you should use the virtual address.
Where in virtual address space have you mapped your kernel? from 0xc0000000 or somewhere different? Identity mapped?
Maybe a Stupid Question
-
- Member
- Posts: 1600
- Joined: Wed Oct 18, 2006 11:59 am
- Location: Vienna/Austria
- Contact:
Re:Maybe a Stupid Question
... the osdever formerly known as beyond infinity ...
BlueillusionOS iso image
BlueillusionOS iso image
Re:Maybe a Stupid Question
identy mapped
it is loaded at 0x10000 by bochs (I think bochs doesn't enable paging)
it is loaded at 0x10000 by bochs (I think bochs doesn't enable paging)
- Pype.Clicker
- Member
- Posts: 5964
- Joined: Wed Oct 18, 2006 2:31 am
- Location: In a galaxy, far, far away
- Contact:
Re:Maybe a Stupid Question
I may have misunderstood your use of 'i' ...ich_will wrote: f.e. if the page with the virtual_address 0x617000 is set (page-index 1559):
from_addr + i*4096 is 0xC30000
0x617000 + 1559*4096 --> 0xC30000 (you shouldn't use this address for invlpg, i think)
Let's say you want to clear pages from 0x617000 to 0x619000, you need to call (among other things) the following sequence.
Code: Select all
_invlpg(0x617000);
_invlpg(0x618000);
_invlpg(0x619000);
(checking my own code for a hopefully correct nasm-like "invlpg" ...)
Re:Maybe a Stupid Question
AAAAAAARRRRGGGGGH, I found the mistake, all the paging things seems to work fine, but I've never tried to write to one page (I've played to much with the loop code):
do this i > 4096, i will never be bigger than 4096 if it starts by zero.
Thanks alot, first the mistake was the not existing invlpg call.
Now all works. F***.
It's better if you can read.
Code: Select all
for(i = 0; i > 4096; i++)
{ *((char*)(0x617000 + i)) = '1'; }
Thanks alot, first the mistake was the not existing invlpg call.
Now all works. F***.
It's better if you can read.