Hardware - Serial Peripheral Interface - BIOS

本文介绍了SPI(Serial Peripheral Interface)在X86主板BIOS中的作用,探讨了双BIOS Flash的功能及其减少使用的原因。内容涵盖BIOS Flash的引脚功能,如CS#、VCC、CLK等,以及PCH支持的不同Fast Read模式。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Serial Peripheral Interface  简称SPI

X86的主板BIOS是如何工作的呢  , 其实就是依赖于SPI通讯

目前的芯片组都支持双BIOS Flash, 但这种做法在我们生活中似乎已经看不到了,可能是因为省成本吧。别看一颗不到一美元,那要是大批量呢,就不是小数目了。。。

言归正传 下图是标准的8Pin BIOS Flash芯片的线路 接下来我会介绍每个Pin是来干嘛的

BIOS Flash最大的容量取决于每个设备的SFDP-discovered(Serial flash Discovery Parameter)寻址能力。使用3字节寻址,每个组件最多可达16 MB(总可寻址32 MB)。使用4字节寻址,每个组件最多可达64 MB(总可寻址128 MB)

当使用双BIOS时,PCH会通过SPI0_CS0#和SPI0_CS1# Pin 进行选择

常规来讲使用一个BIOS Flash就行了 按照规范 我们将BIOS Flash引脚CS# 连到芯片组SPI0_CS0

如图

BIOS Flash :

Chipset :

### FPGA SPI Booting Method In the context of Field Programmable Gate Array (FPGA) devices, one common approach to initialize or configure an FPGA is through Serial Peripheral Interface (SPI) flash memory. This method allows non-volatile storage that retains configuration data even when power cycles occur. For configuring an FPGA via SPI during startup: - The process begins with placing the bitstream file into SPI Flash memory. A bitstream defines how logic cells within the FPGA should be configured. - When powered on, the FPGA checks its mode pins which determine whether it will enter a specific boot mode such as JTAG, I2C, parallel, or serial modes like SPI. For SPI boot loading, these settings instruct the device to look for initialization instructions stored in connected SPI Flash chips rather than waiting for external commands from another controller[^1]. The command `petalinux-package --fsbl fsbl.elf --fpga system.bit --u-boot uImage --force` indicates packaging necessary files including First Stage Boot Loader (`fsbl.elf`) and FPGA image (`system.bit`). These components are essential parts required by some FPGAs at boot time especially those designed around ARM cores where PetaLinux tools facilitate this setup. However, note that while this prepares BOOT.BIN suitable for certain boards possibly using SD card or other media types; direct SPI flashing would involve different procedures often provided specifically by vendor documentation related to your particular hardware platform. To simulate running environments similar to what might happen after successfully setting up SPI bootloading mechanisms, scripts can emulate target systems closely enough so developers may test functionality without actual physical prototypes readily available all times. An example given shows parameters passed to QEMU emulator aimed at creating virtual instances capable of executing Linux kernel images alongside semihosting features useful particularly under debugging circumstances[^2]: ```bash #!/bin/bash qemu/build/qemu-system-aarch64 \ -nographic \ -M virt,secure=on \ -cpu cortex-a57 -smp 4 \ -m 1024 \ -bios bl1.bin \ -kernel Image \ -device virtio-net-device,netdev=eth0 -netdev user,id=eth0 \ -semihosting-config enable=on \ -append "noinitrd root=/dev/nfs nfsroot=10.0.2.2:/home/user/path/to/rootfs,v3 rw init=/linuxrc ip=dhcp console=ttyAMA0" ``` This script does not directly relate to programming SPI but demonstrates environment preparation steps post successful integration of SPI-loaded configurations onto real silicon once development phase concludes satisfactorily inside emulated spaces. --related questions-- 1. How do you generate a bitstream for an FPGA? 2. What role does the first stage bootloader play in embedded systems utilizing FPGAs? 3. Can you explain more about the significance of mode pin states concerning various boot methods supported by FPGAs? 4. In what scenarios would someone choose between using an SD card versus SPI flash for storing boot binaries intended for an FPGA-based design?
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值