现代操作系统如何使用 BIOS? [英] How is the BIOS used by a modern OS?

查看:37
本文介绍了现代操作系统如何使用 BIOS?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

BIOS 在现代操作系统中的作用是什么?开机后还能用吗?是否有某种 BIOS API?

What's the function of the BIOS in a modern OS? Is it still used after booting? And is there some kind of BIOS API?

推荐答案

BIOS 仍然是在刚启动的 CPU 上运行的第一个东西,负责让主板硬件开启,设置基本的芯片组模式和寄存器,初始化一些硬件,并运行加载内核的代码.

The BIOS is still the first thing that runs on the just-started CPU and responsible for getting the motherboard hardware turned on, setting basic chipset modes and registers, initializing some hardware, and running the code that loads the kernel.

加载内核后通常不会使用 BIOS,它依赖于 16 位执行环境,而不是现代内核在其中运行的 32 位或 64 位保护模式环境.

The BIOS is usually not used once the kernel is loaded, and depends on a 16-bit execution environment as opposed to the 32- or 64-bit protected mode environment that a modern kernel operates in.

引导加载程序通常需要 BIOS IO 调用才能将内核放入内存中.即使在此角色中,BIOS 也被更新的启动时软件(例如 Coreboot)取代,以提供更快的开机次数.EFI 有一天会取代传统的 BIOS,并有望取代引导加载程序,在从存储加载内核后直接将控制权传递给内核.

The boot loader normally does require the BIOS IO calls to get the kernel into memory. The BIOS is being replaced even in this role by newer boot-time software such as Coreboot to provide faster boot times. EFI will one day replace the traditional BIOS, and hopefully the boot loader, passing control directly to the kernel after loading it from storage.

发现的硬件配置、内存范围设置和 ACPI 元数据表可能是内核加载后操作系统使用的唯一基于 BIOS 的数据.任何可运行的 ACPI 代码都被编码为 ACPI 机器语言并由操作系统解释.

The discovered hardware configuration, memory range settings, and ACPI metadata tables are probably the only BIOS-based data used by the OS after the kernel is loaded. Any runnable ACPI code is encoded as ACPI Machine Language and is interpreted by the OS.

任何关于 MS-DOS 汇编编程的优秀传统书籍都会包含有关 BIOS 编程接口的信息.查看汇编语言编程的艺术

Any good traditional book on MS-DOS assembly programming will include information on the BIOS programming interface. Check out The Art of ASSEMBLY LANGUAGE PROGRAMMING

这篇关于现代操作系统如何使用 BIOS?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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