Question: memory address and e820

70 views
Skip to first unread message

neoe

unread,
May 3, 2015, 1:19:34 PM5/3/15
to bareme...@googlegroups.com
Hi,

I'm making a "memtest" internal command for BareMetal-OS.
my work is here:
https://github.com/neoedmund/BareMetal-OS/commit/03f11199d7c2a59024bc83c8740c8c4756b9acd4

most of it works, but there is an error:

when I have 8GB memory
the e820 has a record is
start: 0x0000000100000000 length: 0x0000000140000000 usable
so I think it means address from 0x0000000100000000 to 0x0000000240000000 is usable,
but actually when I try to write to 0x0000000200000000 (8GB) it will throw int 14 page fault.

when I have 12GB memory
the error point is write to memory location at 0x0000000300000000 (12GB)

My question is,
(1) Do I understand the meaning of e820 wrong?
(2) how to access all usable memory?

Thank you.
Message has been deleted

neoe

unread,
May 4, 2015, 12:02:32 AM5/4/15
to bareme...@googlegroups.com
I also post this question to OSDEV( http://forum.osdev.org/viewtopic.php?f=1&t=29288&start=0 ), but didn't get satisfied answer yet.
I really preciated if the dear author could explain something for me.
thank you.

Ian Seyler

unread,
May 4, 2015, 6:35:57 PM5/4/15
to bareme...@googlegroups.com
If you have 8GB of RAM then the last address you should be safely able to use is 0x1FFFFFFFF. RAM addresses start at 0x0.

With 12GB the highest addressable byte is at 0x2FFFFFFFF.

-Ian

hi

unread,
May 5, 2015, 1:32:19 PM5/5/15
to bareme...@googlegroups.com
Hi,

you mean 8GB memory is mapped to [0 - 0x1FFFFFFFF]

where are the memory holes reserved listed in E820 records?How to access them?


Neoe
--
You received this message because you are subscribed to a topic in the Google Groups "BareMetal OS" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/baremetal-os/w5bid1W4ewM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to baremetal-os...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages