Martin Roth | 6b303d5 | 2020-06-03 16:03:21 -0600 | [diff] [blame] | 1 | /***************************************************************************** |
| 2 | * |
Martin Roth | fdcbae0 | 2020-10-01 15:39:42 -0600 | [diff] [blame] | 3 | * Copyright (c) 2020, Advanced Micro Devices, Inc. |
Martin Roth | 6b303d5 | 2020-06-03 16:03:21 -0600 | [diff] [blame] | 4 | * All rights reserved. |
| 5 | * |
| 6 | * Redistribution and use in source and binary forms, with or without |
| 7 | * modification, are permitted provided that the following conditions are met: |
| 8 | * * Redistributions of source code must retain the above copyright |
| 9 | * notice, this list of conditions and the following disclaimer. |
| 10 | * * Redistributions in binary form must reproduce the above copyright |
| 11 | * notice, this list of conditions and the following disclaimer in the |
| 12 | * documentation and/or other materials provided with the distribution. |
| 13 | * * Neither the name of Advanced Micro Devices, Inc. nor the names of |
| 14 | * its contributors may be used to endorse or promote products derived |
| 15 | * from this software without specific prior written permission. |
| 16 | * |
| 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND |
| 18 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
| 19 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
| 20 | * DISCLAIMED. IN NO EVENT SHALL ADVANCED MICRO DEVICES, INC. BE LIABLE FOR ANY |
| 21 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
| 22 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
| 23 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
| 24 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 25 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
| 26 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 27 | * |
| 28 | *******************************************************************************/ |
| 29 | |
| 30 | #ifndef BL_ERRORCODES_PUBLIC_H |
| 31 | #define BL_ERRORCODES_PUBLIC_H |
| 32 | |
Martin Roth | fdcbae0 | 2020-10-01 15:39:42 -0600 | [diff] [blame] | 33 | /* Bootloader Return Codes, Error only (0x00 through 0x9F) */ |
| 34 | #define BL_OK 0x00 // General - Success |
| 35 | #define BL_ERR_GENERIC 0x01 // Generic Error Code |
| 36 | #define BL_ERR_MEMORY 0x02 // Generic Memory Error |
| 37 | #define BL_ERR_BUFFER_OVERFLOW 0x03 // Buffer Overflow |
| 38 | #define BL_ERR_INVALID_PARAMETER 0x04 // Invalid Parameter(s) |
| 39 | #define BL_ERR_DATA_ALIGNMENT 0x06 // Data Alignment Error |
| 40 | #define BL_ERR_NULL_PTR 0x07 // Null Pointer Error |
| 41 | #define BL_ERR_INVALID_ADDRESS 0x0A // Invalid Address |
| 42 | #define BL_ERR_OUT_OF_RESOURCES 0x0B // Out of Resource Error |
| 43 | #define BL_ERR_DATA_ABORT 0x0D // Data Abort exception |
| 44 | #define BL_ERR_PREFETCH_ABORT 0x0E // Prefetch Abort exception |
| 45 | #define BL_ERR_GET_FW_HEADER 0x13 // Failure in retrieving firmware |
| 46 | // header |
| 47 | #define BL_ERR_KEY_SIZE 0x14 // Key size not supported |
| 48 | #define BL_ERR_ENTRY_NOT_FOUND 0x15 // Entry not found at requested |
| 49 | // location |
| 50 | #define BL_ERR_UNSUPPORTED_PLATFORM 0x16 // Error when feature is not enabled |
| 51 | // on a given platform. |
| 52 | #define BL_ERR_FWVALIDATION 0x18 // Generic FW Validation error |
| 53 | #define BL_ERR_CCP_RSA 0x19 // RSA operation fail - bootloader |
| 54 | #define BL_ERR_CCP_PASSTHR 0x1A // CCP Passthrough operation failed |
| 55 | #define BL_ERR_CCP_AES 0x1B // AES operation failed |
| 56 | #define BL_ERR_SHA 0x1E // SHA256/SHA384 operation failed |
| 57 | #define BL_ERR_ZLIB 0x1F // ZLib Decompression operation fail |
| 58 | #define BL_ERR_DIR_ENTRY_NOT_FOUND 0x22 // PSP directory entry not found |
| 59 | #define BL_ERR_SYSHUBMAP_FAILED 0x3A // Unable to map a SYSHUB address to |
| 60 | // AXI space |
| 61 | #define BL_ERR_UAPP_PSP_HEADER_NOT_MATCH 0x7A // PSP level directory from OEM user- |
| 62 | // app does not match expected value. |
| 63 | #define BL_ERR_UAPP_BIOS_HEADER_NOT_MATCH 0x7B // BIOS level directory from OEM |
| 64 | // user-app not match expected value. |
| 65 | #define BL_ERR_UAPP_PSP_DIR_OFFSET_NOT_SET 0x7C // PSP Directory offset is not set |
| 66 | // by OEM user-app. |
| 67 | #define BL_ERR_UAPP_BIOS_DIR_OFFSET_NOT_SET 0x7D // BIOS Directory offset is not set |
| 68 | // by OEM user-app. |
| 69 | #define BL_ERR_POSTCODE_MAX_VALUE 0x9F // The maximum allowable error post |
Martin Roth | 6b303d5 | 2020-06-03 16:03:21 -0600 | [diff] [blame] | 70 | |
Martin Roth | fdcbae0 | 2020-10-01 15:39:42 -0600 | [diff] [blame] | 71 | /* Bootloader Return Codes, Success only (0xA0 through 0xFF) */ |
| 72 | #define BL_SUCCESS_USERMODE_OEM_APP 0xF7 // Updated only PSPFW Status when OEM |
| 73 | // PSP BL user app returns success. |
| 74 | #define BL_SUCCESS_PSP_BIOS_DIRECTORY_UPDATE 0xF8 // PSP and BIOS directories are loaded |
| 75 | // into SRAM from the offset provided |
| 76 | // by OEM user app. |
| 77 | |
| 78 | #define BL_SUCCESS_LAST_CODE 0xFF // Bootloader sequence finished |
| 79 | |
| 80 | #endif /* BL_ERRORCODES_PUBLIC_H */ |