parent
f880082352
commit
2e8dd875de
|
@ -7,4 +7,5 @@ echo "$SCRIPT_NAME: ${BIN_FILE}"
|
|||
|
||||
# search:openblt_version
|
||||
# set ascii 'BL01' into third reserved DWORD of vector table
|
||||
# please update BLT_CURRENT_VERSION in C++ when updating here until we improve and make it single source of truth
|
||||
printf '\x42\x4c\x30\x31' | dd of=${BIN_FILE} bs=1 seek=$((0x24)) count=4 conv=notrunc
|
||||
|
|
|
@ -262,9 +262,8 @@ void initializeConsole() {
|
|||
addConsoleAction("hello", sayHello);
|
||||
#if EFI_USE_OPENBLT
|
||||
addConsoleAction("show_blt_version", [](){
|
||||
#define BLT_BIN_VERSION_ADDR ((uint32_t)0x08000024U) /*! 3rd reserved DWORD in vector table search:openblt_version */
|
||||
uint32_t bltBinVersion = ((uint32_t *)BLT_BIN_VERSION_ADDR)[0];
|
||||
efiPrintf("********************** blt=%lx", bltBinVersion);
|
||||
uint32_t bltBinVersion = getOpenBltVersion();
|
||||
efiPrintf("********************** blt=%lx %s version", bltBinVersion, bltBinVersion == BLT_CURRENT_VERSION ? "CURRENT" : "UNEXPECTED");
|
||||
});
|
||||
#endif
|
||||
#if EFI_HAS_RESET
|
||||
|
|
|
@ -128,3 +128,12 @@ void HardFaultVector(void);
|
|||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
// search:openblt_version
|
||||
// ascii 'BL01' in reverse LBS byte order
|
||||
#define BLT_CURRENT_VERSION 0x31304C42
|
||||
#define BLT_BIN_VERSION_ADDR ((uint32_t)0x08000024U) /*! 3rd reserved DWORD in vector table search:openblt_version */
|
||||
|
||||
#if EFI_USE_OPENBLT
|
||||
#define getOpenBltVersion() (((uint32_t *)BLT_BIN_VERSION_ADDR)[0])
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue