However, after a lot of debugging figured out that on my processor (some AMD 64 bit dual core: "AMD Turion(tm) 64 X2 Mobile Technology TL-58" according to linux /proc/cpuinfo) something went awry on turning on paging (or so I believe). For this i am using the following code:
Code: Select all
asm("mov %0, %%cr3\n" : : "r" (main_map));
asm("mov %%cr0, %%eax\n"
"or 0x80000000, %%eax\n"
"mov %%eax, %%cr0" : : : "eax");
(figured this out by removing my identity mapping frrom pagedir, which caused pagefault (as expected) in bochs but did nothing on the real deal)
Has anyone seen something like this before or has an explanation.
For reference, on bochs i use grub 0.97 to boot (grub legacy), on the real hardware grub 1.96beta4 (the default for ubuntu 9.10).