操作系统如何知道物理内存的实际大小? [英] how does the OS know the real size of the physical memory?

查看:80
本文介绍了操作系统如何知道物理内存的实际大小?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在计算机启动时加载操作系统时,操作系统如何知道硬件信息,是否有io指令或引导程序从BIOS中获取信息??

When the OS is loaded at the moment the computer is started, how does the OS know the hardware information, is there some io instruction or the booter program get information from the bios.??

推荐答案

主板固件(也称为BIOS,ACPI接口或EFI)使操作系统能够找出系统中RAM和ROM的物理映射.

The motherboard firmware (also called BIOS, ACPI interface or EFI) allows the OS to find out the physical mapping of RAM and ROM in the system.

例如,这是引导Linux的输出:

For example, this is the output of a booting Linux:

[    0.000000] BIOS-provided physical RAM map:
[    0.000000]  BIOS-e820: 0000000000000000 - 0000000000098c00 (usable)
[    0.000000]  BIOS-e820: 0000000000098c00 - 00000000000a0000 (reserved)
[    0.000000]  BIOS-e820: 00000000000e6000 - 0000000000100000 (reserved)
[    0.000000]  BIOS-e820: 0000000000100000 - 00000000bfea0000 (usable)
[    0.000000]  BIOS-e820: 00000000bfeae000 - 00000000bfeb0000 type 9
[    0.000000]  BIOS-e820: 00000000bfeb0000 - 00000000bfec0000 (ACPI data)
[    0.000000]  BIOS-e820: 00000000bfec0000 - 00000000bfef0000 (ACPI NVS)
[    0.000000]  BIOS-e820: 00000000bfef0000 - 00000000c0000000 (reserved)
[    0.000000]  BIOS-e820: 00000000ffc00000 - 0000000100000000 (reserved)
[    0.000000]  BIOS-e820: 0000000100000000 - 0000000c40000000 (usable)

这篇关于操作系统如何知道物理内存的实际大小?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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