第2章16位和32位微处理器精讲.ppt

  1. 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
  2. 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  3. 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
* Any Pentium CPU starts up in ‘Real Mode’ While in real mode, its behavior is like an 8086 (i.e., any program can do anything it wants, as the CPU’s protection mechanisms are disabled) But software can enter ‘protected mode’ (on a 80286 or higher) using a special instruction to modify a bit within a processor control-register Once in protected mode, the segment-sizes can be adjusted, accesses to physical memory (or to peripheral devices) can be restricted, and tasks can be isolated from interfering with one another * Enabling Protection N E E T T S E M M P P E 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 80286 Machine Status Word PE (Protection Enable) 0=no, 1=yes SMSW AX OR AX, #1 LMSW AX Code-fragment that enables protection * A ‘boot loader’ is a small program that is resident in the starting sector of a disk (or tape or other non-volatile storage medium) After testing and initializing the machine’s essential hardware devices, the startup program in the ROM-BIOS firmware will read the ‘boot loader’ into memory, at an assigned location, and then jump there * PC ROM-BIOS BOOT_LOCN BOOT_LOCN 0x00007C00 0x00007E00 512 bytes ROM-BIOS VRAM IVT and BDA 8086 memory-map RAM Vendor’s Firmware Video Display Memory No installed memory Volatile Program Memory 1-MB (1)特权级 在8086的系统中,由于系统程序和用户程序是放在一起的,同属一个级别,因此用户程序运行中就有可能破坏系统程序。这是早期80X86CPU一个重要的缺陷。自从80286以后,逐步发展并完善了保护模式的功能,使系统的特权级为四级,如图所示。 * * 四级特权保护结构示意图 * 描述符索引Index TI RPL Index:13位,指描述符在描述符表(GDT或LDT)中的顺序号。 TI:1位,TI=0指示从GDT中读出描述符,TI=1指示从LDT中读出描述符。 (2)描述符 1 ).选择符 在保护方式下,段寄存器中存放的不是段地址,而是段选择符,段选择符的格式如下 RPL:请求特权级,2位。 2). 段描述符 从80386开始,段描述符均由8个字节(64位)构成,其格式如图所示。 * 段描述符的格式 * 在保护方式下,段信息由保存在段描述符中。段描述符有3类:存储段描述符、系统段描述符和门描述符。 * 段界限(7~0) 第0字节 段界限(15~8) 第1字节 段基址(7~0) 第2字节 段基址(15~8) 第3字节 段基址(23~16) 第4字节 P DPL DT=1 TYPE A 第5字节 G D 0 AVL 段界限(19~16) 第6字节 段基址(31~24) 第7字节 存储段描述符格式 * 段界限:规定段的大小,与G位共同确定本段的大小。 段基址:32位。 段属性: P:存在位,为1表示该段在内存中,;为0表示该段未在内存中。 * DPL:特权位

文档评论(0)

过各自的生活 + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

1亿VIP精品文档

相关文档