Computer system, method, device and BIOS chip for FRU information management
By detecting the FRU device type and updating the FRU information during the BIOS startup stage, the problem of FRU information in the existing technology that needs to be manually updated after the operating system is loaded, and the FRU information update is fully automated and management efficiency is improved.
Patent Information
- Application Number
- CN202510222651.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-27
- Publication Date
- 2025-05-16
- Estimated Expiration
- 2045-02-27
AI Technical Summary
In the prior art, FRU information needs to be manually updated after the operating system is loaded, resulting in low management efficiency.
The BIOS chip detects the device type of the FRU device inserted into the slot during the BIOS boot stage, obtains the FRU information matching the FRU device, and writes the FRU information into the FRU device through the system management bus.
Fully automation of FRU information updates has been realized, reducing human intervention, reducing operational complexity and improving work efficiency.
Smart Images

Figure CN119718443B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a computer system, method, device and basic input output system (BIOS) chip for field replaceable unit (FRU) information management. Background Art
[0002] In modern computer systems, FRUs not only exist as physical components of hardware modules, but also play an important role in system management and equipment maintenance. In order to improve the flexibility and hardware compatibility of server systems, different types of FRUs can be inserted into the slots or interfaces of the server control board.
[0003] In order to adapt to different types of FRUs, the configuration information in the FRU needs to be modified or updated. In related technologies, it is usually necessary for the user to manually install third-party software in the operating system after the server's operating system is loaded, and to modify or update the configuration information in the FRU by operating the third-party software.
[0004] In the related art, users are required to manually update configuration information in the FRU, resulting in low management efficiency of the FRU information. Summary of the invention
[0005] The present application provides a computer system, method, device and BIOS chip for FRU information management, so as to at least solve the problem in the related art that FRU information needs to be manually updated after the operating system is loaded.
[0006] The present application provides a computer system for FRU information management, the computer system comprising a BIOS chip, a system management bus and at least one slot; the slot is used to insert a FRU device, and the BIOS chip is connected to the FRU device inserted into the slot through the system management bus; the BIOS chip is used to detect the device type of the FRU device inserted into the slot during the BIOS startup phase, and obtain FRU information matching the device type of the FRU device; and the FRU information is written into the FRU device through the system management bus.
[0007] The present application also provides a method for FRU information management, which is applied to a computer system, wherein the computer system includes a BIOS chip, a system management bus, and at least one slot; the slot is used to insert a FRU device, and the BIOS chip is connected to the FRU device inserted into the slot through the system management bus; the method is executed by the BIOS chip, and the method includes: during the BIOS startup phase, detecting the device type of the FRU device inserted into the slot; obtaining FRU information matching the device type of the FRU device; and writing the FRU information into the FRU device through the system management bus.
[0008] The present application also provides a device for FRU information management, which is configured in a BIOS chip, and the BIOS chip is configured in a computer system. The computer system also includes a system management bus and at least one slot; the slot is used to insert a FRU device, and the BIOS chip is connected to the FRU device inserted into the slot through the system management bus; the device includes: a device type acquisition module, which is used to detect the device type of the FRU device inserted into the slot during the BIOS startup phase; a FRU information acquisition module, which is used to obtain FRU information matching the device type of the FRU device; and a FRU information writing module, which is used to write the FRU information into the FRU device through the system management bus.
[0009] The present application also provides a BIOS chip, which is configured in a computer system. The computer system also includes a system management bus and at least one slot; the slot is used to insert a FRU device, and the BIOS chip is connected to the FRU device inserted into the slot through the system management bus; the BIOS chip is used to detect the device type of the FRU device inserted into the slot during the BIOS startup phase; obtain FRU information that matches the device type of the FRU device; and write the FRU information into the FRU device through the system management bus.
[0010] The present application also provides a computer-readable storage medium, in which a computer program is stored, wherein when the computer program is executed by a processor, the steps of any of the above-mentioned methods for FRU information management are implemented.
[0011] The present application also provides a computer program product, including a computer program, which implements the steps of any of the above methods for FRU information management when executed by a processor.
[0012] In the present application, since the computer system includes a BIOS chip, a system management bus, and at least one slot; a FRU device can be inserted into the slot, and the FRU device inserted into the slot can establish a connection with the BIOS chip through the system management bus. During the BIOS startup phase, the BIOS chip detects the device type of the FRU device inserted into the slot, obtains FRU information that matches the device type of the FRU device, and writes the FRU information into the FRU device through the system management bus. Therefore, there is no need to rely on manual writing of FRU information after the operating system is loaded, which realizes full automation of FRU information update, reduces human intervention, reduces operational complexity, and improves work efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] In order to more clearly illustrate the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0014] Figure 1 A schematic diagram of the structure of a computer system for FRU information management provided in an embodiment of the present application;
[0015] Figure 2 An interactive schematic diagram of establishing a communication channel based on a system management bus provided in an embodiment of the present application;
[0016] Figure 3 A schematic diagram of the structure of another computer system for FRU information management provided in an embodiment of the present application;
[0017] Figure 4 A flowchart of a method for FRU information management provided in an embodiment of the present application;
[0018] Figure 5 A schematic diagram of the structure of a device for FRU information management provided in an embodiment of the present application. DETAILED DESCRIPTION
[0019] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0020] It should be noted that, in the description of this application, the terms "include", "comprise" or any other variant thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. The terms "first", "second", etc. in this application are used to distinguish similar objects, and are not used to describe a specific order or sequence.
[0021] In order to enable those skilled in the art to better understand the present application, the present application is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.
[0022] Embodiment 1
[0023] The embodiment of the present application provides a computer system for FRU information management, combined with Figure 1 , the computer system and the management method of FRU information are described in detail, such as Figure 1 As shown, the computer system 10 provided in the embodiment of the present application includes a BIOS chip 11, a system management bus 12 and at least one slot 13. The slot 13 is used to insert a FRU device, and the BIOS chip 11 is connected to the FRU device inserted into the slot through the system management bus.
[0024] The BIOS chip is one of the key components of the server and is responsible for the computer startup and hardware device initialization. As a form of firmware, the BIOS chip is usually embedded in the motherboard of the computer system and powered by a battery to ensure that the data in the BIOS chip is continuously saved when the server is turned off. The basic configuration information and basic setting information of the computer are stored in the BIOS chip, including but not limited to: the startup sequence of hardware devices, the detection and initialization of hardware devices, the system time and date, etc. The BIOS program is stored in the BIOS chip. The BIOS program runs first when the computer starts up and is responsible for important tasks such as performing the power-on self-test (POST), initializing hardware, detecting connected devices, and loading the operating system boot program. The BIOS chip plays a vital role in the operation of the computer system, and its stability and reliability have a significant impact on the performance and operation status of the entire system. In the computer startup sequence, the BIOS chip undertakes the key task of initializing the hardware device information. This process involves presenting the status information of the hardware device to the user through the BIOS setup interface and performing a series of necessary preparations for transmitting the information to the baseboard management controller (BMC). The BMC is a key component integrated on the server motherboard, and its main function is to comprehensively manage and monitor the server hardware and software. BMC has core functions such as real-time monitoring of server operating status, collection of sensor data, and review of event logs, and supports remote management and control of server systems. BMC also provides security functions including remote authentication and access control. By using the server's BMC, system administrators can perform server system management and maintenance tasks with higher efficiency, thereby improving system stability and reliability. At the same time, BMC can also provide asset information functions, such as the physical location, model, status, etc. of the device, so that system administrators can perform remote management.
[0025] Among them, the System Management Bus (SMBus) is a two-wire interface for lightweight communication between low-speed peripheral devices. It is based on the Inter-Integrated Circuit (I²C) protocol but adds specific functions and standards to support more reliable communication. SMBus is widely used in computer systems, especially for hardware monitoring and management. SMBus is designed to achieve simple and reliable data transmission between master and slave devices, and is mainly used to monitor the status of hardware devices such as batteries, power modules, temperature sensors, etc. Through SMBus, the system can obtain real-time operating information of the device, such as battery power, temperature, health status, etc., to support fault diagnosis, performance optimization and maintenance management.
[0026] A slot refers to an important interface on a computer motherboard for expanding functions. Optionally, the slot is an expansion slot. In the embodiment of the present application, the slot is a high-speed serial computer expansion bus standard (Peripheral Component Interconnect Express, PCIe) slot as an example for explanation. PCIe slots provide higher bandwidth and lower latency through point-to-point connections. PCIe slots are used to insert expansion cards such as graphics cards, sound cards, and network cards, providing high-speed data transfer rates. PCIe slots have several different physical sizes, including x1, x4, x8, and x16, where the number after the "x" indicates how many data transmission channels the slot has, and larger slots can provide more bandwidth.
[0027] Furthermore, the above slots support backward compatibility, in other words, an expansion card that requires fewer channels can be inserted into a slot that provides more channels. From a physical size point of view, a larger slot (such as x8 or x16) can accept a smaller card (such as x4 or x1). This is because the larger slot physically contains all the connection points of the smaller one. From an electrical connection, a x4 network card can be inserted into a x8 or x16 slot and work properly. Although x8 and x16 slots provide more data transmission channels, they can also operate with a lower number of channels (such as x4). When a x4 device is inserted into an x8 or x16 slot, the device will only use the number of channels it needs (i.e. 4), and the remaining channels will not be used. This ensures that even if a smaller device is installed in a larger slot, resources will not be wasted, while ensuring that the performance of the device is not affected.
[0028] Among them, FRU devices refer to hardware units that can be replaced or repaired without shutting down the entire server system. Optionally, FRUs include but are not limited to the following: graphics cards, sound cards, network cards and other expansion cards. For example: when the network interface on the motherboard is not enough to meet the needs (for example, an additional Ethernet port or support for Wi-Fi / Bluetooth functions is required), a network card can be added through the PCIe slot.
[0029] When the user inserts the FRU device into the slot, the BIOS chip is connected to the FRU device inserted into the slot through the SMBus. In other words, the FRU device can communicate directly with the BIOS chip, allowing the BIOS chip to read and write the FRU device inserted into the slot.
[0030] Furthermore, the BIOS chip is used to detect the device type of the FRU device inserted into the slot during the BIOS startup phase, obtain FRU information matching the device type of the FRU device, and write the FRU information into the FRU device via the system management bus.
[0031] In a possible implementation, the BIOS chip is further used to enable a system management mode (SMM); detect the device type of the FRU device inserted into the slot in the SMM, and perform subsequent operations.
[0032] After the server system receives the startup instruction, the BIOS first enables the relevant operations of the SMM to activate the management function of the server system and provide support for subsequent FRU detection and FRU information update.
[0033] The BIOS boot phase usually refers to a series of processes that occur between the time the computer is powered on and the time the operating system starts loading. This process usually includes the following four key steps: power-on self-test, hardware initialization, boot device search, and boot program loading.
[0034] The power-on self-test is the first step in the BIOS startup phase, which mainly checks whether the computer's internal hardware is working properly, including basic hardware such as memory, hard drive, keyboard, mouse, etc. If any problems are found during the hardware self-test, such as missing or faulty key hardware, the BIOS will prompt the user by beeping or displaying an error message.
[0035] Initializing the hardware means that after completing the power-on self-test, the BIOS will continue to initialize the hardware settings, including setting the operating frequency of the Central Processing Unit (CPU), configuring memory operating parameters, identifying and initializing all connected hardware devices (such as graphics cards, hard drives, optical drives, etc.), and ensuring that these hardware can operate according to preset standards and parameters.
[0036] Finding a boot device means that the BIOS searches for devices that can boot the operating system, such as hard disks, optical drives, USB drives, or network interfaces, in a preset order. Once a device with a valid boot record is found, the BIOS will hand over control to the boot loader on the device.
[0037] Loading the boot program means that after completing the above steps, the BIOS will try to load the boot program of the operating system from the preset boot device. This process involves reading the first sector of the device (that is, the boot loader in the master boot record MBR or EFI partition) and then passing control to the operating system.
[0038] Furthermore, the BIOS chip can also provide runtime services, which means that once the operating system starts loading, the BIOS also provides various interrupt service routines that allow the operating system to interact with the hardware, such as reading and writing disks, obtaining system time, etc.
[0039] It should be noted that during the BIOS boot phase, the hardware devices involved include FRU devices. In other words, the four key steps involved in the BIOS initialization process include: FRU device self-check, initializing FRU devices, searching for FRU boot devices, loading boot programs for FRU devices, and providing runtime services for FRU.
[0040] In a possible implementation, in response to a power-on instruction of the computer system, the BIOS enters the power-on phase. Specifically, responding to the power-on instruction of the computer system includes: responding to a triggering operation of a power-on button of the computer system.
[0041] FRU information can be understood as key information related to the hardware component that is usually stored in the FRU, including but not limited to: the device model of the hardware component, the serial number of the hardware component, the production date of the hardware component, the firmware version of the hardware component, the health status of the hardware component, the manufacturer information of the hardware component, configuration parameters and maintenance history, etc. FRU information plays a vital role in hardware management, maintenance and fault diagnosis.
[0042] FRU information is not only used for hardware identification and traceability, but also provides key information for system management software to read and analyze when the server system starts. For example, the FRU information of a hard disk may contain data such as its health status, read and write times, temperature, and remaining life for administrators to monitor and analyze in real time. For other FRU components such as network adapters, memory modules, and power supply units, their information also provides important support for maintenance personnel in equipment troubleshooting, repair, and replacement. More importantly, FRU information is not limited to the management of a single hardware, but can also transmit information throughout the system to achieve collaboration and intercommunication between different devices. For example, the server management system can dynamically adjust system parameters such as power distribution, fan speed, and temperature control by reading the FRU information of each FRU device to optimize system operation efficiency and stability. At the same time, the sharing of FRU information can promote fault prediction and early warning between hardware modules, thereby improving the system's fault tolerance and availability.
[0043] As can be seen from the above, since the slot has the feature of backward compatibility, the BIOS chip needs to obtain the device type of the FRU device inserted into the slot during the BIOS startup phase. The device type can be the model of the FRU device, or the device type of the FRU device can be distinguished by the number of pins of the FRU device.
[0044] In other words, since the slot is backward compatible, any one of the x1 expansion cards, x4 expansion cards, x8 expansion cards and x16 expansion cards can be inserted into a x16 slot. The FRU information required for the above four expansion cards is different, so the BIOS chip needs to determine the type of network card inserted into the slot to obtain the FRU information that matches the network card type.
[0045] In one possible implementation, the slot includes a slot controller and slot contacts; the slot controller is used to read the electrical signal of the slot contact after the FRU device is inserted into the slot, and send the electrical signal to the BIOS chip; the BIOS chip is used to determine the device type of the FRU device inserted into the slot based on the received electrical signal.
[0046] The slot contains multiple contacts, also known as pins, which are used to provide power, data transmission, and communication with the inserted expansion card. The contacts not only support high-speed data transmission, but are also responsible for transmitting control signals and status information.
[0047] The slot controller here can be understood as a small controller on the motherboard. When the user inserts the FRU device into the slot, the slot controller can read the electrical signals of each contact. The electrical signal can refer to a high or low level signal. For example: when the FRU device is an x8 expansion card, 8 high and low level signals can be read, and when the FRU device is an x16 expansion card, 16 high and low level signals can be read.
[0048] The slot controller transmits the read electrical signal to the BIOS chip. After the BIOS chip receives the electrical signal, it determines the device type of the FRU device inserted into the slot based on the received electrical signal. For example: the slot controller transmits the read 8 high and low level signals to the BIOS chip. After the BIOS chip receives the 8 high and low level signals, it can be determined that the FRU device inserted into the slot is an x8 expansion card. The slot controller transmits the read 16 high and low level signals to the BIOS chip. After the BIOS chip receives the 16 high and low level signals, it can be determined that the FRU device inserted into the slot is an x16 expansion card.
[0049] In a possible implementation, the BIOS chip obtains FRU information that matches the device type of the FRU device, including: the BIOS chip reads the correspondence between various device types and FRU information, and finds FRU information that matches the device type of the FRU device inserted into the slot in the correspondence between various device types and FRU information. For example: the BIOS chip reads the FRU information of the x1 expansion card, the FRU information of the x4 expansion card, the FRU information of the x8 expansion card, and the FRU information of the x16 expansion card, and the device type of the FRU device inserted into the slot is the x16 expansion card, then the FRU information of the x16 expansion card is used as the FRU information that matches the device type of the FRU device inserted into the slot.
[0050] In a possible implementation, the BIOS chip reads the correspondence between various device types and FRU information in the following ways, but not limited to:
[0051] Read the correspondence between each device type and FRU information from the storage medium of the BIOS chip. The BIOS chip itself contains some default FRU information. This FRU information is preset based on extensive hardware compatibility testing and stored in the storage medium of the BIOS chip. When the computer system starts, the BIOS chip will use this FRU information to initialize the FRU device.
[0052] Read the correspondence between each device type and FRU information from the non-volatile memory of the computer system. Among them, the non-volatile memory includes: Complementary Metal Oxide Semiconductor (CMOS) or Real-Time Clock (RTC) chip. Some configuration parameters that can be adjusted by the user are saved in the CMOS or RTC chip. Because the CMOS or RTC chip is powered by a small battery, its content can be retained even when the computer system is powered off. Changes made by the user through the BIOS setup interface will be saved in the CMOS or RTC chip. The configuration parameters adjusted by the user include but are not limited to: date, time, boot sequence, etc.
[0053] Read the correspondence between each device type and FRU information from the system management table. The system management table includes the Advanced Configuration and Power Management Interface (ACPI) and other types of system management tables. Modern computers use the ACPI standard to define a variety of tables that contain allocation information about system hardware resources. BIOS reads these tables to understand how to correctly configure various hardware components. Among them, the allocation information of hardware resources includes but is not limited to: interrupt requests, direct memory access channels, input and output ports, etc. Other types of system description tables are used to provide more hardware details for BIOS reference.
[0054] It should be noted that the embodiments of the present application only describe the method of obtaining FRU information, rather than identification.
[0055] In one possible implementation, the BIOS chip is used to obtain FRU information that matches the device type of the FRU device, specifically to read the system management table address and store the system management table address in a set pointer in the memory, the system management table including the correspondence between the device type and the FRU information; the FRU information that matches the device type of the FRU device is read from the system management table by setting the system management table address stored in the pointer.
[0056] The system management table, also known as the system description table, generally refers to a data structure or table used to describe system configuration, hardware parameters, software version information and other important system attributes in a computer system. In an embodiment of the present application, the system management table includes FRU information corresponding to the device type of each FRU device in the server system. FRU information includes, but is not limited to: the model, serial number, manufacturer information, production date, hardware version, write address of FRU information, etc. of each FRU. The system management table provides a centralized source of information, which is convenient for identifying and managing each FRU component within the system, and facilitates the maintenance and troubleshooting of each FRU. Furthermore, SMST is also a data structure for storing the address of the system management interrupt service routine (SMI Handler) and other related information to ensure that subsequent management operations can correctly call related services.
[0057] The system management table address may be understood as a specific storage location of the system management table in a storage medium of the BIOS or a storage system of the server system.
[0058] In one possible implementation, during the BIOS boot process, the system management table address is read, including: after the server system receives the boot command, the BIOS first enables the relevant operations of the SMM to activate the management function of the server system and provide support for subsequent FRU detection and FRU information updates. Specifically, the BIOS will configure the processor's ability to enter the system management mode at the beginning of the boot, including setting a specific memory area as the storage space for the system management mode (System Management RAM, SMRAM). SMRAM is a memory area specially allocated for storing SMM code and data, which is invisible to external access to ensure security.
[0059] Furthermore, the BIOS chip selects a secure and fixed memory address in SMRAM to store the pointer to the system management table address to implement data protection for the system management table address and prevent unauthorized access. By placing the pointer to the system management table address at a known and secure storage address, the BIOS chip or other components can access the system management table address when needed to perform necessary system management tasks. For example, when an SMI occurs, the CPU knows where to find the corresponding Handler to handle the interrupt request.
[0060] In an embodiment of the present application, the BIOS chip reads the system management table address from the pointer of the system management table address, accesses the system management table address, reads the correspondence between various device types and FRU information from the system management table address, and finds the FRU information that matches the device type of the FRU device inserted into the slot in the correspondence between various device types and FRU information.
[0061] The BIOS chip writes the FRU information into the FRU device through the system management bus, including: the BIOS chip writes the FRU information into the memory of the FRU device through the system management bus.
[0062] The memory of the FRU may be understood as an embedded storage medium contained in the FRU, and the embedded storage medium includes but is not limited to: an electrically erasable programmable read-only memory (EEPROM), a FLASH memory, and the like.
[0063] In one possible implementation, if there are multiple slots, during the BIOS boot process, for the FRU devices in each slot, FRU information matching the device type of the FRU device is obtained in turn, and the FRU information matching the device type is written into the memory of the corresponding FRU device.
[0064] In a possible implementation, the FRU information is written into a write address corresponding to a memory of the FRU.
[0065] Further, a new FRU information file is prepared according to the read FRU information. For example, a binary file containing FRU information or a file following a set format is edited, wherein the set format includes but is not limited to: XML, JSON. The ipmitool tool is used to write the file containing the FRU information into the write address corresponding to the FRU memory.
[0066] For example, if the write address corresponding to the FRU information is 0xA00, it means that the FRU information is written starting from the address 0xA00 of the FRU memory. Specifically, writing the FRU information to the write address corresponding to the FRU memory includes: enabling the system management bus, and using the system management bus to establish a communication channel between the BIOS and the FRU; and writing the FRU information to the write address corresponding to the FRU memory through the communication channel.
[0067] In the embodiment of the present application, since the device type of the FRU device inserted into the slot is detected during the BIOS startup phase, and the FRU information matching the device type of the FRU device is obtained; the FRU information is written into the FRU device through the system management bus, the embodiment of the present application has the following beneficial effects:
[0068] 1. No need to rely on manual detection and update of FRU information after the operating system is loaded, but the relevant operations are completed during the BIOS startup phase, realizing full automation of FRU information update. This greatly reduces the need for human intervention, reduces operational complexity, and improves work efficiency.
[0069] 2. Since the FRU information is updated during the system startup phase, the latest status information of the FRU can be obtained and recorded earlier. This enhances the real-time and accuracy of the system, ensures that the system can allocate and optimize resources based on the accurate hardware status after startup, and reduces system performance problems and potential faults caused by information lag.
[0070] 3. Through the unified BIOS management mechanism, centralized management and maintenance of FRU devices are achieved. System administrators can remotely monitor and manage FRU information through BMC without entering the operating system or using additional management software. It simplifies the management process, reduces maintenance costs, and improves maintenance efficiency, which is particularly suitable for large data centers and remotely deployed server environments.
[0071] Embodiment 2
[0072] Based on the technology of the above-mentioned embodiments, the embodiments of the present application introduce a method of establishing a communication channel based on a system management bus.
[0073] like Figure 2 As shown, the BIOS chip sends a startup instruction to the system management bus, which is used to enable the system management bus and allocate an access address to the FRU device; if the BIOS chip can access the FRU device through the access address allocated by the FRU device, a communication channel is established between the BIOS chip and the FRU device.
[0074] Enabling SMBus can be understood as activating or turning on the function of the SMBus controller, making the SMBus ready to communicate on the SMBus. Enabling SMBus includes: detecting that the SMBus controller on the motherboard has been correctly installed and that all FRU devices that need to communicate through the SMBus have been correctly inserted into the slots. Set the configuration parameters to enable SMBus. Specifically, configure basic parameters such as clock frequency, I / O port address, etc. according to the specific hardware platform. This usually involves writing to specific control registers. Set one or more bits in the control register of the SMBus controller to activate its function. For example, in the SMBus controller, set an "Enable" bit, which, when set to 1, enables SMBus operations.
[0075] Specifically, the FRU device is correctly inserted into the slot, and the memory of the FRU device is accessible through the SMBus. Each FRU device connected to the SMBus is assigned a unique 7-bit access address. The access address of the FRU device must be known or can be obtained through query. The access address is used to determine whether the communicating FRU device is accessible. During the system startup phase, the BIOS chip is responsible for initializing the SMBus bus. Once the SMBus bus is initialized, the BIOS chip will perform a device enumeration process to identify all FRU devices connected to the SMBus. During this process, the system will record the unique address of each FRU device, which is crucial for subsequent communication with a specific device.
[0076] Enable the SMBus controller, including setting the controller's operating mode, configuring I / O ports, allocating IRQ and other resources, and enabling the SMBus function.
[0077] Writing the FRU information to the write address corresponding to the memory of the FRU device through the communication channel includes: using the SMBus protocol to send a "block write" command (Block Write) to the memory of the FRU device, which allows multiple bytes of data to be written at one time.
[0078] Specifically, the BIOS chip sends a start signal to the memory of the FRU device, and sends a byte containing the FRU information and a write direction bit. Sends a write address to indicate which address to start writing from. Sends a data block containing the FRU information in a set format. Sends a stop signal.
[0079] In the embodiment of the present application, the read and write operations of SMBus in the memory are enabled to ensure that the system can perform data transmission through the SMBus protocol, provide the necessary communication channel for information exchange between BIOS and FRU, and support information reading and updating of each FRU module.
[0080] The embodiments of the present application adopt a standardized SMBus protocol to achieve reliable data transmission and exchange between the BIOS and each FRU. This communication framework ensures data consistency and transmission efficiency in a multi-device environment. The SMBus protocol has good cross-platform compatibility and scalability. FRU modules or hardware devices of different brands can be easily integrated into the existing system, support automatic detection and management of more devices, meet the requirements of diversified and complex hardware environments, and enhance the system's adaptability and future expansion potential.
[0081] In a possible implementation, when FRU devices are respectively inserted into a plurality of slots, the system management bus is used to assign different access addresses to the respective FRU devices;
[0082] The BIOS chip is used to access the FRU device in sequence through the access address assigned to the FRU device; if the FRU device cannot be accessed through the access address assigned to the FRU device, the access address assigned to the next FRU device is obtained; and the next FRU device is accessed through the access address assigned to the next FRU device.
[0083] Specifically, the BIOS chip uses the access address assigned by the system management bus to send a detection request to the FRU device; if the BIOS chip receives a response message fed back by the FRU device within a set time, the communication channel between the BIOS chip and the FRU device is closed; if the BIOS chip does not receive a response message fed back by the FRU device within a set time, the BIOS chip uses the next access address assigned by the system management bus to send a detection request to the next FRU device.
[0084] A probe request usually refers to a signal or command sent by the BIOS chip to a FRU device to confirm the existence of the FRU device and check whether it is ready for communication. A probe request can be considered a "handshake" process to determine the status and accessibility of the target device. A response message refers to the data or status information returned by the target FRU device to the BIOS chip when the BIOS chip sends a probe request to the target FRU device. The response message can confirm the existence of the target FRU device, indicate the status of the FRU, provide specific query results, or confirm the successful execution of the issued command.
[0085] Specifically, the BIOS chip obtains the address range of all possible FRU devices connected to the SMBus. Each FRU device has a unique 7-bit address. For each FRU device address, a probe request is sent in sequence. If a response message is received within the set time, it means that the FRU device is online and accessible, and then a communication channel is established between the BIOS chip and the FRU device as required to perform subsequent write operations. If no response message is received within the set time, the BIOS chip should skip the access address of the current FRU device and continue to send a probe request to the access address of the next FRU device.
[0086] If no response message is received within the set time, it indicates that the FRU device is in an inaccessible state. At this time, an alarm signal should be generated and an alarm should be issued in time.
[0087] If no response message is received within the set time, a probe request is sent to the access address of the FRU device again. If no response message is received within the set time, the retry fails. If the number of retry failures reaches the set number, a probe request is sent to the access address of the next FRU device.
[0088] Furthermore, in order to prevent a long wait for an unresponsive FRU device, a reasonable setting time may be set.
[0089] In an embodiment of the present application, by sending a detection request and receiving a response message, it is possible to monitor in real time whether each FRU device is in an accessible state, and to promptly alarm when the FRU device is in an inaccessible state, thereby helping to take measures before a fault occurs and reduce downtime and maintenance costs.
[0090] By fully testing various FRU devices during the BIOS chip initialization process and updating the FRU information in the FRU devices in real time, potential hardware failures or abnormal conditions can be discovered early. This allows the system to pre-process these problems during the startup process, avoiding sudden failures during the operation of the operating system, thereby improving the reliability and stability of the overall system.
[0091] Embodiment 3
[0092] Based on the technology of the above embodiment, the embodiment of the present application further optimizes the consistency check of FRU information, such as Figure 3 As shown, the system management bus is connected to the FRU device through a multiplexer; the system management bus is used to send a first level signal to the multiplexer (MUX); the multiplexer is used to open a first channel in response to the first level signal to establish a write channel between the BIOS chip and the FRU device; the BIOS chip is used to write the FRU information into the FRU device through the write channel.
[0093] A multiplexer is an electronic device used to select one signal from multiple analog or digital input signals for transmission. The data of one input channel is selected by the control signal to be passed to the output end, so that different signals can be transmitted at different time points. Multiplexing technology is widely used in electrical signal processing and communication systems to increase the efficiency of communication links and reduce costs.
[0094] In digital circuits, multiplexers usually use binary codes as selection signals to select specific input channels. For example, a 4-to-1 multiplexer will have 4 data inputs, 2 selection inputs, and 1 output. Depending on the different combinations of the selection inputs, any one of the 4 data inputs can be selected to connect to the output.
[0095] The first level signal can be a low level signal. In other words, the system management bus sends a low level signal to the MUX. After receiving the low level signal, the MUX selects an input channel from multiple data input terminals for data transmission. The selected channel is the first channel opened to establish a write channel between the BIOS chip and the FRU device.
[0096] In a possible implementation, the BIOS chip is used to write the configuration information of the FRU into a corresponding write address in a memory of the FRU device through a write channel.
[0097] The FRU information includes the configuration information and write address of the FRU device. The configuration information of the FRU device includes the CPU port configuration information and the bandwidth configuration information. The write address is the physical address where the above configuration information is to be written.
[0098] Further, such as Figure 3As shown, the system management bus is also used to send a second level signal to the multiplexer; the multiplexer is used to open the second channel in response to the second level signal to establish a read channel between the BIOS chip and the FRU device; the BIOS chip is used to read the relevant information of the system management SMBIOS in the FRU device through the read channel; based on the relevant information of the SMBIOS, the configuration information of the FRU device written into the FRU is verified.
[0099] The second level signal can be a high level signal. In other words, the system management bus sends a high level signal to the MUX. After receiving the high level signal, the MUX selects an input channel from multiple data input terminals for data transmission. The selected channel is the opened second channel, and a read channel is established between the BIOS chip and the FRU device. The BIOS chip is used to read the relevant information of the system management SMBIOS in the FRU device through the read channel.
[0100] SMBIOS is a set of data structures that provides a standardized way for BIOS chips to access computer hardware configuration information. Information about FRU information written to the memory of the FRU device is saved in SMBIOS.
[0101] The relevant information of SMBIOS includes the number of bytes occupied by the configuration information in the memory of the FRU device and the storage address occupied by the configuration information in the memory of the FRU device.
[0102] Reading SMBIOS related information includes: using Windows Management Instrumentation (WMI) to query SMBIOS related information, or using a third-party tool to directly read the SMBIOS table and determine its related information based on the read SMBIOS.
[0103] Read the relevant information of SMBIOS, including: extract the SMBIOS entry point location from the FRU memory. The SMBIOS entry point is located at a fixed location in the system memory or is found through a specific signature. Parse the entry point structure to obtain the pointer to the actual SMBIOS and its size. Verify the SMBIOS data. After the verification is completed, the starting address of the SMBIOS and the number of bytes occupied by the SMBIOS will be obtained.
[0104] A consistency check is performed on the FRU information written into the FRU device based on the relevant information of the SMBIOS. If the check passes, it indicates that the FRU information written into the FRU device is correct. If the check fails, it indicates that the FRU information written into the FRU device is incorrect.
[0105] In a possible implementation, the relevant information of SMBIOS includes the number of bytes occupied by the configuration information in the memory of the FRU device; the BIOS chip is used to compare the number of bytes occupied by the configuration information in the memory of the FRU device with the actual number of bytes of the configuration information; if the number of bytes occupied by the configuration information in the memory of the FRU device is the same as the actual number of bytes of the configuration information, the verification passes; if the number of bytes occupied by the configuration information in the memory of the FRU device is different from the actual number of bytes of the configuration information, the verification fails.
[0106] The actual number of bytes of the configuration information can be understood as the number of bytes of the configuration information obtained by the BIOS chip. The number of bytes occupied by the configuration information in the memory of the FRU device is compared with the actual number of bytes of the configuration information for consistency. If the number of bytes occupied by the configuration information in the memory of the FRU device is the same as the actual number of bytes of the configuration information, it indicates that the configuration information written into the FRU device is consistent with the number of bytes of the obtained configuration information, and the consistency check passes. If the number of bytes occupied by the configuration information in the memory of the FRU device is different from the actual number of bytes of the configuration information, it indicates that the configuration information written into the memory of the FRU device is inconsistent with the number of bytes of the obtained configuration information, and the consistency check fails.
[0107] In the embodiment of the present application, a consistency check is performed between the number of bytes occupied by the configuration information in the memory of the FRU device and the actual number of bytes of the configuration information to perform data verification and ensure the accuracy of subsequent data.
[0108] In a possible implementation, the relevant information of SMBIOS includes the storage address occupied by the configuration information in the memory of the FRU device; a BIOS chip is used to compare the storage address occupied by the configuration information in the memory of the FRU device with the write address corresponding to the configuration information; if the storage address occupied by the configuration information in the memory of the FRU device is the same as the write address corresponding to the configuration information, the verification passes; if the storage address occupied by the configuration information in the memory of the FRU device is different from the storage address corresponding to the configuration information, the verification fails.
[0109] The storage address occupied by the configuration information in the memory of the FRU device refers to the starting address of the configuration information in the memory of the FRU device. The write address corresponding to the configuration information refers to the write address included in the acquired FRU information. The storage address occupied by the configuration information in the memory of the FRU device and the write address corresponding to the configuration information are compared for consistency. If the storage address occupied by the configuration information in the memory of the FRU device is the same as the write address corresponding to the configuration information, it indicates that the configuration information written into the memory of the FRU device is written to the correct storage address, and the consistency check passes. If the storage address occupied by the configuration information in the memory of the FRU device is different from the write address corresponding to the configuration information, it indicates that the configuration information written into the memory of the FRU device is not written to the correct storage address, and the consistency check fails.
[0110] In the embodiment of the present application, a consistency check is performed between the storage address occupied by the configuration information in the memory of the FRU device and the write address corresponding to the configuration information to verify the data storage address, thereby ensuring that accurate data positioning can be achieved subsequently.
[0111] If the verification fails, it indicates that the configuration information written into the FRU device is incorrect. In this case, it is necessary to re-acquire the FRU information that matches the device type of the FRU device and re-perform the write operation on the memory of the FRU device to ensure that the information written into the memory of the FRU device is correct and improve the accuracy of the data.
[0112] Embodiment 4
[0113] In the above embodiment, after the BIOS chip verifies the FRU information written into the FRU device, it needs to perform the next operation on the FRU device. Specifically, the BIOS chip is also used to enable the memory of the FRU device after writing the FRU information into the FRU device through the system management bus.
[0114] The memory of the FRU device may be understood as an embedded storage medium contained in the FRU device. The embedded storage medium includes but is not limited to: EEPROM, FLASH memory, and the like.
[0115] Enabling the memory of a FRU device refers to activating or turning on the function of the non-volatile memory in the FRU so that it is ready for read and write operations. This usually involves setting specific control bits or sending specific commands to the memory to ensure that it is in an operational state.
[0116] After the FRU information written into the FRU device is verified, the BIOS chip sends a specific enable command to the FRU device, which is used to activate the memory read and write function of the FRU device. Then, a simple read and write operation is performed to verify whether the memory read and write function is activated. After verifying that the memory read and write function is activated, the communication channel between the BIOS chip and the FRU device is closed to release the occupied resources.
[0117] Enabling the memory of a FRU device means activating the read and write functions of the memory, making it ready for data exchange. By enabling the memory of a FRU device, you can ensure that the system can read and write the memory effectively. This provides necessary support for the update and storage of FRU information, ensuring smooth data operations.
[0118] Furthermore, the BIOS chip is also used to mark the data of a set type stored in the memory of the FRU device as read-only.
[0119] Read-only status refers to an operation mode of the memory of the FRU device. In read-only mode, the FRU information can only be read but not modified or deleted. In other words, any attempt to write or erase the memory in read-only status will fail.
[0120] If the memory of the FRU device is configured with a physical write protection switch, whether the memory is allowed to be written is directly controlled by switching the protection switch.
[0121] Many memories have set commands or register bits to switch read and write permissions. For example, in an SMBus / I2C connected EEPROM, there may be a specific command or register bit to set the memory's operating mode to read-only.
[0122] In a possible implementation, the BIOS chip is used to create a read-only state variable in the system, and store the setting type in the memory of the FRU device and the offset corresponding to the setting type in the read-only state variable.
[0123] A read-only state variable is one that uses a suitable data structure to store the state for each type and offset combination. A read-only state variable can be an array, map, bitmap, or other data structure.
[0124] Specifically, create an instance of the WriteOnceStatus class, which will be used to track the status of a specific type and offset combination. It will be responsible for tracking which types and offsets have been written. In other words, the set type and the offset corresponding to the set type written to the memory of the FRU device are recorded in the offset corresponding to the set type to ensure that the data of the set type and the offset corresponding to the set type will not be written repeatedly or illegally modified, thereby protecting the security and integrity of the data.
[0125] When the system writes data to a certain type and offset again, the WriteOnceStatus class will identify the conflict and reject the write operation, and prompt that the location has already been written. This can effectively prevent key data from being accidentally overwritten or tampered with, ensuring data security and consistency.
[0126] In a possible implementation, the BIOS chip is further used to create a system management interrupt (SMI) program for the FRU. The SMI program is used to detect the address value of the FRU setting port and call different interface programs to perform tasks based on different address values.
[0127] The SMI program is used to detect the address value of the set port of the FRU device and call different interface programs to perform tasks based on different address values.
[0128] The port of a FRU device generally refers to a hardware interface or address used to communicate with the FRU device. The port of a FRU device allows the system to access and control the FRU device, and perform operations such as reading status information, configuring parameters, and reporting errors. The set port of a FRU device refers to a port that is pre-set to access and control the FRU device. Exemplarily, the set port of a FRU device can be 0xB2.
[0129] The interface program refers to a code module or program for interacting with the FRU device. Specifically, the interface program refers to a program that can perform corresponding tasks according to the address value of the set port of the FRU device.
[0130] Exemplarily, different interface programs perform different tasks. The interface program provides a way to communicate with a hardware device or system component. For example, by calling the interface program, you can send a command or request to the FRU device and receive a response. The interface program is usually responsible for interpreting the data received from the hardware and converting it into meaningful information. For example, converting raw sensor data into temperature readings. The interface program can also be used to control the behavior of the hardware. For example, adjust the fan speed, restart the power supply, or update the firmware. When errors occur when the BIOS chip interacts with the FRU device, the interface program can capture these errors and take appropriate actions, such as logging, attempting recovery operations, or notifying the administrator.
[0131] The SMI program is a special type of interrupt in the x86 architecture. The SMI program allows the BIOS to perform low-level hardware operations without interfering with the currently running tasks. The SMI program is usually used to handle system management tasks that require high priority, such as power management and hardware monitoring.
[0132] Specifically, create an SMI handler. The SMI handler will be called when an SMI occurs. Add logic to the SMI handler to read the address value of the set port of the FRU device, and register the SMI handler in the operating system kernel module through the BIOS chip.
[0133] Inside the SMI processor, the code is written to access the setting port of the FRU device and read its address value. The SMI processor obtains the address value of the setting port of the FRU device and decides which interface program to call based on the obtained address value.
[0134] Specifically, a logical judgment is implemented in the SMI processor to determine which interface program should be called according to the read address value. For example, if the address value of the set port of the FRU device is 0x50, the interface program interfaceA() is called; if it is 0x51, the interface program interfaceB() is called; if it is 0x52, the interface program interfaceC() is called; if it is 0x53, the interface program interfaceD() is called, and so on.
[0135] Calling an interface program can be understood as each interface program is responsible for performing tasks related to a specific address value. The interface program can be used to update certain configurations, perform diagnostic checks, or trigger certain hardware actions.
[0136] Register SMI handler. Detect the address value of the set port of the FRU device, and call different interface programs to perform tasks based on different address values. Achieve accurate response to different types of interrupt signals, ensuring that the system can perform corresponding management operations based on the interrupt signal.
[0137] In one possible implementation, different address values correspond to different priorities; the SMI program is used to suspend calling the interface program corresponding to the second address value when it detects that the priority of the first address value of the set port of the FRU device is higher than the priority of the second address value, and call the interface program corresponding to the first address value, wherein the first address value is the address value corresponding to the currently received call request, and the second address value is the address value corresponding to the interface program currently being called; the SMI program is used to continue calling the interface program corresponding to the first address value when it detects that the priority of the first address value of the set port of the FRU is lower than the priority of the second address value, and after the interface program corresponding to the first address value is executed, call the interface program corresponding to the second address value.
[0138] In an embodiment of the present application, different priorities can be set for different address values. For example, address value 0x50 corresponds to priority 1, address value 0x51 corresponds to priority 2, address value 0x52 corresponds to priority 3, and address value 0x53 corresponds to priority 4. The larger the priority number, the higher the priority.
[0139] When a new call request is received, the SMI program reads the address value corresponding to the call request as the first address value, queries the priority of the first address value, and obtains the address value corresponding to the currently executed task as the second address value, and obtains the priority of the second address value.
[0140] If the priority of the first address value is higher than the priority of the second address value, this means that the currently executing task needs to be stopped immediately, and the interface program corresponding to the first address value needs to be called immediately to execute the task.
[0141] If the priority of the first address value is lower than or equal to the priority of the second address value, the current task is allowed to continue to execute. After the current task is completed, check whether there is a waiting address value with a higher priority. If so, start executing the task corresponding to the address value with a higher priority until the task with a higher priority is completed. Then call the interface program corresponding to the first address value to perform necessary operations.
[0142] Exemplarily, when a new call request is received, the SMI program reads the address value corresponding to the call request as address value 0x53, and the priority of querying address value 0x53 is 4. The address value 0x52 corresponding to the currently executed task is obtained, and the priority of obtaining address value 0x52 is 3. The priority of address value 0x53 is higher than the priority of address value 0x52, and the call of the interface program corresponding to address value 0x52 is interrupted, and the interface program corresponding to address value 0x53 is called first.
[0143] When a new call request is received, the SMI program reads the address value corresponding to the call request as address value 0x51, and queries the priority of address value 0x51 as 2. Get the address value 0x52 corresponding to the currently executed task, and get the priority of address value 0x52 as 3. The priority of address value 0x51 is lower than that of address value 0x52, and continue to call the interface program corresponding to address value 0x52. After the call of the interface program corresponding to address value 0x52 is completed, determine whether there is a priority higher than address value 0x51 in the waiting task. If so, continue to call the interface program corresponding to the high-priority address value until all the interface programs corresponding to the high-priority address values are called, and then call the interface program corresponding to address value 0x51.
[0144] The SMI program can not only respond to the set port address values of different FRU devices, but also effectively manage and schedule the execution of related tasks based on pre-set priorities to ensure that key operations are processed in a timely manner.
[0145] Embodiment 5
[0146] The embodiment of the present application provides a method for FRU information management, the method is applied to a computer system, the computer system includes a basic input and output system BIOS chip, a system management bus and at least one slot; the slot is used to insert a FRU device, and the BIOS chip is connected to the FRU device inserted into the slot through the system management bus; the method is executed by the BIOS chip, such as Figure 4 As shown, the method includes steps S401-S403.
[0147] S401. During the BIOS startup phase, the device type of the FRU device inserted into the slot is detected.
[0148] S402: Acquire FRU information that matches the device type of the FRU device.
[0149] S403: Write the FRU information into the FRU device through the system management bus.
[0150] In the present application, since the computer system includes a BIOS chip, a system management bus, and at least one slot; a FRU device can be inserted into the slot, and the FRU device inserted into the slot can establish a connection with the BIOS chip through the system management bus. During the BIOS startup phase, the BIOS chip detects the device type of the FRU device inserted into the slot, obtains FRU information that matches the device type of the FRU device, and writes the FRU information into the FRU device through the system management bus. Therefore, there is no need to rely on manual writing of FRU information after the operating system is loaded, which realizes full automation of FRU information update, reduces human intervention, reduces operational complexity, and improves work efficiency.
[0151] In a possible implementation, the slot includes a slot controller and a slot contact; detecting the device type of the FRU device inserted into the slot includes: a BIOS chip, which is used to determine the device type of the FRU device inserted into the slot based on a received electrical signal. The electrical signal is read by the slot controller after the FRU device is inserted into the slot, and the electrical signal is sent to the BIOS chip.
[0152] In one possible implementation, obtaining FRU information that matches the device type of the FRU device includes: when obtaining the FRU information that matches the device type of the FRU device, specifically reading a system management table address and storing the system management table address in a set pointer in the memory, the system management table including a correspondence between the device type and the FRU information; and reading the FRU information that matches the device type of the FRU device from the system management table by setting the system management table address stored in the pointer.
[0153] In a possible implementation, the method further includes: if the FRU device is accessible through the access address allocated by the FRU device, establishing a communication channel between the BIOS chip and the FRU device. The access address is allocated to the FRU device after the system management bus is enabled.
[0154] In a possible implementation, when FRU devices are respectively inserted into multiple slots, the system management bus assigns different access addresses to each FRU device; it also includes: accessing the FRU devices in sequence through the access addresses assigned to the FRU devices; if the FRU device cannot be accessed through the access address assigned to the FRU device, obtaining the access address assigned to the next FRU device; accessing the next FRU device through the access address assigned to the next FRU device.
[0155] In one possible implementation, the system management bus is connected to the FRU device through a multiplexer; the system management bus is used to send a first level signal to the multiplexer; the multiplexer is used to open a first channel in response to the first level signal to establish a write channel between the BIOS chip and the FRU device; and the FRU information is written into the FRU device through the write channel.
[0156] In one possible implementation, the FRU information includes configuration information of the FRU device and a write address of the configuration information; writing the FRU information into the FRU device through the system management bus includes: writing the FRU configuration information into a corresponding write address in a memory of the FRU device through a write channel.
[0157] In one possible implementation, the system management bus is also used to send a second level signal to the multiplexer; the multiplexer is used to open the second channel in response to the second level signal to establish a read channel between the BIOS chip and the FRU device; and also includes: reading the relevant information of the system management SMBIOS in the FRU device through the read channel; and verifying the configuration information of the FRU device written into the FRU based on the relevant information of the SMBIOS.
[0158] In a possible implementation, the relevant information of SMBIOS includes the number of bytes occupied by the configuration information in the memory of the FRU device; and also includes: comparing the number of bytes occupied by the configuration information in the memory of the FRU device with the actual number of bytes of the configuration information; if the number of bytes occupied by the configuration information in the memory of the FRU device is the same as the actual number of bytes of the configuration information, the verification passes; if the number of bytes occupied by the configuration information in the memory of the FRU device is different from the actual number of bytes of the configuration information, the verification fails.
[0159] In a possible implementation, the relevant information of SMBIOS includes the storage address occupied by the configuration information in the memory of the FRU device; and also includes: comparing the storage address occupied by the configuration information in the memory of the FRU device with the write address corresponding to the configuration information; if the storage address occupied by the configuration information in the memory of the FRU device is the same as the write address corresponding to the configuration information, the verification passes; if the storage address occupied by the configuration information in the memory of the FRU device is different from the storage address corresponding to the configuration information, the verification fails.
[0160] In a possible implementation, the method further includes: enabling a system management mode SMM; and detecting a device type of a FRU device inserted into the slot in the SMM.
[0161] In a possible implementation, the method further includes: after writing the FRU information into the FRU device via the system management bus, enabling a memory of the FRU device.
[0162] In a possible implementation, the method further includes: marking data of a set type stored in a memory of the FRU device as read-only.
[0163] In one possible implementation, data of a setting type stored in a memory of a FRU device is marked as read-only, including: creating a read-only status variable in the system, and storing the setting type in the memory of the FRU device and the offset corresponding to the setting type in the read-only status variable.
[0164] In a possible implementation, the method further includes: creating a system management interrupt SMI program for the FRU, wherein the SMI program is used to detect the address value of the FRU setting port and call different interface programs to execute tasks based on different address values.
[0165] In one possible implementation, different address values correspond to different priorities; the SMI program is used to suspend calling the interface program corresponding to the second address value when it detects that the priority of the first address value of the set port of the FRU device is higher than the priority of the second address value, and call the interface program corresponding to the first address value, wherein the first address value is the address value corresponding to the currently received call request, and the second address value is the address value corresponding to the interface program currently being called; the SMI program is used to continue calling the interface program corresponding to the first address value when it detects that the priority of the first address value of the set port of the FRU device is lower than the priority of the second address value, and call the interface program corresponding to the second address value after the interface program corresponding to the first address value is executed.
[0166] Embodiment 6
[0167] Based on the above embodiments, the present application provides an application example, which specifically includes the following steps:
[0168] S51: BIOS chip enables SMM related operations
[0169] After the server system starts, the BIOS chip first enables SMM-related operations. This operation activates the system's management function and provides support for subsequent device detection and FRU updates.
[0170] S12: BIOS chip obtains SMST table address and saves system table pointer
[0171] BIOS reads the address of the System Management System Table (SMT) and saves the system table pointer to a predetermined memory location. SMST is a data structure used to store the address of the System Management Interrupt Service Routine (SMIHandle) and other related information to ensure that subsequent management operations can correctly call related services.
[0172] S13: BIOS chip enables SMBus related operations
[0173] Enables SMBus read and write operations in memory to ensure that the system can perform data transmission through the SMBus protocol. Provides the necessary communication channel for information exchange between BIOS and FRU, and supports information reading and updating of each FRU module.
[0174] S14: The BIOS chip obtains the memory table information and returns the address and size of the SMBIOS
[0175] Extract the table information from the memory and return the address and size of the SMBIOS table. The address and size of the SMBIOS table will be used for subsequent data access and management operations to ensure that the BIOS can accurately locate and operate SMBIOS data.
[0176] S15: BIOS chip enables memory related operations
[0177] Enables memory-related operations to ensure that the system can read and write memory effectively. Provides necessary support for the update and storage of FRU information to ensure smooth data operations.
[0178] S16: The BIOS chip creates a WriteOnceStatus variable, which can be used to determine whether the offset of the corresponding Type is read-only.
[0179] Create a WriteOnceStatus variable in the system to determine whether the offset of a specific type is in read-only state. This variable can prevent repeated writing or illegal modification of key data, ensuring data security and integrity.
[0180] S17: BIOS chip registers SMI handler
[0181] Register SMI handler. When the address value of IO port 0xB2 is detected to be 0x50, 0x51, 0x52 or 0x53, different interface programs are called for corresponding processing. Accurate response to different types of interrupt signals is achieved, ensuring that the system can perform corresponding management operations according to the interrupt signal.
[0182] In an embodiment of the present application, during the BIOS initialization phase, a specific method for automatically detecting device status and updating FRU information is implemented through steps S11 to S17, including enabling SMM related operations, obtaining SMST table addresses, enabling SMBus read and write operations, obtaining Flash Table information, enabling Flash operations, creating a WriteOnceStatus variable, and registering an SMI handler.
[0183] The specific implementation method of using the SMBus protocol to transmit and exchange data between the BIOS and FRU modules ensures data consistency and transmission efficiency in a multi-device environment.
[0184] By creating and managing WriteOnceStatus variables, the specific method of controlling the offset write permission of a specific Type is ensured to ensure the security and integrity of FRU information.
[0185] The specific design and implementation method of the SMI handler that calls the corresponding interface program according to different IO port values can achieve accurate response to different interrupt signals.
[0186] In the process of reading and writing FRU content, the specific implementation method of the integrated error detection and processing mechanism ensures that the system can recover and maintain stability in time when an abnormality occurs.
[0187] Through systematic integration and optimization, the automation, real-time and security of FRU content management is achieved, providing an efficient and reliable solution for the maintenance and management of computer systems. The present invention has significant advantages in improving FRU management efficiency, enhancing system reliability, simplifying system maintenance procedures, etc., and has broad application prospects and market value.
[0188] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method.
[0189] Embodiment 7
[0190] The embodiment of the present application also provides a device for FRU information management, such as Figure 5 As shown, the device 50 for FRU information management provided in the embodiment of the present application is configured in a basic input / output system BIOS chip, the BIOS chip is configured in a computer system, and the computer system includes a basic input / output system BIOS chip, a system management bus, and at least one slot; the slot is used to insert a FRU device, and the BIOS chip is connected to the FRU device inserted in the slot through the system management bus; the device includes:
[0191] The device type acquisition module 51 is used to detect the device type of the FRU device inserted into the slot during the BIOS startup phase; the FRU information acquisition module 52 is used to obtain FRU information matching the device type of the FRU device; and the FRU information writing module 53 is used to write the FRU information into the FRU device via the system management bus.
[0192] In the present application, since the computer system includes a BIOS chip, a system management bus, and at least one slot; a FRU device can be inserted into the slot, and the FRU device inserted into the slot can establish a connection with the BIOS chip through the system management bus. During the BIOS startup phase, the BIOS chip detects the device type of the FRU device inserted into the slot, obtains FRU information that matches the device type of the FRU device, and writes the FRU information into the FRU device through the system management bus. Therefore, there is no need to rely on manual writing of FRU information after the operating system is loaded, which realizes full automation of FRU information update, reduces human intervention, reduces operational complexity, and improves work efficiency.
[0193] In one possible implementation, the slot includes a slot controller and slot contacts; the device type of the FRU device inserted into the slot is detected, and the device type acquisition module 51 is specifically used to determine the device type of the FRU device inserted into the slot based on the received electrical signal. The electrical signal is read by the slot controller from the slot contact after the FRU device is inserted into the slot, and the electrical signal is sent to the BIOS chip.
[0194] In one possible implementation, the FRU information acquisition module 52 is specifically used to obtain FRU information that matches the device type of the FRU device, specifically to read the system management table address, and store the system management table address in a set pointer in the memory, the system management table including the correspondence between the device type and the FRU information; by setting the system management table address stored in the pointer, the FRU information that matches the device type of the FRU device is read from the system management table.
[0195] In one possible implementation, the communication channel establishing module is used to establish a communication channel between the BIOS chip and the FRU device if the FRU device is accessible through the access address assigned by the FRU device. The access address is assigned to the FRU device after the system management bus is enabled.
[0196] In a possible implementation, when FRU devices are inserted into multiple slots respectively, the system management bus assigns different access addresses to each FRU device respectively; a communication channel establishment module is used to access the FRU devices in sequence through the access addresses assigned to the FRU devices; if the FRU device cannot be accessed through the access address assigned to the FRU device, the access address assigned to the next FRU device is obtained; and the next FRU device is accessed through the access address assigned to the next FRU device.
[0197] In one possible implementation, the system management bus is connected to the FRU device through a multiplexer; the system management bus is used to send a first level signal to the multiplexer; the multiplexer is used to open a first channel in response to the first level signal to establish a write channel between the BIOS chip and the FRU device; and the FRU information is written into the FRU device through the write channel.
[0198] In a possible implementation, the FRU information includes configuration information of the FRU device and a write address of the configuration information; the FRU information writing module 53 is specifically used to write the configuration information of the FRU into the corresponding write address in the memory of the FRU device through a write channel.
[0199] In one possible implementation, the system management bus is also used to send a second level signal to the multiplexer; the multiplexer is used to open the second channel in response to the second level signal to establish a read channel between the BIOS chip and the FRU device; the FRU information writing module 53 is specifically used to read the relevant information of the system management SMBIOS in the FRU device through the read channel; based on the relevant information of the SMBIOS, the configuration information of the FRU device written into the FRU is verified.
[0200] In a possible implementation, the relevant information of SMBIOS includes the number of bytes occupied by the configuration information in the memory of the FRU device; an information verification module is used to compare the number of bytes occupied by the configuration information in the memory of the FRU device with the actual number of bytes of the configuration information; if the number of bytes occupied by the configuration information in the memory of the FRU device is the same as the actual number of bytes of the configuration information, the verification passes; if the number of bytes occupied by the configuration information in the memory of the FRU device is different from the actual number of bytes of the configuration information, the verification fails.
[0201] In a possible implementation, the relevant information of SMBIOS includes the storage address occupied by the configuration information in the memory of the FRU device; an information verification module is used to compare the storage address occupied by the configuration information in the memory of the FRU device with the write address corresponding to the configuration information; if the storage address occupied by the configuration information in the memory of the FRU device is the same as the write address corresponding to the configuration information, the verification passes; if the storage address occupied by the configuration information in the memory of the FRU device is different from the storage address corresponding to the configuration information, the verification fails.
[0202] In a possible implementation, the system further includes: an SMM enabling module, configured to enable a system management mode SMM; and detecting a device type of a FRU device inserted into the slot under the SMM.
[0203] In a possible implementation, the method further includes: after writing the FRU information into the FRU device via the system management bus, enabling a memory of the FRU device.
[0204] In a possible implementation, the method further includes: a read-only marking module, configured to mark data of a set type stored in the memory of the FRU device as being in a read-only state.
[0205] In a possible implementation, the read-only marking module is specifically used to create a read-only state variable in the system, and store the setting type in the memory of the FRU device and the offset corresponding to the setting type in the read-only state variable.
[0206] In a possible implementation, it also includes: an SMI program creation module, which is used to create a system management interrupt SMI program for the FRU. The SMI program is used to detect the address value of the FRU setting port and call different interface programs to perform tasks based on different address values.
[0207] In one possible implementation, different address values correspond to different priorities; the SMI program is used to suspend calling the interface program corresponding to the second address value when it detects that the priority of the first address value of the set port of the FRU device is higher than the priority of the second address value, and call the interface program corresponding to the first address value, wherein the first address value is the address value corresponding to the currently received call request, and the second address value is the address value corresponding to the interface program currently being called; the SMI program is used to continue calling the interface program corresponding to the first address value when it detects that the priority of the first address value of the set port of the FRU device is lower than the priority of the second address value, and call the interface program corresponding to the second address value after the interface program corresponding to the first address value is executed.
[0208] For the description of the features in the embodiment corresponding to the device for FRU information management, reference may be made to the relevant description of the embodiment corresponding to the computer system for FRU information management, which will not be described in detail here.
[0209] An embodiment of the present application also provides a BIOS, wherein the BIOS chip is configured in a computer system, wherein the computer system includes a system management bus and at least one slot; the slot is used to insert a FRU device, and the BIOS chip is connected to the FRU device inserted into the slot through the system management bus; the BIOS chip is used to detect the device type of the FRU device inserted into the slot during the BIOS startup phase; obtain FRU information matching the device type of the FRU device; and write the FRU information into the FRU device through the system management bus.
[0210] An embodiment of the present application further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above-mentioned method embodiments for FRU information management.
[0211] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any one of the above-mentioned method embodiments for FRU information management when running.
[0212] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.
[0213] An embodiment of the present application further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps in any one of the above-mentioned method embodiments for FRU information management are implemented.
[0214] An embodiment of the present application also provides another computer program product, including a non-volatile computer-readable storage medium, the non-volatile computer-readable storage medium storing a computer program, and when the computer program is executed by a processor, implementing the steps in any of the above-mentioned method embodiments for FRU information management.
[0215] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0216] The above is a detailed introduction to a computer system method for FRU information management provided by the present application. This article uses specific examples to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method and core ideas of the present application. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the scope of protection of the claims of the present application.
Claims
1. A computer system for FRU information management, characterized in that: The computer system includes a basic input and output system BIOS chip, a system management bus and at least one slot; The slot is used to insert a field replaceable unit FRU device, and the BIOS chip is connected to the FRU device inserted into the slot via a system management bus; The BIOS chip is used to detect the device type of the FRU device inserted into the slot during the BIOS startup phase, and obtain FRU information matching the device type of the FRU device; and write the FRU information into the FRU device through the system management bus; The slot includes a slot controller and a slot contact; The slot controller is used to read the electrical signal of the slot contact after the FRU device is inserted into the slot, and send the electrical signal to the BIOS chip; The BIOS chip is used to determine the device type of the FRU device inserted into the slot based on the number of the received electrical signals.
2. The computer system for FRU information management according to claim 1, characterized in that: The BIOS chip is used to obtain FRU information that matches the device type of the FRU device, specifically to read the system management table address and store the system management table address in a setting pointer in the memory, wherein the system management table includes a correspondence between the device type and the FRU information; and read the FRU information that matches the device type of the FRU device from the system management table through the system management table address stored in the setting pointer.
3. The computer system for FRU information management according to claim 1, characterized in that: The system management bus is used to enable the system management bus and allocate an access address to the FRU device; The BIOS chip is used to establish a communication channel between the BIOS chip and the FRU device if the FRU device is accessible through the access address allocated by the FRU device.
4. The computer system for FRU information management according to claim 3, characterized in that: In the case where FRU devices are respectively inserted into the plurality of slots, the system management bus is used to allocate different access addresses to the respective FRU devices; The BIOS chip is used to access the FRU device in sequence through the access address assigned to the FRU device; if the FRU device cannot be accessed through the access address assigned to the FRU device, obtain the access address assigned to the next FRU device; and access the next FRU device through the access address assigned to the next FRU device.
5. The computer system for FRU information management according to claim 1, characterized in that: The computer system further comprises a multiplexer, and the system management bus is connected to the FRU device via the multiplexer; The system management bus is used to send a first level signal to the multiplexer; The multiplexer is used to open a first channel in response to a first level signal to establish a write channel between the BIOS chip and the FRU device; The BIOS chip is used to write the FRU information into the FRU device through the write channel.
6. The computer system for FRU information management according to claim 5, characterized in that: The FRU information includes configuration information of the FRU device and a write address of the configuration information; The BIOS chip is used to write the configuration information of the FRU into the corresponding write address in the memory of the FRU device through the write channel.
7. The computer system for FRU information management according to claim 6, characterized in that: The system management bus is further used to send a second level signal to the multiplexer; The multiplexer is further used to open the second channel in response to the second level signal to establish a read channel between the BIOS chip and the FRU device; The BIOS chip is further used to read the relevant information of the system management SMBIOS in the FRU device through the reading channel; The configuration information of the FRU device written into the FRU is verified based on the relevant information of the SMBIOS.
8. The computer system for FRU information management according to claim 7, characterized in that: The relevant information of the SMBIOS includes the number of bytes occupied by the configuration information in the memory of the FRU device; The BIOS chip is used to compare the number of bytes occupied by the configuration information in the memory of the FRU device with the actual number of bytes of the configuration information; If the number of bytes occupied by the configuration information in the memory of the FRU device is the same as the actual number of bytes of the configuration information, the verification passes; If the number of bytes occupied by the configuration information in the memory of the FRU device is different from the actual number of bytes of the configuration information, the check fails.
9. The computer system for FRU information management according to claim 7, characterized in that: The relevant information of the SMBIOS includes the storage address occupied by the configuration information in the memory of the FRU device; The BIOS chip is used to compare the storage address occupied by the configuration information in the memory of the FRU device with the write address corresponding to the configuration information; If the storage address occupied by the configuration information in the memory of the FRU device is the same as the write address corresponding to the configuration information, the verification passes; If the storage address occupied by the configuration information in the memory of the FRU device is different from the storage address corresponding to the configuration information, the verification fails.
10. The computer system for FRU information management according to claim 7, characterized in that: The BIOS chip is also used to enable a system management mode SMM; and to detect the device type of the FRU device inserted into the slot under the SMM.
11. The computer system for FRU information management according to any one of claims 1 to 10, wherein the BIOS chip is further used to enable the memory of the FRU device after writing the FRU information into the FRU device through the system management bus.
12. The computer system for FRU information management according to claim 9, characterized in that: The BIOS chip is also used to mark the data of a set type stored in the memory of the FRU device as read-only.
13. The computer system for FRU information management according to claim 12, characterized in that: The BIOS chip is specifically used to create a read-only state variable in the system, and store the setting type in the memory of the FRU device and the offset corresponding to the setting type in the read-only state variable.
14. The computer system for FRU information management according to claim 13, characterized in that: The BIOS chip is also used to create a system management interrupt SMI program for the FRU. The SMI program is used to detect the address value of the FRU setting port and call different interface programs to perform tasks based on different address values.
15. The computer system for FRU information management according to claim 14, characterized in that: Different address values correspond to different priorities; The SMI program is used to suspend the call of the interface program corresponding to the second address value and call the interface program corresponding to the first address value when detecting that the priority of the first address value of the set port of the FRU device is higher than the priority of the second address value, wherein the first address value is the address value corresponding to the currently received call request, and the second address value is the address value corresponding to the interface program currently being called; The SMI program is used to continue calling the interface program corresponding to the first address value when it detects that the priority of the first address value of the set port of the FRU device is lower than the priority of the second address value, and after the interface program corresponding to the first address value is executed, call the interface program corresponding to the second address value.
16. A method for FRU information management, characterized in that: The method is applied to a computer system, the computer system comprising a basic input and output system BIOS chip, a system management bus and at least one slot; the slot is used to insert a field replaceable unit FRU device, the BIOS chip is connected to the FRU device inserted into the slot through the system management bus; The method is executed by the BIOS chip, and the method includes: During the BIOS boot phase, detecting the device type of the FRU device inserted into the slot; Obtain FRU information matching the device type of the FRU device; Writing the FRU information into the FRU device via the system management bus; The slot includes a slot controller and slot contacts; detecting the device type of the FRU device inserted into the slot, including: a BIOS chip, which is used to determine the device type of the FRU device inserted into the slot based on the number of received electrical signals, the electrical signal is read by the slot controller after the FRU device is inserted into the slot, and the electrical signal is sent to the BIOS chip.
17. A device for FRU information management, characterized in that: The device is configured in a basic input / output system BIOS chip, the BIOS chip is configured in a computer system, the computer system further comprises a system management bus and at least one slot; the slot is used to insert a field replaceable unit FRU device, the BIOS chip is connected to the FRU device inserted in the slot via the system management bus; the device comprises: A device type acquisition module, used to detect the device type of the FRU device inserted into the slot during the BIOS startup phase; A FRU information acquisition module, used to acquire FRU information matching the device type of the FRU device; A FRU information writing module, used for writing the FRU information into the FRU device through the system management bus; The slot includes a slot controller and slot contacts; a device type acquisition module is used to detect the device type of the FRU device inserted into the slot, and is specifically used to determine the device type of the FRU device inserted into the slot based on the received electrical signal. The electrical signal is read by the slot controller after the FRU device is inserted into the slot, and the electrical signal is sent to the BIOS chip.
18. A basic input-output system chip, characterized in that: The basic input and output system BIOS chip is configured in a computer system, and the computer system also includes a system management bus and at least one slot; the slot is used to insert a field replaceable unit FRU device, and the BIOS chip is connected to the FRU device inserted in the slot through the system management bus; the BIOS chip is used to detect the device type of the FRU device inserted in the slot during the BIOS startup phase; obtain FRU information matching the device type of the FRU device; and write the FRU information into the FRU device through the system management bus; The slot includes a slot controller and slot contacts; the slot controller is used to read the electrical signals of the slot contacts after the FRU device is inserted into the slot, and send the electrical signals to the BIOS chip; the BIOS chip is used to determine the device type of the FRU device inserted into the slot based on the number of the received electrical signals.
19. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program, when executed by a processor, implements the steps of the method for FRU information management as claimed in claim 16.
20. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method for FRU information management according to claim 16 are implemented.
Citation Information
Patent Citations
PCIE slot configuration setting method and system, medium and device
CN111177055A
Self-adaptive control right distribution method, system and device for FRU information memory
CN114281526A
BIOS (Basic Input / Output System) updating method and device, electronic equipment and storage medium
CN115658106A
Processing method and electronic equipment
CN116954732A
Realizing method of universal serial bus equipment safety switch on
CN1479214A