x86 programming question

Thomas Bocek draft at icu.unizh.ch
Thu Aug 23 20:20:29 UTC 2001


Erwin Rol wrote:

>On 23 Aug 2001 13:19:54 -0500, Joel Sherrill wrote:
>
>>Hi,
>>
>>On the pc386 BSP, can I make a BIOS int call from protected mode
>>(easily).  If not, I want to make a bios call in the start16.S code,
>>store the result and use it later.  This is simply a call to return
>>the size of memory.  Advice appreciated. :)
>>
>
>AFAIK it is done via a int 0x?? and passes the parameters in registers
>and the resulets too. A look at the lilo code or the linux kernel start
>code might give you some hints.
>
>- Erwin
>

I  looked at the linux startup code (arch/i386/boot/bsetup.s): there are 
3 different methods to detect memory. All methods are running in real 
mode. It must be in start16.S.

The old traditional methode (ah=0x88 int 0x15 -> mem in ax in kb) is 
only up to 64MB.
It is better to use the "alternative new detection scheme". (ax=0xe801 
int 0x15 -> mem in ax/bx).
And there is a sample code for the 3. methode at
http://www.teleport.com/~acpi/acpihtml/topic249.htm

But how to store the memory size for using later?

Thomas Bocek





More information about the users mailing list