Resource management method, resource management device, electronic equipment and storage medium
By acquiring and storing the preset resource information of bus devices in the server's cold standby state and verifying it upon power-up, the problem of unreliable PCIe resource allocation is solved, thereby improving the reliability and efficiency of server startup and operation.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHANDONG ZHISUO INFORMATION TECHNOLOGY CO LTD
- Filing Date
- 2025-12-30
- Publication Date
- 2026-04-17
AI Technical Summary
In existing technologies, the transmission of PCIe resource allocation strategies for servers is unreliable, making it difficult to verify whether the server is reliably powered on, thus affecting the reliability of the server boot process.
When the server is in a cold standby state, the preset resource information of the bus device is obtained through the storage unit mounted on the programmable controller. When the server is powered on, the basic input/output system and the programmable controller work together to perform resource configuration and verification to ensure the reliable transmission and acquisition of resource information.
It improves the reliability of PCIe resource information transmission, ensures the reliability of server startup and operation, and enhances server configuration efficiency and reliability.
Smart Images

Figure CN121880002A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a resource management method, resource management device, electronic device, and computer-readable storage medium. Background Technology
[0002] With the rapid development of the electronics and information industry, the performance requirements for servers are increasing. Consequently, the number, type, and specifications of the bus devices that servers are equipped with are changing. Taking PCIe (Peripheral Component Interconnect Express) as an example, the bus devices that can be integrated into a server may include GPUs (Graphics Processing Units), PCIe hard drives, RAID (Redundant Arrays of Independent Disks) cards, network cards, and other bus devices. These bus devices can be integrated into the same server.
[0003] As server configurations become more complex, the types of bandwidth allocation for CPU (Central Processing Unit) PCIe resources also increase, typically requiring resource allocation policies to be fed back at the start of server power-on. However, the Basic Input / Output System (PIS) usually cannot obtain PCIe bus information identifiers on its own. Unreliable information transmission can easily occur when obtaining bus information identifiers and resource allocation policies through other means, potentially even affecting the reliability of the server's power-on process. Summary of the Invention
[0004] This application provides a resource management method, a resource management device, an electronic device, and a computer-readable storage medium to at least solve the problems of unreliable transmission of resource allocation strategies and difficulty in verifying whether the server is reliably powered on in the related art.
[0005] This application provides a resource management method, which includes: in response to the current server being in a cold standby state, a storage unit mounted on a programmable controller (PLC) obtains preset resource information of the bus devices of the current server; the PLC accesses the storage unit to obtain the preset resource information; in response to the current server being powered on, a basic input / output system (PIS) initializes the bus devices of the current server and configures the resources of the bus devices to form initialization data; the PIS obtains the preset resource information input from the PLC, compares the preset resource information with the initialization data, and in response to a match, the PIS assigns the bus information identifier carried by the preset resource information to the bus devices and transmits the current device information to the baseboard management controller.
[0006] This application also provides a resource management device for implementing the resource management method described in the above embodiments. The resource management device includes a storage unit, a programmable logic controller (PLC), a basic input / output system (PIS), and a baseboard management controller. The storage unit is used to acquire and store preset resource information of the current server's bus devices when the current server is in a cold standby state. The PLC is connected to the storage unit and is used to access the storage unit to acquire the preset resource information. The PLC is connected to the PLC and is used to initialize the current server's bus devices and configure the resources of the bus devices to form initialization data in response to the current server being powered on. The PLC acquires the preset resource information input from the PLC, compares the preset resource information with the initialization data, and in response to a match, assigns the bus information identifier carried by the preset resource information to the bus device and forms current device information, which is then transmitted to the baseboard management controller. The baseboard management controller is used to acquire the current device information.
[0007] This application also provides an electronic device, which includes: a memory and a processor; the memory is used to store a computer program; the processor is used to implement the steps of any of the above-described resource management methods when executing the computer program.
[0008] This application also provides a computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the steps of any of the above-described resource management methods.
[0009] This application allows for the writing of preset resource information of the server's bus devices into the storage unit before the server is powered on (i.e., in a cold standby state). When the server powers on, the Basic Input / Output System (PIS) can retrieve this preset resource information via the programmable controller (PLC) connected to the storage unit and compare it with the initialization data generated during the initialization of the bus devices and resource configuration. This verifies the reliability of the configuration during the server's power-on process. Thus, through the collaborative work of the added storage unit, the PLC, the PIS, and the baseboard management controller, reliable pre-storage and retrieval of resource information are achieved. Therefore, this solves the problems of unreliable resource allocation strategy transmission and difficulty in verifying reliable server power-on, thereby improving the reliability of preset resource information transmission and enhancing the reliability of server startup and operation. Attached Figure Description
[0010] To more clearly illustrate the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0011] Figure 1 This is a schematic diagram of the structure of an embodiment of the resource management device of this application;
[0012] Figure 2 This is a flowchart illustrating an embodiment of the resource management method of this application;
[0013] Figure 3 This is a flowchart illustrating another embodiment of the resource management method of this application;
[0014] Figure 4 This is a schematic diagram of the structure of an embodiment of the electronic device of this application;
[0015] Figure 5 This is a schematic diagram of the structure of an embodiment of the computer-readable storage medium of this application. Detailed Implementation
[0016] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the protection scope of this application.
[0017] It should be noted that, in the description of this application, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. 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.
[0018] To enable those skilled in the art to better understand the present application, the present application will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0019] To address the technical problems of unreliable resource allocation strategy transmission and difficulty in verifying server power-on reliability in related technologies, this application provides a resource management method, a resource management device, an electronic device, and a computer-readable storage medium. The resource management method includes: in response to the current server being in a cold standby state, a storage unit mounted on a programmable controller (PLC) obtains preset resource information of the current server's bus devices; the PLC accesses the storage unit to obtain the preset resource information; in response to the current server being powered on, a basic input / output system (PIS) initializes the current server's bus devices and configures their resources to form initialization data; the PLC obtains the preset resource information input from the PLC, compares the preset resource information with the initialization data, and in response to a match, the PLC assigns the bus information identifier carried by the preset resource information to the bus device, forming current device information which is then transmitted to the baseboard management controller. The specific working principle of this application is illustrated below with examples.
[0020] The specific application environment architecture or hardware architecture upon which the execution of the resource management method depends is described herein. Specifically, embodiments of this application provide a resource management device, and the specific structure and working principle of the resource management device are illustrated below.
[0021] Please see Figure 1 , Figure 1 This is a schematic diagram of the structure of an embodiment of the resource management device of this application.
[0022] In one embodiment, the resource management device may include a storage unit 11, a programmable controller 12, a basic input / output system 13, and a baseboard management controller 14.
[0023] Storage unit 11 is a device with storage function. In this embodiment, storage unit 11 can be used to store preset resource information. That is, when the current server is in a cold standby state, storage unit 11 can obtain and store the preset resource information of the current server's bus devices.
[0024] The programmable controller 12 represents a control device that can adapt to control requirements. In this embodiment, the programmable controller 12 can be connected to a storage unit 11, that is, the storage unit 11 is connected to the programmable controller 12, and the programmable controller 12 can be used to access the storage unit 11 to obtain preset resource information.
[0025] The basic input / output system 13 is connected to the programmable controller 12. In response to the current server being powered on, the basic input / output system 13 initializes the bus devices of the current server and configures the resources of the bus devices to form initialization data. It also obtains preset resource information input from the programmable controller 12, compares the preset resource information with the initialization data, and in response to the match, assigns the bus information identifier carried by the preset resource information to the bus device and forms the current device information, which is then transmitted to the baseboard management controller 14.
[0026] The substrate management controller 14 is used to acquire current device information. The substrate management controller 14 can store the current device information and can further display the current device information, which is not limited here.
[0027] In other words, this embodiment achieves reliable pre-storage and reliable retrieval of resource information through the collaborative work of the added storage unit 11, programmable controller 12, basic input / output system 13, and baseboard management controller 14. Specifically, this embodiment can write the preset resource information of the current server's bus devices into the storage unit 11 before the server is in a cold standby state (i.e., before power-on). When the server powers on, the basic input / output system 13 can retrieve the preset resource information through the programmable controller 12 connected to the storage unit 11 and compare it with the initialization data formed by initializing the bus devices and configuring resources, thereby verifying whether the server is reliably configured during power-on. This design improves the reliability of preset resource information transmission and the reliability of server startup and operation.
[0028] For example, storage unit 11 can be an E2PROM (Electrically Erasable Programmable Read-Only Memory), etc. Programmable controller 12 can be a CPLD (Complex Programmable Logic Device), etc. Basic input / output system 13 can be a BIOS (Basic Input Output System), etc., and the BIOS can be set in the CPU of the server. Baseboard management controller 14 can be a BMC (Baseboard Management Controller), etc.
[0029] For a description of the features in the embodiment corresponding to the resource management device, please refer to the relevant description in the embodiment corresponding to the resource management method, which will not be repeated here.
[0030] The embodiments of this application provide a resource management method, and the resource management method is described in detail below in conjunction with the execution flow of the resource management method.
[0031] Please see Figure 2 , Figure 2 This is a flowchart illustrating an embodiment of the resource management method of this application.
[0032] S101: In response to the current server being in a cold standby state, the storage unit mounted on the programmable controller obtains the preset resource information of the current server's bus devices.
[0033] In this embodiment, "cold standby" can refer to a state where the server is not powered on. Specifically, "cold standby" can mean that the server is not currently powered on, or it can mean that the server is in a state before its first power-on.
[0034] The current server can be deployed with the resource management device described above. That is, the current server may include the server itself and the resource management device, which, as illustrated in the previous examples, may include a storage unit, a programmable logic controller (PLC), a basic input / output system (PIS), and a baseboard management controller. In other words, the current server may include a storage unit, a PLC, a PIS, and a baseboard management controller.
[0035] In response to the current server being in a cold standby state, the storage unit mounted on the programmable controller retrieves the preset resource information of the current server's bus devices. The storage unit may or may not be installed on the current server when retrieving the preset resource information; this is not limited here.
[0036] S102: The programmable controller accesses the storage unit to obtain preset resource information.
[0037] In this embodiment, in response to the storage unit acquiring and storing preset resource information, the programmable controller connected to the storage unit can access the storage unit to acquire the preset resource information stored in the storage unit.
[0038] The programmable controller (PLC) can access the storage unit actively or passively to obtain preset resource information, without limitation. The PLC can obtain the preset resource information when the current server is still in a cold standby state (i.e., not yet powered on), or it can access the storage unit to obtain the preset resource information after the current server is powered on, again without strict limitation.
[0039] S103: In response to the current server being powered on, the basic input / output system initializes the bus devices of the current server and configures the resources of the bus devices to form initialization data.
[0040] In this embodiment, in response to the current server powering on, the basic input / output system can initialize the current server's bus devices, configure the resources of the bus devices, and generate initialization data. This initialization data expresses the configuration information of the current server's bus devices after resource configuration is complete.
[0041] Optionally, the preset resource information may include the target configuration information of the bus device. The basic input / output system can obtain the preset resource information from the programmable controller to configure the bus device resources according to the preset resource information. Alternatively, the basic input / output system can obtain the configuration strategy of the bus device through other methods, which will not be elaborated here.
[0042] S104: The basic input / output system obtains the preset resource information input from the programmable controller, compares the preset resource information with the initialization data, and in response to the match, the basic input / output system assigns the bus information identifier carried by the preset resource information to the bus device and forms the current device information to be transmitted to the board management controller.
[0043] In this embodiment, in response to the programmable controller accessing the storage unit to obtain preset resource information, the basic input / output system can obtain the preset resource information from the programmable controller. The basic input / output system can compare the preset resource information with the initialization data. The preset resource information characterizes the expected target configuration of the bus devices, while the initialization characterizes the actual configuration of the bus devices after configuration by the basic input / output system. Thus, the basic input / output system can verify whether the actual configuration of the bus devices matches the expected target configuration of the preset resource information, thereby verifying the reliable configuration of the bus devices during the server power-on process and achieving quantitative verification of the reliability of the server power-on process.
[0044] In other words, in this embodiment, before the server is powered on (cold standby), the preset resource information of the server's bus devices can be written into the storage unit. When the server powers on, the basic input / output system (PIS) can obtain the preset resource information through the programmable controller (PLC) connected to the storage unit and compare it with the initialization data generated during the initialization of the bus devices and resource configuration. This verifies whether the server configuration is reliable during power-on. Thus, through the collaborative work of the added storage unit, the PLC, the PIS, and the baseboard management controller, reliable pre-storage and retrieval of resource information are achieved, thereby improving the reliability of preset resource information transmission and the reliability of server startup and operation.
[0045] Please see Figure 3 , Figure 3 This is a flowchart illustrating another embodiment of the resource management method of this application.
[0046] S201: The storage unit obtains preset resource information.
[0047] In this embodiment, in response to the current server being in a cold standby state, the storage unit mounted on the programmable controller obtains the preset resource information of the current server's bus device.
[0048] Specifically, the storage unit can obtain the bus information input to it. This bus information may include at least one of the following: CPU root port source information, rated allocated bandwidth information, bus device type, and bus device preset bus information identifier. In other words, in this embodiment, the preset resource information stored in the storage unit can be flexibly configured according to the current server power-on requirements to improve the consistency between the preset resource information and the current server power-on configuration needs. For example, the bus information may include CPU root port source information, rated allocated bandwidth information, bus device type, and bus device preset bus information identifier. Thus, the subsequent basic input / output system can rely on the preset resource information to configure the bus device resources during the current server power-on process. It can also assign / identify preset bus information identifiers such as sequence numbers, thereby improving the reliability of preset resource information transmission while promoting the efficiency and reliability of bus device resource configuration.
[0049] For example, the source information of the central processing unit root port can include CPU Root Port, etc. Taking PCIe as the server bus protocol, the bus device type can represent the PCIe device type, such as hard drive, network card, RAID card, etc. The default bus information identifier of the bus device can include the default serial number information of the PCIe device, that is, the serial number information can be used as the bus information identifier.
[0050] In response to acquiring bus information, the storage unit can perform a radix conversion on the acquired bus information, using the converted bus information as preset resource information, and store the preset resource information in its storage space. Taking an E2PROM storage unit as an example, the following table illustrates the preset resource information and its storage space:
[0051] Table 1. Correspondence between storage space and the information it stores
[0052]
[0053] Optionally, the storage unit can obtain multiple configuration resource information associated with the current type. Here, "current type" represents the server type to which the current server belongs, and each configuration resource information is associated with a specific server configuration of the current server. The storage unit allocates different address ranges for the multiple configuration resource information as storage space for each configuration resource information. The storage unit stores the configuration resource information in its corresponding storage space as pre-stored resource information. The pre-stored resource information is the pre-stored resource information corresponding to the current server configuration of the current server.
[0054] In layman's terms, the storage unit can be the E2PROM non-volatile memory on the current server motherboard, which interconnects with programmable controllers such as CPLDs via a bus such as I2C. In traditional server system designs, the E2PROM chip on the motherboard mainly stores basic identification information of the board, such as the board part number, manufacturer, and date. In this embodiment, the newly added E2PROM is mainly used to pre-store the rated asset information and bandwidth allocation information for some or all PCIe configurations of the current server model. Thus, users or developers can traverse different PCIe configuration types, encode the PCIe bandwidth allocation requirements and asset information for each configuration, and store the information for different configurations in different address areas of the E2PROM chip on the motherboard in binary form. This improves the compatibility and generalizability of resource management methods, and further optimizes resource management to improve the operational reliability and performance of the current server. The following table provides examples of configuration resource information:
[0055] Table 2. Resource Information Table for Various Configurations of Storage Units
[0056]
[0057] Among them, PE0 and PE1 are used to represent the specific identifier of PCIe Root Port; X4 and X8 are used to represent the theoretical bandwidth. Taking X4 as an example, it is used to indicate that the interface adopts four-channel transmission, and the four channels are superimposed to achieve four times the transmission rate of a single channel; NVMe represents Non-Volatile Memory Host Controller Interface Specification.
[0058] In this embodiment, the storage unit acquires preset resource information before the server is powered on. Optionally, the preset resource information stored in the storage unit can be acquired before the server leaves the factory, based on the server configuration requirements. Alternatively, it can be updated in real time via the bus within the server through the baseboard management controller. Specifically, the baseboard management controller may include a user serial port interface that can communicate with the outside of the server, allowing the user to send data to the baseboard management controller via the user serial port interface. In this embodiment, the user can communicate with the baseboard management controller through a user serial port interface such as a UART (Universal Asynchronous Receiver / Transmitter), transmitting configuration information that meets the current server configuration requirements as preset resource information to the baseboard management controller via the UART bus. The baseboard management controller, as a connection module, can be connected to the storage unit via a bus such as an I2C (Inter-Integrated Circuit) bus. In other words, the user sends preset resource information to the board management controller via a first bus such as the UART bus, and the board management controller writes the preset resource information to the storage unit via a second bus such as the I2C bus. This allows the user to update the preset resource information in real time using both the first and second buses, thus improving the flexibility of the storage unit in storing preset resource information and increasing the efficiency of updating the preset resource information.
[0059] The first bus and the second bus can be the same protocol bus or different protocol buses, depending on the substrate management controller and the memory unit, and are not strictly limited here.
[0060] S202: The baseboard management controller obtains the current configuration command.
[0061] In this embodiment, the current configuration command can be sent to the baseboard management controller by an external environment such as a user.
[0062] Typically, the main function of the Baseboard Management Controller (BMC) is to perform out-of-band monitoring of various aspects of the server, such as temperature, voltage, and operating status, and to display the server's asset information intuitively. The BMC's asset information data is primarily acquired from the Basic Input / Output System (BIOS) via data buses such as the I2C bus. In this embodiment, the BMC is configured to participate in improving the flexibility of the BIOS in acquiring raw PCIe asset information under different protocol bus configurations (such as different PCIe configurations). It can also optimize the serial number information and bandwidth allocation requirements of bus devices such as PCIe devices and transmit these issues to the BMC.
[0063] Specifically, in response to the server being in a cold standby state and the storage unit storing preset resource information, the baseboard management controller obtains the current configuration instruction. This current configuration instruction indicates the current server configuration. The baseboard management controller controls the programmable controller based on the current configuration instruction.
[0064] S203: The baseboard management controller generates a target configuration instruction based on the current configuration instruction.
[0065] In this embodiment, the baseboard management controller can directly use the current configuration as the target configuration instruction, or it can extract and / or expand the current configuration instruction to form the target configuration instruction, which is not limited here.
[0066] S204: The baseboard management controller transmits the target configuration instruction to the programmable controller.
[0067] In this embodiment, the target configuration instruction is used to instruct the programmable controller to latch the target storage space. The target storage space represents the storage space where the storage unit stores the currently configured server. This reduces the risk of the preset resource information in the target storage space being tampered with before and during the current server's power-on process, thus improving the reliability of the preset resource information storage. This allows reliable preset resource information to be obtained during server startup and power-on, for example, the current server's bus devices can be configured and / or the current server's power-on reliability can be verified based on reliable preset resource information, thereby improving the current server's resource management efficiency and operational reliability.
[0068] In layman's terms, users can control the programmable controller via the bus through the baseboard management controller, based on the actual configuration of the current server, so that the programmable controller can access a specific area of the storage unit, i.e., the target storage space.
[0069] S205: The programmable controller latches the target storage space based on the target configuration instruction.
[0070] In this embodiment, the programmable controller acquires the target configuration instruction formed by the baseboard management controller based on the current configuration instruction. The programmable controller identifies the current server configuration indicated by the target configuration instruction and latches the target storage space storing the current server configuration.
[0071] In other words, the programmable controller (PLC) can access the target storage space of the storage unit based on the target configuration instruction, and load preset resource information such as the currently configured asset information and PCIe bandwidth configuration information. Furthermore, combining the various configuration resource information examples in Table 2 above, if the specified target storage space is the storage space for storing configuration resource information 1, the user can send an instruction to the PLC via the bus through the UI (User Interface) of the baseboard management controller before the current server is first powered on. The PLC then latches the storage space for storing configuration resource information 1 based on this instruction. Moreover, it can be specified that the PLC loads and transmits the preset resource information of the configuration resource information 1 area to the basic input / output system during subsequent power-on processes of the current server.
[0072] S206: In response to the current server being powered on, the programmable controller transmits preset resource information to the input / output system.
[0073] In this embodiment, when the current server is powered on, it transmits the bus resource information preset by the target storage space and the bandwidth configuration information of the bus device to the basic input / output system.
[0074] Thus, in this embodiment, the programmable controller can access the target storage space through the baseboard management controller to obtain the bus resource information and bus device bandwidth configuration information of the current server configuration, and use the bus resource information and bus device bandwidth configuration information in the target storage space as preset resource information. In other words, the programmable controller can access the storage unit to obtain the preset resource information.
[0075] S207: In response to the current server powering on, the basic input / output system initializes the bus devices and generates initialization data.
[0076] In this embodiment, in response to the current server being powered on, the basic input / output system initializes the bus devices of the current server and configures the resources of the bus devices to form initialization data.
[0077] Specifically, the Basic Input / Output System (BIOS) configures the bandwidth of the root port of the protocol bus. The BIOS also initializes the bus devices and sets up their configuration spaces.
[0078] In layman's terms, the CPU of the current server's motherboard acts as the running entity for the BIOS program. After the server boots up, the programmable controller (PLC) can transmit preset resource information, such as PCIe asset information and bandwidth allocation information obtained from the E2PROM, to the BIOS via a bus such as eSPI (Enhanced Serial Peripheral Interface). The CPU PCIe ports can be configured as 4x4, 2x8, or 1x16 according to actual needs, specifically configured by the BIOS based on external input information. This allows the BIOS to complete the bandwidth configuration of all PCIe ports within a short time after the server boots up.
[0079] S208: The basic input / output system obtains preset resource information from the programmable controller input.
[0080] In this embodiment, the Basic Input / Output System (BIOS) can acquire preset resource information to verify the reliable configuration of bus devices during the current server power-on process. Alternatively, in an alternative embodiment, the BIOS's bus device initialization and resource configuration in step S207 can also rely on preset resource information; that is, the BIOS can acquire preset resource information to configure bus device resources according to the preset resource information. In other words, in response to acquiring the preset resource information transmitted by the CPLD, the BIOS can configure the bandwidth of the CPU PCIe Root Port and initialize all PCIe devices and set their configuration spaces.
[0081] S209: The basic input / output system compares the preset resource information with the initialization data to see if they match.
[0082] In this embodiment, when it is determined that the preset resource information and the initialization data match, step S210 can be executed; when it is determined that the preset resource information and the initialization data match, step S212 can be executed.
[0083] In other words, once the bus device is initialized, the basic input / output system can obtain the preset resource information sent by the programmable controller and match the preset resource information with the initialization data of the bus device being initialized.
[0084] Specifically, the basic input / output system can compare the resource indicators of the preset resource information with those of the initialization data to see if they match. These resource indicators include at least one of the following: the number of bus devices, the type of bus device, and the bandwidth configuration. In other words, this embodiment compares the preset configuration represented by the preset resource information with the actual initialization configuration represented by the initialization data, and simultaneously verifies whether the server architecture expressed by the two matches. This improves the reliability of the verification results, thereby enhancing resource management reliability and ultimately ensuring server power-on reliability, thus improving overall server reliability.
[0085] In response to the matching of resource indicators between preset resource information and initialization data, it is determined that the preset resource information and initialization data match.
[0086] In response to a mismatch between the resource indicators in the preset resource information and the initialization data, it is determined that the preset resource information and the initialization data do not match.
[0087] S210: The basic input / output system assigns the bus information identifier carried by the preset resource information to the bus device and transmits the current device information to the board management controller.
[0088] In this embodiment, in response to the matching of preset resource information and initialization data, the Basic Input / Output System (PIOS) assigns the bus information identifier carried in the preset resource information to the bus device and transmits the current device information to the board management controller. Simultaneously, the PIOS can transmit the current device information to the board management controller. Optionally, after the PIOS completes a full POST (Power-On Self-Test), it can transmit the current device information to the board management controller via the entire bus.
[0089] In an alternative embodiment, the basic input / output system may assign a bus information identifier pre-stored in the preset resource information to the bus device when comparing preset resource information with initialization data.
[0090] S211: The baseboard management controller acquires and displays the current device information.
[0091] In this embodiment, the baseboard management controller can store current device information in the baseboard management controller log, allowing users to easily view the current configuration data directly through the log. Furthermore, the base management controller can also display the current device information out-of-band to improve the data intuitiveness.
[0092] S212: The basic input / output system generates an error log and transmits it to the board management controller.
[0093] In this embodiment, in response to a mismatch between the preset resource information and the resource indicators of the initialization data, an error log is generated and transmitted to the baseboard management controller.
[0094] S213: The baseboard management controller retrieves an error message log.
[0095] In this embodiment, the substrate management controller can store the abnormal prompt log in the substrate management controller log; or, the substrate management controller can display the abnormal prompt log out of band.
[0096] In traditional server systems, PCIe devices need to be identified in the chassis silkscreen and BMC asset information log according to different specifications and sequences. The asset information of PCIe devices mainly includes the CPU Root Port to which the device belongs, bandwidth information, serial number information, BDF information, etc. Among them, the BDF information represents a triple consisting of bus number, device number, and function number, which is used to uniquely identify the PCIe device or its functional unit.
[0097] For example, in the BMC log, the complete asset information of a PCIe hard drive should be described as CPU0_PE1<3:0>_X4_NVMe0, where CPU0_PE1<3:0> represents that the current PCIe hard drive's uplink interface comes from the lower 4 lanes of PCIe Port1 on CPU0, with a bandwidth of X4 and an NVMe serial number of "0". Asset information can be displayed intuitively in the BMC's asset information log and corresponds to the chassis silkscreen, facilitating user viewing and physical location of PCIe assets. During boot, the BIOS needs to set the bandwidth of the CPU PCIe Root Port according to the PCIe bandwidth allocation requirements and allocate configuration space for PCIe devices to determine the PCIe BDF information. However, for different configurations, PCIe devices originating from a single CPU PCIe Port may have different bandwidth allocation and serial number requirements. The BIOS cannot obtain the PCIe serial number information or sort them automatically. Therefore, the BIOS needs to obtain the serial number information of the PCIe devices under the current configuration from other means to completely and correctly transmit asset information to the BMC. In other words, traditional servers use fixed PCIe asset information sequences or dedicated GPIO ID (General-purpose input / output identity document) signal pins to help the BIOS determine the bandwidth allocation and silkscreen information of each PCIe port. This limits flexibility and makes it impossible to directly identify faulty PCIes.
[0098] However, the present application, as described in the foregoing embodiments, can overcome the aforementioned problems. The present application can flexibly adapt to the bandwidth configuration requirements of various buses of the central processing unit according to the different configuration requirements of the server type to which the current server belongs. It can also help improve the transmission efficiency of preset resource information. Furthermore, it can promptly verify situations such as bus device loss or bandwidth speed mismatch that may occur during the current server startup process. This is conducive to improving the management performance and generalizability of resource management, and in turn, it is conducive to improving server performance and operational reliability by optimizing resource management methods.
[0099] In layman's terms, the bandwidth allocation and asset information transmission method provided in this application can traverse different PCIe configuration types during the current server design phase, encode the CPU PCIe bandwidth allocation requirements and asset information under each configuration, and store the information of different configurations in binary form in different address areas of the E2PROM on the motherboard. The E2PROM is mounted on the motherboard CPLD via the data bus. The data information stored in the E2PROM may mainly include: the source of the PCIe device's CPU Root Port, the rated allocated bandwidth information, the PCIe device type (such as hard drive, network card, RAID card, etc.), and the preset serial number information of the PCIe device.
[0100] Thus, upon the server's first power-on, the user can communicate with the CPLD via external user interfaces such as the BMC, configure the non-volatile memory area on the CPLD, specify the CPLD's access to a particular area of the E2PROM, and load the currently configured PCIe bandwidth allocation and asset information. After acquiring the data, the CPLD will transmit the asset and bandwidth information to the BIOS via the eSPI bus.
[0101] In response, the BIOS can initialize all PCIe devices and configure their space during the boot process. The BIOS can also obtain asset information (preset resource information) transmitted by the CPLD, match it with the data of the currently initialized PCIe devices (initialization data), and assign the read PCIe serial number information to the corresponding device. The BIOS can also compare the actually identified PCIe devices with the data transmitted by the CPLD. If the number, type, or bandwidth of the devices does not match, an exception log can be recorded to the BMC. After the BIOS completes the full POST, it can also transmit the current device information to the BMC, allowing users to directly view the current server configuration data through the BMC logs. This allows for flexible selection of the BIOS silkscreen information format to meet different configuration requirements and enables verification of device loss and bandwidth / speed mismatches during boot. Furthermore, since the register controlling the CPLD to read E2PROM information is located in the CPLD's non-volatile area, after the initial power-on configuration, it is usually unnecessary to separately configure the CPLD to read E2PROM if the system configuration remains unchanged, further improving resource management performance.
[0102] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method.
[0103] Embodiments of this application also provide an electronic device. See also... Figure 4 , Figure 4 This is a schematic diagram of the structure of an embodiment of the electronic device of this application.
[0104] In one embodiment, the electronic device may include a memory 21 and a processor 22, the memory 21 storing a computer program and the processor 22 being configured to run the computer program to perform the steps in any of the resource management method embodiments described above.
[0105] The resource management method may include at least the following: in response to the current server being in a cold standby state, the storage unit mounted on the programmable controller obtains the preset resource information of the bus device of the current server; the programmable controller accesses the storage unit to obtain the preset resource information; in response to the current server being powered on, the basic input / output system initializes the bus device of the current server and configures the resources of the bus device to form initialization data; the basic input / output system obtains the preset resource information input from the programmable controller, compares the preset resource information with the initialization data, and in response to the two matching, the basic input / output system assigns the bus information identifier carried by the preset resource information to the bus device and forms the current device information, which is then transmitted to the baseboard management controller.
[0106] Embodiments of this application also provide a computer-readable storage medium. See also... Figure 5 , Figure 5 This is a schematic diagram of the structure of an embodiment of the computer-readable storage medium of this application.
[0107] In one embodiment, the computer-readable storage medium stores a computer program 31, wherein the computer program 31 is configured to execute the steps in any of the resource management method embodiments described above when it is run.
[0108] The resource management method may include at least the following: in response to the current server being in a cold standby state, the storage unit mounted on the programmable controller obtains the preset resource information of the bus device of the current server; the programmable controller accesses the storage unit to obtain the preset resource information; in response to the current server being powered on, the basic input / output system initializes the bus device of the current server and configures the resources of the bus device to form initialization data; the basic input / output system obtains the preset resource information input from the programmable controller, compares the preset resource information with the initialization data, and in response to the two matching, the basic input / output system assigns the bus information identifier carried by the preset resource information to the bus device and forms the current device information, which is then transmitted to the baseboard management controller.
[0109] In one exemplary embodiment, the aforementioned computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard disk, magnetic disk, or optical disk.
[0110] Embodiments of this application also provide a computer program product, which includes a computer program that, when executed by a processor, implements the steps in any of the above-described resource management method embodiments.
[0111] The resource management method may include at least the following: in response to the current server being in a cold standby state, the storage unit mounted on the programmable controller obtains the preset resource information of the bus device of the current server; the programmable controller accesses the storage unit to obtain the preset resource information; in response to the current server being powered on, the basic input / output system initializes the bus device of the current server and configures the resources of the bus device to form initialization data; the basic input / output system obtains the preset resource information input from the programmable controller, compares the preset resource information with the initialization data, and in response to the two matching, the basic input / output system assigns the bus information identifier carried by the preset resource information to the bus device and forms the current device information, which is then transmitted to the baseboard management controller.
[0112] Embodiments of this application also provide another computer program product, including a non-volatile computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps in any of the resource management method embodiments described above.
[0113] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0114] The resource management method, resource management device, electronic device, and computer-readable storage medium provided in this application have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the embodiments above are merely for the purpose of helping to understand the method and core ideas of this application. It should be noted that those skilled in the art can make various improvements and modifications to this application without departing from the principles of this application, and these improvements and modifications also fall within the protection scope of the claims of this application.
Claims
1. A resource management method characterized by, The resource management method includes: In response to the current server being in a cold standby state, the storage unit mounted on the programmable controller obtains the preset resource information of the bus device of the current server; The programmable controller accesses the storage unit to obtain the preset resource information; In response to the current server being powered on, the basic input / output system initializes the bus device of the current server and configures the resources of the bus device to form initialization data; The basic input / output system obtains the preset resource information input from the programmable controller, compares the preset resource information with the initialization data, and in response to a match, the basic input / output system assigns the bus information identifier carried by the preset resource information to the bus device and forms the current device information, which is then transmitted to the board management controller.
2. The resource management method according to claim 1, characterized in that, The programmable controller accesses the storage unit to obtain the preset resource information, including: In response to the current server being in a cold standby state and the storage unit storing the preset resource information, the baseboard management controller obtains a current configuration instruction; wherein, the current configuration instruction is used to indicate the current server configuration of the current server; The baseboard management controller controls the programmable controller based on the current configuration instruction, causing the programmable controller to access the target storage space to obtain the bus resource information configured by the current server and the bandwidth configuration information of the bus device, as the preset resource information; wherein, the target storage space represents the storage space configured by the current server stored in the storage unit.
3. The resource management method according to claim 2, characterized in that, The step of enabling the programmable controller to access the target storage space includes: The programmable controller acquires the target configuration instruction formed by the baseboard management controller based on the current configuration instruction; The programmable controller identifies the current server configuration indicated by the target configuration instruction, latches the target storage space storing the current server configuration, and when the current server is powered on, transmits the bus resource information preset in the target storage space and the bandwidth configuration information of the bus device to the basic input / output system.
4. The resource management method according to claim 2, characterized in that, The storage unit obtains the preset resource information of the current server's bus device, including: The storage unit acquires multiple configuration resource information associated with the current type; wherein, the current type represents the server type to which the current server belongs, and each configuration resource information is associated with a server configuration of the current server; The storage unit allocates different address ranges to the various configuration resource information as storage space for storing each of the configuration resource information. The storage unit stores the configuration resource information into its corresponding storage space as pre-stored resource information; wherein, the pre-stored resource information is the pre-stored resource information corresponding to the current server configuration of the current server.
5. The resource management method according to claim 1, characterized in that, The basic input / output system initializes the bus device of the current server and configures the resources of the bus device, including: The basic input / output system configures the bandwidth of the root port of the protocol bus; The basic input / output system initializes the bus device and sets up the configuration space.
6. The resource management method according to claim 1 or 5, characterized in that, The comparison between the preset resource information and the initialization data includes: The basic input / output system compares the preset resource information with the resource indicators of the initialization data to see if they match; wherein, the resource indicators include at least one of the following: number of bus devices, type of bus device, and bandwidth configuration; In response to the matching of the preset resource information with the resource indicators of the initialization data, it is determined that the preset resource information and the initialization data are matched. In response to a mismatch between the preset resource information and the resource indicators of the initialization data, an error log is generated and transmitted to the baseboard management controller.
7. The resource management method according to claim 1, characterized in that, The storage unit obtains the preset resource information of the current server's bus device, including: The storage unit acquires the bus information input to it; wherein, the bus information includes at least one of the following: central processing unit root port source information, rated allocated bandwidth information, bus device type, and bus device preset bus information identifier; The storage unit performs a number system conversion on the bus information it acquires, uses the converted bus information as the preset resource information, and stores the preset resource information in its storage space.
8. A resource management device, characterized in that, The resource management device is used to implement the resource management method as described in any one of claims 1 to 7, and the resource management device includes: The storage unit is used to acquire and store the preset resource information of the current server's bus devices when the current server is in a cold standby state; A programmable controller, with the storage unit attached, is used to access the storage unit to obtain the preset resource information; A basic input / output system, connected to the programmable controller, is used to initialize the bus devices of the current server and configure the resources of the bus devices to form initialization data in response to the power-on of the current server; obtain the preset resource information input from the programmable controller, compare the preset resource information with the initialization data, and in response to the match, the basic input / output system assigns the bus information identifier carried by the preset resource information to the bus device and forms current device information which is transmitted to the baseboard management controller; The baseboard management controller is used to obtain current device information.
9. An electronic device, characterized in that, The electronic device includes: Memory, used to store computer programs; A processor for implementing the steps of the resource management method as described in any one of claims 1 to 7 when executing the computer program.
10. 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 resource management method as described in any one of claims 1 to 7.