diff options
author | Jörg Frings-Fürst <debian@jff.email> | 2023-03-15 20:36:27 +0100 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff.email> | 2023-03-15 20:36:27 +0100 |
commit | d602f4fb516292c297072bd924289eea37b45fa2 (patch) | |
tree | 7c30ed558709e44b7a9cbb6b9558b744c880a796 /util/mem_if.c | |
parent | 19b878add9337a1328f974d685c1b236e126e91a (diff) |
New upstream version 3.1.9upstream/3.1.9upstream
Diffstat (limited to 'util/mem_if.c')
-rw-r--r-- | util/mem_if.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/util/mem_if.c b/util/mem_if.c index 3fcc139..c7ca677 100644 --- a/util/mem_if.c +++ b/util/mem_if.c @@ -8,6 +8,7 @@ * 02/26/08 ARCress - decode type 15 log structure * 07/21/08 ARCress - fixed for 64-bit memory model * 08/12/08 ARCress - trim out extra stuff, consolidated + * 01/09/23 ARCress - try UEFI_MEM_RANGE_BASE 0x6d5a7000 if error *----------------------------------------------------------------------*/ /*----------------------------------------------------------------------* The BSD License @@ -74,6 +75,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #endif #define DOS_MEM_RANGE_BASE 0xF0000 //starting memory range for smbios tables +#define UEFI_MEM_RANGE_BASE 0x6d5a7000 //starting memory range for UEFI tables #define DOS_NUM_BYTES_TO_MAP 0x0FFFE //number bytes to map for smbios tables //smbios defines @@ -416,8 +418,13 @@ int getSmBiosTables(UCHAR **ptableAddress) * unless in debug mode. */ if (fsm_debug) #endif - fprintf(stderr, "Cannot map memory.\n"); - return ulSmBiosLen; /*==0*/ + fprintf(stderr, "Cannot map SMBIOS memory.\n"); + /* Try UEFI address */ + tdStartAddress = UEFI_MEM_RANGE_BASE; + if (!MapPhysicalMemory(tdStartAddress,ulSize,&tdVirtualAddress)) { + fprintf(stderr, "Cannot map UEFI SMBIOS memory.\n"); + return ulSmBiosLen; /*==0*/ + } } //now find the entry point for smbios |