1 /* 2 * SPDX-FileCopyrightText: Copyright (c) 2021-2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved. 3 * SPDX-License-Identifier: MIT 4 * 5 * Permission is hereby granted, free of charge, to any person obtaining a 6 * copy of this software and associated documentation files (the "Software"), 7 * to deal in the Software without restriction, including without limitation 8 * the rights to use, copy, modify, merge, publish, distribute, sublicense, 9 * and/or sell copies of the Software, and to permit persons to whom the 10 * Software is furnished to do so, subject to the following conditions: 11 * 12 * The above copyright notice and this permission notice shall be included in 13 * all copies or substantial portions of the Software. 14 * 15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 18 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 20 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 21 * DEALINGS IN THE SOFTWARE. 22 */ 23 24 #pragma once 25 26 #include <nvtypes.h> 27 28 // 29 // This file was generated with FINN, an NVIDIA coding tool. 30 // Source file: ctrl/ctrlc638.finn 31 // 32 33 #include "ctrl/ctrlxxxx.h" 34 /* AMPERE_SMC_EXEC_PARTITION_REF commands and parameters */ 35 36 #define NVC638_CTRL_CMD(cat,idx) NVXXXX_CTRL_CMD(0xC638, NVC638_CTRL_##cat, idx) 37 38 /* Command categories (6bits) */ 39 #define NVC638_CTRL_RESERVED (0x00) 40 #define NVC638_CTRL_EXEC_PARTITION (0x01) 41 42 /*! 43 * NVC638_CTRL_CMD_NULL 44 * 45 * This command does nothing. 46 * This command does not take any parameters. 47 * 48 * Possible status values returned are: 49 * NV_OK 50 */ 51 #define NVC638_CTRL_CMD_NULL (0xc6380000) /* finn: Evaluated from "(FINN_AMPERE_SMC_EXEC_PARTITION_REF_RESERVED_INTERFACE_ID << 8) | 0x0" */ 52 53 /*! 54 * NVC638_CTRL_CMD_GET_UUID 55 * 56 * This command returns SHA1 ASCII UUID string as well as the binary UUID for 57 * the execution partition. The ASCII string format is, 58 * "MIG-%16x-%08x-%08x-%08x-%024x" (the canonical format of a UUID) 59 * 60 * uuid[OUT] 61 * - Raw UUID bytes 62 * 63 * uuidStr[OUT] 64 * - ASCII UUID string 65 * 66 * Possible status return values are: 67 * NV_OK 68 * NV_ERR_NOT_SUPPORTED 69 * NV_ERR_INVALID_STATE 70 */ 71 72 #define NVC638_UUID_LEN 16 73 74 /* 'M' 'I' 'G' '-'(x5), '\0x0', extra = 9 */ 75 #define NVC638_UUID_STR_LEN (0x29) /* finn: Evaluated from "((NVC638_UUID_LEN << 1) + 9)" */ 76 77 78 79 #define NVC638_CTRL_CMD_GET_UUID (0xc6380101) /* finn: Evaluated from "(FINN_AMPERE_SMC_EXEC_PARTITION_REF_EXEC_PARTITION_INTERFACE_ID << 8) | NVC638_CTRL_GET_UUID_PARAMS_MESSAGE_ID" */ 80 81 82 83 #define NVC638_CTRL_GET_UUID_PARAMS_MESSAGE_ID (0x1U) 84 85 typedef struct NVC638_CTRL_GET_UUID_PARAMS { 86 // C form: NvU8 uuid[NVC638_UUID_LEN]; 87 NvU8 uuid[NVC638_UUID_LEN]; 88 89 // C form: char uuidStr[NVC638_UUID_STR_LEN]; 90 char uuidStr[NVC638_UUID_STR_LEN]; 91 } NVC638_CTRL_GET_UUID_PARAMS;// _ctrlc638_h_ 92