函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\debug\kdb\kdb_support.c Create Date:2022-07-27 12:47:31
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:kdb_getphys - Read data from a physical address

函数原型:static int kdb_getphys(void *res, unsigned long addr, size_t size)

返回类型:int

参数:

类型参数名称
void *res
unsigned longaddr
size_tsize
383  pfn等于addr右移PAGE_SHIFT determines the page size
384  如果非pfn_valid(pfn)则返回:1
386  page等于pfn_to_page(pfn)
387  vaddr等于kmap_atomic(page)
388  内存复制(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  返回:0
调用者
名称描述
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.