Unable to turn paging on!!

From: ravikumar.chakaravarthy@amd.com
Date: Wed Mar 26 2003 - 14:23:17 EST


I tweaked the kernel and boot loader to load the kernel at 0xdf000000, physical address. I did the following changes to setup the initial page table.

However during boot, in arch/i386/kernel/head.S when the paging bit is set
       movl %eax,%cr0 /* ..and set paging (PG) bit */

My computer hangs!!

Any idea why??

  -Ravi

.org 0x1000
ENTRY(swapper_pg_dir)
        .fill 0x37c,4,0
        .long 0xdf002007
        .long 0xdf003007
        .fill 0x2,4,0
        /* default: 766 entries */
        .long 0xdf002007
        .long 0xdf003007
        /* default: 254 entries */
        .fill 0x7e,4,0

/*
 * The page tables are initialized to only 8MB here - the final page
 * tables are set up later depending on memory size.
 */
.org 0x2000
ENTRY(pg0)

.org 0x3000
ENTRY(pg1)

Arch/i386/kernel/head.S

/*
 * Initialize page tables
 */
        movl $pg0-__PAGE_OFFSET,%edi /* initialize page tables */
        movl $007,%eax /* "007" doesn't mean with right to kill, but
                                   PRESENT+RW+USER */
        addl $0xdf000000,%eax
2: stosl
        add $0x1000,%eax
        cmp $empty_zero_page-__PAGE_OFFSET,%edi
        jne 2b

/*
 * Enable paging
 */
3:
        movl $swapper_pg_dir-__PAGE_OFFSET,%eax
        movl %eax,%cr3 /* set the page table pointer.. */
        movl %cr0,%eax
        orl $0x80000000,%eax
        movl %eax,%cr0 /* ..and set paging (PG) bit */ ---------------- Fails here
        jmp 1f /* flush the prefetch-queue */

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Mon Mar 31 2003 - 22:00:25 EST