CN118093276A - Method, device, equipment and medium for updating type information of SMBIOS (System management information service) table - Google Patents
Method, device, equipment and medium for updating type information of SMBIOS (System management information service) table Download PDFInfo
- Publication number
- CN118093276A CN118093276A CN202410526145.9A CN202410526145A CN118093276A CN 118093276 A CN118093276 A CN 118093276A CN 202410526145 A CN202410526145 A CN 202410526145A CN 118093276 A CN118093276 A CN 118093276A
- Authority
- CN
- China
- Prior art keywords
- type
- byte number
- update
- information
- updating
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 70
- 230000003068 static effect Effects 0.000 claims abstract description 26
- 230000008859 change Effects 0.000 claims description 11
- 238000004590 computer program Methods 0.000 claims description 11
- 230000001174 ascending effect Effects 0.000 claims description 3
- 238000004364 calculation method Methods 0.000 claims description 3
- 108010028984 3-isopropylmalate dehydratase Proteins 0.000 claims description 2
- 230000008569 process Effects 0.000 description 11
- 238000004891 communication Methods 0.000 description 6
- 238000007726 management method Methods 0.000 description 6
- 230000002093 peripheral effect Effects 0.000 description 5
- 238000010586 diagram Methods 0.000 description 4
- 238000012216 screening Methods 0.000 description 3
- 238000013461 design Methods 0.000 description 2
- 238000012423 maintenance Methods 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 230000006978 adaptation Effects 0.000 description 1
- 238000004458 analytical method Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
- 230000009467 reduction Effects 0.000 description 1
- 230000000630 rising effect Effects 0.000 description 1
- 238000007650 screen-printing Methods 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 239000000758 substrate Substances 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/14—Error detection or correction of the data by redundancy in operation
- G06F11/1402—Saving, restoring, recovering or retrying
- G06F11/1471—Saving, restoring, recovering or retrying involving logging of persistent data for recovery
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/22—Indexing; Data structures therefor; Storage structures
- G06F16/2282—Tablespace storage structures; Management thereof
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/23—Updating
- G06F16/2379—Updates performed during online database operations; commit processing
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/4401—Bootstrapping
- G06F9/4411—Configuring for operating with peripheral devices; Loading of device drivers
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Databases & Information Systems (AREA)
- Data Mining & Analysis (AREA)
- Computer Security & Cryptography (AREA)
- Quality & Reliability (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention relates to the technical field of server management, and provides a method, a device, electronic equipment and a medium for updating type information of an SMBIOS (system management entity) table, wherein the method comprises the following steps: in a DXE starting stage of the BIOS, updating the information of the first update type on the SMBIOS table; determining the reserved byte number of the SMBIOS table; after the DXE boot phase of the BIOS is completed and before entering the OS phase, the information of the second update type on the SMBIOS table is updated based on the reserved byte count and the second update type. The invention ensures the static update of the type information by the reserved byte number after the start-up phase is finished and before entering the OS phase by dynamically updating the type information in the DXE start-up phase of the BIOS, thereby ensuring sufficient resources for updating the SMBIOS protocol table and reducing the problem of causing downtime of the system.
Description
Technical Field
The present invention relates to the field of server management technologies, and in particular, to a method, an apparatus, a device, and a medium for updating type information of an SMBIOS table.
Background
Electronic products such as servers, desktops, notebooks, mobile phones and the like all need to view management information of the system under an operating system, wherein the management information comprises, but is not limited to, a CPU (central processing unit), a memory manufacturer, a memory model, memory location information, memory rate, system PCI (peripheral component interconnect) Slot equipment information, power supply information, UUID (universal serial bus) information, system manufacturer, mainboard screen printing information, mainboard on-board equipment information and the like. In short, all information on the main board is collected and summarized and updated to the SMBIOS protocol specification table of the BIOS for recording, so that a user or operation and maintenance personnel can quickly and real-timely check the configuration information of the server system, and the configuration of the whole machine can be known without physically and practically contacting with the server equipment.
According to the SMBIOS protocol specification, the SMBIOS table has two updating modes, namely a dynamic updating mode and a static updating mode, wherein the static updating mode is that the BIOS fills all information of a main board in a system in advance when the BIOS is started, the BIOS fills and updates the information into various types of the SMBIOS protocol when the BIOS is started, but the data are static and cannot be dynamically changed along with the change of the configuration of a server. Therefore, the method of dynamic update dynamically updates the configuration of the motherboard to the type of the SMBIOS table, that is, when the motherboard is started, the BIOS actively identifies the number of CPU processors, CPU rate, CPU core, memory number, memory core, memory manufacturer, PCI slot device number, motherboard on-board device number, system manufacturer, system model, motherboard model, etc. that are related to perform dynamic update, but the byte data length of each type is not fixed. If the reserved bytes are not enough in number or length, the data exceeding the reserved bytes cannot be supported, and the system has serious fatal problems such as error and downtime.
Disclosure of Invention
Aiming at the problems existing in the prior art, the invention provides a method, a device, electronic equipment and a medium for updating type information of an SMBIOS table.
The invention provides a type information updating method of an SMBIOS table, which comprises the following steps:
determining a first update type and a second update type on the SMBIOS table; the first update type is a type of which the type information adopts a dynamic update mode; the second update type is a type of which the type information adopts a static update mode;
In a DXE starting stage of the BIOS, updating the information of the first update type on the SMBIOS table;
determining the reserved byte number of the SMBIOS table;
And after the DXE starting stage of the BIOS is finished and before entering the OS stage, updating the information of the second update type on the SMBIOS table based on the reserved byte number and the second update type.
In one embodiment, the determining the first update type and the second update type on the SMBIOS table includes:
Based on a history record of type information updating of the SMBIOS table in a preset time period, obtaining the maximum value of byte number change intervals of each type of information and the updating times of each type of information;
and taking the type with the maximum value larger than a first preset value and the update times larger than a second preset value as a first update type, and taking the rest types except the first update type in each type of the SMBIOS table as a second update type.
In one embodiment, the type information of the first update type is divided into a first content and a second content, where the first content is information adopting a dynamic update mode, and the second content is information adopting a static update mode, and accordingly, in a DXE startup phase of the BIOS, the first content of the type information of the first update type on the SMBIOS table is updated, and after the DXE startup phase of the BIOS is finished and before entering the OS phase, the second content of the type information of the first update type on the SMBIOS table is updated based on the reserved byte number.
In one embodiment, the determining the number of reserved bytes of the SMBIOS table comprises:
acquiring a first byte number of type information of a first update type after updating the information of the first update type on the SMBIOS table;
acquiring the total byte number after the type information on the SMBIOS table is updated last time, the second byte number after the type information of the first updated type on the SMBIOS table is updated last time, and the reserved byte number last time;
And determining the reserved byte number of the SMBIOS table according to the first byte number, the total byte number, the second byte number and the last reserved byte number.
In one embodiment, said determining the reserved byte number of the SMBIOS table according to the first byte number, the total byte number, and the last reserved byte number comprises:
determining a byte update ratio according to the first byte number and the second byte number;
determining a third byte count from the total byte count and the second byte count;
determining a fourth byte count according to the third byte count and the byte update ratio;
And determining the reserved byte number of the SMBIOS table according to the last reserved byte number and the fourth byte number.
In one embodiment, the determining the number of reserved bytes of the SMBIOS table comprises:
Acquiring a first total byte number and a second total byte number after the type information on the SMBIOS table is updated for the last time and the last reserved byte number;
determining a lifting type based on the two total byte numbers;
And determining the reserved byte number of the SMBIOS table based on the lifting type, the second total byte number and the last reserved byte number.
In one embodiment, the determining the reserved byte number of the SMBIOS table based on the lift type, the second total byte number, and the last reserved byte number includes:
If the lifting type is an ascending value, determining a fifth byte number based on the second total byte number and a preset descending proportion, and determining the reserved byte number of the SMBIOS table according to the last reserved byte number and the fifth byte number;
And if the lifting type is a descending value, determining a sixth byte number based on the second total byte number and a preset lifting proportion, and determining the reserved byte number of the SMBIOS table according to the last reserved byte number and the sixth byte number.
In one embodiment, an update sequence of the plurality of first update types is configured, and accordingly, in a DXE boot phase of the BIOS, updating the information of the first update type on the SMBIOS table includes:
in the DXE starting stage of the BIOS, based on the updating sequence, respectively acquiring new information of each first updating type, and updating the original information of the first updating type on the SMBIOS table by the new information.
In one embodiment, the first update type is types 0,1, 2, 3, FRU information of BMC under the system is obtained through IPMI protocol, and the first content of types 0,1, 2, 3 is obtained based on the FRU information.
In one embodiment, the determining the first update type and the second update type on the SMBIOS table further comprises:
determining a seventh byte number after the type information of the first update type on the SMBIOS table is updated last time;
determining an eighth byte number based on the seventh byte number and a selection ratio;
Based on the last type number of the first update type on the SMBIOS table, accumulating the byte number of the first update type, and when the current accumulated byte number is equal to or exceeds the eighth byte number, counting a plurality of update types of which the byte number is accumulated as the screened first update type, and classifying the update types of the incomplete accumulated byte number as the second update type.
In one embodiment, the method further comprises:
Updating the information of the second update type on the SMBIOS table, and counting that the byte number of the second update type is larger than the reserved byte number of the SMBIOS table, and optimizing the reserved byte number of the SMBIOS table based on the counted byte number of the second update type.
In one embodiment, the method further comprises:
And removing the fifth byte number from the last reserved byte number to obtain the reserved byte number of the SMBIOS table:
And increasing the last reserved byte number by the sixth byte number to obtain the reserved byte number of the SMBIOS table.
The invention also provides a type information updating device of the SMBIOS table, which comprises the following steps:
The determining module is used for determining a first update type and a second update type on the SMBIOS table; the first update type is a type of which the type information adopts a dynamic update mode; the second update type is a type of which the type information adopts a static update mode;
the first updating module is used for updating the first updating type of information on the SMBIOS table in the DXE starting stage of the BIOS;
a calculation module, configured to determine a reserved byte number of the SMBIOS table;
And the second updating module is used for updating the information of the second updating type on the SMBIOS table based on the reserved byte number and the second updating type after the DXE starting stage of the BIOS is ended and before the BIOS enters the OS stage.
The invention also provides an electronic device, which comprises a memory, a processor and a computer program stored in the memory and capable of running on the processor, wherein the processor realizes the type information updating method of the SMBIOS table when executing the program.
The present invention also provides a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements a method of updating type information of an SMBIOS table as described above.
According to the type information updating method, device, electronic equipment and medium of the SMBIOS protocol table, the type information is dynamically updated in the DXE starting stage of the BIOS, and the static update of the type information is ensured by the reserved byte number after the starting stage is finished and before the OS stage is entered, so that the resources for updating the SMBIOS protocol table are sufficient, and the problem of system downtime is reduced.
Drawings
In order to more clearly illustrate the invention or the technical solutions of the prior art, the following description will briefly explain the drawings used in the embodiments or the description of the prior art, and it is obvious that the drawings in the following description are some embodiments of the invention, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a method for updating type information of an SMBIOS table provided by the invention;
fig. 2 is a schematic structural diagram of a type information updating device of an SMBIOS table provided by the present invention;
Fig. 3 is a schematic structural diagram of an electronic device provided by the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present invention more apparent, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is apparent that the described embodiments are some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The following describes a method, a device, an electronic device and a medium for updating type information of an SMBIOS table in accordance with the present invention with reference to fig. 1 to 3.
Fig. 1 shows a flow chart of a method for updating type information of an SMBIOS table, and referring to fig. 1, the method includes:
11. Determining a first update type and a second update type on the SMBIOS table; the first update type is a type of which the type information adopts a dynamic update mode; the second update type is a type of which the type information adopts a static update mode;
12. In a DXE starting stage of the BIOS, updating the information of the first update type on the SMBIOS table;
13. determining the reserved byte number of the SMBIOS table;
14. After the DXE boot phase of the BIOS is completed and before entering the OS phase, the information of the second update type on the SMBIOS table is updated based on the reserved byte count and the second update type.
In this regard, it should be noted that, in electronic products such as servers, desktops, notebooks, and mobile phones, management information of the system needs to be checked under an operating system, where the management information includes, but is not limited to, a CPU processor, a memory manufacturer, a memory model, memory location information, a memory rate, system PCI (PERIPHERAL COMPONENT INTERCONNECT, peripheral component interconnect standard) Slot (peripheral component interconnect standard) device information, power supply information, UUID (universal unique identification code) information, system manufacturer, motherboard silk-screen information, motherboard on-board device information, and the like. In short, all information on the motherboard is collected and summarized and updated to an SMBIOS protocol specification table of a BIOS (basic input output system) for recording, so that a user or an operation and maintenance person can quickly and real-timely check the configuration information of the server system, and the configuration of the whole machine can be known without physically touching the server equipment.
According to the SMBIOS protocol specification, the SMBIOS table has two updating modes, namely a dynamic updating mode and a static updating mode, wherein the static updating mode is that the BIOS fills all information of a main board in a system in advance when the BIOS is started, the BIOS fills and updates the information into various types of the SMBIOS protocol when the BIOS is started, but the data are static and cannot be dynamically changed along with the change of the configuration of a server. Therefore, the method of dynamic update dynamically updates the configuration of the motherboard to the type of the SMBIOS table, that is, when the motherboard is started, the BIOS actively identifies the number of CPU processors, CPU rate, CPU core, memory number, memory core, memory manufacturer, PCI slot device number, motherboard on-board device number, system manufacturer, system model, motherboard model, etc. that are related to perform dynamic update, but the byte data length of each type is not fixed. If the reserved bytes are not enough in number or length, the data exceeding the reserved bytes cannot be supported, and the system has serious fatal problems such as error and downtime.
Therefore, the design concept of the method of the invention is to ensure that the reserved byte number meets the length of the updated byte data as much as possible. In contrast, the method of the invention updates some types of information on the SMBIOS table in the DXE (driver execution environment) starting stage of the BIOS, and changes the byte number change caused by the information update in real time by adopting a dynamic updating mode in the DXE starting stage of the BIOS, thereby achieving real-time adaptation byte number change and not occupying reserved byte number.
Note that, the Type information of the specified SMBIOS table based on the protocol may include Bios information (Type 0), system (Type 1), substrate (Type 2), chassis (Type 3), processor information (Type 4), OEM string (Type 11), system configuration option (Type 12), portable battery (Type 22), system power (Type 39), and the like, which are not all described herein.
It is necessary to determine, for each type on the SMBIOS table, which type of information completes the update in the DXE startup phase, which type of information completes the update after the startup phase ends and before entering the OS phase. In this regard, the type information of the first update type is dynamically updated, and the update is completed in the DXE startup phase. The type information of the second update type adopts a static update mode, and the update is completed after the start-up phase is finished and before entering an OS (operating system) phase.
In the DXE startup phase of the BIOS, the first update type of information on the SMBIOS table is updated.
Because the type information of the second update type adopts a static update mode, the reserved byte number is needed to meet the update byte requirement of the type information of the second update type, so that the reserved byte number of the SMBIOS table needed by the information update is firstly determined.
After the reserved byte number is determined, after the DXE startup phase of the BIOS is finished and before entering the OS phase, updating the information of the second update type on the SMBIOS table based on the reserved byte number and the second update type.
After all types of information in the SMBIOS protocol table are updated, calculating SMIOS the total resource requirement of the protocol table and applying for the corresponding memory space so as to enable the system to start the operating system.
According to the type information updating method of the SMBIOS table, the type information is dynamically updated in the DXE starting stage of the BIOS, and the static update of the type information is ensured by the reserved byte number after the starting stage is finished and before the OS stage is entered, so that the resources for updating the SMBIOS protocol table are sufficient, and the problem of system downtime is reduced.
In a further method of the above method, mainly the process of determining the first update type and the second update type on the SMBIOS table is explained, specifically as follows:
Based on a history record of type information updating of the SMBIOS table in a preset time period, obtaining the maximum value of byte number change intervals of each type of information and the updating times of each type of information;
And taking the type with the maximum value larger than the first preset value and the update times larger than the second preset value as a first update type, and taking the rest types except the first update type in the various types of the SMBIOS table as a second update type.
In this regard, it should be noted that for each type on the SMBIOS table, it is necessary to determine which type information completes the update in the DXE startup phase and which type information completes the update after the startup phase is completed and before entering the OS phase. For this reason, it is necessary to select more appropriate type information as the first update type, and perform information update in a dynamic update manner. For information updates of a server, there may be multiple update procedures. At this time, a history of type information update of the SMBIOS table within a certain period of time may be acquired. From this history, the minimum and maximum number of bytes per type of information can be counted, i.e. there is a change in number of bytes. Meanwhile, the update times of each type of information can be obtained. As some types do not have substantial information updates.
For each type of screening, a screening condition may be set, for example, the maximum value is greater than a first preset value, and the number of updates is greater than a second preset value. And taking each type filtered out as a first updating type, and taking other types as a second updating type.
According to the further method, the types with more update changes and more byte changes are reasonably obtained to serve as information update in the DXE starting stage, so that the reserved byte number is not occupied.
In a further method of the above method, the type information includes a plurality of bytes, and there is also a fixed portion of the content presence update included in the entire bytes. That is, the type information of one type can be divided into a first content and a second content, wherein the first content adopts a dynamic update mode and is performed in a DXE startup phase of the BIOS, the second content adopts a static update mode, and after the DXE startup phase of the BIOS is finished and before entering an OS phase, the update is completed in a mode of occupying the reserved byte number.
In the further method of the invention, the dynamically updated content is updated in the DXE startup stage by dividing one type of information content so as not to occupy the reserved byte number.
In a further method of the above method, the process of determining the number of reserved bytes in the SMBIOS table is mainly explained as follows:
acquiring a first byte number of type information of a first update type after updating the information of the first update type on the SMBIOS table;
acquiring the total byte number after the type information on the SMBIOS table is updated last time, the second byte number after the type information of the first updated type on the SMBIOS table is updated last time, and the reserved byte number last time;
and determining the reserved byte number of the SMBIOS table according to the first byte number, the total byte number, the second byte number and the last reserved byte number.
In this regard, it should be noted that in the present invention, the number of reserved bytes is to be determined for the resource requirement of the information update of the second update type. For this reason, the determination of the number of reserved bytes needs to be calculated based on the number of bytes recorded at each angle. For example, the first byte number of the type information of the first updated type after updating, the total byte number after updating the type information on the SMBIOS table last time, the second byte number after updating the type information of the first updated type on the SMBIOS table last time, and the reserved byte number last time are obtained. The reserved byte numbers of the angles are related to the byte numbers generated in the last updating process and the byte numbers generated in the current updating process, so that the reserved byte numbers of the SMBIOS table are calculated in the comprehensive analysis of the byte numbers, and the actual situation of information updating can be matched better.
Further, determining a byte update ratio according to the first byte number and the second byte number;
determining a third byte number based on the total byte number and the second byte number;
Determining a fourth byte count according to the third byte count and the byte update ratio;
and determining the reserved byte number of the SMBIOS table according to the reserved byte number of the last time and the fourth byte number.
And comparing the byte numbers under the same type in the previous and subsequent updating processes to obtain the byte updating proportion. The byte update ratio can represent the size of the change in byte increment or decrement.
And determining a third byte number according to the total byte number and the second byte number, and obtaining the byte number after type updating of the static updating mode. And then determining the fourth byte number by the third byte number and the byte updating proportion, so that the change trend of the byte number after the type updating in the static updating mode can be embodied.
And finally determining the reserved byte number of the SMBIOS table based on the reserved byte number of the last time and the fourth byte number. For example, the last reserved byte number and the fourth byte number are summed or subtracted to obtain the reserved byte number updated this time.
In another embodiment, the process of determining the reserved byte number of the SMBIOS table is as follows:
acquiring a first total byte number and a second total byte number after the type information on the SMBIOS table is updated for the last time and a reserved byte number for the last time;
determining a lifting type based on the two total byte numbers;
and determining the reserved byte number of the SMBIOS table based on the lifting type, the second total byte number and the last reserved byte number.
In this regard, it is to be noted that, from the two adjacent updating processes, it is determined whether the number of bytes between the first total number of bytes and the second total number of bytes is rising or falling. Because the amplitude of the change of the byte number is not larger, namely the byte number after lifting is similar to a larger value or a smaller value, the reserved byte number of the SMBIOS table is calculated according to the second total byte number and the reserved byte number of the last time by carrying out certain lifting design under the lifting trend.
Further, specifically, if the lifting type is an ascending value, determining a fifth byte number based on the second total byte number and a preset descending proportion, and determining the reserved byte number of the SMBIOS table according to the last reserved byte number and the fifth byte number.
And if the lifting type is a descending value, determining a sixth byte number based on the second total byte number and a preset lifting proportion, and determining the reserved byte number of the SMBIOS table according to the last reserved byte number and the sixth byte number.
More specifically, the fifth byte number is removed from the last reserved byte number, so as to obtain the reserved byte number of the SMBIOS table:
And increasing the last reserved byte number by a sixth byte number to obtain the reserved byte number of the SMBIOS table.
In addition, it should be noted that it is difficult to ensure that the determined number of reserved bytes must meet the resources required in the update process, so that the information of the second update type on the SMBIOS table is updated, the number of bytes of the second update type is counted to be greater than the number of reserved bytes of the SMBIOS table, and the number of reserved bytes of the SMBIOS table is optimized based on the counted number of bytes of the second update type. At this time, the update process needs to be stopped, and then, after the new reserved byte number is perfected, the update process is performed again.
In a further method of the above method, configuring an update sequence of the plurality of first update types, and correspondingly, in a DXE startup phase of the BIOS, updating information of the first update type on the SMBIOS table, including:
In the DXE starting stage of the BIOS, based on the updating sequence, respectively acquiring new information of each first updating type, and updating the original information of the first updating type on the SMBIOS table by the new information.
For example, the first update type includes types 0,1, 2, 3,4, 12, 17, 18, 19, 20, 39, and 41.
Before the DXE phase is finished, updating the table types 0, 1,2 and 3 in the SMBIOS protocol, wherein partial character strings of the data existence types 0, 1,2 and 3 are acquired through updating FRU information, and meanwhile, partial information is reserved in the types 0, 1,2 and 3 of the SMBIOS protocol table in advance.
When the types 0, 1,2 and 3 are updated, the type 4 in the SMBIOS protocol table is continuously updated, wherein the type 4 is information of recording the current CPU, including but not limited to CPU manufacturer, CPU model, CPU speed, CPU core number and the like.
After the Type 4 is updated, the Type 12 of the SMBIOS protocol is updated, the Type 12 mainly relates to physical silk screen information of the link between the main board and the peripheral, and after the update is finished, the memory related information, namely types 17, 18, 19 and the like, is updated.
The types 17, 18, 19 of the updated SMBIOS protocol table, the types 17, 18, 19 mainly relate to the memory quantity, memory slot silk screen information, memory capacity, memory manufacturer, memory supported functional characteristics and the like of the current server.
After the memory information of the types 17, 18 and 19 is updated, the type 20 of the SMBIOS protocol table is updated in sequence, and the type 20 mainly records the communication protocol of the BIOS and the BMC.
After the type 20 of SMIOS is updated, the type 39 of the SMBIOS protocol is updated, wherein the type 39 mainly relates to power supply equipment of the server, namely PSU power supply information, including power supply related information such as power supply manufacturer, power supply delivery date, power supply in-place information, power supply position information and the like.
After the type 39 is updated, the type 41 is updated, and the type 41 mainly relates to on-board equipment of the main board, including position information of an on-board storage medium and the like.
In one embodiment, the second update type includes type 9, and after the DXE phase is completed, type 9 information of the SMBIOS protocol is updated, where type 9 is mainly PCI slot information, including but not limited to core information such as slot information, bandwidth information, device location information, and the like of the PCI device. The PCI slot information update of type 9 of the SMBIOS table would also occupy the previously reserved byte count.
In a further method of the above method, mainly the process of determining the first update type and the second update type on the SMBIOS table is explained, specifically as follows:
determining a seventh byte number after the type information of the first update type on the SMBIOS table is updated last time;
determining an eighth byte number based on the seventh byte number and a selection ratio;
Based on the last type number of the first update type on the SMBIOS table, accumulating the byte number of the first update type, and when the current accumulated byte number is equal to or exceeds the eighth byte number, counting a plurality of update types of which the byte number is accumulated as the screened first update type, and classifying the update types of the incomplete accumulated byte number as the second update type.
To reduce the amount of computation on information types during the DXE startup phase of the BIOS, a further reduction may be performed on the plurality of update types selected to obtain less sophisticated types. At this time, the byte count after the last update of the type information of the first update type on the SMBIOS table is needed. A lesser number of bytes may then be determined based on the selected scale. I.e. the eighth byte count is smaller than the seventh byte count.
And then accumulating the byte numbers of the type information of each type one by one, counting a plurality of update types which are accumulated completely as a first update type after screening, and classifying the update type of the incomplete accumulated byte number as a second update type as long as the screened total byte number is reached.
The type information updating device of the SMBIOS table provided by the present invention is described below, and the type information updating device of the SMBIOS table described below and the type information updating method of the SMBIOS table described above may be referred to correspondingly to each other.
Fig. 2 is a schematic structural diagram of an apparatus for updating type information of an SMBIOS table, referring to fig. 2, where the apparatus includes a determining module 21, a first updating module 22, a calculating module 23, and a second updating module 24, where:
The determining module is used for determining a first update type and a second update type on the SMBIOS table; the first update type is a type of which the type information adopts a dynamic update mode; the second update type is a type of which the type information adopts a static update mode;
the first updating module is used for updating the first updating type of information on the SMBIOS table in the DXE starting stage of the BIOS;
a calculation module, configured to determine a reserved byte number of the SMBIOS table;
And the second updating module is used for updating the information of the second updating type on the SMBIOS table based on the reserved byte number and the second updating type after the DXE starting stage of the BIOS is ended and before the BIOS enters the OS stage.
The type information updating device of the SMBIOS protocol table provided by the invention dynamically updates the type information in the DXE starting stage of the BIOS, and ensures the static update of the type information by the reserved byte number after the starting stage is finished and before entering the OS stage, so that the resources for updating the SMBIOS protocol table are sufficient, and the problem of system downtime is reduced.
Fig. 3 illustrates a physical schematic diagram of an electronic device, as shown in fig. 3, where the electronic device may include: a processor (processor) 31, a communication interface (Communications Interface) 32, a memory (memory) 33, and a communication bus 34, wherein the processor 31, the communication interface 32, and the memory 33 communicate with each other via the communication bus 34. The processor 31 may call logic instructions in the memory 33 to perform a method of updating type information of an SMBIOS table, the method comprising: determining a first update type and a second update type on the SMBIOS table; the first update type is a type of which the type information adopts a dynamic update mode; the second update type is a type of which the type information adopts a static update mode; in a DXE starting stage of the BIOS, updating the information of the first update type on the SMBIOS table; determining the reserved byte number of the SMBIOS table; after the DXE boot phase of the BIOS is completed and before entering the OS phase, the information of the second update type on the SMBIOS table is updated based on the reserved byte count and the second update type.
Further, the logic instructions in the memory 33 described above may be implemented in the form of software functional units and may be stored in a computer readable storage medium when sold or used as a stand alone product. Based on this understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a usb disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
In another aspect, the present invention also provides a computer program product, where the computer program product includes a computer program, where the computer program can be stored on a non-transitory computer readable storage medium, and when the computer program is executed by a processor, the computer can execute a method for updating type information of an SMBIOS table provided by the above methods, and the method includes: determining a first update type and a second update type on the SMBIOS table; the first update type is a type of which the type information adopts a dynamic update mode; the second update type is a type of which the type information adopts a static update mode; in a DXE starting stage of the BIOS, updating the information of the first update type on the SMBIOS table; determining the reserved byte number of the SMBIOS table; after the DXE boot phase of the BIOS is completed and before entering the OS phase, the information of the second update type on the SMBIOS table is updated based on the reserved byte count and the second update type.
In still another aspect, the present invention also provides a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, is implemented to perform a method for updating type information of an SMBIOS table provided by the above methods, the method comprising: determining a first update type and a second update type on the SMBIOS table; the first update type is a type of which the type information adopts a dynamic update mode; the second update type is a type of which the type information adopts a static update mode; in a DXE starting stage of the BIOS, updating the information of the first update type on the SMBIOS table; determining the reserved byte number of the SMBIOS table; after the DXE boot phase of the BIOS is completed and before entering the OS phase, the information of the second update type on the SMBIOS table is updated based on the reserved byte count and the second update type.
The apparatus embodiments described above are merely illustrative, wherein the elements illustrated as separate elements may or may not be physically separate, and the elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
From the above description of the embodiments, it will be apparent to those skilled in the art that the embodiments may be implemented by means of software plus necessary general hardware platforms, or of course may be implemented by means of hardware. Based on this understanding, the foregoing technical solution may be embodied essentially or in a part contributing to the prior art in the form of a software product, which may be stored in a computer readable storage medium, such as ROM/RAM, a magnetic disk, an optical disk, etc., including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method described in the respective embodiments or some parts of the embodiments.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present invention, and are not limiting; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims (15)
1. A method for updating type information of an SMBIOS table, comprising:
determining a first update type and a second update type on the SMBIOS table; the first update type is a type of which the type information adopts a dynamic update mode; the second update type is a type of which the type information adopts a static update mode;
In a DXE starting stage of the BIOS, updating the information of the first update type on the SMBIOS table;
determining the reserved byte number of the SMBIOS table;
And after the DXE starting stage of the BIOS is finished and before entering the OS stage, updating the information of the second update type on the SMBIOS table based on the reserved byte number and the second update type.
2. The method for updating type information of an SMBIOS table according to claim 1, wherein said determining a first update type and a second update type on the SMBIOS table comprises:
Based on a history record of type information updating of the SMBIOS table in a preset time period, obtaining the maximum value of byte number change intervals of each type of information and the updating times of each type of information;
and taking the type with the maximum value larger than a first preset value and the update times larger than a second preset value as a first update type, and taking the rest types except the first update type in each type of the SMBIOS table as a second update type.
3. The method for updating type information of an SMBIOS table according to claim 1, wherein the type information of the first update type is divided into a first content and a second content, the first content is information adopting a dynamic update mode, the second content is information adopting a static update mode, accordingly, the first content of the type information of the first update type on the SMBIOS table is updated in a DXE startup phase of the BIOS, and the second content of the type information of the first update type on the SMBIOS table is updated based on the reserved byte number after the DXE startup phase of the BIOS is ended and before entering an OS phase.
4. The method for updating type information of the SMBIOS table according to claim 1, wherein said determining the number of reserved bytes of the SMBIOS table comprises:
acquiring a first byte number of type information of a first update type after updating the information of the first update type on the SMBIOS table;
acquiring the total byte number after the type information on the SMBIOS table is updated last time, the second byte number after the type information of the first updated type on the SMBIOS table is updated last time, and the reserved byte number last time;
And determining the reserved byte number of the SMBIOS table according to the first byte number, the total byte number, the second byte number and the last reserved byte number.
5. The method for updating type information of an SMBIOS table according to claim 4, wherein said determining the number of reserved bytes of the SMBIOS table according to said first number of bytes, said total number of bytes, and said last reserved number of bytes comprises:
determining a byte update ratio according to the first byte number and the second byte number;
determining a third byte count from the total byte count and the second byte count;
determining a fourth byte count according to the third byte count and the byte update ratio;
And determining the reserved byte number of the SMBIOS table according to the last reserved byte number and the fourth byte number.
6. The method for updating type information of the SMBIOS table according to claim 1, wherein said determining the number of reserved bytes of the SMBIOS table comprises:
acquiring a first total byte number and a second total byte number after the type information on the SMBIOS table is updated for the last time and a reserved byte number for the last time;
determining a lifting type based on the two total byte numbers;
And determining the reserved byte number of the SMBIOS table based on the lifting type, the second total byte number and the last reserved byte number.
7. The method for updating type information of the SMBIOS table according to claim 6, wherein said determining the number of reserved bytes of the SMBIOS table based on said lifting type, said second total number of bytes and said last reserved number of bytes comprises:
If the lifting type is an ascending value, determining a fifth byte number based on the second total byte number and a preset descending proportion, and determining the reserved byte number of the SMBIOS table according to the last reserved byte number and the fifth byte number;
And if the lifting type is a descending value, determining a sixth byte number based on the second total byte number and a preset lifting proportion, and determining the reserved byte number of the SMBIOS table according to the last reserved byte number and the sixth byte number.
8. The method for updating type information of an SMBIOS table according to claim 1, wherein configuring an update sequence of the plurality of first update types, and accordingly, in a DXE startup phase of the BIOS, updating the information of the first update type on the SMBIOS table comprises:
in the DXE starting stage of the BIOS, based on the updating sequence, respectively acquiring new information of each first updating type, and updating the original information of the first updating type on the SMBIOS table by the new information.
9. The method for updating type information of an SMBIOS table according to claim 3, wherein the first update type is types 0, 1,2, 3, and the FRU information of the BMC under the system is obtained through IPMI protocol, and the first content of types 0, 1,2, 3 is obtained based on the FRU information.
10. The method for updating type information of an SMBIOS table according to claim 2, wherein said determining a first update type and a second update type on the SMBIOS table further comprises:
determining a seventh byte number after the type information of the first update type on the SMBIOS table is updated last time;
determining an eighth byte number based on the seventh byte number and a selection ratio;
Based on the last type number of the first update type on the SMBIOS table, accumulating the byte number of the first update type, and when the current accumulated byte number is equal to or exceeds the eighth byte number, counting a plurality of update types of which the byte number is accumulated as the screened first update type, and classifying the update types of the incomplete accumulated byte number as the second update type.
11. The method for updating type information of an SMBIOS table according to claim 1, further comprising:
Updating the information of the second update type on the SMBIOS table, and counting that the byte number of the second update type is larger than the reserved byte number of the SMBIOS table, and optimizing the reserved byte number of the SMBIOS table based on the counted byte number of the second update type.
12. The method for updating type information of an SMBIOS table according to claim 7, further comprising:
And removing the fifth byte number from the last reserved byte number to obtain the reserved byte number of the SMBIOS table:
And increasing the last reserved byte number by the sixth byte number to obtain the reserved byte number of the SMBIOS table.
13. An apparatus for updating type information of an SMBIOS table, comprising:
The determining module is used for determining a first update type and a second update type on the SMBIOS table; the first update type is a type of which the type information adopts a dynamic update mode; the second update type is a type of which the type information adopts a static update mode;
the first updating module is used for updating the first updating type of information on the SMBIOS table in the DXE starting stage of the BIOS;
a calculation module, configured to determine a reserved byte number of the SMBIOS table;
And the second updating module is used for updating the information of the second updating type on the SMBIOS table based on the reserved byte number and the second updating type after the DXE starting stage of the BIOS is ended and before the BIOS enters the OS stage.
14. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements a method for updating type information of an SMBIOS table as claimed in any one of claims 1 to 12 when the program is executed by the processor.
15. A non-transitory computer-readable storage medium having stored thereon a computer program, wherein the computer program, when executed by a processor, implements a method of updating type information of an SMBIOS table according to any one of claims 1 to 12.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202410526145.9A CN118093276B (en) | 2024-04-29 | 2024-04-29 | Method, device, equipment and medium for updating type information of SMBIOS (System management information service) table |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202410526145.9A CN118093276B (en) | 2024-04-29 | 2024-04-29 | Method, device, equipment and medium for updating type information of SMBIOS (System management information service) table |
Publications (2)
Publication Number | Publication Date |
---|---|
CN118093276A true CN118093276A (en) | 2024-05-28 |
CN118093276B CN118093276B (en) | 2024-08-09 |
Family
ID=91165608
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202410526145.9A Active CN118093276B (en) | 2024-04-29 | 2024-04-29 | Method, device, equipment and medium for updating type information of SMBIOS (System management information service) table |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN118093276B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN118377513A (en) * | 2024-06-26 | 2024-07-23 | 苏州元脑智能科技有限公司 | Information management method and device of server |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20080072029A1 (en) * | 2005-03-30 | 2008-03-20 | Ling-Hung Yu | Method for executing power on self test on a computer system and updating SMBIOS information partially |
US20090019278A1 (en) * | 2007-07-11 | 2009-01-15 | Shah Hemal V | Method And System For A Platform Level Data Model And Messages For Transferring SMBIOS Structures And Data |
CN107145455A (en) * | 2017-04-19 | 2017-09-08 | 深圳市国鑫恒宇科技有限公司 | A kind of method that machine system updates SMBIOS static informations |
-
2024
- 2024-04-29 CN CN202410526145.9A patent/CN118093276B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20080072029A1 (en) * | 2005-03-30 | 2008-03-20 | Ling-Hung Yu | Method for executing power on self test on a computer system and updating SMBIOS information partially |
US20090019278A1 (en) * | 2007-07-11 | 2009-01-15 | Shah Hemal V | Method And System For A Platform Level Data Model And Messages For Transferring SMBIOS Structures And Data |
CN107145455A (en) * | 2017-04-19 | 2017-09-08 | 深圳市国鑫恒宇科技有限公司 | A kind of method that machine system updates SMBIOS static informations |
Non-Patent Citations (2)
Title |
---|
朱贺新;王正鹏;: "基于UEFI的SMBIOS设计与研究", 计算机工程与设计, no. 09, 16 September 2013 (2013-09-16) * |
陈榕;陈海波;张逢喆;臧斌宇;: "操作系统的动态更新", 小型微型计算机系统, no. 12, 15 December 2007 (2007-12-15) * |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN118377513A (en) * | 2024-06-26 | 2024-07-23 | 苏州元脑智能科技有限公司 | Information management method and device of server |
CN118377513B (en) * | 2024-06-26 | 2024-09-27 | 苏州元脑智能科技有限公司 | Information management method and device of server |
Also Published As
Publication number | Publication date |
---|---|
CN118093276B (en) | 2024-08-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN118093276B (en) | Method, device, equipment and medium for updating type information of SMBIOS (System management information service) table | |
US9379944B2 (en) | Computer system, computer system information processing method, and information processing program | |
CN109375956B (en) | Method for restarting operating system, logic device and control device | |
WO2024183334A1 (en) | Device operation method, system and apparatus, and non-volatile readable storage medium and electronic device | |
US11861357B2 (en) | Selecting and sending subset of components to computing device prior to operating system install | |
CN112083971B (en) | Component processing method, device and storage medium | |
CN114257551A (en) | Distributed current limiting method and system and storage medium | |
CN115033352A (en) | Task scheduling method, device and equipment for multi-core processor and storage medium | |
CN112860512A (en) | Interface monitoring optimization method and device, computer equipment and storage medium | |
EP3861433B1 (en) | Upgrades based on analytics from multiple sources | |
CN114048033A (en) | Load balancing method and device for batch running task and computer equipment | |
CN114253619A (en) | SSD multi-level Boot method and device, computer equipment and storage medium | |
CN110308914B (en) | Upgrade processing method, device, equipment, system and computer readable storage medium | |
CN107256167B (en) | Upgrade control method and upgrade control equipment applied to application system migration | |
CN108255527A (en) | The method and apparatus of activation system, computing device, readable storage medium storing program for executing | |
CN117235017A (en) | Data upgrading method, device, equipment and storage medium | |
CN111857854A (en) | Shutdown resource loading method and device, storage medium and electronic equipment | |
CN108399031B (en) | Method and device for determining interface layout mode | |
US10809996B2 (en) | Method and device for creating images of different installation and download software units | |
CN114157662B (en) | Cloud platform parameter adaptation method, device, terminal equipment and storage medium | |
CN115150268A (en) | Network configuration method and device of Kubernetes cluster and electronic equipment | |
CN111694628A (en) | Page display method based on application program thread and related equipment | |
CN116391177A (en) | Prioritized inactive memory device updates | |
CN110891097B (en) | Cross-device user identification method and device | |
CN110058866B (en) | Cluster component installation method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |