blob: 6c6774af76c8142d6aaf5af16bcd4c38c5fa1bb2 [file] [log] [blame]
Simon Glass7bddac92014-10-10 08:21:52 -06001/*
2 * Copyright (c) 2014 The Chromium OS Authors.
3 *
4 * SPDX-License-Identifier: GPL-2.0+
5 */
6
7#ifndef __X86_CPU_H
8#define __X86_CPU_H
9
10 /**
11 * cpu_enable_paging_pae() - Enable PAE-paging
12 *
13 * @pdpt: Value to set in cr3 (PDPT or PML4T)
14 */
15void cpu_enable_paging_pae(ulong cr3);
16
17/**
18 * cpu_disable_paging_pae() - Disable paging and PAE
19 */
20void cpu_disable_paging_pae(void);
21
Simon Glass92cc94a2014-10-10 08:21:54 -060022/**
23 * cpu_has_64bit() - Check if the CPU has 64-bit support
24 *
25 * @return 1 if this CPU supports long mode (64-bit), 0 if not
26 */
27int cpu_has_64bit(void);
28
Simon Glass200182a2014-10-10 08:21:55 -060029/**
30 * cpu_call64() - Jump to a 64-bit Linux kernel (internal function)
31 *
32 * The kernel is uncompressed and the 64-bit entry point is expected to be
33 * at @target.
34 *
35 * This function is used internally - see cpu_jump_to_64bit() for a more
36 * useful function.
37 *
38 * @pgtable: Address of 24KB area containing the page table
39 * @setup_base: Pointer to the setup.bin information for the kernel
40 * @target: Pointer to the start of the kernel image
41 */
42void cpu_call64(ulong pgtable, ulong setup_base, ulong target);
43
44/**
45 * cpu_jump_to_64bit() - Jump to a 64-bit Linux kernel
46 *
47 * The kernel is uncompressed and the 64-bit entry point is expected to be
48 * at @target.
49 *
50 * @setup_base: Pointer to the setup.bin information for the kernel
51 * @target: Pointer to the start of the kernel image
52 */
53int cpu_jump_to_64bit(ulong setup_base, ulong target);
54
Simon Glass7bddac92014-10-10 08:21:52 -060055#endif