Updating method of ACPI (Advanced Configuration and Power Interface) table and related equipment
By writing subtable structure information and contents of ACPI tables in the second storage space of flash memory, and querying table structure information according to the creation instructions, the problem of time-consuming and cost-effectiveness of the existing ACPI table update method is solved, and the ACPI table is realized Convenient updates and efficiency improvements.
Patent Information
- Application Number
- CN202310960382.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-31
- Publication Date
- 2025-02-14
AI Technical Summary
The existing ACPI table update method requires full package update, which takes a long time and is costly.
By writing the table structure information and contents of M subtables in the ACPI table in the second storage space of the flash memory, and querying the first table structure information according to the creation instruction, determining which subtable it belongs to, thereby only updating the contents of the corresponding subtable .
It realizes convenient update of ACPI tables, reduces update time and cost, improves efficiency, and reduces computing power consumption.
Smart Images

Figure CN119440568A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computers, and in particular to an update method and related equipment for an advanced configuration and power interface (ACPI) table. Background Art
[0002] The advanced configuration and power interface (ACPI) table is used to provide power management interface information to the operating system or related applications. The operating system or related applications can complete related operations through the ACPI table.
[0003] The ACPI table includes multiple sub-tables, such as the dynamic platform and thermal framework (DPTF) table used to develop thermal policies, or the Windows Management Instrumentation (WMI) table for managing certain functions under the operating system. Usually, after the developer writes the compiled file of the ACPI table, the compiled file can be stored in the flash memory. The basic input output system (BIOS) obtains the compiled file of the ACPI table from the flash memory and creates the ACPI table, and reports it to the operating system (OS).
[0004] In the process of BIOS development, it is often necessary to update the ACPI table. At present, the method for updating the ACPI table is that the developer modifies the ACPI table to obtain a new ACPI table, then generates a new BIOS file based on the new ACPI table, the new BIOS file includes a new ACPI table, and then flashes the BIOS in the flash memory with the new BIOS file, thereby completing the update of the ACPI table. However, this method of updating the ACPI table as a whole package is time-consuming and costly. Summary of the invention
[0005] The embodiments of the present application provide an ACPI table update method and related devices for conveniently updating the ACPI table.
[0006] In a first aspect, the present application proposes an ACPI table updating method for a computer device, wherein the computer device comprises a first storage space and a second storage space, wherein the first storage space stores table structure information and corresponding first content of each sub-table in the ACPI table, and the ACPI table comprises N sub-tables, where N is a positive integer.
[0007] In the present application, the table structure information and the corresponding second content of each subtable in the M subtables in the ACPI table are written into the second storage space of the flash memory, where M is a positive integer less than or equal to; a creation instruction for the ACPI table is received; based on the creation instruction, the first table structure information is queried in the second storage space to determine whether the first table structure information belongs to the table structure information of one of the M subtables; if the first table structure information belongs to the table structure information of one of the M subtables, a first subtable is created based on the first table structure information and the corresponding second content in the second storage space, and the first subtable is the subtable in the ACPI table corresponding to the first table structure information; if the first table structure information does not belong to the table structure information of any subtable in the M subtables, the first subtable is created based on the first table structure information and the corresponding first content in the first storage space.
[0008] Therefore, when developers only need to update a sub-table in the ACPI table, they do not need to update the entire ACPI table. They only need to update the contents of one or more sub-tables, which takes less time, improves efficiency, reduces computing power consumption, and reduces costs.
[0009] In some possible implementations, the first table structure information is compared with the table structure information of each subtable in the M subtables. If the table structure information of one of the M subtables contains table structure information that is consistent with the first table structure information, it is determined that the first table structure information belongs to the table structure information of one of the subtables in the M subtables; otherwise, it is determined that the first table structure information does not belong to the table structure information of any subtable in the M subtables.
[0010] Then, the first table structure information is queried in the second storage space to determine whether the first table structure information belongs to the table structure information of one of the M sub-tables.
[0011] In some possible implementations, the table structure information includes one or more of a signature and an original manufacturer table identifier. By comparing the signature and one or more of the original manufacturer table identifiers, it can be determined whether the two sub-tables belong to the same one.
[0012] In some possible implementations, the second content is stored in the second storage space in the form of a file in the Automation Markup Language (AML) format or the ACPI format generated by compilation, so that developers can easily modify the second content.
[0013] In some possible implementations, the computer device includes a flash memory, and the flash memory includes the first storage space and the second storage space.
[0014] A second aspect of the present application provides a computer device, the computer device comprising a first storage space and a second storage space, the first storage space storing table structure information and corresponding first content of each sub-table in the ACPI table, the ACPI table comprising N sub-tables, where N is a positive integer;
[0015] The computer device comprises:
[0016] a processing module, configured to write table structure information and corresponding second content of each subtable in the M subtables in the ACPI table into the second storage space of the flash memory, where M is a positive integer less than or equal to ;
[0017] A transceiver module, used for receiving an instruction to create the ACPI table;
[0018] The processing module is further configured to query the first table structure information in the second storage space based on the creation instruction to determine whether the first table structure information belongs to table structure information of one of the M sub-tables;
[0019] The processing module is further configured to create a first sub-table based on the first table structure information and the corresponding second content in the second storage space if the first table structure information belongs to the table structure information of one of the M sub-tables, where the first sub-table is a sub-table in the ACPI table corresponding to the first table structure information;
[0020] The processing module is further configured to create the first sub-table based on the first table structure information and corresponding first content in the first storage space if the first table structure information does not belong to table structure information of any sub-table among the M sub-tables.
[0021] In some possible implementations, the processing module is specifically configured to:
[0022] The first table structure information is compared with the table structure information of each subtable in the M subtables. If the table structure information of one of the subtables in the M subtables contains table structure information that is consistent with the first table structure information, it is determined that the first table structure information belongs to the table structure information of one of the subtables in the M subtables; otherwise, it is determined that the first table structure information does not belong to the table structure information of any subtable in the M subtables.
[0023] In some possible implementations, the table structure information includes one or more of a signature and an original manufacturer table identifier.
[0024] In some possible implementations, the second content is stored in the second storage space in the form of a file in the Automation Markup Language (AML) format or the Automation Markup Language (ACPI) format generated by compilation.
[0025] In some possible implementations, the computer device includes a flash memory, and the flash memory includes the first storage space and the second storage space.
[0026] A third aspect of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores instructions, which, when executed on a computer, enable the computer to execute any one of the methods described in the first aspect.
[0027] A fourth aspect of the present application provides a computer program product, which includes computer execution instructions, which are stored in a computer-readable storage medium; at least one processor of a device can read the computer execution instructions from the computer-readable storage medium, and at least one processor executes the computer execution instructions so that the device implements the method provided by the above-mentioned first aspect or any possible implementation of the first aspect.
[0028] In a fifth aspect, the present application provides a communication device, which may include at least one processor, a memory, and a communication interface. At least one processor is coupled to the memory and the communication interface. The memory is used to store instructions, at least one processor is used to execute the instructions, and the communication interface is used to communicate with other communication devices under the control of at least one processor. When the instructions are executed by at least one processor, the at least one processor executes the method in the first aspect or any possible implementation of the first aspect.
[0029] A sixth aspect of the present application provides a chip system, which includes a processor for supporting the implementation of the functions involved in the above-mentioned first aspect or any possible implementation method of the first aspect.
[0030] In a possible design, the chip system may also include a memory, which is used to store necessary program instructions and data. The chip system may be composed of a chip, or may include a chip and other discrete devices.
[0031] Among them, the technical effects brought about by the second to sixth aspects or any possible implementation methods thereof can refer to the technical effects brought about by the first aspect or different possible implementation methods of the first aspect, and will not be repeated here.
[0032] It can be seen from the above technical solutions that the embodiments of the present application have the following advantages:
[0033] To this end, the present application proposes an ACPI table update method for a computer device, wherein the computer device includes a first storage space and a second storage space, wherein the first storage space stores table structure information and corresponding first content of each sub-table in the ACPI table, and the ACPI table includes N sub-tables, where N is a positive integer.
[0034] In the present application, the BIOS first writes the table structure information of each sub-table in the M sub-tables in the ACPI table and the corresponding second content in the second storage space of the flash memory, where M is a positive integer less than or equal to. When the BIOS receives a creation instruction for the ACPI table, the BIOS can query the first table structure information in the second storage space based on the creation instruction to determine whether the first table structure information belongs to the table structure information of one of the M sub-tables.
[0035] If the first table structure information belongs to the table structure information of one of the M subtables, a first subtable is created based on the first table structure information and the corresponding second content in the second storage space, and the first subtable is the subtable corresponding to the first table structure information in the ACPI table; if the first table structure information does not belong to the table structure information of any subtable among the M subtables, the first subtable is created based on the first table structure information and the corresponding first content in the first storage space.
[0036] Therefore, when developers only need to update a sub-table in the ACPI table, they do not need to update the entire ACPI table. They only need to update the contents of one or more sub-tables, which takes less time, improves efficiency, reduces computing power consumption, and reduces costs. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] Figure 1-1 A schematic diagram of the structure of a computer device provided in an embodiment of the present application;
[0038] Figure 1-2 A schematic diagram of the ACPI system architecture provided in an embodiment of the present application;
[0039] Figure 2-1 A flowchart of a method for updating an ACPI table provided in an embodiment of the present application;
[0040] Figure 2-2 A schematic diagram of the process of creating an ACPI table in this application;
[0041] Figure 2-3 Another schematic diagram of the process of creating an ACPI table in this application;
[0042] Figure 3 A schematic diagram of the structure of a computer device provided in an embodiment of the present application;
[0043] Figure 4 A schematic diagram of the structure of a communication device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0044] The embodiments of the present application provide an ACPI table updating method and related devices for updating a sub-table of an ACPI table.
[0045] The embodiments of the present application are described below in conjunction with the accompanying drawings.
[0046] The terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and need not be used to describe a specific order or sequential order. It should be understood that the terms used in this way can be interchangeable under appropriate circumstances, which is only to describe the distinction mode adopted by the objects of the same attributes when describing in the embodiments of the present application. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, so that the process, method, system, product or equipment comprising a series of units need not be limited to those units, but may include other units that are not clearly listed or inherent to these processes, methods, products or equipment.
[0047] The embodiments of the present application can be applied to Figure 1-1 In the computer device 100 shown, the computer device 100 includes a processing module 110, a display module 120, a storage module 130 and an input module 140 (such as a keyboard, a mouse, a touch screen, etc., which are not limited here).
[0048] The processing module 110 is the control center of the computer device 100. It uses various interfaces and lines to connect various parts of the computer device 100, and executes various functions and processes data of the computer device 100 by running or executing software programs and / or modules stored in the storage module 130, and calling data stored in the storage module 130, so as to monitor the computer device 100 as a whole. Optionally, the processing module 110 may include one or more processing units; preferably, the processing module 110 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface and application programs, etc., and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processing module 110.
[0049] The display module 120 can be used to display information input by the user or information provided to the user and various interfaces of the computer device 100. The display module 120 may include a display panel, and optionally, the display panel may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), etc. Further, the touch panel may cover the display panel, and when the touch panel detects a touch operation on or near it, it is transmitted to the processing module 110 to determine the type of the touch event, and then the processing module 110 provides a corresponding visual output on the display panel according to the type of the touch event.
[0050] The storage module 130 may include a read-only memory and a random access memory, and provides instructions and data to the processing module 110. A portion of the storage module 130 may also include a non-volatile random access memory (NVRAM). The storage module 130 stores processor and operation instructions, executable modules or data structures, or subsets thereof, or extended sets thereof, wherein the operation instructions may include various operation instructions for implementing various operations.
[0051] The input module 140 can be used to receive input digital or character information, and to generate key signal input related to the user settings and function control of the computer device 100. Specifically, the input module 140 may include a touch panel and other input devices. The touch panel, also known as a touch screen, can collect the user's touch operation on or near it (such as the user's operation on or near the touch panel using any suitable object or accessory such as a finger, stylus, etc.), and drive the corresponding connection device according to a pre-set program. Optionally, the touch panel may include a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch orientation, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into the contact coordinates, and then sends it to the processing module 110, and can receive and execute the command sent by the processing module 110. In addition, the touch panel can be implemented using various types such as resistive, capacitive, infrared and surface acoustic waves. In addition to the touch panel, the input module 140 may also include other input devices. Specifically, other input devices may include, but are not limited to, one or more of a physical keyboard, function keys (such as a volume control key, a switch key, etc.), a trackball, a mouse, a joystick, and the like.
[0052] In some possible implementations, the computer device 100 may be a terminal device or a server, which is not limited here.
[0053] In this embodiment, the server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, and big data and artificial intelligence platforms. The terminal can be a smart phone, tablet computer, laptop computer, desktop computer, smart speaker, smart watch, etc., but is not limited to this. The terminal and the server can be directly or indirectly connected through wired or wireless communication, and the terminal and the server can be connected to form a blockchain network, which is not limited in this application.
[0054] Among them, the terminal device can be user equipment (UE), mobile station (MS), mobile terminal (MT), etc. The terminal device can be a mobile phone, a tablet computer (Pad), a computer with wireless transceiver function, a virtual reality (VR) terminal device, an augmented reality (AR) terminal device, a wireless terminal in industrial control, a wireless terminal in self driving, a wireless terminal in remote medical surgery, a wireless terminal in smart grid, a wireless terminal in transportation safety, a wireless terminal in smart city, a wireless terminal in smart home, etc. The embodiments of the present application do not limit the specific technology and specific device form adopted by the terminal device.
[0055] The computer device 100 can provide an operating system (OS) and a basic input output system (BIOS) through the processing module 110 and the storage module 130. The ACPI table is an important way for the OS and the BIOS to interact. The ACPI table is used to provide information about the power management interface to the operating system or related applications. The operating system or related applications can complete related operations through the ACPI table. The compiled file of the ACPI table is stored in the storage module (flash memory). The BIOS can create the ACPI table in the memory and report it to the OS. The ACPI table includes multiple sub-tables, such as a dynamic platform and thermal framework (DPTF) table for developing thermal strategies, or a windows management instrumentation (WMI) table for managing certain functions under the operating system.
[0056] For example, Figure 1-2 As shown in the figure, it is the system architecture of ACPI. ACPI in BIOS can include ACPI registers, ACPI BIOS and ACPI tables. Among them, ACPI BIOS includes basic information of platform hardware, and platform hardware is used to support various functions of BIOS. OS is implemented based on kernel, and kernel includes ACPI driver, device driver, OS Power Management system code (OSPM system code), and application. Among them, ACPI driver can be an interpreter (AMLinterpreter) of automation markup language (AML), which is used to parse ACPI tables for use by devices under OS.
[0057] Among them, the OS can interact with the ACPI register through the ACPI register interface, interact with the ACPI BIOS through the firmware interface, and interact with the ACPI table through the ACPI table interface. In addition, the Device Driver can also interact directly with the platform hardware.
[0058] Among them, ACPI registers are used to provide register information for interaction with BIOS to OS. ACPI BIOS is the driver of BIOS for ACPI table, which is used to realize functions such as creation, deletion, and update of ACPI table. ACPI table is a table compiled based on ACPI source language (ACPI Source Language, ASL) code or other formats and stored in flash memory. Then, BIOS can create the ACPI table and report it to OS, and OS completes related operations based on the ACPI table.
[0059] Usually, after developers write the compilation file of the ACPI table, they can store the compilation file in the flash memory. The BIOS obtains the compilation file of the ACPI table from the flash memory and creates the ACPI table, and reports it to the operating system (OS). In the development process of the BIOS, it is often necessary to update the ACPI table. At present, the method for updating the ACPI table is to modify the ACPI table by the developer to obtain a new ACPI table, and then generate a new BIOS file based on the new ACPI table. The new BIOS file includes a new ACPI table, and then the BIOS in the flash memory is flashed with the new BIOS file, thereby completing the update of the ACPI table. However, this method of updating the ACPI table as a whole package is time-consuming and costly.
[0060] To this end, the present application proposes an ACPI table update method for a computer device, the computer device comprising a first storage space and a second storage space, the first storage space storing table structure information and corresponding first content of each subtable in the ACPI table, the ACPI table comprising N subtables, N being a positive integer. In the present application, the BIOS first writes the table structure information and corresponding second content of each subtable in the M subtables in the ACPI table into the second storage space of the flash memory, M being a positive integer less than or equal to. When the BIOS receives a creation instruction for the ACPI table, the BIOS can query the first table structure information in the second storage space based on the creation instruction to determine whether the first table structure information belongs to the table structure information of one of the M subtables. If the first table structure information belongs to the table structure information of one of the M subtables, then a first subtable is created based on the first table structure information and the corresponding second content in the second storage space, and the first subtable is the subtable corresponding to the first table structure information in the ACPI table; if the first table structure information does not belong to the table structure information of any of the M subtables, then the first subtable is created based on the first table structure information and the corresponding first content in the first storage space. Then, when the developer only needs to update one or more of the subtables, there is no need to update the entire package of the ACPI table, only the content of one or more subtables needs to be updated, which takes less time, improves efficiency, reduces computing power consumption and reduces costs.
[0061] For example, see Figure 2-1 As shown, an ACPI table update method provided by an embodiment of the present application is used for a computer device, the computer device includes a first storage space and a second storage space, wherein the first storage space and the second storage space may belong to the same flash memory in the computer device, and the computer device includes the flash memory. The computer device also includes a memory, and the memory is used to create an ACPI table.
[0062] The method includes:
[0063] 201. BIOS writes table structure information and corresponding first content of each sub-table of the ACPI table into a first storage space.
[0064] In some possible implementations, the BIOS may receive a compiled file of an ACPI table input by a developer in a first storage space of the flash memory. In some possible implementations, the compiled file of the ACPI table may be written by a developer, and the first content of each sub-table of the ACPI table may be used to provide information of a power management interface to the operating system or related applications, and the operating system or related applications may complete related operations through the ACPI table. In some possible implementations, after the developer writes the ACPI table, a file in the format of automation markup language (aml) or acpi may be generated. In some possible implementations, the table structure information includes one or more of a signature and an original manufacturer table identifier (OemTableId), which are not limited here.
[0065] In some possible implementations, the ACPI table may include table structure information and corresponding first content of each of the N sub-tables, and the N sub-tables may be a dynamic platform and thermal framework (DPTF) table for developing thermal strategies, a windows management instrumentation (WMI) table for managing certain functions under an operating system, etc., which are not limited here. Wherein, N is a positive integer.
[0066] 202. The BIOS writes table structure information of M sub-tables in the ACPI table and corresponding second content into the second storage space, where M is a positive integer less than or equal to N.
[0067] In some possible implementations, when a developer wants to update the contents of the M sub-tables in the ACPI table, the developer can write the table structure information and the corresponding second contents of each of the M sub-tables in the ACPI table into the second storage space of the flash memory through the BIOS. In some possible implementations, in the second storage space, the table structure information and the corresponding second contents of each of the M sub-tables in the ACPI table can be written in a file in a compiled and generated automation markup language (AML) format or an acpi format.
[0068] It should be noted that the M subtables of the ACPI table in the second storage space have the same M subtables in the N subtables of the ACPI table in the first storage space, and the two have the same table structure information, but may have different contents. Exemplarily, the M subtables of the ACPI table in the second storage space include the first subtable and the second subtable, and the N subtables of the ACPI table in the first storage space include the first subtable, the second subtable, the third subtable, and the fourth subtable, wherein the first subtable of the ACPI table in the second storage space and the first subtable of the ACPI table in the first storage space have the same table structure information (but have different contents), and the second subtable of the ACPI table in the second storage space and the second subtable of the ACPI table in the first storage space have the same table structure information (but have different contents). In addition, since the developer needs to update M subtables in the ACPI table, that is, needs to modify the first subtable and the second subtable in the ACPI table, the first subtable of the ACPI table in the second storage space and the first subtable of the ACPI table in the first storage space can have different contents, and the second subtable of the ACPI table in the second storage space and the second subtable of the ACPI table in the first storage space can have different contents.
[0069] 203. BIOS receives an instruction to create an ACPI table.
[0070] In some possible implementations, the developer may operate in the BIOS and input the creation instruction, or operate from other devices and send the creation instruction to the BIOS, or the BIOS may generate the creation instruction according to a program, which is not limited here. After the BIOS receives the creation instruction for the ACPI table, the BIOS may create each sub-table in the ACPI table.
[0071] Exemplarily, the BIOS may apply for memory for the ACPI table, and create a linked list in the memory based on the table structure information of each sub-table of the ACPI table in the first storage space, and assign the address of the memory to the root system description pointer (RSDP). The BIOS may use RSDP as the entry point in the ACPI table in the memory, and RSDP includes a root system description table (RSDT) and an extended system description table (XSDT). The RSDT and XSDT have the same functions, and the BIOS may store the addresses of each sub-table in the ACPI table in the RSDT or XSDT. Next, the BIOS may obtain the addresses of each sub-table in the ACPI table from the RSDT or XSDT, obtain the contents of each sub-table in the ACPI table based on these addresses, and create each sub-table of the ACPI table in the memory based on these contents. For details, please refer to steps 204 to 207.
[0072] In the embodiment of the present application, i=1 may be set and steps 204 to 207 may be executed.
[0073] 204. The BIOS obtains table structure information i of the i-th sub-table of the ACPI table in the first storage space.
[0074] In an embodiment of the present application, after the BIOS receives the instruction to create the ACPI table, the BIOS can determine the various sub-tables of the ACPI table that need to be created in the memory in the ACPI table in the first storage space. Taking the i-th sub-table as an example, the BIOS first obtains the table structure information i of the i-th sub-table of the ACPI table from the first storage space.
[0075] Exemplarily, the ACPI table in the first storage space includes a first subtable (the first subtable), a second subtable (the second subtable), a third subtable (the third subtable), and a fourth subtable (the fourth subtable). After receiving the instruction to create the ACPI table, the BIOS first obtains the table structure information 1 of the first subtable from the ACPI table in sequence, and then executes steps 204 to 207; then obtains the table structure information 2 of the second subtable in sequence, and then executes steps 204 to 207, and so on, until all subtables in the ACPI table are processed in steps 204 to 207, that is, the creation of the ACPI table is completed.
[0076] 205. The BIOS queries the table structure information i in the second storage space based on the creation instruction to determine whether the table structure information i belongs to the table structure information of one of the M sub-tables.
[0077] In an embodiment of the present application, after the BIOS obtains the table structure information i of the i-th sub-table of the ACPI table in the first storage space, the BIOS can first query the table structure information of each sub-table of the M sub-tables in the second storage space of the flash memory to determine whether the table structure information i belongs to the table structure information of one of the sub-tables in the M sub-tables.
[0078] In some possible implementations, the BIOS may compare the table structure information i with the table structure information of each sub-table in the M sub-tables. If the table structure information of one of the M sub-tables contains table structure information that is consistent with the table structure information i, it is determined that the table structure information i belongs to the table structure information of one of the sub-tables in the M sub-tables; otherwise, it is determined that the table structure information i does not belong to the table structure information of any sub-table in the M sub-tables.
[0079] Exemplarily, if i=1, that is, after the BIOS obtains the table structure information 1 of the first subtable in the ACPI table in the first storage space, the BIOS may first query the table structure information of each subtable of the M subtables in the second storage space of the flash memory to determine whether the table structure information 1 belongs to the table structure information of one of the M subtables. Assuming that each of the M subtables in the second storage space is the first subtable (i.e., the first subtable) and the second subtable (i.e., the second subtable), which correspond to the table structure information 1 and the table structure information 2, respectively, then it is determined that the table structure information i belongs to the table structure information of one of the M subtables.
[0080] As another example, if i=3, that is, after the BIOS obtains the table structure information 3 of the third subtable in the ACPI table in the first storage space, the BIOS may first query the table structure information of each of the M subtables in the second storage space of the flash memory to determine whether the table structure information 3 belongs to the table structure information 3 of one of the M subtables. Assuming that each of the M subtables in the second storage space is the first subtable (i.e., the first subtable) and the second subtable (i.e., the second subtable), which correspond to the table structure information 1 and the table structure information 2, respectively, then the table structure information of each of the M subtables in the second storage space does not include the table structure information 1.
[0081] In the embodiment of the present application, if the BIOS searches the second storage space for the table structure information of at least one sub-table of the ACPI table including the table structure information i, step 206 is executed; otherwise, step 207 is executed.
[0082] 206. The BIOS obtains the second content of the i-th sub-table in the ACPI table in the second storage space, and creates the i-th sub-table in the memory based on the second content.
[0083] In some possible implementations, after the BIOS queries the table structure information i in the second storage space based on the creation instruction, if it is found that the table structure information i belongs to the table structure information of one of the M sub-tables of the ACPI table in the second storage space, then the BIOS can create the i-th sub-table of the ACPI table in the memory of the computer device based on the table structure information i and the corresponding second content in the second storage space, and based on the second content.
[0084] In an embodiment of the present application, by writing the table structure information i and the corresponding second content of the ith sub-table in the second storage space, the BIOS can create the ith sub-table of the ACPI table in the memory of the computer device based on the table structure information i and the corresponding second content in the second storage space, thereby updating the ith sub-table in the ACPI table, and there is no need to rewrite the entire ACPI table in the first storage space. It is only necessary to write the table structure information i and the corresponding second content of the ith sub-table in the second storage space, which takes less time, improves efficiency, reduces computing power consumption and reduces costs.
[0085] In some possible implementations, after the BIOS writes the table structure information and the corresponding second content of the M sub-tables of the ACPI table in the second storage space, the BIOS can load the table structure information and the corresponding second content of each sub-table of the M sub-tables of the ACPI table in the second storage space into the memory to create the M sub-tables in the ACPI table in the memory.
[0086] like Figure 2-2 As shown, taking XSDT as an example, BIOS can obtain the second address of the i-th subtable of the ACPI table in the second storage space and store it in XSDT. Then, BIOS obtains the second address of the i-th subtable in the ACPI table in the second storage space in XSDT, and obtains the second content of the i-th subtable from the second storage space based on the second address of the i-th subtable, and then calls the unified extensible firmware interface (UEFI) to create the i-th subtable in the memory based on the second content of the i-th subtable, thereby completing the creation of the i-th subtable in the ACPI table.
[0087] Exemplarily, the BIOS may obtain the second address of the first subtable of the ACPI table in the second storage space and store it in the XSDT. Then, the BIOS obtains the second address of the first subtable in the second storage space in the XSDT, obtains the second content of the first subtable from the second storage space based on the second address of the first subtable, and then calls UEFI to create the first subtable in the memory based on the second content of the first subtable, thereby completing the creation of the first subtable in the ACPI table.
[0088] 207. The BIOS obtains the first content of the i-th sub-table in the ACPI table from the first storage space and installs the i-th sub-table in the memory.
[0089] In the embodiment of the present application, if the BIOS sends the table structure information of at least one sub-table of the table structure information i belonging to the ACPI table in the second storage space, then the BIOS can obtain the first content of the i-th sub-table in the ACPI table from the first storage space and create the i-th sub-table in the memory, that is, the content of the i-th sub-table of the ACPI table remains unchanged.
[0090] Such as Figure 2-3 shown, taking XSDT as an example, the BIOS can obtain the first address of the i-th sub-table of the ACPI table in the first storage space and store it in XSDT. Then, the BIOS obtains the first address of the i-th sub-table in the ACPI table in the first storage space in XSDT, and based on the first address of the i-th sub-table, obtains the first content of the i-th sub-table from the first storage space, and then calls UEFI to create the i-th sub-table in the memory based on the first content of the i-th sub-table, thereby completing the creation of the i-th sub-table in the ACPI table.
[0091] Exemplarily, the BIOS can obtain the second address of the third sub-table of the ACPI table in the second storage space and store it in XSDT. Then, the BIOS obtains the second address of the third sub-table in the second storage space in XSDT, and based on the second address of the third sub-table, obtains the second content of the third sub-table from the second storage space, and then calls UEFI to create the third sub-table in the memory based on the second content of the third sub-table, thereby completing the creation of the third sub-table in the ACPI table.
[0092] In the embodiment of the present application, through the above steps, when a developer needs to modify the content of M sub-tables in the ACPI table, only the table structure information and corresponding content of the M sub-tables in the ACPI table need to be written in the second storage space, without the need to rewrite the APCI table in the first storage space of the flash memory, which takes less time, improves efficiency, reduces computing power consumption and reduces costs.
[0093] In the embodiment of the present application, if i < N, it means that the BIOS has not traversed each sub-table of the ACPI table in the first storage space, that is, the creation of the ACPI table in the memory has not been completed. Then, it is necessary to execute i = i + 1 and continue to execute steps 204-207 to create another sub-table in the ACPI table. If i = N, it means that the BIOS has traversed each sub-table of the ACPI table in the first storage space and completed the creation of the ACPI table in the memory.
[0094] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.
[0095] In order to better implement the above-mentioned solution of the embodiment of the present application, relevant devices for implementing the above-mentioned solution are also provided below.
[0096] See also Figure 3 As shown, an embodiment of the present application provides a computer device 300, the computer device includes a first storage space and a second storage space, the first storage space stores table structure information and corresponding first content of each sub-table in the ACPI table, the ACPI table includes N sub-tables, N is a positive integer;
[0097] The computer device comprises:
[0098] Processing module 301, configured to write table structure information and corresponding second content of each sub-table in M sub-tables in the ACPI table into the second storage space, where M is a positive integer less than or equal to .
[0099] The transceiver module 302 is used to receive an instruction to create the ACPI table;
[0100] The processing module is further configured to query the first table structure information in the second storage space based on the creation instruction to determine whether the first table structure information belongs to table structure information of one of the M sub-tables;
[0101] The processing module 301 is further configured to create a first subtable based on the first table structure information and the corresponding second content in the second storage space if the first table structure information belongs to the table structure information of one of the M subtables, where the first subtable is a subtable in the ACPI table corresponding to the first table structure information;
[0102] The processing module 301 is further configured to create the first sub-table based on the first table structure information and corresponding first content in the first storage space if the first table structure information does not belong to table structure information of any sub-table among the M sub-tables.
[0103] In some possible implementations, the processing module 301 is specifically configured to:
[0104] comparing the first table structure information with the table structure information of each subtable in the M subtables, and if the table structure information of one of the subtables in the M subtables contains table structure information that is consistent with the first table structure information, determining that the first table structure information belongs to the table structure information of one of the subtables in the M subtables;
[0105] Otherwise, it is determined that the first table structure information does not belong to table structure information of any sub-table among the M sub-tables.
[0106] In some possible implementations, the table structure information includes one or more of a signature and an original manufacturer table identifier.
[0107] In some possible implementations, the second content is stored in the second storage space in the form of a file in the Automation Markup Language (AML) format or the Automation Markup Language (ACPI) format generated by compilation.
[0108] In some possible implementations, the computer device 300 includes a flash memory, and the flash memory includes the first storage space and the second storage space.
[0109] It should be noted that the information interaction, execution process, etc. between the modules / units of the above-mentioned device are based on the same concept as the method embodiment of the present application, and the technical effects they bring are the same as those of the method embodiment of the present application. For specific contents, please refer to the description in the method embodiment shown above in the present application, and will not be repeated here.
[0110] An embodiment of the present application also provides a computer storage medium, wherein the computer storage medium stores a program, and the program executes some or all of the steps recorded in the above method embodiment.
[0111] Next, another communication device provided by the embodiment of the present application is introduced. Figure 4 As shown, the communication device 400 includes:
[0112] Receiver 401, transmitter 402, processor 403 and memory 404. In some embodiments of the present application, receiver 401, transmitter 402, processor 403 and memory 404 may be connected via a bus or other means, wherein: Figure 4 The example of connecting through bus is taken in the following.
[0113] The memory 404 may include a read-only memory and a random access memory, and provides instructions and data to the processor 403. A portion of the memory 404 may also include a non-volatile random access memory (NVRAM). The memory 404 stores an operating system and operating instructions, executable modules or data structures, or a subset thereof, or an extended set thereof, wherein the operating instructions may include various operating instructions for implementing various operations. The operating system may include various system programs for implementing various basic services and processing hardware-based tasks.
[0114] The processor 403 controls the operation of the communication device 400, and the processor 403 may also be referred to as a central processing unit (CPU). In a specific application, the various components of the communication device 400 are coupled together through a bus system, wherein the bus system may include a power bus, a control bus, and a status signal bus in addition to a data bus. However, for the sake of clarity, various buses are referred to as bus systems in the figure.
[0115] The method disclosed in the above embodiment of the present application can be applied to the processor 403, or implemented by the processor 403. The processor 403 can be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the processor 403. The above processor 403 can be a general processor, a digital signal processor (digital signal processing, DSP), an application specific integrated circuit (application specific integrated circuit, ASIC), a field programmable gate array (field-programmable gate array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the embodiment of the present application can be directly embodied as a hardware decoding processor to execute, or the hardware and software modules in the decoding processor can be executed. The software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 404, and the processor 403 reads the information in the memory 404 and completes the steps of the above method in combination with its hardware.
[0116] The receiver 401 may be used to receive input digital or character information and generate signal input related to relevant settings and function control. The transmitter 402 may include a display device such as a display screen. The transmitter 402 may be used to output digital or character information through an external interface.
[0117] In the embodiment of the present application, the processor 403 is used to execute the aforementioned ACPI table updating method.
[0118] In another possible design, when the computer device 300 or the communication device 400 is a chip, it includes: a processing unit and a communication unit, the processing unit may be, for example, a processor, and the communication unit may be, for example, an input / output interface, a pin or a circuit, etc. The processing unit may execute the computer execution instructions stored in the storage unit, so that the chip in the terminal executes the method for sending wireless report information of any one of the above-mentioned first aspects. Optionally, the storage unit is a storage unit in the chip, such as a register, a cache, etc., and the storage unit may also be a storage unit in the terminal located outside the chip, such as a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (RAM), etc.
[0119] The processor mentioned in any of the above places may be a general-purpose central processing unit, a microprocessor, an ASIC, or one or more integrated circuits for controlling the execution of the program of the above method.
[0120] It should also be noted that the device embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed over multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. In addition, in the drawings of the device embodiments provided by the present application, the connection relationship between the modules indicates that there is a communication connection between them, which may be specifically implemented as one or more communication buses or signal lines.
[0121] Through the description of the above implementation mode, the technicians in the field can clearly understand that the present application can be implemented by means of software plus necessary general hardware, and of course, it can also be implemented by special hardware including application-specific integrated circuits, special CPUs, special memories, special components, etc. In general, all functions completed by computer programs can be easily implemented with corresponding hardware, and the specific hardware structure used to implement the same function can also be various, such as analog circuits, digital circuits or special circuits. However, for the present application, software program implementation is a better implementation mode in more cases. Based on such an understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a readable storage medium, such as a computer floppy disk, a U disk, a mobile hard disk, a ROM, a RAM, a magnetic disk or an optical disk, etc., including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0122] In the above embodiments, all or part of the embodiments may be implemented by software, hardware, firmware or any combination thereof. When implemented by software, all or part of the embodiments may be implemented in the form of a computer program product.
[0123] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website site, a computer, a server, or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server, or data center. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a server or a data center that includes one or more available media integrations. The available medium may be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)), etc.
Claims
1. A method for updating an advanced configuration and power management interface ACPI table, characterized in that: Used in a computer device, the computer device comprising a first storage space and a second storage space, the first storage space storing table structure information and corresponding first content of each sub-table in the ACPI table, the ACPI table comprising N sub-tables, where N is a positive integer; The method comprises: Writing table structure information and corresponding second content of each subtable in the M subtables in the ACPI table into the second storage space, where M is a positive integer less than or equal to ; Receiving a creation instruction for the ACPI table; querying the first table structure information in the second storage space based on the creation instruction to determine whether the first table structure information belongs to table structure information of one of the M sub-tables; If the first table structure information belongs to table structure information of one of the M subtables, creating a first subtable based on the first table structure information and the corresponding second content in the second storage space, where the first subtable is a subtable in the ACPI table corresponding to the first table structure information; If the first table structure information does not belong to the table structure information of any sub-table among the M sub-tables, the first sub-table is created based on the first table structure information and the corresponding first content in the first storage space.
2. The method according to claim 1, characterized in that: The querying the first table structure information in the second storage space based on the creation instruction to determine whether the first table structure information belongs to table structure information of one of the M sub-tables includes: comparing the first table structure information with the table structure information of each subtable in the M subtables, and if the table structure information of one of the subtables in the M subtables contains table structure information that is consistent with the first table structure information, determining that the first table structure information belongs to the table structure information of one of the subtables in the M subtables; Otherwise, it is determined that the first table structure information does not belong to table structure information of any sub-table among the M sub-tables.
3. The method according to claim 1 or 2, characterized in that: The table structure information includes one or more of a signature and an original manufacturer table identification.
4. The method according to any one of claims 1 to 3, characterized in that: The second content is stored in the second storage space in the form of a file in the Automation Markup Language (AML) format or the ACPI format generated by compilation.
5. The method according to any one of claims 1 to 4, characterized in that: The computer device includes a flash memory including the first storage space and the second storage space.
6. A computer device, characterized in that: The computer device includes a first storage space and a second storage space, the first storage space stores table structure information and corresponding first content of each sub-table in the ACPI table, the ACPI table includes N sub-tables, where N is a positive integer; The computer device comprises: a processing module, configured to write into the second storage space the table structure information and the corresponding second content of each sub-table in the M sub-tables in the ACPI table, where M is a positive integer less than or equal to ; A transceiver module, configured to receive an instruction to create the ACPI table; The processing module is further configured to query the first table structure information in the second storage space based on the creation instruction to determine whether the first table structure information belongs to table structure information of one of the M sub-tables; The processing module is further configured to create a first sub-table based on the first table structure information and the corresponding second content in the second storage space if the first table structure information belongs to the table structure information of one of the M sub-tables, where the first sub-table is a sub-table in the ACPI table corresponding to the first table structure information; The processing module is further configured to create the first sub-table based on the first table structure information and corresponding first content in the first storage space if the first table structure information does not belong to table structure information of any sub-table among the M sub-tables.
7. The computer device according to claim 6, characterized in that: The processing module is specifically used for: comparing the first table structure information with the table structure information of each subtable in the M subtables, and if the table structure information of one of the subtables in the M subtables contains table structure information that is consistent with the first table structure information, determining that the first table structure information belongs to the table structure information of one of the subtables in the M subtables; Otherwise, it is determined that the first table structure information does not belong to table structure information of any sub-table among the M sub-tables.
8. The computer device according to claim 6 or 7, characterized in that: The table structure information includes one or more of a signature and an original manufacturer table identification.
9. The computer device according to any one of claims 6 to 8, characterized in that: The second content is stored in the second storage space in the form of a file in the Automation Markup Language (AML) format or the ACPI format generated by compilation.
10. The computer device according to any one of claims 6 to 9, characterized in that: The computer device includes a flash memory including the first storage space and the second storage space.
11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a program, and the program causes a computer device to execute the method according to any one of claims 1 to 5.
12. A computer program product, characterized in that The computer program product includes computer-executable instructions, which are stored in a computer-readable storage medium; at least one processor of a device reads the computer-executable instructions from the computer-readable storage medium, and the at least one processor executes the computer-executable instructions so that the device performs the method as described in any one of claims 1-5.
13. A communication device, characterized in that: The communication device includes at least one processor, a memory and a communication interface; The at least one processor is coupled to the memory and the communication interface; The memory is used to store instructions, the processor is used to execute the instructions, and the communication interface is used to communicate with other communication devices under the control of the at least one processor; When the instructions are executed by the at least one processor, the at least one processor is caused to perform the method according to any one of claims 1 to 5.
14. A chip system, characterized in that: The chip system includes a processor and a memory, the memory and the processor are interconnected via a line, instructions are stored in the memory, and the processor is used to execute the method as described in any one of claims 1-5.