diff -r 34ab61cd89bb extras/mini-os/arch/x86/setup.c --- a/extras/mini-os/arch/x86/setup.c Tue Jan 30 21:26:45 2007 +0000 +++ b/extras/mini-os/arch/x86/setup.c Tue Jan 30 21:45:46 2007 +0000 @@ -75,6 +75,13 @@ void void arch_init(start_info_t *si) { + if(VIRT_START & (L1_PAGETABLE_ENTRIES * PAGE_SIZE - 1)) + { + printk("Virt address space has to start on 4Mb(2Mb for PAE) boundary. " + "\nPlease adjust start of the text section. Exiting\n"); + do_exit(); + } + /* Copy the start_info struct to a globally-accessible area. */ /* WARN: don't do printk before here, it uses information from shared_info. Use xprintk instead. */