Well, I got frustrated at my sucky system design and started again. Much easier this time around now I know what I'm doing! I've made a new ISO directory bootloader that can load any file from the CD to memory.
But I'm not sure exactly how the memory should be set out. I've seen enough real mode maps, but I need to know just how the memory is set out as a whole. I've looked on google and google image search for maps and the most I've found is some references to where the Linux kernel is loaded. It's weird, somehow it's located 3GB in memory. I'm pretty sure today's computers don't have that much RAM.
So does anyone have a proper map of how the 4GB of memory is layed out including references to hardware like things reserved for video RAM?
Memory maps.
Re:Memory maps.
Hi,
Every different computer is different. There are "standard" ways an OS can find out what is where though.
To start with, determine where the RAM is.
Once you've done this everything else is device specific. For PCI devices you can find out by checking the "PCI configuration space" for each device. For ISA there's "ISA Plug & Play" (which wasn't used by much) and ugly manual probing.
The only exception to this is the legacy video area between 0x000A0000 and 0x000BFFFF. Of course it's a legacy area - you'd want to use a linear frame buffer instead if you can.
Cheers,
Brendan
No.Exabyte256 wrote:So does anyone have a proper map of how the 4GB of memory is layed out including references to hardware like things reserved for video RAM?
Every different computer is different. There are "standard" ways an OS can find out what is where though.
To start with, determine where the RAM is.
Once you've done this everything else is device specific. For PCI devices you can find out by checking the "PCI configuration space" for each device. For ISA there's "ISA Plug & Play" (which wasn't used by much) and ugly manual probing.
The only exception to this is the legacy video area between 0x000A0000 and 0x000BFFFF. Of course it's a legacy area - you'd want to use a linear frame buffer instead if you can.
Cheers,
Brendan
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.
- Colonel Kernel
- Member
- Posts: 1437
- Joined: Tue Oct 17, 2006 6:06 pm
- Location: Vancouver, BC, Canada
- Contact:
Re:Memory maps.
3GB is probably the virtual address at which the Linux kernel is mapped, not the physical address where it's loaded. See HigherHalfKernel in the FAQ.Exabyte256 wrote: I've looked on google and google image search for maps and the most I've found is some references to where the Linux kernel is loaded. It's weird, somehow it's located 3GB in memory. I'm pretty sure today's computers don't have that much RAM.
Top three reasons why my OS project died:
- Too much overtime at work
- Got married
- My brain got stuck in an infinite loop while trying to design the memory manager
Re:Memory maps.
Thankyou, that's cleared everything up. I think I'll keep the kernel in it's current 1MB place and use the below 1MB for its workspace (Paging will only become a target if I start getting memory-limit errors!).
Printing out the results of the first "0x88" function in bochs shows 14MB of extended RAM as the FAQ said. I can't help notice the lack of reference in the FAQ to the 0xE881 and 0xE802 commands that were mentioned though. Are they they very similar or have they just been missed out?
Edit: Oh, and also while I'm about it, what's the difference between "Configured Memory" and the regular Extended Memory?
Printing out the results of the first "0x88" function in bochs shows 14MB of extended RAM as the FAQ said. I can't help notice the lack of reference in the FAQ to the 0xE881 and 0xE802 commands that were mentioned though. Are they they very similar or have they just been missed out?
Edit: Oh, and also while I'm about it, what's the difference between "Configured Memory" and the regular Extended Memory?
Re:Memory maps.
I rewrote that section of that page a while ago (it originally only mentioned the memory map and 88h), I didn't want to clutter the page with interrupt definitions but you can look them up on Ralf Brown's Interrupt List (there's a link on the wiki page)