Home > Archive > alt.os.linux > October 2002 > Linux memory map - startup question





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Linux memory map - startup question
wb

2002-09-24, 7:29 pm

Hi,

I've poked around http://www.tldp.org/ ( Linux Documentation )
and still haven't found a paper that describes a typical Intel
Linux memory map. - Ie 2.4.xx kernels .

For example : I'd like to know:

1. Where does lilo load at.. and is it ran in real mode or protected.
I would think it uses BIOS int 13 for disk requests for the initial IPL
boot strap to read vmlinuz + ramdisk.

2. Where is the Kernel (vmlinux & ramdisk) loaded at - physical address or
virtual ?
Can it use any BIOS requests for is it completely on it's own
upon startup.

3. What happens to the low memory area @0 to 640k ( old MS Doz region)
and to what range . I know video buffers use to be at a fixed 0:b800
address at one time.

4. Are the BIOS data areas in low memory ( I vaguely recall it starting
at 0:400 segment area ) protected or is the entire low memory area
used.

Any references are welcome.



Thanks

John.






Kurt

2002-09-24, 9:29 pm


wb wrote:

> I've poked around http://www.tldp.org/ ( Linux Documentation )
> and still haven't found a paper that describes a typical Intel
> Linux memory map. - Ie 2.4.xx kernels .



This might be of some help although it is old and was written by someone
who is more familiar with the Alpha port, and written during the 2.0.x
kernel (maybe the 2.2.x one):

http://www.tldp.org/LDP/tlk/tlk.html

For both the kernel, and lilo stuff, you could always resort to the
source and related documentation.


> 3. What happens to the low memory area @0 to 640k ( old MS Doz region)
> and to what range . I know video buffers use to be at a fixed 0:b800
> address at one time.



Flat memory from what I understand. High and low memory is a DOS thing.


- Kurt

Kurt

2002-09-24, 10:29 pm


wb wrote:

> I've poked around http://www.tldp.org/ ( Linux Documentation )
> and still haven't found a paper that describes a typical Intel
> Linux memory map. - Ie 2.4.xx kernels .



This might be of some help although it is old and was written by someone
who is more familiar with the Alpha port, and written during the 2.0.x
kernel (maybe the 2.2.x one):

http://www.tldp.org/LDP/tlk/tlk.html

For both the kernel, and lilo stuff, you could always resort to the
source and related documentation.


> 3. What happens to the low memory area @0 to 640k ( old MS Doz region)
> and to what range . I know video buffers use to be at a fixed 0:b800
> address at one time.



Flat memory from what I understand. High and low memory is a DOS thing.


- Kurt

Tauno Voipio

2002-09-25, 5:29 am


"wb" <b24warbaby.Dot.@yahoo.com> wrote in message
news:bH6k9.63$LR3.2084026@news.cpqcorp.net...
> Hi,
>
> I've poked around http://www.tldp.org/ ( Linux Documentation )
> and still haven't found a paper that describes a typical Intel
> Linux memory map. - Ie 2.4.xx kernels .
>
> For example : I'd like to know:
>
> 1. Where does lilo load at.. and is it ran in real mode or protected.
> I would think it uses BIOS int 13 for disk requests for the initial

IPL
> boot strap to read vmlinuz + ramdisk.


LILO runs in the low memory. It is a 16 bit piece of code. It opens up a
segment descriptor to address the memory above 1 Mbyte by visiting 32 bit
protected mode briefly (see sources for details).

> 2. Where is the Kernel (vmlinux & ramdisk) loaded at - physical address

or
> virtual ?
> Can it use any BIOS requests for is it completely on it's own
> upon startup.


The disk I/O is done with BIOS I/O calls - there are no other disk drivers
present yet.

The kernel is loaded just above 1 Mbyte, either directly or decompressed
there.

> 3. What happens to the low memory area @0 to 640k ( old MS Doz region)
> and to what range . I know video buffers use to be at a fixed

0:b800
> address at one time.
>
> 4. Are the BIOS data areas in low memory ( I vaguely recall it starting
> at 0:400 segment area ) protected or is the entire low memory area
> used.


Please note that the memory management in 32 bit virtual memory systems is
very different from the 16 bit (maybe pseudo-) real mode addressing in DOS.

The 16 bit physical memory addresses are irrelevant here. The only addresses
the 32 bit program sees are the paged linear addresses. Their correspondence
to physical memory is at the whim of the virtual memory manager.

When the 32 bit mode is running, you cannot use BIOS for anything. Also, it
is not healthy to go to mess with the display memory, even if you could. The
same applies to other I/O memory.

> Any references are welcome.


You could start with the books:

Daniel P. Bovet & Marco Cesati, Understanding the Linux Kernel, O'Reilly,
ISBN 0-596-00002-2, and

Alessandro Rubini, Linux Device Drivers, O'Reilly, ISBN 1-56592-292-1.

> Thanks


You're welcome.

> John.


HTH

Tauno Voipio
tauno voipio @ iki fi



Tauno Voipio

2002-09-25, 6:28 am


"wb" <b24warbaby.Dot.@yahoo.com> wrote in message
news:bH6k9.63$LR3.2084026@news.cpqcorp.net...
> Hi,
>
> I've poked around http://www.tldp.org/ ( Linux Documentation )
> and still haven't found a paper that describes a typical Intel
> Linux memory map. - Ie 2.4.xx kernels .
>
> For example : I'd like to know:
>
> 1. Where does lilo load at.. and is it ran in real mode or protected.
> I would think it uses BIOS int 13 for disk requests for the initial

IPL
> boot strap to read vmlinuz + ramdisk.


LILO runs in the low memory. It is a 16 bit piece of code. It opens up a
segment descriptor to address the memory above 1 Mbyte by visiting 32 bit
protected mode briefly (see sources for details).

> 2. Where is the Kernel (vmlinux & ramdisk) loaded at - physical address

or
> virtual ?
> Can it use any BIOS requests for is it completely on it's own
> upon startup.


The disk I/O is done with BIOS I/O calls - there are no other disk drivers
present yet.

The kernel is loaded just above 1 Mbyte, either directly or decompressed
there.

> 3. What happens to the low memory area @0 to 640k ( old MS Doz region)
> and to what range . I know video buffers use to be at a fixed

0:b800
> address at one time.
>
> 4. Are the BIOS data areas in low memory ( I vaguely recall it starting
> at 0:400 segment area ) protected or is the entire low memory area
> used.


Please note that the memory management in 32 bit virtual memory systems is
very different from the 16 bit (maybe pseudo-) real mode addressing in DOS.

The 16 bit physical memory addresses are irrelevant here. The only addresses
the 32 bit program sees are the paged linear addresses. Their correspondence
to physical memory is at the whim of the virtual memory manager.

When the 32 bit mode is running, you cannot use BIOS for anything. Also, it
is not healthy to go to mess with the display memory, even if you could. The
same applies to other I/O memory.

> Any references are welcome.


You could start with the books:

Daniel P. Bovet & Marco Cesati, Understanding the Linux Kernel, O'Reilly,
ISBN 0-596-00002-2, and

Alessandro Rubini, Linux Device Drivers, O'Reilly, ISBN 1-56592-292-1.

> Thanks


You're welcome.

> John.


HTH

Tauno Voipio
tauno voipio @ iki fi



Steven J. Hathaway

2002-10-02, 11:26 pm

This may help, but it defines the kernel boot loader instead of Lilo,
but the concepts are similar. The basic documentation is available
in the Linux Kernel Sources

/Documentation/i386/boot.txt
/Documentation/i386/zero-page.txt
/Documentation/ramdisk.txt
/Documentation/initrd.txt
/Documentation/devices.txt
/Documentation/kernel-parameters.txt

and the bootstrap code in

/arch/i386/boot/
/arch/i386/boot/compressed/
/arch/i386/boot/kernel/

The documentation also gives insite into Lilo and other loader requirements
when booting the Linux kernel.

Happy Reading,
Steve Hathaway

wb wrote:

> Hi,
>
> I've poked around http://www.tldp.org/ ( Linux Documentation )
> and still haven't found a paper that describes a typical Intel
> Linux memory map. - Ie 2.4.xx kernels .
>
> For example : I'd like to know:
>
> 1. Where does lilo load at.. and is it ran in real mode or protected.
> I would think it uses BIOS int 13 for disk requests for the initial IPL
> boot strap to read vmlinuz + ramdisk.
>
> 2. Where is the Kernel (vmlinux & ramdisk) loaded at - physical address or
> virtual ?
> Can it use any BIOS requests for is it completely on it's own
> upon startup.
>
> 3. What happens to the low memory area @0 to 640k ( old MS Doz region)
> and to what range . I know video buffers use to be at a fixed 0:b800
> address at one time.
>
> 4. Are the BIOS data areas in low memory ( I vaguely recall it starting
> at 0:400 segment area ) protected or is the entire low memory area
> used.
>
> Any references are welcome.
>
> Thanks
>
> John.


Sponsored Links





Free Braindumps | MCSE braindumps software forum

Copyright 2003 - 2008 examnotes.net