Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:yrix_get_free_region - get a free ARR.*@base: the starting (base) address of the region.*@size: the size (in bytes) of the region.* Returns: the index of the region on success, else -1 on error.

Proto:static int cyrix_get_free_region(unsigned long base, unsigned long size, int replace_reg)

Type:int

Parameter:

TypeParameterName
unsigned longbase
unsigned longsize
intreplace_reg
98  Case replace_reg == 7
99  If size < 0x40 Then Break
102  Case replace_reg == 6
103  Case replace_reg == 5
104  Case replace_reg == 4
105  Return replace_reg
106  Case replace_reg == 3
107  Case replace_reg == 2
108  Case replace_reg == 1
109  Case replace_reg == 0
110  Return replace_reg
113  If size > 0x2000 Then
114  cyrix_get_arr(7, & lbase, & lsize, & ltype)
115  If lsize == 0 Then Return 7
118  Else
119  When i < 7 cycle
120  cyrix_get_arr(i, & lbase, & lsize, & ltype)
121  If lsize == 0 Then Return i
128  cyrix_get_arr(i, & lbase, & lsize, & ltype)
129  If lsize == 0 && size >= 0x40 Then Return i
132  Return -ENOSPC