Load kernel at 0x0000 ?

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
User avatar
AJ
Member
Member
Posts: 2646
Joined: Sun Oct 22, 2006 7:01 am
Location: Devon, UK
Contact:

Re: Load kernel at 0x0000 ?

Post by AJ »

Hi,

AFAIK this ISA memory hole only relates to ISA video cards. Theoreticaly, there can be a hole anywhere in memory. For example, device configuration space tends to be in high memory but needn't be. There may be an APIC hiding up there somewhere in high memory too.

As long as you're creating your physical memory allocator based on int 15h, AX=E820h, you should be fine. If you can't use this function, assume worst case scenario - i.e. a memory hole at 15Mb and a large PCI configuration space in high memory.

Cheers,
Adam
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Re: Load kernel at 0x0000 ?

Post by Combuster »

ouchouchouch, your OS would seriously bork my test box when it finds the video memory (located at 1G) and think it's RAM... :shock:
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
LoseThos
Member
Member
Posts: 112
Joined: Tue Oct 30, 2007 6:41 pm
Location: Las Vegas, NV USA
Contact:

Re: Load kernel at 0x0000 ?

Post by LoseThos »

I used INT 15h E801, so people with less memory are okay. i should probably upgrade to the E820 call.

It returns a value just shy of 2 Gig=0x80000000. I have no clue what's just below the 2 Gig mark -- something tiny.

Umm... The IHC7 chip uses stuff in the 0xFE000000 range. I have a video card in the 0xE0000000. In general the 0x80000000-0xFFFFFFFF range seems full of landmines :?

Currently you must enter physical address ranges of additional RAM beyond 2 Gig when you compile the kernel. I only have 2 Gig and have no idea where a third or fourth Gig would be mapped. My OS is 64-bit, so I can handle more memory. You know... the problem of only having one or two machines to test on really sucks when it comes to operating systems. Actually, it's a convenient excuse ;-)
CodeCat
Member
Member
Posts: 158
Joined: Tue Sep 23, 2008 1:45 pm
Location: Eindhoven, Netherlands

Re: Load kernel at 0x0000 ?

Post by CodeCat »

You should DEFINITELY use E820 if you can. Any newer system has it. There's some information in this topic that might be useful when using E820, as there are some catches.
Post Reply