From 451797a6d507d4d9c06c5a03898efc98774fdf51 Mon Sep 17 00:00:00 2001 From: Prateek sethi Date: Tue, 3 Mar 2020 12:29:30 +0530 Subject: [PATCH] gpu: nvgpu: move userspace firmware files to gv11b qnx unit test access ucode from /proc/boot/gv11b. QNX Unit test face issues like permission, platform dependency etc when test tries to access ucode from /proc/boot. To fix issue updating qnx firmware unit to read ucode from firmware/gv11b in case of unit test. Patch also updates firmware access path for posix as well. Jira NVGPU-3582 Bug 2693908 Change-Id: I1b28c8475b6bc4fe5ec3d6a525cb3af152feb887 Signed-off-by: Prateek sethi Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2306278 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Sagar Kamble Reviewed-by: Nicolas Benech Reviewed-by: Dinesh T Reviewed-by: Vaibhav Kachore Reviewed-by: mobile promotions GVS: Gerrit_Virtual_Submit Tested-by: mobile promotions --- drivers/gpu/nvgpu/os/posix/firmware.c | 4 ++-- userspace/Makefile.tmk | 2 +- userspace/install-unit.sh | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/nvgpu/os/posix/firmware.c b/drivers/gpu/nvgpu/os/posix/firmware.c index 3e97038d3..87c5d1bcc 100644 --- a/drivers/gpu/nvgpu/os/posix/firmware.c +++ b/drivers/gpu/nvgpu/os/posix/firmware.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2018-2020, 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"), @@ -30,7 +30,7 @@ #include #define FW_MAX_PATH_SIZE 2048U -#define NVGPU_UNITTEST_UCODE_PATH "/firmware/" +#define NVGPU_UNITTEST_UCODE_PATH "/firmware/gv11b/" static int nvgpu_ucode_load(struct gk20a *g, const char *path, struct nvgpu_firmware *ucode) diff --git a/userspace/Makefile.tmk b/userspace/Makefile.tmk index 264edcc82..b718b3511 100644 --- a/userspace/Makefile.tmk +++ b/userspace/Makefile.tmk @@ -71,7 +71,7 @@ NV_ACR_UCODE_PROD_IMG=acr_ucode_prod.bin NV_ACR_UCODE_DBG_IMG=acr_ucode_dbg.bin NV_PMU_BL_IMG=pmu_bl.bin NV_COMPONENT_SYSTEMIMAGE_DIR := $(NV_SYSTEMIMAGE_TEST_EXECUTABLE_DIR)/nvgpu_unit -NV_UNIT_REQ_FIRMWARE_DIR := $(NV_COMPONENT_SYSTEMIMAGE_DIR)/firmware +NV_UNIT_REQ_FIRMWARE_DIR := $(NV_COMPONENT_SYSTEMIMAGE_DIR)/firmware/gv11b systemimage:: $(NV_COMPONENT_SYSTEMIMAGE_DIR) $(NV_COMPONENT_SYSTEMIMAGE_DIR)/$(NV_UNIT_SH) \ $(NV_SYSTEMIMAGE_TEST_EXECUTABLE_DIR)/$(NV_SUBMIT_UNIT_SH) \ $(NV_COMPONENT_SYSTEMIMAGE_DIR)/$(NV_TESTLIST_PY) \ diff --git a/userspace/install-unit.sh b/userspace/install-unit.sh index ff24150b8..928646da7 100755 --- a/userspace/install-unit.sh +++ b/userspace/install-unit.sh @@ -1,6 +1,6 @@ #!/bin/bash # -# Copyright (c) 2019, NVIDIA CORPORATION. All Rights Reserved. +# Copyright (c) 2019-2020, 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"), @@ -103,7 +103,7 @@ fi # Building the necessary directory structure. It may not be present # first time this is run. ssh $target mkdir -p nvgpu_unit/units -ssh $target mkdir -p nvgpu_unit/firmware +ssh $target mkdir -p nvgpu_unit/firmware/gv11b ssh $target mkdir -p $TOP/kernel if [ $? != 0 ]; then echo @@ -122,7 +122,7 @@ jcp $TOP/kernel/nvgpu/userspace/gcov.sh nvgpu_unit/gcov.sh jcp $TOP/kernel/nvgpu/userspace/testlist.py nvgpu_unit/testlist.py jcp $TOP/kernel/nvgpu/userspace/required_tests.json \ nvgpu_unit/required_tests.json -jcp $TOP/kernel/nvgpu/userspace/firmware/ nvgpu_unit/firmware/ +jcp $TOP/kernel/nvgpu/userspace/firmware/ nvgpu_unit/firmware/gv11b/ find $nvgpu_bins/userspace/units -name "*.so" -not -path "*unit.so" \ -not -path "*drv.so" -exec du -b {} \; | sort -n | while read size unit_so ; do