mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-22 09:12:24 +03:00
userspace: Enable unit tests on l4t for GA10B
JIRA NVGPU-9909 Change-Id: I4917384b855ebfe6e3c428f0a268ad09a6bfb573 Signed-off-by: srajum <srajum@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2892996 Reviewed-by: svcacv <svcacv@nvidia.com> Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com> Reviewed-by: Sagar Kamble <skamble@nvidia.com> Reviewed-by: Vaibhav Kachore <vkachore@nvidia.com> GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
a9b995bc3f
commit
80a21343a0
@@ -158,11 +158,16 @@ static void nvgpu_posix_load_regs(struct gk20a *g)
|
||||
int err;
|
||||
struct nvgpu_mock_iospace space;
|
||||
struct nvgpu_posix_io_reg_space *regs;
|
||||
FILE *tegra_name;
|
||||
|
||||
char chip[24];
|
||||
|
||||
memset(chip, 0, sizeof(chip));
|
||||
FILE *tegra_name = popen("uname -m", "r");
|
||||
#if defined(__QNX__)
|
||||
tegra_name = popen("uname -m", "r");
|
||||
#else
|
||||
tegra_name = popen("cat /proc/device-tree/compatible | cut -d',' -f 5", "r");
|
||||
#endif
|
||||
|
||||
while (fgets(chip, sizeof(chip), tegra_name) != NULL) {
|
||||
chip[strcspn(chip, "\n")] = '\0';
|
||||
@@ -170,7 +175,7 @@ static void nvgpu_posix_load_regs(struct gk20a *g)
|
||||
pclose(tegra_name);
|
||||
|
||||
for (i = 0; i < MOCK_REGS_LAST; i++) {
|
||||
if (strcmp(chip, "ARMv8_nVidia-Orin") == 0) {
|
||||
if ((strcmp(chip, "ARMv8_nVidia-Orin") == 0) || (strcmp(chip, "tegra23x") == 0)) {
|
||||
err = nvgpu_get_mock_reglist_ga10b(g, i, &space);
|
||||
} else {
|
||||
err = nvgpu_get_mock_reglist_gv11b(g, i, &space);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright (c) 2019, NVIDIA CORPORATION. All Rights Reserved.
|
||||
# Copyright (c) 2019-2023, NVIDIA CORPORATION. All Rights Reserved.
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a
|
||||
# copy of this software and associated documentation files (the "Software"),
|
||||
@@ -31,18 +31,48 @@ options=$(getopt -o t: --long test-level: -- "$@")
|
||||
this_script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" > /dev/null && pwd )"
|
||||
pushd $this_script_dir
|
||||
|
||||
FIRMWARES=("/gpu-firmware-private/t19x/gr/net/safety/NETD_img.bin"
|
||||
"/gpu-firmware-private/t19x/gr/net/safety/fecs_sig.bin"
|
||||
"/gpu-firmware-private/t19x/gr/net/safety/gpccs_sig.bin"
|
||||
"/gpu-firmware-private/t19x/gr/fecs/safety/fecs.bin"
|
||||
"/gpu-firmware-private/t19x/gr/gpccs/safety/gpccs.bin"
|
||||
"/gpu-firmware-private/t19x/gr/pmu/safety/acr_ucode_prod.bin"
|
||||
"/gpu-firmware-private/t19x/gr/pmu/safety/acr_ucode_dbg.bin")
|
||||
tegra_platform=`cat /proc/device-tree/model`
|
||||
|
||||
FIRMWARE_TARGET_PATH="/lib/firmware/gv11b/"
|
||||
if [ -d /sys/devices/platform/17000000.ga10b ] && [ "$tegra_platform" != "t234pre_si" ];
|
||||
then
|
||||
FIRMWARES=("/gpu-firmware-private/t23x/gr/net/fecs_pkc_sig_encrypt.bin"
|
||||
"/gpu-firmwa0re-private/t23x/gr/net/gpccs_pkc_sig_encrypt.bin"
|
||||
"/gpu-firmware-private/t23x/gr/fecs/fecs_encrypt_dbg.bin"
|
||||
"/gpu-firmware-private/t23x/gr/fecs/fecs_encrypt_prod.bin"
|
||||
"/gpu-firmware-private/t23x/gr/gpccs/gpccs_encrypt_dbg.bin"
|
||||
"/gpu-firmware-private/t23x/gr/gpccs/gpccs_encrypt_prod.bin"
|
||||
"/gpu-firmware-private/t23x/gr/net/NETC_img_debug_encrypted.bin"
|
||||
"/gpu-firmware-private/t23x/gr/net/NETC_img_prod_encrypted.bin"
|
||||
"/gpu-firmware-private/t23x/gr/gsp/riscv/acr-gsp.data.encrypt.bin"
|
||||
"/gpu-firmware-private/t23x/gr/gsp/riscv/acr-gsp.manifest.encrypt.bin.out.bin"
|
||||
"/gpu-firmware-private/t23x/gr/gsp/riscv/acr-gsp.text.encrypt.bin"
|
||||
"/gpu-firmware-private/t23x/gr/gsp/riscv/acr-gsp.data.encrypt.bin.prod"
|
||||
"/gpu-firmware-private/t23x/gr/gsp/riscv/acr-gsp.manifest.encrypt.bin.out.bin.prod"
|
||||
"/gpu-firmware-private/t23x/gr/gsp/riscv/acr-gsp.text.encrypt.bin.prod"
|
||||
"/gpu-firmware-private/t23x/gr/gsp/riscv/safety-scheduler.data.encrypt.bin"
|
||||
"/gpu-firmware-private/t23x/gr/gsp/riscv/safety-scheduler.manifest.encrypt.bin.out.bin"
|
||||
"/gpu-firmware-private/t23x/gr/gsp/riscv/safety-scheduler.text.encrypt.bin"
|
||||
"/gpu-firmware-private/t23x/gr/gsp/riscv/safety-scheduler.data.encrypt.bin.prod"
|
||||
"/gpu-firmware-private/t23x/gr/gsp/riscv/safety-scheduler.manifest.encrypt.bin.out.bin.prod"
|
||||
"/gpu-firmware-private/t23x/gr/gsp/riscv/safety-scheduler.text.encrypt.bin.prod")
|
||||
|
||||
FIRMWARE_TARGET_PATH="/lib/firmware/ga10b/"
|
||||
CUR_DIR=`pwd`
|
||||
DEST_DIR=${CUR_DIR}/firmware/ga10b/
|
||||
else
|
||||
FIRMWARES=("/gpu-firmware-private/t23x/gr/net/NETC_img.bin"
|
||||
"/gpu-firmware-private/t23x/gr/net/fecs_sig.bin"
|
||||
"/gpu-firmware-private/t23x/gr/net/gpccs_sig.bin"
|
||||
"/gpu-firmware-private/t23x/gr/fecs/fecs.bin"
|
||||
"/gpu-firmware-private/t23x/gr/gpccs/gpccs.bin"
|
||||
"/gpu-firmware-private/t23x/gr/pmu/acr_ucode_prod.bin"
|
||||
"/gpu-firmware-private/t23x/gr/pmu/acr_ucode_dbg.bin")
|
||||
|
||||
FIRMWARE_TARGET_PATH="/lib/firmware/gv11b/"
|
||||
CUR_DIR=`pwd`
|
||||
DEST_DIR=${CUR_DIR}/firmware/gv11b/
|
||||
fi
|
||||
|
||||
CUR_DIR=`pwd`
|
||||
DEST_DIR=${CUR_DIR}/firmware/gv11b/
|
||||
mkdir -p ${DEST_DIR}
|
||||
|
||||
if [ -f nvgpu_unit ]; then
|
||||
@@ -59,6 +89,17 @@ if [ -f nvgpu_unit ]; then
|
||||
LD_LIBRARY_PATH=".:units/igpu"
|
||||
cores=$(cat /proc/cpuinfo |grep processor |wc -l)
|
||||
|
||||
if [ -d /sys/devices/platform/17000000.ga10b ] && [ "$tegra_platform" != "t234pre_si" ];
|
||||
then
|
||||
rm -rf units/igpu/libnvgpu-fifo*
|
||||
rm -rf units/igpu/libnvgpu-gr-falcon.so
|
||||
rm -rf units/igpu/libnvgpu-gr-intr.so
|
||||
rm -rf units/igpu/libnvgpu-gr-init.so
|
||||
rm -rf units/igpu/libmc.so
|
||||
rm -rf units/igpu/libnvgpu-gr-config.so
|
||||
rm -rf units/igpu/libnvgpu-gr-setup.so
|
||||
fi
|
||||
|
||||
# Ignore number of cores for now; it seems that the parallel unit
|
||||
# tests are just too buggy and that they really don't save much
|
||||
# actual computing time.
|
||||
|
||||
Reference in New Issue
Block a user