From d602f4fb516292c297072bd924289eea37b45fa2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Wed, 15 Mar 2023 20:36:27 +0100 Subject: New upstream version 3.1.9 --- util/mem_if.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'util/mem_if.c') 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 -- cgit v1.2.3