函数逻辑报告 |
Source Code:arch\x86\kernel\cpu\mtrr\if.c |
Create Date:2022-07-27 09:05:55 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| 首页 | 函数Tree |
| 注解内核,赢得工具 | 下载SCCT | English |
函数名称:mtrr_ioctl
函数原型:static long mtrr_ioctl(struct file *file, unsigned int cmd, unsigned long __arg)
返回类型:long
参数:
| 类型 | 参数 | 名称 |
|---|---|---|
| struct file * | file | |
| unsigned int | cmd | |
| unsigned long | __arg |
| 160 | err等于0 |
| 171 | 当:cmd恒等于These are the various ioctls |
| 172 | 当:cmd恒等于MTRRIOC_SET_ENTRY |
| 173 | 当:cmd恒等于MTRRIOC_DEL_ENTRY |
| 174 | 当:cmd恒等于MTRRIOC_KILL_ENTRY |
| 175 | 当:cmd恒等于MTRRIOC_ADD_PAGE_ENTRY |
| 176 | 当:cmd恒等于MTRRIOC_SET_PAGE_ENTRY |
| 177 | 当:cmd恒等于MTRRIOC_DEL_PAGE_ENTRY |
| 178 | 当:cmd恒等于MTRRIOC_KILL_PAGE_ENTRY |
| 182 | 当:cmd恒等于MTRRIOC_GET_ENTRY |
| 183 | 当:cmd恒等于MTRRIOC_GET_PAGE_ENTRY |
| 188 | 当:cmd恒等于MTRRIOC32_ADD_ENTRY |
| 189 | 当:cmd恒等于MTRRIOC32_SET_ENTRY |
| 190 | 当:cmd恒等于MTRRIOC32_DEL_ENTRY |
| 191 | 当:cmd恒等于MTRRIOC32_KILL_ENTRY |
| 192 | 当:cmd恒等于MTRRIOC32_ADD_PAGE_ENTRY |
| 193 | 当:cmd恒等于MTRRIOC32_SET_PAGE_ENTRY |
| 194 | 当:cmd恒等于MTRRIOC32_DEL_PAGE_ENTRY |
| 195 | 当:cmd恒等于MTRRIOC32_KILL_PAGE_ENTRY |
| 199 | err等于Careful: we have to cast the result to the type of the pointer* for sign reasons(Base address , & Base address ) |
| 200 | err或等于Careful: we have to cast the result to the type of the pointer* for sign reasons(Size of region , & Size of region ) |
| 201 | err或等于Careful: we have to cast the result to the type of the pointer* for sign reasons(Type of region , & Type of region ) |
| 204 | 退出 |
| 206 | 当:cmd恒等于MTRRIOC32_GET_ENTRY |
| 207 | 当:cmd恒等于MTRRIOC32_GET_PAGE_ENTRY |
| 211 | err等于Careful: we have to cast the result to the type of the pointer* for sign reasons( Register number , & Register number ) |
| 212 | err或等于Careful: we have to cast the result to the type of the pointer* for sign reasons( Base address , & Base address ) |
| 213 | err或等于Careful: we have to cast the result to the type of the pointer* for sign reasons( Size of region , & Size of region ) |
| 214 | err或等于Careful: we have to cast the result to the type of the pointer* for sign reasons( Type of region , & Type of region ) |
| 217 | 退出 |
| 223 | 默认 |
| 224 | 返回:负ENOTTY |
| 225 | 当:cmd恒等于These are the various ioctls |
| 227 | 当:cmd恒等于MTRRIOC32_ADD_ENTRY |
| 231 | err等于mtrr_file_add(Base address , Size of region , Type of region , true, file, 0) |
| 234 | 退出 |
| 235 | 当:cmd恒等于MTRRIOC_SET_ENTRY |
| 237 | 当:cmd恒等于MTRRIOC32_SET_ENTRY |
| 242 | 退出 |
| 243 | 当:cmd恒等于MTRRIOC_DEL_ENTRY |
| 245 | 当:cmd恒等于MTRRIOC32_DEL_ENTRY |
| 251 | 当:cmd恒等于MTRRIOC_KILL_ENTRY |
| 253 | 当:cmd恒等于MTRRIOC32_KILL_ENTRY |
| 258 | 退出 |
| 259 | 当:cmd恒等于MTRRIOC_GET_ENTRY |
| 261 | 当:cmd恒等于MTRRIOC32_GET_ENTRY |
| 263 | 如果 Register number 大于等于num_var_ranges则返回:负EINVAL |
| 265 | get( Register number , & base, & size, & type) |
| 268 | 如果base加size减1大于等于1UL左移8乘 Size of region 的长度减PAGE_SHIFT determines the page size 位或size大于等于1UL左移8乘 Size of region 的长度减PAGE_SHIFT determines the page size 位则 Base address 等于 Size of region 等于 Type of region 等于0 |
| 271 | 否则 |
| 274 | Type of region 等于type |
| 277 | 退出 |
| 278 | 当:cmd恒等于MTRRIOC_ADD_PAGE_ENTRY |
| 280 | 当:cmd恒等于MTRRIOC32_ADD_PAGE_ENTRY |
| 284 | err等于mtrr_file_add(Base address , Size of region , Type of region , true, file, 1) |
| 287 | 退出 |
| 288 | 当:cmd恒等于MTRRIOC_SET_PAGE_ENTRY |
| 290 | 当:cmd恒等于MTRRIOC32_SET_PAGE_ENTRY |
| 296 | 退出 |
| 297 | 当:cmd恒等于MTRRIOC_DEL_PAGE_ENTRY |
| 299 | 当:cmd恒等于MTRRIOC32_DEL_PAGE_ENTRY |
| 305 | 当:cmd恒等于MTRRIOC_KILL_PAGE_ENTRY |
| 307 | 当:cmd恒等于MTRRIOC32_KILL_PAGE_ENTRY |
| 312 | 退出 |
| 313 | 当:cmd恒等于MTRRIOC_GET_PAGE_ENTRY |
| 315 | 当:cmd恒等于MTRRIOC32_GET_PAGE_ENTRY |
| 317 | 如果 Register number 大于等于num_var_ranges则返回:负EINVAL |
| 319 | get( Register number , & base, & size, & type) |
| 321 | 如果size不等于size则 Base address 等于 Size of region 等于 Type of region 等于0 |
| 323 | 否则 |
| 328 | 退出 |
| 335 | 当:cmd恒等于MTRRIOC_GET_ENTRY |
| 336 | 当:cmd恒等于MTRRIOC_GET_PAGE_ENTRY |
| 341 | 当:cmd恒等于MTRRIOC32_GET_ENTRY |
| 342 | 当:cmd恒等于MTRRIOC32_GET_PAGE_ENTRY |
| 350 | 退出 |
| 354 | 返回:err |
| 源代码转换工具 开放的插件接口 | X |
|---|---|
| 支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |