DMI table address question

DMI table address question

Post by Paul Johnso » Wed, 10 Jan 2001 14:53:12



I'm trying to write a DMI viewer and am having problems using the
structure table address (18h of SMBIOS entry point table).

The variable is a dword containing a 32 bit address to the first SMBIOS
structure. I believe its a protected mode address. I need to convet it
to a real mode address. In bios memory (viewed with a hex editor) the
value is 00 08 0F 00, equaling 000F0800h. I found the first SMBIOS
structure to be at F000:0800. I found several documents saying that to
convert a protected mode address to segment:offset you divide address by
16 to obtain the segment and address mod 16 to get the offset. But

seg = 000F0800h / 16 = F080h
off = 000F0800h % 16 = 0000h

Am I doing something wrong? How do I properly interprete and translate
this address?

Sent via Deja.com
http://www.deja.com/

 
 
 

DMI table address question

Post by Ralf Quin » Thu, 11 Jan 2001 04:27:15




Quote:>I'm trying to write a DMI viewer and am having problems using the
>structure table address (18h of SMBIOS entry point table).

>The variable is a dword containing a 32 bit address to the first SMBIOS
>structure. I believe its a protected mode address. I need to convet it
>to a real mode address. In bios memory (viewed with a hex editor) the
>value is 00 08 0F 00, equaling 000F0800h. I found the first SMBIOS
>structure to be at F000:0800. I found several documents saying that to
>convert a protected mode address to segment:offset you divide address by
>16 to obtain the segment and address mod 16 to get the offset. But

>seg = 000F0800h / 16 = F080h
>off = 000F0800h % 16 = 0000h

>Am I doing something wrong? How do I properly interprete and translate
>this address?

No, you are not doing something wrong. Everything is ok. Maybe if you
would use 10h instead of the decimal value 16 it would be a bit more
obvious.

Seg = 000F0800h / 10h = 0000F080h
Off  = 000F0800h % 10h = 00000000h

A segment can start at any paragraph boundary (16d/10h bytes), so you
can have several representations for the same physical address.
F000:0800 and F080:0000 are the same!

 
 
 

DMI table address question

Post by Nightmare Lor » Thu, 18 Jan 2001 02:30:04





> >I'm trying to write a DMI viewer and am having problems using the
> >structure table address (18h of SMBIOS entry point table).

> >The variable is a dword containing a 32 bit address to the first SMBIOS
> >structure. I believe its a protected mode address. I need to convet it
> >to a real mode address. In bios memory (viewed with a hex editor) the
> >value is 00 08 0F 00, equaling 000F0800h. I found the first SMBIOS
> >structure to be at F000:0800. I found several documents saying that to
> >convert a protected mode address to segment:offset you divide address by
> >16 to obtain the segment and address mod 16 to get the offset. But

> >seg = 000F0800h / 16 = F080h
> >off = 000F0800h % 16 = 0000h

> >Am I doing something wrong? How do I properly interprete and translate
> >this address?

> No, you are not doing something wrong. Everything is ok. Maybe if you
> would use 10h instead of the decimal value 16 it would be a bit more
> obvious.

> Seg = 000F0800h / 10h = 0000F080h
> Off  = 000F0800h % 10h = 00000000h

> A segment can start at any paragraph boundary (16d/10h bytes), so you
> can have several representations for the same physical address.
> F000:0800 and F080:0000 are the same!

True, but u can do the same, but faster by using this:

Seg = 0x000F0800 >> 8;
Off = 0x000F0800 &  0xff;

--
Posted via CNET Help.com
http://www.help.com/

 
 
 

DMI table address question

Post by Ralf Quin » Thu, 18 Jan 2001 06:16:51


On Tue, 16 Jan 2001 17:30:04 -0000, Nightmare Lord





>> >I'm trying to write a DMI viewer and am having problems using the
>> >structure table address (18h of SMBIOS entry point table).

>> >The variable is a dword containing a 32 bit address to the first SMBIOS
>> >structure. I believe its a protected mode address. I need to convet it
>> >to a real mode address. In bios memory (viewed with a hex editor) the
>> >value is 00 08 0F 00, equaling 000F0800h. I found the first SMBIOS
>> >structure to be at F000:0800. I found several documents saying that to
>> >convert a protected mode address to segment:offset you divide address by
>> >16 to obtain the segment and address mod 16 to get the offset. But

>> >seg = 000F0800h / 16 = F080h
>> >off = 000F0800h % 16 = 0000h

>> >Am I doing something wrong? How do I properly interprete and translate
>> >this address?

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

- Show quoted text -

Quote:

>> No, you are not doing something wrong. Everything is ok. Maybe if you
>> would use 10h instead of the decimal value 16 it would be a bit more
>> obvious.

>> Seg = 000F0800h / 10h = 0000F080h
>> Off  = 000F0800h % 10h = 00000000h

>> A segment can start at any paragraph boundary (16d/10h bytes), so you
>> can have several representations for the same physical address.
>> F000:0800 and F080:0000 are the same!

>True, but u can do the same, but faster by using this:

>Seg = 0x000F0800 >> 8;
>Off = 0x000F0800 &  0xff;

Well, there was no question about a faster solution, rather
understanding the segment:offset value for a specific function, and
for this my explanation above was explicitly used this way.....
 
 
 

1. Reading BIOS tables for COM port addresses & detecting IRQs

I'm writing a serial comms library ad part of it involves some routines to
auto-detect where the COM ports are.
I have 2 questions regarding this:

1. Part of the routine looks at address 0040:0000 thru 0040:0006 to get the
addresses where the BIOS thinks the com ports are.
I know I can get COM1-COM4 from here, but does the BIOS check for higher
COM's (like COM5-COM8)?

2. I have some IRQ detection routines which work by unmasking all
interrupts on the PIC (after a CLI of course =), then enabling and
disabling Transmit Hold Register Empty from the interrupt enable register
on the UART and viewing the results on the interrupt request register on
the PIC.
The problem is that if I try running this code in a dosbox under w95 (I
know, I probably won't ever use them in a w95 dosbox, but that's how I'm
testing my code), w95 seems to take over the PIC, and the IRR of the PIC
always reads 0x00.
I know it works fine when w95 is out of the picture.

Is there another way to auto-detect IRQs (like somthing in the BIOS
tables)?  Or is there something special I have to do to get this to work in
a w95 dos box?

To respond via email, take the SPAMXYZ off.

2. Help Finding CD-KEY in Registry?

3. PnP (DMI) Function

4. NT 4.0 and Netware

5. DOS DMI SDK (v1.0 or v1.1)... does anyone know where to obtain it?

6. Learn about how hackers break in!

7. verifying DMI-Pool-Data

8. DNS Problem

9. Partition table question

10. A question on using the Interrupt Vector table

11. 32-Bit Assembler Interrupt Vector Table Question

12. Obtaining the absolute (physical) address from a protected mode address

13. linear address to seg:off address