diff options
author | Tom Rini <trini@konsulko.com> | 2016-10-12 08:32:09 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2016-10-12 13:59:26 -0400 |
commit | 5ebd27d860ec0c6e36f1b0f973653fe66a7360be (patch) | |
tree | 71ba0f39cc03c131889ce51803d85cf4c49b2941 /arch/x86/cpu/cpu.c | |
parent | f812574e61e9bfe37e76e620606fd1a65cc9cdc2 (diff) | |
parent | 00bcaedd5c4063c677d16af264bbcb991fb9675c (diff) |
Merge branch 'master' of git://git.denx.de/u-boot-x86
Diffstat (limited to 'arch/x86/cpu/cpu.c')
-rw-r--r-- | arch/x86/cpu/cpu.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/arch/x86/cpu/cpu.c b/arch/x86/cpu/cpu.c index 269043dedc..7c1d6deda9 100644 --- a/arch/x86/cpu/cpu.c +++ b/arch/x86/cpu/cpu.c @@ -135,7 +135,7 @@ static void load_gdt(const u64 *boot_gdt, u16 num_entries) struct gdt_ptr gdt; gdt.len = (num_entries * X86_GDT_ENTRY_SIZE) - 1; - gdt.ptr = (u32)boot_gdt; + gdt.ptr = (ulong)boot_gdt; asm volatile("lgdtl %0\n" : : "m" (gdt)); } @@ -630,13 +630,11 @@ static void build_pagetable(uint32_t *pgtable) memset(pgtable, '\0', PAGETABLE_SIZE); /* Level 4 needs a single entry */ - pgtable[0] = (uint32_t)&pgtable[1024] + 7; + pgtable[0] = (ulong)&pgtable[1024] + 7; /* Level 3 has one 64-bit entry for each GiB of memory */ - for (i = 0; i < 4; i++) { - pgtable[1024 + i * 2] = (uint32_t)&pgtable[2048] + - 0x1000 * i + 7; - } + for (i = 0; i < 4; i++) + pgtable[1024 + i * 2] = (ulong)&pgtable[2048] + 0x1000 * i + 7; /* Level 2 has 2048 64-bit entries, each repesenting 2MiB */ for (i = 0; i < 2048; i++) |