[英]How does a modern operating system like Windows or Linux know the chipset specific memory map?
The memory map of the peripherals are defined by the chipset.外设的 memory map 由芯片组定义。 However, modern operating systems like linux and Windows can boot from pretty much every chip (if compiled for the right architecture).
然而,像 linux 和 Windows 这样的现代操作系统几乎可以从每个芯片启动(如果编译为正确的架构)。 As far as I know, the memory mapped devices like the USB Host are not included in the architecture standard.
据我所知,memory 映射设备,如 USB 主机不包含在架构标准中。 How can the OS still boot, load the drivers, and function?
操作系统如何仍然可以启动、加载驱动程序和 function? I suppose there must be some specification where the chipset is described.
我想必须有一些描述芯片组的规范。
Formulated a little different: How does the identification of the chipset work, what standards define the communication between the chipset and the processor so that it works on different hardwares and how does the kernel know the right physical addresses for the different peripherals?表述略有不同:芯片组的识别是如何工作的,什么标准定义了芯片组和处理器之间的通信以便它在不同的硬件上工作,以及 kernel 如何知道不同外围设备的正确物理地址?
Open systems typically use a device tree , which is a specification of the attached hardware, and how it is attached.开放系统通常使用设备树,它是附加硬件及其连接方式的规范。 There is another system, ACPI which supports legacy PCs.
还有另一个系统, ACPI ,它支持旧版 PC。 Either system permits an OS to locate and configure the buses and associated peripherals it needs.
任一系统都允许操作系统定位和配置所需的总线和相关外围设备。
It is never 100% as easy as that.它从来没有像那样容易 100%。 For example, it is fine for the OS to know there is a scsi controller on bus 1 at address 1000;
例如,操作系统可以知道总线 1 的地址 1000 上有一个 scsi controller; but if the code for the scsi driver isn't in the loaded os image, then this knowledge is of little use, as it has no way to load the driver.
但是如果scsi驱动的代码不在加载的os镜像中,那么这个知识就没什么用了,因为它没有办法加载驱动。
The intel specification for ACPI attempts to fix this by having tiny driver implementations baked into the firmware of either the platform, the device itself, or both. ACPI 的英特尔规范试图通过将微型驱动程序实现嵌入到平台、设备本身或两者的固件中来解决此问题。 Since the device doesn't necessarily know what sort of cpu it will run on, these mini drivers are written in a virtual instruction set which the host OS requires an interpreter for.
由于设备不一定知道它将在哪种 cpu 上运行,因此这些迷你驱动程序是在主机操作系统需要解释器的虚拟指令集中编写的。
UEFI provides an alternate way have addressing the boot dependency via a more generic mechanism to use mini-boot drivers for the same purpose. UEFI 提供了一种替代方法,通过更通用的机制来解决启动依赖关系,以将微型启动驱动程序用于相同目的。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.