Files
linux-nvgpu/userspace/units/fuse/nvgpu-fuse-gp10b.h
Philip Elcan de9cb99b02 gpu: nvgpu: unit: add SWUTS docs for fuse test
This adds the SWUTS documentation for the fuse unit test.
Also, the gm20b header had declared some undefined tests, so those are
removed.

JIRA NVGPU-3943

Change-Id: I7530471df30ed95007f820c875b6cb55486e1777
Signed-off-by: Philip Elcan <pelcan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2194568
Reviewed-by: Thomas Fleury <tfleury@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Alex Waterman <alexw@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2020-12-15 14:05:52 -06:00

171 lines
5.4 KiB
C

/*
* Copyright (c) 2018-2019, 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"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*/
#ifndef __UNIT_NVGPU_FUSE_GP10B_H__
#define __UNIT_NVGPU_FUSE_GP10B_H__
struct gk20a;
struct unit_module;
/** @addtogroup SWUTS-fuse
* @{
*/
extern struct fuse_test_args gp10b_init_args;
/**
* Test specification for: test_fuse_gp10b_check_sec
*
* Description: Verify fuse API check_priv_security() when security fuse is
* enabled.
*
* Test Type: Feature based
*
* Input: test_fuse_device_common_init() must be called for this GPU.
*
* Steps:
* - Setup the security regs appropriately.
* - Call the fuse API check_priv_security().
* - Verify Security flags are enabled/disabled correctly.
*
* Output: Returns SUCCESS if the steps above were executed successfully. FAIL
* otherwise.
*/
int test_fuse_gp10b_check_sec(struct unit_module *m,
struct gk20a *g, void *__args);
/**
* Test specification for: test_fuse_gp10b_check_gcplex_fail
*
* Description: Verify fuse API check_priv_security() handles an error from
* reading gcplex.
*
* Test Type: Feature based
*
* Input: test_fuse_device_common_init() must be called for this GPU.
*
* Steps:
* - Override HAL for reading gcplex so it returns an error.
* - Call the fuse API check_priv_security(), which will read gcplex, and verify
* an error is returned.
*
* Output: Returns SUCCESS if the steps above were executed successfully. FAIL
* otherwise.
*/
int test_fuse_gp10b_check_gcplex_fail(struct unit_module *m,
struct gk20a *g, void *__args);
/**
* Test specification for: test_fuse_gp10b_check_sec_invalid_gcplex
*
* Description: Verify fuse API check_priv_security() handles invalid gcplex
* configurations of WPR and VPR bits.
*
* Test Type: Feature based
*
* Input: test_fuse_device_common_init() must be called for this GPU.
*
* Steps:
* - Override HAL for reading gcplex so the WPR/VPR configuration can be
* overwritten.
* - Enable Security fuse.
* - Write an invalid WPR/VPR configuration into the gcplex override by using
* the overridden HAL.
* - Call the fuse API check_priv_security() and verify an error is returned.
* - Repeat the previous 2 steps for all invalid combinations of WPR/VPR
* configurations.
*
* Output: Returns SUCCESS if the steps above were executed successfully. FAIL
* otherwise.
*/
int test_fuse_gp10b_check_sec_invalid_gcplex(struct unit_module *m,
struct gk20a *g, void *__args);
/**
* Test specification for: test_fuse_gp10b_check_non_sec
*
* Description: Verify fuse API check_priv_security() when security fuse is
* disabled.
*
* Test Type: Feature based
*
* Input: test_fuse_device_common_init() must be called for this GPU.
*
* Steps:
* - Disable Security fuse.
* - Call the fuse API check_priv_security().
* - Verify correct security flags are disabled.
*
* Output: Returns SUCCESS if the steps above were executed successfully. FAIL
* otherwise.
*/
int test_fuse_gp10b_check_non_sec(struct unit_module *m,
struct gk20a *g, void *__args);
/**
* Test specification for: test_fuse_gp10b_ecc
*
* Description: Verify fuse reports ECC enable correctly.
*
* Test Type: Feature based
*
* Input: test_fuse_device_common_init() must be called for this GPU.
*
* Steps:
* - Disable ECC fuse.
* - Verify API is_opt_ecc_enable() returns false.
* - Enable ECC fuse.
* - Verify API is_opt_ecc_enable() returns true.
*
* Output: Returns SUCCESS if the steps above were executed successfully. FAIL
* otherwise.
*/
int test_fuse_gp10b_ecc(struct unit_module *m,
struct gk20a *g, void *__args);
/**
* Test specification for: test_fuse_gp10b_feature_override_disable
*
* Description: Verify fuse reports Feature Override enable correctly.
*
* Test Type: Feature based
*
* Input: test_fuse_device_common_init() must be called for this GPU.
*
* Steps:
* - Disable Feature Override fuse.
* - Verify API is_opt_feature_override_disable() returns false.
* - Enable Feature Override fuse.
* - Verify API is_opt_feature_override_disable() returns true.
*
* Output: Returns SUCCESS if the steps above were executed successfully. FAIL
* otherwise.
*/
int test_fuse_gp10b_feature_override_disable(struct unit_module *m,
struct gk20a *g, void *__args);
#ifdef CONFIG_NVGPU_SIM
int test_fuse_gp10b_check_fmodel(struct unit_module *m,
struct gk20a *g, void *__args);
#endif
#endif /* __UNIT_NVGPU_FUSE_GP10B_H__ */