diff options
| author | Bin Meng <[email protected]> | 2019-01-31 08:22:12 -0800 |
|---|---|---|
| committer | Bin Meng <[email protected]> | 2019-02-12 14:37:16 +0800 |
| commit | dbb0696ba05b6e201341805e0df0f5095bc43a78 (patch) | |
| tree | 39202f3d3ef2374fec1132adc31e7e12d6e24f75 | |
| parent | ca7db866fead1d01ecf018343a99e3cd0d095d51 (diff) | |
x86: Change 4-level page table base address to low memory
At present the 4-level page table base address for 64-bit U-Boot
proper is assigned an address that conflicts with CONFIG_LOADADDR.
Change it to an address within the low memory range instead.
Fixes crashes seen when 'dhcp' on QEMU x86_64 with
"-net nic -net user,tftp=.,bootfile=u-boot".
Reported-by: Alexander Graf <[email protected]>
Signed-off-by: Bin Meng <[email protected]>
Tested-by: Heinrich Schuchardt <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
| -rw-r--r-- | arch/x86/cpu/i386/cpu.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/arch/x86/cpu/i386/cpu.c b/arch/x86/cpu/i386/cpu.c index 208ef08562d..af42431f45e 100644 --- a/arch/x86/cpu/i386/cpu.c +++ b/arch/x86/cpu/i386/cpu.c @@ -462,6 +462,7 @@ int cpu_has_64bit(void) has_long_mode(); } +#define PAGETABLE_BASE 0x80000 #define PAGETABLE_SIZE (6 * 4096) /** @@ -523,10 +524,7 @@ int cpu_jump_to_64bit_uboot(ulong target) uint32_t *pgtable; func_t func; - /* TODO([email protected]): Find a better place for this */ - pgtable = (uint32_t *)0x1000000; - if (!pgtable) - return -ENOMEM; + pgtable = (uint32_t *)PAGETABLE_BASE; build_pagetable(pgtable); |
