Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\debug\kdb\kdb_support.c Create Date:2022-07-28 11:43:08
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:kdb_getphys - Read data from a physical address

Proto:static int kdb_getphys(void *res, unsigned long addr, size_t size)

Type:int

Parameter:

TypeParameterName
void *res
unsigned longaddr
size_tsize
383  pfn = addr >> PAGE_SHIFT determines the page size
384  If Not pfn_valid(pfn) Then Return 1
386  page = pfn_to_page(pfn)
387  vaddr = kmap_atomic(page)
388  No 3D Now!(res, vaddr + (addr & (PAGE_SIZE - 1)), size)
389  Prevent people trying to call kunmap_atomic() as if it were kunmap()* kunmap_atomic() should get the return value of kmap_atomic, not the page.(vaddr)
391  Return 0
Caller
NameDescribe
kdb_getphyswordkdb_getphysword* Inputs:* word Pointer to the word to receive the result.* addr Address of the area to copy.* size Size of the area.* Returns:* 0 for success, < 0 for error.