Page 1 of 1

Wierd memory problem

Posted: Mon Jan 21, 2013 8:38 pm
by BMW
In my OS I load my kernel to 0x00100000. However it triple faults when I try to load it to that address, so I did a memory dump to see what was going on.

At 0x00100000 was some wierd stuff, here is some of it (its not my kernel this is before i load it):
(this stuff is at 0xFFF01)

Code: Select all

c) 2002 MandrakeSoft S.A. Written by Kevin Lawton & the Bochs team
Bochs??? I am using QEMU.....WTF.

And...

In my OS, I load my file table to 0x500.
In the memory dump, the file table is at 0x500 AND AT 0x00100500, WTF????????

And, the bootloader is at 0x7C00 AND 0x107C00........................

Sorry if this is a dumb question but I am very confused right now.

BTW I give my OS 128MB of memory, if that helps.

Re: Wierd memory problem

Posted: Mon Jan 21, 2013 9:33 pm
by Brendan
Hi,
BMW wrote:At 0x00100000 was some wierd stuff, here is some of it (its not my kernel this is before i load it):
(this stuff is at 0xFFF01)

Code: Select all

c) 2002 MandrakeSoft S.A. Written by Kevin Lawton & the Bochs team
Bochs??? I am using QEMU.....WTF.
The Bochs project needed a BIOS so they wrote an open source one. The Qemu project needed a BIOS, so they just used the open source BIOS written for Bochs. Since then I think Qemu shifted to their own BIOS (called SeaBIOS) but I don't know if this new BIOS is a derivative of the original Bochs BIOS or not.

In any case, one of the things that is good about open source is that people can "borrow" pieces of code from other projects.
BMW wrote:In my OS, I load my file table to 0x500.
In the memory dump, the file table is at 0x500 AND AT 0x00100500, WTF????????

And, the bootloader is at 0x7C00 AND 0x107C00........................
That sounds like A20 to me.


Cheers,

Brendan

Re: Wierd memory problem

Posted: Mon Jan 21, 2013 10:01 pm
by BMW
Oh, of course, the A20. But I already enabled A20...

Unless it doesn't work with the method I am using.

Thanks.

EDIT: Ok, got it working. Can I overwrite the stuff I found at 0x00100000? I am assuming I can since is not in the memory map.

Re: Wierd memory problem

Posted: Tue Jan 22, 2013 1:12 am
by AJ
Yes.