[long] Address translation
Posted: Mon Jan 20, 2003 12:00 am
Hi to everyone,
this is my case. I have compiled a simple code to run at 0xC0100000
(3Gb+1Mb) and I put it at 0x100000 (1Mb).
Addresses of the data structures inside assembly are patched (eg. real
address of GDT is GDT-3Gb) all jumps are near (or short). Debug confirms
that everithing is ok with data references.
This little code starts within pmode with paging enabled and memory
identically mapped.
I set the vir-to-phys value (or the base adddress of the code/data segment
in the new GDT) to 0x40000000 (1Gb).
Reloading GDT and the new stack doesn't hurt but when jumping in the new
code segment I get a triple fault.
The strange thing is that, with provious GDT, I defined a test dataseg, and
writing to 0xc00b8000 works as expected putting a letter in the left corner
of the screen, but I can't use the dataseg of the new GDT.
I think error resides in paging structures, can somebody explain me how they
must be set? Addresses starting from 0x40000000 must be valid? Or they have
to be remapped to 0? Or whatever?
Thx for help,
Matteo
this is my case. I have compiled a simple code to run at 0xC0100000
(3Gb+1Mb) and I put it at 0x100000 (1Mb).
Addresses of the data structures inside assembly are patched (eg. real
address of GDT is GDT-3Gb) all jumps are near (or short). Debug confirms
that everithing is ok with data references.
This little code starts within pmode with paging enabled and memory
identically mapped.
I set the vir-to-phys value (or the base adddress of the code/data segment
in the new GDT) to 0x40000000 (1Gb).
Reloading GDT and the new stack doesn't hurt but when jumping in the new
code segment I get a triple fault.
The strange thing is that, with provious GDT, I defined a test dataseg, and
writing to 0xc00b8000 works as expected putting a letter in the left corner
of the screen, but I can't use the dataseg of the new GDT.
I think error resides in paging structures, can somebody explain me how they
must be set? Addresses starting from 0x40000000 must be valid? Or they have
to be remapped to 0? Or whatever?
Thx for help,
Matteo