17bddac94SSimon Glass /* 27bddac94SSimon Glass * Copyright (c) 2014 The Chromium OS Authors. 37bddac94SSimon Glass * 47bddac94SSimon Glass * SPDX-License-Identifier: GPL-2.0+ 57bddac94SSimon Glass */ 67bddac94SSimon Glass 77bddac94SSimon Glass #ifndef __X86_CPU_H 87bddac94SSimon Glass #define __X86_CPU_H 97bddac94SSimon Glass 107bddac94SSimon Glass /** 117bddac94SSimon Glass * cpu_enable_paging_pae() - Enable PAE-paging 127bddac94SSimon Glass * 137bddac94SSimon Glass * @pdpt: Value to set in cr3 (PDPT or PML4T) 147bddac94SSimon Glass */ 157bddac94SSimon Glass void cpu_enable_paging_pae(ulong cr3); 167bddac94SSimon Glass 177bddac94SSimon Glass /** 187bddac94SSimon Glass * cpu_disable_paging_pae() - Disable paging and PAE 197bddac94SSimon Glass */ 207bddac94SSimon Glass void cpu_disable_paging_pae(void); 217bddac94SSimon Glass 2292cc94a1SSimon Glass /** 2392cc94a1SSimon Glass * cpu_has_64bit() - Check if the CPU has 64-bit support 2492cc94a1SSimon Glass * 2592cc94a1SSimon Glass * @return 1 if this CPU supports long mode (64-bit), 0 if not 2692cc94a1SSimon Glass */ 2792cc94a1SSimon Glass int cpu_has_64bit(void); 2892cc94a1SSimon Glass 29*200182a7SSimon Glass /** 30*200182a7SSimon Glass * cpu_call64() - Jump to a 64-bit Linux kernel (internal function) 31*200182a7SSimon Glass * 32*200182a7SSimon Glass * The kernel is uncompressed and the 64-bit entry point is expected to be 33*200182a7SSimon Glass * at @target. 34*200182a7SSimon Glass * 35*200182a7SSimon Glass * This function is used internally - see cpu_jump_to_64bit() for a more 36*200182a7SSimon Glass * useful function. 37*200182a7SSimon Glass * 38*200182a7SSimon Glass * @pgtable: Address of 24KB area containing the page table 39*200182a7SSimon Glass * @setup_base: Pointer to the setup.bin information for the kernel 40*200182a7SSimon Glass * @target: Pointer to the start of the kernel image 41*200182a7SSimon Glass */ 42*200182a7SSimon Glass void cpu_call64(ulong pgtable, ulong setup_base, ulong target); 43*200182a7SSimon Glass 44*200182a7SSimon Glass /** 45*200182a7SSimon Glass * cpu_jump_to_64bit() - Jump to a 64-bit Linux kernel 46*200182a7SSimon Glass * 47*200182a7SSimon Glass * The kernel is uncompressed and the 64-bit entry point is expected to be 48*200182a7SSimon Glass * at @target. 49*200182a7SSimon Glass * 50*200182a7SSimon Glass * @setup_base: Pointer to the setup.bin information for the kernel 51*200182a7SSimon Glass * @target: Pointer to the start of the kernel image 52*200182a7SSimon Glass */ 53*200182a7SSimon Glass int cpu_jump_to_64bit(ulong setup_base, ulong target); 54*200182a7SSimon Glass 557bddac94SSimon Glass #endif 56