普通的x86或AMD PC是直接从ROM运行启动/BIOS代码还是将它们首先复制到RAM? [英] Do normal x86 or AMD PCs run startup/BIOS code directly from ROM, or do they copy it first to RAM?

查看:238
本文介绍了普通的x86或AMD PC是直接从ROM运行启动/BIOS代码还是将它们首先复制到RAM?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我了解现代计算机已经修改了哈佛体系结构.

I understand modern computers have modified Harvard architectures.

他们可以从保存数据的地方以外的其他地方读取指令的事实是否可以使他们直接从ROM芯片中获取指令?他们是先将BIOS加载到RAM,还是直接从芯片上执行BIOS?我没有可以在附近打开的计算机,所以...如果我从内存插槽中删除了所有RAM,计算机将能够启动完整的BIOS,运行POST程序并告诉我我需要RAM吗?有趣的是我从未尝试过...

Can the fact that they can read instructions from somewhere other than where they hold data allow them to fetch instructions directly from ROM chips? Do they load the BIOS to RAM first, or do they execute it directly from the chip? I don't have a computer I can open nearby, so... If I remove ALL the RAM from the memory slots, will the computer be able to start the full BIOS, run the POST stuff and tell me I need RAM? It's funny I've never tried it...

我对这个问题的意图是了解商用CPU(或至少是Intel cpus)是否可以直接从ROM执行代码.这不是出于实际目的,而是为了加深我对计算机体系结构和内容的理解.删除RAM部分不是我的主要疑问,只是一个例子

my intention with this question is to learn whether commercial CPUs (or at least intel cpus) can execute code directly from ROM. It's not for practical purposes, it's to increase my understanding of computer architectures and stuff. The removing-RAM-part is not my main doubt, just an example

推荐答案

都是直接从ROM 执行的strong>将内容复制到RAM中.

It both directly executes from ROM and copies stuff into RAM.

在现代x86处理器上,芯片组内存控制器在初次加电时未初始化,因此没有可用的RAM.

On a modern x86 processor, the chipset memory controller is uninitialized at initial power-up, so there is no RAM available.

现代BIOS通常分为两部分:

A modern BIOS is usually divided into two parts:

  1. 启动块(早期POST)
  2. 压缩区(POST中后期)

当处理器退出复位状态时,它将开始在内存中的固定地址(称为复位向量")上执行指令. BIOS闪存芯片映射到内存中的该地址.处理器只是从该地址开始执行指令.

When the processor comes out of reset, it begins executing instructions at a fixed address in memory, called the "reset vector". The BIOS flash chip is mapped to this address in memory. The processor simply starts executing instructions from this address.

引导块"是指从复位向量(加上一些JMP)开始的BIOS代码.这是直接从ROM执行的(内存控制器尚未启动),因此非常慢.

The "Boot Block" refers to the BIOS code starting at the reset vector (plus a few JMPs). This is executed directly from ROM (memory controller isn't up yet), so it is very slow.

BIOS引导块通常执行以下操作:

The BIOS Boot Block generally does the following:

  1. 初始化内存控制器. (如果您从主板上收到未检测到内存"的哔声代码,则会在此处发生.)
  2. 在压缩区上执行校验和,以确保BIOS的其余部分没有损坏.
  3. 如果检测到任何损坏,请跳至恢复模式.
  4. 如果校验和通过,则将BIOS的其余部分解压缩到RAM中的某个位置(通常在1MB边界以下).
  5. 跳转到RAM中解压缩的代码,然后继续启动.

这篇关于普通的x86或AMD PC是直接从ROM运行启动/BIOS代码还是将它们首先复制到RAM?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆