blob: 5f1d3c421f686019847efd0533c049a608e401bf [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001/* SPDX-License-Identifier: GPL-2.0 */
Yinghai Luc8dcdb92012-11-16 19:39:10 -08002#ifndef _ASM_X86_INIT_H
3#define _ASM_X86_INIT_H
Pekka Enberg4fcb2082009-03-05 14:55:08 +02004
Yinghai Luaece2782013-01-24 12:19:48 -08005struct x86_mapping_info {
6 void *(*alloc_pgt_page)(void *); /* allocate buf for page table */
7 void *context; /* context for alloc_pgt_page */
Xunlei Pang66aad4f2017-05-04 09:42:50 +08008 unsigned long page_flag; /* page flag for PMD or PUD entry */
Rafael J. Wysockie4630fd2016-08-08 15:31:31 +02009 unsigned long offset; /* ident mapping offset */
Xunlei Pang66aad4f2017-05-04 09:42:50 +080010 bool direct_gbpages; /* PUD level 1GB page support */
Tom Lendackybba4ed02017-07-17 16:10:28 -050011 unsigned long kernpg_flag; /* kernel pagetable flag override */
Yinghai Luaece2782013-01-24 12:19:48 -080012};
13
14int kernel_ident_mapping_init(struct x86_mapping_info *info, pgd_t *pgd_page,
Rafael J. Wysockie4630fd2016-08-08 15:31:31 +020015 unsigned long pstart, unsigned long pend);
Pekka Enberg4fcb2082009-03-05 14:55:08 +020016
Yinghai Luc8dcdb92012-11-16 19:39:10 -080017#endif /* _ASM_X86_INIT_H */