summaryrefslogtreecommitdiff
path: root/util/mem_if.c
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff.email>2023-06-19 22:51:54 +0200
committerJörg Frings-Fürst <debian@jff.email>2023-06-19 22:51:54 +0200
commita75ccaa9a52b79788eea5fccfe6c3fc3dfc5a81d (patch)
treefd9e7b4ead2ca237d5836c1ccceaf336310b39dc /util/mem_if.c
parente33cb500a5cefab12062415dd12b6192b59e5ae5 (diff)
parent06b8b4b51519bfcf8d210eb199e2eab09e0c6a64 (diff)
Merge branch 'release/debian/3.1.9-1'debian/3.1.9-1
Diffstat (limited to 'util/mem_if.c')
-rw-r--r--util/mem_if.c11
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