xref: /linux/arch/x86/include/asm/init.h (revision a1ff5a7d78a036d6c2178ee5acd6ba4946243800)
1b2441318SGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 */
2c8dcdb9cSYinghai Lu #ifndef _ASM_X86_INIT_H
3c8dcdb9cSYinghai Lu #define _ASM_X86_INIT_H
44fcb2083SPekka Enberg 
5d2a285d6SHou Wenlong #define __head	__section(".head.text")
6d2a285d6SHou Wenlong 
7aece2785SYinghai Lu struct x86_mapping_info {
8aece2785SYinghai Lu 	void *(*alloc_pgt_page)(void *); /* allocate buf for page table */
9*d88e7b3eSKirill A. Shutemov 	void (*free_pgt_page)(void *, void *); /* free buf for page table */
10aece2785SYinghai Lu 	void *context;			 /* context for alloc_pgt_page */
1166aad4fdSXunlei Pang 	unsigned long page_flag;	 /* page flag for PMD or PUD entry */
12e4630fddSRafael J. Wysocki 	unsigned long offset;		 /* ident mapping offset */
1366aad4fdSXunlei Pang 	bool direct_gbpages;		 /* PUD level 1GB page support */
14bba4ed01STom Lendacky 	unsigned long kernpg_flag;	 /* kernel pagetable flag override */
15aece2785SYinghai Lu };
16aece2785SYinghai Lu 
17aece2785SYinghai Lu int kernel_ident_mapping_init(struct x86_mapping_info *info, pgd_t *pgd_page,
18e4630fddSRafael J. Wysocki 				unsigned long pstart, unsigned long pend);
194fcb2083SPekka Enberg 
20*d88e7b3eSKirill A. Shutemov void kernel_ident_mapping_free(struct x86_mapping_info *info, pgd_t *pgd);
21*d88e7b3eSKirill A. Shutemov 
22c8dcdb9cSYinghai Lu #endif /* _ASM_X86_INIT_H */
23