不是bios引导是什么意思_引导后我的BIOS会做什么?

不是bios引导是什么意思

不是bios引导是什么意思

Once your computer finishes the boot process and you’re firmly inside the operating system buzzing along, is there anything left for the BIOS to do?

一旦您的计算机完成了启动过程,并且您牢牢地掌握着操作系统内部的嗡嗡声,BIOS还有什么要做的事情吗?

Today’s Question & Answer session comes to us courtesy of SuperUser—a subdivision of Stack Exchange, a community-drive grouping of Q&A web sites.

今天的问答环节由SuperUser提供,它是Stack Exchange的一个分支,它是Q&A网站的社区推动组织。

问题 (The Question)

SuperUser reader Indrek poses this BIOS related question:

超级用户阅读器Indrek提出了以下与BIOS相关的问题:

I always wondered whether the BIOS (apart from conducting POST, starting the bootloader and passing control to the OS after one presses the power button) has any purpose or function while the operating system is running?

我一直想知道,BIOS(除了执行POST启动引导程序并在按下电源按钮后将控制权传递给OS)在操作系统运行时是否有任何用途或功能?

Does the operating system communicate with the BIOS while running and if so, how?

操作系统在运行时是否与BIOS通信,如果可以,该如何进行?

Indeed? What function does the BIOS have besides its critical role in the startup of the computer?

确实? BIOS除了在计算机启动中起关键作用外,还具有什么功能?

答案 (The Answers)

Courtesy of SuperUser contributor Mechanical Snail, an overview of how the role of the BIOS has changed over time and what it is and is not doing today: 

由SuperUser贡献者Mechanical Snail提供,它概述了BIOS的角色随时间变化的方式以及它在今天的作用和不起作用:

BIOS的作用 (The Role of the BIOS)

With modern OSs, practically none. Linus Torvalds reportedly said its task is to “just load the OS and get the hell out of there”.

对于现代操作系统, 几乎没有 。 据报道,莱纳斯·托瓦尔兹(Linus Torvalds)表示,其任务是“仅加载操作系统并摆脱困境”。

Older operating systems like MS-DOS relied on the BIOS for many tasks (e.g. disk access), by calling interrupts.

诸如MS-DOS之类的较早的操作系统通过调用中断来依靠BIOS执行许多任务(例如,磁盘访问)。

With modern OSs, the bootloader quickly switches into 32- or 64-bit mode and executes the OS kernel. The kernel can register its own interrupt handlers, which can be called by user-space applications. The kernel’s routines can be more portable (since they don’t depend on the specific hardware), more flexible (OS vendors can change them on demand rather than having to use whatever came with the hardware), more sophisticated (they can execute arbitrarily complex code rather than what was programmed into the BIOS), and more secure (since the OS can control access to shared resources and prevent programs from clobbering each other, implementing its own arbitrary permissions schemes).

对于现代操作系统,引导加载程序可快速切换到32位或64位模式并执行OS内核。 内核可以注册自己的中断处理程序,可由用户空间应用程序调用。 内核的例程可以更可移植(因为它们不依赖于特定的硬件),更灵活(OS供应商可以按需更改它们,而不必使用硬件附带的任何东西),更复杂(它们可以任意执行)代码(而不是BIOS中编写的代码),并且更加安全(因为OS可以控制对共享资源的访问并防止程序相互破坏,从而实现其自己的任意权限方案)。

To interact with specific hardware, OSs can load and use its own device drivers. So there’s no need for the OS or applications to call most BIOS routines at all. In fact, for security reasons, BIOS interrupts are even disabled. Since the BIOS lives in 16-bit real mode it’s harder to call for modern OSs.

为了与特定的硬件交互,操作系统可以加载和使用其自己的设备驱动程序。 因此,操作系统或应用程序根本不需要调用大多数BIOS例程。 实际上,出于安全原因,BIOS中断甚至被禁用。 由于BIOS处于16位实模式下,因此更难调用现代OS。

While use of the BIOS is very limited while the OS runs, its functions are still peripherally used. For example, when a computer sleeps, the OS is not running and it ultimately falls to the firmware to set the hardware to the correct state to pause and resume the OS. These uses are generally limited to ACPIcalls rather than calls to the full BIOS interface. ACPI is a BIOS extension that “brings power management under the control of the operating system (OSPM), as opposed to the previous BIOS-central system, which relied on platform-specific firmware to determine power management and configuration policy”.

虽然在运行OS的过程中BIOS的使用非常有限,但其功能仍在外围使用。 例如,当计算机进入睡眠状态时 ,操作系统未运行,并且最终落入固件中,以将硬件设置为正确的状态以暂停并恢复操作系统。 这些用途通常仅限于ACPI调用,而不是对完整BIOS接口的调用。 ACPI是BIOS扩展,它“在操作系统(OSPM)的控制下进行电源管理,这与以前的BIOS中央系统相反,后者依靠特定于平台的固件来确定电源管理和配置策略”

Note that officially “BIOS” refers to a particular firmware interface, but the term is commonly used to refer to computer firmware in general. Some recent computers (especially Apple ones) have replaced BIOS (sensu strictu) with UEFI, which of course then is what is called to implement these functions.

请注意,正式的“ BIOS”是指特定的固件接口,但是该术语通常通常用于指代计算机固件。 最近的一些计算机(尤其是Apple的计算机)已经用UEFI代替了BIOS(严格意义上的固件),这当然就是所谓的实现这些功能的方法。

For more information about how the role of the BIOS has diminished over time, see Wikipedia.

有关BIOS的角色随着时间的推移如何减少的更多信息,请参阅Wikipedia

()

Another SuperUser contributor, Simon Richter, gives us an overview of the things the BIOS still does: 

另一个SuperUser贡献者Simon Richter向我们概述了BIOS仍在执行的操作:

BIOS和电源管理 (The BIOS and Power Management)

The BIOS provides a number of services to the Operating Systems, most of which are related to power management:

BIOS为操作系统提供了许多服务,其中大多数与电源管理有关:

  • modifying the CPU and bus clocks

    修改CPU和总线时钟
  • enabling/disabling mainboard devices

    启用/禁用主板设备
  • expansion port power control

    扩展端口电源控制
  • suspend-to-disk and suspend-to-RAM

    暂挂到磁盘和暂挂到RAM
  • resume event settings

    恢复事件设置

Suspend-to-disk is implemented in the OS most of the time as the OS can restore its state faster (only the kernel state is reloaded, and program state swapped in when required, which is significantly faster than reloading the entire RAM), but the feature remains in the specification.

由于操作系统可以更快地还原其状态(大多数情况下,只有在重新加载内核状态并在需要时才交换程序状态,这比重新加载整个RAM的速度要快得多),因此大多数时候都在操作系统中实现了“挂起磁盘”功能。该功能仍保留在规范中。

Suspend-to-RAM can not be implemented by the OS, as it relies on the BIOS skipping the RAM initialization and test, so the OS needs an API to tell the BIOS that it intends to be resumed with the current RAM contents. In order to provide this service, the BIOS asks the OS to leave a certain RAM area intact.

操作系统无法实现Suspend-to-RAM,因为它依赖BIOS跳过RAM初始化和测试,因此OS需要一个API来告知BIOS,它打算使用当前RAM内容恢复。 为了提供此服务,BIOS要求OS完整保留某个RAM区域。

The interface for the OS for all BIOS services is a piece of virtual machine code that needs to be run on an emulator, and which generates the necessary I/O operations into the hardware. For suspend, this is generally implemented so that executing one of the hardware writes then triggers an interrupt, which transfers control to the BIOS.

用于所有BIOS服务的OS的接口是一段虚拟机代码,需要在仿真器上运行,并在硬件中生成必要的I / O操作。 对于挂起,通常是这样实现的:执行硬件写操作之一然后触发一个中断,该中断将控制权转移到BIOS。



Have something to add to the explanation? Sound off in the the comments. Want to read more answers from other tech-savvy Stack Exchange users? Check out the full discussion thread here.

有什么补充说明吗? 在评论中听起来不对。 是否想从其他精通Stack Exchange的用户那里获得更多答案? 在此处查看完整的讨论线程

翻译自: https://www.howtogeek.com/124711/what-does-my-bios-do-after-booting/

不是bios引导是什么意思

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值