《现在计算机底层软件技术精品文稿.ppt》由会员分享,可在线阅读,更多相关《现在计算机底层软件技术精品文稿.ppt(34页珍藏版)》请在淘文阁 - 分享文档赚钱的网站上搜索。
1、现在计算机底层软件技术第1页,本讲稿共34页PC底层软件包括?BIOSBIOS B Basic asic I Input nput O Output utput S Systemystem 基本输入输出系统基本输入输出系统 系统硬件的一部分系统硬件的一部分 硬件中的软件硬件中的软件ECEC Embedded Controller ProgramEmbedded Controller Program Embedded keyboard&Embedded MouseEmbedded keyboard&Embedded Mouse Power ManagementPower Management B
2、attery SystemBattery System第2页,本讲稿共34页BIOS功能Boot OS from some mediaInitialize ISA SystemInitialize Specific HardwareInitialize Industry Standard systemOffer system information to OS and AppHardware Program Interface routinePower Manage Sx Support第3页,本讲稿共34页Boot OS from some mediaDevice TypeATA/ATAPI
3、 DeviceATA/ATAPI DeviceUSB Hard disk/floppy/CDROMUSB Hard disk/floppy/CDROMPCI DevicePCI DeviceOtherOtherSelectableBBS Spec第4页,本讲稿共34页Initialize Specific HardwareMemory SizingGPIOClock ChipCS Specific InitializeSpecific Hardware Porting to our SystemCardBus ControllerCardBus Controller第5页,本讲稿共34页Ini
4、tialize ISA SystemVGA to Keyboard8259,8254,第6页,本讲稿共34页Initialize Industry Standard systemInitialize PCI SystemInitialize PnP SystemInitialize ATA/ATA SystemInitialize USB SystemOther 1394第7页,本讲稿共34页Initialize PCI SystemEnumerate PCI SystemBus No,Device No,and Function NoBus No,Device No,and Function
5、 NoAllocate System Resource to Every PCI DeviceMemoryMemoryIOIOCopy ROM to ROM Address第8页,本讲稿共34页Initialize PnP SystemBased On SCDInitialize PnP ISAInitialize Compatible PnP DeviceSupper IOSupper IOCard Reader(LPC)Card Reader(LPC)第9页,本讲稿共34页Initialize ATA/ATAPI SystemNative Support?How Many Controll
6、er?Loop every Channel to find deviceInitialize every found Hard disk and CDROMSet up Int 13 Routine and Disk Parameter Table第10页,本讲稿共34页Initialize USB SystemAllocate system resource to USB ControllerLoop Every controller to find deviceSet AddressSet AddressEnumerateDevice ClassDevice ClassHook from
7、USB Storage Device第11页,本讲稿共34页Offer system information to OS and AppTo OS:To OS:ACPIACPI Int 15Int 15 MP TableMP Table PCI Routing TablePCI Routing Table To AppTo App SMBIOSSMBIOS F000 InformationF000 Information 第12页,本讲稿共34页Hardware Program Interface routineINTKeyboardKeyboardMouseMouseFloppyFloppy
8、Hard Disk,VGA Hard Disk,VGA SMIAPMAPMSpeedStepSpeedStep第13页,本讲稿共34页INT过程SoftwareHardware第14页,本讲稿共34页SMI过程第15页,本讲稿共34页Power Management Sx SupportS4=S5S3Judge S3Judge S3Restore Some Device EnvironmentRestore Some Device EnvironmentSearch ACPI TableSearch ACPI TableJudge to OS routineJudge to OS routin
9、e第16页,本讲稿共34页Address Space ConceptAddress SpacePCIISA第17页,本讲稿共34页MemoryMemory Space Space(4GB4GB)BIOS LocationBIOS BIOS AreaAreaFFFF FFFFFFFF FFFF 以2M的BIOS为例,其占用的内存范围为 0FFFC0000H-0FFFFFFFFH 0000 00000000 0000占用高端地址占用高端地址第18页,本讲稿共34页BIOS LocationF000 SegmentE000 Segment0000 00000000 00000010 00000010
10、 0000 BIOS最高两个段的内容同时被映射到1M以下的高端地址。第19页,本讲稿共34页ShadowDRAM空间 vs ROM空间CHIPSET寻址控制程序运行速度第20页,本讲稿共34页A000:0hE000:0hF000:0hCGAVGAB000:0hC000:0hB800:0hAvailableVGA BIOSC800:0hExpansionROMsD000:0hSystem BIOSSystem BIOSAvailableShadow Area第21页,本讲稿共34页Memory Map Below 1M00000-003FF Int Vector00400-004FF BIOS
11、Data AreaA0000-BFFFF Vedio MemoryC0000-?Vedio BIOS?-DFFFF Option ROME0000-FFFFF BIOS Area第22页,本讲稿共34页The First Instruction ExecuteCPU Power OnCPU Instruction Pipe is emptyCPU Instruction Pool 给CPU接口指令预取单元指令预取单元启动FSB总线,执行一个Read F000:FFF0操作,FSB是重试类型,北桥接受到这个读请求,以Retry结束。第23页,本讲稿共34页The First Instructio
12、n Execute北桥在北桥在PCIPCI总线上启动总线上启动Read Read transactiontransaction(F000:FFF0F000:FFF0)操作。)操作。如果如果PCI SlotPCI Slot上面没有任何设备以快速,中速,或者慢上面没有任何设备以快速,中速,或者慢速解码,那么速解码,那么LPCLPC桥解码这个桥解码这个TransactionTransaction,启动,启动RetryRetry,结束北桥的行为。如果结束北桥的行为。如果PCI SlotPCI SlotLPCLPC桥启动桥启动Read transactionRead transaction(F000:F
13、FF0F000:FFF0)操作,被)操作,被ECEC解解码,码,ECEC在在ROMROM的的ISAISA总线上启动交易,从总线上启动交易,从ROMROM中取出第一中取出第一条指令条指令第24页,本讲稿共34页The First Instruction ExecuteLPC桥得到第一条指令位置信息北桥Retry,LPC桥返回F000:FFF0地方内容CPU Retry,北桥返回F000:FFF0地方内容F000:FFF0地方内容进入指令流一般第一条指令都是跳转指令,调试除外。该跳转指令进入指令流水线第25页,本讲稿共34页The First Instruction Execute最后这条指令被最
14、后这条指令被CPUCPU核心指令核心指令在这条指令达到核心时,预取指令单元同步工作,此时后在这条指令达到核心时,预取指令单元同步工作,此时后面一堆指令已被读出,进入流水线工作面一堆指令已被读出,进入流水线工作核心知道这时一条跳转指令,清空指令流,更新预取指令核心知道这时一条跳转指令,清空指令流,更新预取指令池和预取单元地址池和预取单元地址预取指令池空,请求预取指令单元启动预取指令池空,请求预取指令单元启动FSBFSB读取新的位置读取新的位置指令内容指令内容上面过程重复上面过程重复第26页,本讲稿共34页例子指令分析:MOV ax,ds:si DS=F000h,Si=FFF0h该条指令被预取指令
15、单元预取进入指令池进入核心单元核心单元向数据单元要数据,不是向指令预取单元核心单元向Cache要数据(如果Cache Enable)第27页,本讲稿共34页例子指令分析:MOV ax,ds:siCache系统没有当前内容备份,Cache系统在FSB启动读F000:FFF0处内容的Read Transaction该FSB 上Transaction部分以及后续部分的PCI、LPC等行为和取指令时的行为没有任何区别同样的行为重复Cache取到数据,交给核心单元。第28页,本讲稿共34页Memory Sizing and ShadowRUN in ROM F000RUN in ROM F000Memo
16、ry SizingMemory Sizing Read RAM Information from SPD Read RAM Information from SPD(SMBusSMBus)Program timingProgram timing(Frequency and CAS LatencyFrequency and CAS Latency)Program Address InformationProgram Address InformationSimple Memory TestSimple Memory Test 0 0250k250k。停。停0F0FShadowShadow第29页
17、,本讲稿共34页Memory Sizing and ShadowShadowShadow Copy ROM Image to RAMCopy ROM Image to RAM,Not in F000Not in F000 Jump to RAMJump to RAM,Far JumpFar JumpShadow F000 to RAMShadow F000 to RAMGo To POSTGo To POST VGAVGA ISAISA PnPPnP PCIPCI第30页,本讲稿共34页CMOS RAM128 Bytes RAM 电池供电保护数据Accessed By I/O port 70H/71HMost Chipset have secondary CMOS RAM第31页,本讲稿共34页SCU Screen第32页,本讲稿共34页BIOS RUN总结RUN IN ROMPOSTOSACPIMP TablePCI Routing TableSMIINT 15BootMemory Sizing and ShadowHardware Power OnCS InitializeISA LegacyPnP InitializePCI Initialize第33页,本讲稿共34页Q&AThanks第34页,本讲稿共34页
限制150内