易截截图软件、单文件、免安装、纯绿色、仅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 Bluetooth编程(三) HCI层编程

1. HCI层协议概述:
HCI提供一套统一的方法来访问Bluetooth底层。如图所示:
从图上可以看出,Host Controller Interface(HCI)  就是用来沟通Host和Module。Host通常就是PC, Module则是以各种物理连接形式(USB,serial,pc-card等)连接到PC上的bluetooth Dongle。
在Host这一端:application,SDP,L2cap等协议 ......

实战Linux Bluetooth编程 (七) SDP协议

Service Discovery Protocol(SDP)提供一种能力,让应用程序有方法发现哪种服务可用以及这种服务的特性。
服务发现协议(SDP或Bluetooth SDP)在蓝牙协议栈中对蓝牙环境中的应用程序有特殊的含意,发现哪个服务是可用的和确定这些可用服务的特征。SDP定义了bluetooth client发现可用bluetooth server服务和它们的特征的方法。 ......

Linux系统管理实践(10):PPPoE上网配置

    当使用DSL连接上网时,如果你使用是有固定或静态IP地址的DSL连接,那么配置步骤和前面的“网络配置”中描述的是一样的。你把以太网接口连接到DSL modem上,配置ISP提供的IP地址,子网掩码,广播地址,和网关信息。重启网络设备后你就应该连上网了。记住,你可能还需要正确地配置DNS服务器。如 ......

How to interpret a Linux core dump file


Symptom:
 
This technote provides information on how to interpret a Linux core
dump file when an application running on the system, terminates
unexpectedly, due to a segmentation fault and generates a core file.
 
Reason for the problem:
 
A segmentation fault generally occu ......

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号