Wierd memory problem

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.
Post Reply
User avatar
BMW
Member
Member
Posts: 286
Joined: Mon Nov 05, 2012 8:31 pm
Location: New Zealand

Wierd memory problem

Post 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.
Currently developing Lithium OS (LiOS).

Recursive paging saves lives.
"I want to change the world, but they won't give me the source code."
User avatar
Brendan
Member
Member
Posts: 8561
Joined: Sat Jan 15, 2005 12:00 am
Location: At his keyboard!
Contact:

Re: Wierd memory problem

Post 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
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.
User avatar
BMW
Member
Member
Posts: 286
Joined: Mon Nov 05, 2012 8:31 pm
Location: New Zealand

Re: Wierd memory problem

Post 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.
Currently developing Lithium OS (LiOS).

Recursive paging saves lives.
"I want to change the world, but they won't give me the source code."
User avatar
AJ
Member
Member
Posts: 2646
Joined: Sun Oct 22, 2006 7:01 am
Location: Devon, UK
Contact:

Re: Wierd memory problem

Post by AJ »

Yes.
Post Reply