OSDev.org

The Place to Start for Operating System Developers
It is currently Thu Mar 28, 2024 3:22 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Linux kernel boot protocol memory layout
PostPosted: Wed Oct 06, 2021 4:06 pm 
Offline

Joined: Fri Feb 07, 2020 7:35 pm
Posts: 24
This might be a silly question, but why is the memory layout documented in this document from the linux documentation different from the article about the memory map from the osdev wiki in the address 0x00000500?

According to the linux kernel documentation the memory is something like this:
Code:
010000  +------------------------+
        |  Boot loader           |      <- Boot sector entry point 0000:7C00
001000  +------------------------+
        |  Reserved for MBR/BIOS |
000800  +------------------------+
        |  Typically used by MBR |
000600  +------------------------+
        |  BIOS use only         |
000000  +------------------------+

But in the osdev wiki, it is something like this:
Code:
007E00  +------------------------+
        |  Your OS BootSector    |
007C00  +------------------------+
        |  Conventional memory   |
000500  +------------------------+
        |  BDA (BIOS data area)  |
000400  +------------------------+
        |  Real Mode IVT         |
000000  +------------------------+

The "Real Mode IVT" and "BDA" are things that are meant for BIOS use only, so it makes sense. I don't undestand however why linux says memory from 0x000500 to 0x000600 is also "BIOS use only" but that piece of memory is part of the "Conventional memory" according to the osdev wiki.


Top
 Profile  
 
 Post subject: Re: Linux kernel boot protocol memory layout
PostPosted: Wed Oct 06, 2021 6:01 pm 
Offline
Member
Member

Joined: Tue Feb 18, 2020 3:29 pm
Posts: 1071
0x500 - 0x600 used to be BIOS reserved on some ancient machines. Nowadays, no modern machine's BIOS uses this

_________________
"How did you do this?"
"It's very simple — you read the protocol and write the code." - Bill Joy
Projects: NexNix | libnex | nnpkg


Top
 Profile  
 
 Post subject: Re: Linux kernel boot protocol memory layout
PostPosted: Wed Oct 06, 2021 8:21 pm 
Offline
Member
Member

Joined: Mon Mar 25, 2013 7:01 pm
Posts: 5099
IBM printed several manuals for their PCs and PC-compatibles that state 0x500 is the first byte of usable memory, even though it isn't. That's probably where the incorrect information in the wiki came from.

The original IBM PC BIOS used the byte at 0x500 as a status flag for the print screen handler. (As in printing the text on the screen to a sheet of paper. That kind of print screen.) Recent BIOSes probably don't support this function anymore, but it's definitely there in mid-90s BIOSes.

Several versions of MS-DOS overwrite that whole area as part of the boot process...


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: Bing [Bot] and 56 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group