strange interrupt problem with bochs?
Posted: Fri Nov 09, 2007 9:50 pm
Code: Select all
sti();
__asm__ __volatile__("ud2a\n\t");
*(int*)2 = 3;
CKernel::syshalt();
but "*(int*)2 = 3;" can't work?
why it's in bochs?
The Place to Start for Operating System Developers
http://f.osdev.org/
Code: Select all
sti();
__asm__ __volatile__("ud2a\n\t");
*(int*)2 = 3;
CKernel::syshalt();
Code: Select all
*(int*)2 = 3;
hi,bluecode wrote:That would only cause a pagefault if the page at virtual address 0 is not mapped or you do not have enough rights to write that page.Code: Select all
*(int*)2 = 3;
Code: Select all
void CTrap::test_trap(UNUSED int n)
{
*(int *)0x2 = 3; // failed trap in fault
*(int *)0x40000020 = 3; // failed trap in fault
__asm__ __volatile__("ud2a\n\t"); // success trap in fault
}
Code: Select all
void CTrap::test_trap(UNUSED int n)
{
*(int *)0x2 = 3; // failed trap in fault
*(int *)0x40000020 = 3; // success trap in fault
__asm__ __volatile__("ud2a\n\t"); // success trap in fault
}
maybe i forgot, the first 4M memory setup by grub, i just take reference of linux-2.4, and din't see unmap in linux.Combuster wrote:did you forget to unmap the first 4M ? (tlb flushes and all)