diff options
author | Jörg Frings-Fürst <debian@jff.email> | 2023-03-15 20:36:50 +0100 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff.email> | 2023-03-15 20:36:50 +0100 |
commit | 6e29eaaca0743e63ff367e128a35abd303000f29 (patch) | |
tree | fb7a5856b53fb2fa195793efc7f8c38d185b9f42 /util/mem_if.c | |
parent | 899cb94807a04dcd6e8b045c7d901d2852273345 (diff) | |
parent | 5eca20c9805ec489c6860c793ee66e82b79836d1 (diff) |
Merge branch 'feature/upstream' into develop
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 |