Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:arch\x86\kernel\machine_kexec_32.c Create Date:2022-07-28 08:36:49
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:machine_kexec_page_table_set_one

Proto:static void machine_kexec_page_table_set_one(pgd_t *pgd, pmd_t *pmd, pte_t *pte, unsigned long vaddr, unsigned long paddr)

Type:void

Parameter:

TypeParameterName
pgd_t *pgd
pmd_t *pmd
pte_t *pte
unsigned longvaddr
unsigned longpaddr
98  pgd += he pgd page can be thought of an array like this: pgd_t[PTRS_PER_PGD]* this macro returns the index of the entry in the pgd page which would* control the given virtual address(vaddr)
103  p4d = p4d_offset(pgd, vaddr)
104  pud = pud_offset(p4d, vaddr)
105  pmd = pmd_offset(pud, vaddr)
106  If Not (pmd_val( * pmd) & _PAGE_PRESENT) Then set_pmd(pmd, __pmd(__pa(pte) | _PAGE_TABLE))
108  pte = pte_offset_kernel(pmd, vaddr)
109  set_pte(pte, pfn_pte(paddr >> PAGE_SHIFT determines the page size , PAGE_KERNEL_EXEC))
Caller
NameDescribe
machine_kexec_prepare_page_tables