delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2002/12/17/03:08:16

From: "Nigel Harwood" <nharwood AT bigpond DOT com>
To: <djgpp AT delorie DOT com>
Subject: Accessing SMBIOS memory above 1 MB
Date: Tue, 17 Dec 2002 19:03:28 +1100
Message-ID: <BLEIKKOJPIJGGPFINPJHIEFGCAAA.nharwood@bigpond.com>
MIME-Version: 1.0
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0)
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
Importance: Normal
Reply-To: djgpp AT delorie DOT com

Folks,

I wrote a program to return useful information from a systems SMBIOS under
Windows NT and this works for computers that have this memory mapped below
1MB but silently fails on the first _farpeekb() when this memory is mapped
above 1 MB.

I am running the program under Windows NT 4.0.

As far I know I am doing these accesses correctly as have always worked fine
for other computer models.  I've re-read the FAQ and can't see anything else
to consider.  I've scanned the web but found nothing relevant.  I've
searched the mailing list archive and found one similar question but no
answer.

I'm hoping that this mailing list will provide the answer.

The approach I am using is:

   unsigned char c;
   unsigned short smbios_selector;
   __dpmi_meminfo meminfo;

   meminfo.size = smbios_entry_point.structure_table_length;
   meminfo.address = smbios_entry_point.structure_table_address;  // address
is 0xFEEF800

   __dpmi_physical_address_mapping(&meminfo);
   smbios_selector = __dpmi_allocate_ldt_descriptors(1);
   __dpmi_set_segment_base_address(smbios_selector,meminfo.address);
   __dpmi_set_segment_limit(smbios_selector,meminfo.size-1);

    c = _farpeekb(smbios_selector,0);  // first byte of SMBIOS memory

Using debug statements I can confirm that the program fails at the
_farpeekb().  Absolutely no error message appears it just comes back to the
command prompt.

Any help greatly appreciated.

Regards
        Nigel


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019