Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:arch\x86\kernel\tboot.c Create Date:2022-07-28 07:53:12
Last Modify:2022-05-22 06:45:44 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:map_tboot_page

Proto:static int map_tboot_page(unsigned long vaddr, unsigned long pfn, pgprot_t prot)

Type:int

Parameter:

TypeParameterName
unsigned longvaddr
unsigned longpfn
pgprot_tprot
112  pgd = a shortcut to get a pgd_t in a given mm( & tboot_mm, vaddr)
113  p4d = The following ifdef needed to get the 5level-fixup.h header to work.* Remove it when 5level-fixup.h has been removed.
114  If Not p4d Then Return -1
116  pud = pud_alloc( & tboot_mm, p4d, vaddr)
117  If Not pud Then Return -1
119  pmd = pmd_alloc( & tboot_mm, pud, vaddr)
120  If Not pmd Then Return -1
122  pte = pte_alloc_map( & tboot_mm, pmd, vaddr)
123  If Not pte Then Return -1
125  set_pte_at( & tboot_mm, vaddr, pte, pfn_pte(pfn, prot))
126  pte_unmap(pte)
136  pgd &= ~_PAGE_NX
138  Return 0
Caller
NameDescribe
map_tboot_pages