#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/types.h>
#include <asm/pgtable.h>
#include <asm/current.h>
#include <asm/desc_defs.h>
MODULE_LICENSE("GPL");
struct desc_ptr idt;
int init_module(void)
{
asm volatile ("sidt %0" : "=m" (idt));
unsigned int level;
pte_t *pte;
pte = lookup_address( idt.address, &level);
printk("level:%d\n", level);
printk("pte_val(*pte):%lx\n", pte_val(*pte));
printk("pte_val(*pte)& _PAGE_PRESENT:%d\n", pte_val(*pte)& _PAGE_PRESENT);
return 0;
}
void cleanup_module(void)
{
printk("clean_module : fixmap\n");
}

  

查找idt table 所對應的page table in Linux的更多相关文章

  1. Page (computer memory) Memory segmentation Page table 虚拟地址到物理地址的转换

    A page, memory page, or virtual page is a fixed-length contiguous block of virtual memory, described ...

  2. Virtual Memory PAGE TABLE STRUCTURE

    COMPUTER ORGANIZATION AND ARCHITECTURE DESIGNING FOR PERFORMANCE NINTH EDITION The basic mechanism f ...

  3. Marlin 溫度感應器 數值轉換對應表

    Marlin 溫度感應器 數值轉換對應表   (2014/03/27)Update: 自己實測了這個自動產生的對應表,結果測得的溫度與實際值仍有相當大的誤差.看來還是要回頭用測量的方式來校正溫度... ...

  4. linux page table entry struct

    Page Table Entry The access control information is held in the PTE and is CPU specific; figure bit f ...

  5. [Xamarin.Android]使用Java Bindings Libary專案 Binding Java元件(.jar) 與Metadata.xml、型別對應 (转帖)

    使用Xamarin開發Android APP時, 如果已經有原本就用Java寫好的套件(.jar), 就可以利用Xamarin提供的Java Bindings Libary將他變成C#可使用的元件. ...

  6. Linux就这个范儿 第15章 七种武器 linux 同步IO: sync、fsync与fdatasync Linux中的内存大页面huge page/large page David Cutler Linux读写内存数据的三种方式

    Linux就这个范儿 第15章 七种武器  linux 同步IO: sync.fsync与fdatasync   Linux中的内存大页面huge page/large page  David Cut ...

  7. html table表格导出excel的方法 html5 table导出Excel HTML用JS导出Excel的五种方法 html中table导出Excel 前端开发 将table内容导出到excel HTML table导出到Excel中的解决办法 js实现table导出Excel,保留table样式

    先上代码   <script type="text/javascript" language="javascript">   var idTmr; ...

  8. foreach statement cannot operate on variables of type 'System.Web.UI.WebControls.Table' because 'System.Web.UI.WebControls.Table' does not contain a public definition for 'GetEnumerator'

    错误:foreach statement cannot operate on variables of type 'System.Web.UI.WebControls.Table' because ' ...

  9. magento -- 解决magento错误:ERROR: Base table or view already exists: 1050 Table ... already exists

    相信有更新magento或者,备份转移magento站点的时候可能会碰到类似这样的错误提示: Base table or view already exists: 1050 Table ... alr ...

随机推荐

  1. 自定义、操作cookie

    /** * 读取所有cookie * 注意二.从客户端读取Cookie时,包括maxAge在内的其他属性都是不可读的,也不会被提交.浏览器提交Cookie时只会提交name与value属性.maxAg ...

  2. tomcat日志切割脚本shell

    tomcat-rotate.sh: #!/bin/bash log_path="/home/tomcat7-api/logs/"expried_time=7 function de ...

  3. 6-基于TMS320C6678、FPGA XC5VSX95T的6U CPCI 8路光纤信号处理卡

    基于TMS320C6678.FPGA XC5VSX95T的6U CPCI 8路光纤信号处理卡 1.板卡概述  本板卡由我公司自主研发,基于CPCI架构,符合CPCI2.0标准,采用两片TI DSP T ...

  4. 动态规划—triangle

    题目: Given a triangle, find the minimum path sum from top to bottom. Each step you may move to adjace ...

  5. [USACO07DEC]Sightseeing Cows(负环,0/1分数规划)

    [USACO07DEC]Sightseeing Cows Description Farmer John has decided to reward his cows for their hard w ...

  6. man(2) W

    wait(2) wait3(2) wait4(2) waitpid(2) waitid(2) SEE ALSO _exit(2), clone(2), fork(2), kill(2), ptrace ...

  7. vue子传父、父传子

    子传父 vue子传父使用$emit传值 子组件: <template> <div> <button @click="toParent">点击传到 ...

  8. 对Promise的研究3

    Promise.race() Promise.race方法同样是将多个 Promise 实例,包装成一个新的 Promise 实例. const p = Promise.race([p1, p2, p ...

  9. django数据库迁移相关【sqlite3迁移到MySQL】(django2.0.3测试通过)

    前言 项目部署到服务器之后,用的数据库还是sqlite3. 发现一些问题,sqlite3是小巧,但是服务器上查看数据库比较费劲,不能直观看到数据.可是我们经常需要即时.直观查看数据,这就用到MySQL ...

  10. php str_ireplace()函数 语法

    php str_ireplace()函数 语法 作用:字符串替换操作,不区分大小写 语法:str_ireplace(find,replace,string,count)大理石平台规格 参数: 参数 描 ...