易截截图软件、单文件、免安装、纯绿色、仅160KB

linux 0.11 内核学习 setup.s

参考资料 Linux内核完全注释.pdf
            网上相关资料
! setup程序的主要作用是利用rom bios的中断来读取机器系统参数,并将这些数据保存在0x90000
! 开始的位置(覆盖掉了bootsect程序所在的位置),所取得的参数被内核的相关程序使用。注意在bootsect
! 中已经将该模块和system、模块加载到内存中。
! 然后setup程序将system模块从地址0x10000-0x8fff(当时认为内核的最大值)整块移动到内存的绝对地址
! 0x00000处。接下来加载中断描述符表寄存器idtr和全局描述符表gdtr,开启a20地址线,重新设置两个
! 中断控制芯片,将硬件终端号重新设置,最后设置cpu的控制寄存器cr0,从而进入32位的保护模式,并
! 且跳转到system模块最前面的head.s程序处开始继续运行。
!
! 为了能让head.s在32位的保护模式下运行,本程序设置了中断描述符表idt和全局描述符表gdt,并在gdt
! 中设置了当前内核代码段的描述符和数据段的描述符。在下面的head.s程序中会根据内核的需要重新设置
! 这些描述符表。
!
!
! setup.s  (C) 1991 Linus Torvalds
!
! setup.s is responsible for getting the system data from the BIOS,
! and putting them into the appropriate places in system memory.
! both setup.s and system has been loaded by the bootblock.
!
! This code asks the bios for memory/disk/other parameters, and
! puts them in a "safe" place: 0x90000-0x901FF, ie where the
! boot-block used to be. It is then up to the protected mode
! system to read them from there before the area is overwritten
! for buffer-blocks.
!
! NOTE! These had better be the same as in bootsect.s!
INITSEG  = 0x9000 ! we move boot here - out of the way,原来的bootsect段
SYSSEG   = 0x1000 ! system loaded at 0x10000 (65536).system所在段
SETUPSEG = 0x9020 ! this is the current segment,本程序所在段
.globl begtext, begdata, begbss, endtext, enddata, endbss
.text
begtext:
.data
begdata:
.bss
begbss:
.text
entry start
start:
! ok, the read went well so we get current cursor position and save it for
! posterity.
! 整个读磁盘的过程都很顺利,现在将光标位置保存以备后


相关文档:

Linux设备模型之input子系统详解

一:前言
最近在研究android的sensor driver,主要是E-compass,其中用到了Linux input子系统.在网上也看了很多这方面的资料,感觉还是这篇分析的比较细致透彻,因此转载一下以便自己学习,同时和大家分享!
(这篇博客主要是以键盘驱动为例的,不过讲解的是Linux Input Subsystem,可以仔细的研究一下!)
键盘驱动将检 ......

Linux使用窍门技巧15则

  初用Linux时可能有处处不方便感觉, 可是等使用段时间掌控了些窍门技巧后就会感到越来越顺手了
以下是使用Linux积累些经验和窍门技巧
  1.使用虚拟控制台
  登录后按Alt F2键这时又能够看到"login:"提示符这个就是第 2个虚拟控制台般新安装Linux有 4个虚拟控制
台能够用Alt F1~Alt F4来访问虚拟控制台最有用时候 ......

linux下查看java路径

用命令 whereis java就可以看到了
eg:
-bash-3.1$ whereis java
java: /usr/bin/java /etc/java /usr/lib/java /usr/share/java /opt/jdk1.6.0_01/bin/java

如果仅仅想知道java执行路径在那里的话 用which java就可以了
eg:
-bash-3.1$ which java
/usr/bin/java ......

linux下查看字符的ascii码是多少

> echo "A" | tr -d "\n" | od -An -t dC
   65
> echo "X" | tr -d "\n" | od -An -t dC
   88
> echo "a" | tr -d "\n" | od -An -t dC
   97
如果在echo中输入特殊字符,比如ctrl+A,或者tab可以先输入ctrl+ ......

GCC在Ubuntu Linux下的安装

GCC编译工具在Red Hat/Fedora Core发行版中默认已经安装,因此不需要再安装。在Ubuntu发行版中,打开shell,使用下面的命令可以方便的安装GCC编译器(\$为命令行提示符):
  $ sudo apt-get install build-essential
  该命令可以把所需要gcc、g++编译器和make工具及其依赖的其它软件包自动安装并配置好。
  &nb ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号