Method, system and device for realizing ACPI (Advanced Configuration and Power Interface) on RISC-V platform and storage medium
By using UEFI firmware startup method on the RISC-V platform, setting and loading ACPI tables, the lack of ACPI support on the RISC-V platform is solved, efficient energy management and hardware configuration are achieved, and system performance and compatibility are improved. sex.
Patent Information
- Application Number
- CN202411210461.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-30
- Publication Date
- 2025-01-10
- Estimated Expiration
- 2044-08-30
AI Technical Summary
The support for ACPI on the RISC-V platform has not yet been implemented, resulting in complexity and difficulty in energy management and hardware configuration, and it is difficult to meet its unique needs.
Using the startup method of UEFI firmware, set the root system description pointer, write and store the ACPI table, load and dynamically modify the ACPI table through the firmware file system, add it to the extended system description table, and install it to the UEFI configuration table to ensure the compliance of ACPI specifications. Adapt to hardware differences.
It realizes efficient, scalable and universal energy management and hardware configuration support on the RISC-V platform, improving system performance and compatibility.
Smart Images

Figure CN119292677A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a method, system, device and storage medium for implementing ACPI on a RISC-V platform. Background Art
[0002] In computer systems, efficient energy management and hardware configuration are key factors in ensuring a balance between system performance and power consumption. ACPI (Advanced Configuration and Power Interface) is a standard interface for implementing energy management and configuration information in computer systems. The ACPI specification defines a set of data structures that describe the hierarchy, capabilities, and responses of system hardware to various events. However, with the widespread application of RISC-V architecture in computing platforms, the demand for ACPI support on RISC-V platforms has gradually increased.
[0003] Traditional ACPI implementations are mainly oriented towards x86 and ARM architectures. UEFI has implemented ACPI support for x86 and ARM platforms, but ACPI implementation on the RISC-V platform is not yet supported. The uniqueness of the RISC-V platform requires a targeted ACPI solution. Migration on the RISC-V platform may involve hardware differences, memory management, and interrupt handling issues, all of which lead to the complexity and difficulty of ACPI migration on the RISC-V platform. Therefore, it is necessary to propose an ACPI implementation method for the RISC-V platform in UEFI, so as to provide more flexible, efficient, and universal energy management and hardware configuration support on the RISC-V computing platform. Summary of the invention
[0004] In response to the RISC-V platform's demand for efficient energy management and hardware configuration, the present invention provides a method, system, device and storage medium for implementing ACPI on a RISC-V platform to provide scalable, efficient and universal energy management and hardware configuration support.
[0005] Terminology explanation:
[0006] 1. RISC-V: RISC-V is an open source instruction set architecture that adopts the concepts of reduced instruction set, modular design, and scalability. This makes the RISC-V processor simple to design, low cost, and can be flexibly expanded according to demand. This design flexibility makes RISC-V suitable for a variety of different application scenarios, including embedded systems, servers, high-performance computing, and IoT devices.
[0007] 2. UEFI (Unified Extensible Firmware Interface): UEFI is a firmware interface specification designed to replace the traditional BIOS (Basic Input / Output System). It provides a more flexible and standardized boot solution that can load operating systems and applications, and provides more powerful hardware initialization and configuration functions.
[0008] 3. UEFI / PI services: UEFI and PI (Platform Initialization) services are key firmware architectures and feature sets in the startup and operation of modern computer systems. UEFI replaces the traditional BIOS, providing a more flexible and scalable startup environment and rich interfaces to support the interaction between the operating system and firmware. The PI service defines a modular framework for hardware initialization and system booting, including the initialization of processors, chipsets, and devices, to ensure the standardization and compatibility of the system startup process. Together, the two form the basic firmware framework of modern computing platforms, providing functions such as secure boot, device driver management, and system configuration.
[0009] 4. Firmware File System (FFS): FFS is a special file system for embedded systems, usually stored in non-volatile memory (such as flash memory, EEPROM). It is mainly used to store the device's firmware, configuration data, and other static information, and is designed to provide efficient read and update operations while protecting data from problems such as power failures. FFS can achieve reliable firmware upgrades, configuration management, and boot processes, and is widely used in embedded devices (such as routers, smart home appliances, and IoT devices).
[0010] 5. UEFI configuration table: The UEFI configuration table is a set of data structures created by the firmware when the system starts up. These data structures provide hardware information and platform configuration for the operating system and boot loader. The configuration table includes various types of information, such as system memory map, ACPI table, SMBIOS (System Management BIOS) table, and EFI system partition information. These tables are accessed through the EFI System Table and are used to support the booting of the operating system and hardware initialization.
[0011] 6. Advanced Configuration and Power Interface (ACPI): ACPI is the Advanced Configuration and Power Interface, a standard interface for implementing advanced configuration and power management. It aims to provide a unified interface between the operating system and computer hardware for energy management and hardware configuration.
[0012] 7. OSPM (Open Source Power Management): OSPM is an open source energy management framework that aims to provide effective energy management and optimization solutions for computer systems. OSPM is committed to developing portable, flexible and extensible software tools to support various operating systems and hardware platforms.
[0013] 8. Root System Description Pointer (RSDP): RSDP is a pointer to a data structure used to identify the Advanced Configuration and Power Interface (ACPI) in a computer system. Typically, the BIOS or UEFI firmware specifies an RSDP in the system's memory, which points to a data structure containing ACPI information.
[0014] 9. Extended System Description Table (XSDT): XSDT is a data table whose main function is to provide a list of pointers to other ACPI data tables in the system for quick access to the location and content of other ACPI data tables.
[0015] 10. Fixed ACPI Description Table (FADT): FADT is an important table in the ACPI specification, which is used to provide fixed information about the computer system, including parameters for energy management and configuration of the system hardware. FADT contains some key information, such as the system clock, the location of the power button, the address of the interrupt controller, etc., so that the operating system can effectively manage and control the system's power status and hardware configuration.
[0016] 11. Differentiated System Description Table (DSDT): DSDT contains information related to system-specific hardware. By defining devices, resources, methods, and events in the ACPI namespace, it provides the operating system and firmware with key information for dynamically configuring hardware and managing power at runtime.
[0017] 12. Processor Properties Topology Table (PPTT): Commonly used to describe the topology of the processor, including the processor's cache hierarchy, core properties, and other information related to the processor topology.
[0018] 13. Memory-Mapped Configuration Space BaseAddress Table (MCFG): Provides the starting address and range of the PCIe configuration space, enabling the operating system to directly read and write the configuration registers of the PCIe device through memory mapping, simplifying the configuration and management process of the PCIe device.
[0019] 14. Serial Port Console Redirection Table (SPCR): defines how the system firmware redirects the output of the system console to the serial port.
[0020] 15. System Resource Affinity Table (SRAT): used to describe the topology of the CPU, memory, and I / O devices in the system and their association with NUMA (Non-Uniform Memory Access) nodes.
[0021] 16. System Locality Information Table (SLIT): Defines the relative access delays between different processors and memory nodes in the system. It provides a matrix table showing the delay values between each pair of nodes.
[0022] 17. Advanced Programmable Interrupt Controller (APIC): APIC is an advanced programmable interrupt controller used to manage and distribute interrupts in a computer system. APIC allows multiple processors in the system to work together to efficiently process and respond to interrupt requests.
[0023] 18. Multiple APIC Description Table (MADT): MADT describes the configuration information of the local interrupt controller (Local APIC) and I / O interrupt controller (I / O APIC) in the system, as well as other hardware information related to interrupts.
[0024] 19. RISC-V HART Capability Table (RHCT): A new ACPI table used to communicate certain capabilities of the RISC-V HART (hardware thread) to the operating system.
[0025] 20. RINTC (RISC-V Hart Local Interrupt Controller): A simple, supervisory mode-enabled interrupt controller for each Hart (hardware thread) on the RISC-V platform.
[0026] 21. PLIC (Platform Level Interrupt Controller): PLIC is the platform-level interrupt controller in the RISC-V architecture, responsible for managing and distributing various interrupt signals to ensure that interrupt events in the system are handled effectively and reliably.
[0027] 22. AIA (Advanced Interrupt Architecture): AIA is a new interrupt controller specification proposed by the RISC-V community to address the defects of PLIC. AIA defines two components: IMSIC (Incoming MSI Controller) and APLIC (Advanced platform level interrupt controller). The task of IMSIC is to collect and process MSI interrupts. The task of APLIC is to collect and process line interrupts, and then pass these interrupts to Hart in the form of line connections or MSIs.
[0028] 23. PCIe (Peripheral Component Interconnect Express): PCIe is a high-speed serial computer expansion bus standard used to connect computer motherboards with high-speed components such as graphics cards, solid-state drives, and network adapters. Compared with traditional parallel PCI, PCIe provides higher data transfer rates and better scalability by using point-to-point serial connections and multiple data channels (called "lanes") to improve bandwidth and efficiency. The PCIe standard supports hot-swap functionality, and its versions are constantly upgraded to provide gradually increasing bandwidth and performance improvements, and are widely used in modern computer and server systems.
[0029] The technical solution adopted by the present invention is as follows:
[0030] A method for implementing ACPI on a RISC-V platform, based on a UEFI firmware startup method, includes:
[0031] UEFI sets the root system description pointer in the computer system memory address space and points it to the extended system description table;
[0032] According to the requirements of the RISC-V platform, a static ACPI table is written according to the ACPI specification, and the ACPI table is stored in the form of an independent firmware file;
[0033] Read the ACPI tables one by one through the firmware file system and load the ACPI tables into the memory to complete the static loading process;
[0034] After the static loading process is completed, the ACPI table is dynamically modified according to the differences in hardware platforms;
[0035] Add the ACPI table to the list of entries in the extended system description table and install it to the UEFI configuration table.
[0036] Preferably, according to the present invention, UEFI sets a root system description pointer in the system memory address space and points to the extended system description table, specifically including:
[0037] UEFI firmware creates a root system description pointer structure and initializes the fields of the root system description pointer structure, including signature, OEM logo, version, length, and extended system description table address;
[0038] Create an extended system description table, initialize the system description table header information of the extended system description table, and reserve the first table entry of the extended system description table for the firmware ACPI description table.
[0039] Preferably, according to the requirements of the RISC-V platform, a static ACPI table is written according to the ACPI specification, and the ACPI table is stored in the form of an independent firmware file; including:
[0040] The ACPI table includes a root system description pointer, an extended system description table, a firmware ACPI description table, a difference system description table, a composite APIC description table, a processor attribute topology table, a RISC-V Hart function table, a memory mapping configuration space base address description table, a serial port terminal redirection table, a system resource association table and a system location information table.
[0041] Preferably, according to the present invention, the ACPI table is dynamically modified according to the difference of the hardware platform, including the configuration information of the CPU, memory and PCIE.
[0042] Preferably, according to the present invention, the ACPI table is added to the table item list of the extended system description table and installed to the UEFI configuration table, specifically including:
[0043] According to the ACPI specification, the differentiated system description table is pointed to by the firmware ACPI description table, and other ACPI tables are pointed to by the extended system description table. According to the hierarchical relationship between ACPI tables, the ACPI table is added to the table item list of the extended system description table;
[0044] Installs a pointer to the root system description pointer structure to the UEFI configuration table, calculates and updates the checksum of the ACPI table.
[0045] Further preferably, according to the hierarchical relationship between ACPI tables, the ACPI table is added to the table item list of the extended system description table; including:
[0046] The firmware loads the firmware ACPI description table, which includes a pointer to a differentiated system description table. For other ACPI tables, pointers to other ACPI tables are added to the table entry list of the extended system description table. The structure of the extended system description table includes a fixed header and a variable-length table entry list, each of which is a 64-bit address pointing to another ACPI table. When the system starts, it finds and loads the ACPI table by parsing the extended system description table, thereby completing the system's ACPI configuration and initialization.
[0047] A device for implementing ACPI on a RISC-V platform, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method for implementing ACPI on the RISC-V platform when executing the computer program.
[0048] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the method for implementing ACPI on the RISC-V platform.
[0049] A system for implementing ACPI on a RISC-V platform, based on a UEFI firmware startup method, comprising:
[0050] A management module is configured to: create and initialize a root system description pointer and an extended system description table, and generate a UEFI / PI service to install, uninstall or manage an ACPI table;
[0051] The writing module is configured to: write a static ACPI table according to the requirements of the RISC-V platform and the ACPI specification, and store the ACPI table in the form of an independent firmware file;
[0052] The loading module is configured to: read the ACPI table one by one through the firmware file system, and load the ACPI table into the memory to complete the static loading process;
[0053] The dynamic modification module is configured to: after the static loading process is completed, dynamically modify the ACPI table according to the difference of the hardware platform;
[0054] The installation module is configured to: add the ACPI table to the table item list of the extended system description table, and install it to the UEFI configuration table.
[0055] The beneficial effects of the present invention are:
[0056] 1. The present invention fully considers the uniqueness of the RISC-V architecture and optimizes the special requirements of RISC-V in the design and implementation of ACPI, thereby improving the versatility of ACPI on the RISC-V platform.
[0057] 2. The present invention can provide efficient energy management and improve system performance. ACPI can not only achieve efficient power management, but also provide a detailed description of the hierarchy and capabilities of the system hardware, so that the operating system can configure the hardware more accurately, thereby optimizing system performance.
[0058] 3. The present invention improves the scalability of hardware configuration. Through static loading and dynamic modification, the hardware structure on the RISC-V platform can be more accurately described and managed, making it more scalable and adaptable.
[0059] 4. The present invention takes into account the particularity of the RISC-V platform and helps to improve compatibility with different operating systems by following specifications and standards in ACPI implementation. BRIEF DESCRIPTION OF THE DRAWINGS
[0060] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the structures shown in these drawings without paying creative work.
[0061] Figure 1 A flow chart of a method for implementing ACPI on a RISC-V platform of the present invention.
[0062] Figure 2 FIG. 1 is a schematic diagram of the ACPI architecture in the memory of the present invention. DETAILED DESCRIPTION
[0063] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.
[0064] Example 1
[0065] A method for implementing ACPI on a RISC-V platform, based on the startup method of UEFI firmware, such as Figure 1 As shown, including:
[0066] UEFI sets the root system description pointer in the computer system memory address space and points it to the extended system description table;
[0067] According to the requirements of the RISC-V platform, a static ACPI table is written according to the ACPI specification, and the ACPI table is stored in the form of an independent firmware file;
[0068] Read the ACPI tables one by one through the firmware file system and load the ACPI tables into the memory to complete the static loading process;
[0069] After the static loading process is completed, the ACPI table is dynamically modified according to the differences in hardware platforms;
[0070] Add the ACPI table to the list of entries in the extended system description table and install it to the UEFI configuration table.
[0071] Example 2
[0072] The method for implementing ACPI on a RISC-V platform according to Embodiment 1 is different in that:
[0073] UEFI sets the root system description pointer in the system memory address space and points to the extended system description table, which includes:
[0074] UEFI firmware creates a root system description pointer structure and initializes the fields of the root system description pointer structure, including signature, OEM logo, version, length, and extended system description table address;
[0075] Create an extended system description table, initialize the system description table header information of the extended system description table, and reserve the first table entry of the extended system description table for the firmware ACPI description table.
[0076] In UEFI-enabled systems, the EFI system table is used throughout the development phase of UEFI applications and drivers. A pointer to the EFI configuration table is contained in the EFI system table, where there is a pointer to the RSDP structure. The OS loader provides a pointer to the EFI configuration table when called. The OS loader must retrieve the pointer to the RSDP structure from the EFI configuration table and pass the pointer to OSPM using an OS-specific data structure as part of the OS loader's transfer of control to the OS. An EFI configuration table entry consists of a GUID (global Unique Identifier) / table pointer pair. The EFIGUID that points to the RSDP structure for ACPI 2.0 and above is: 8868e871-e4f1-11d3-bc22-0080c73c8881.
[0077] According to the requirements of the RISC-V platform, a static ACPI table is written according to the ACPI specification and stored in an independent firmware file; including:
[0078] The ACPI table includes the root system description pointer, the extended system description table, the firmware ACPI description table, the differential system description table, the composite APIC description table, the processor attribute topology table, the RISC-V Hart function table, the memory mapping configuration space base address description table, the serial port terminal redirection table, the system resource association table, and the system location information table. Among them, considering the uniqueness of the RISC-V platform, including the difference in hardware structure, the different requirements for memory management, and the unique design of the interrupt handling mechanism, it is necessary to implement an ACPI table that conforms to the characteristics of the RISC-V architecture. The ACPI interrupt model uses a unified interrupt model implementation to describe all interrupts of the entire system. The composite APIC description table is targeted at systems based on RISC-V processors and provides OSPM with the information required to operate on systems that implement RINTC, AIA, and PLIC. Among them, each Hart in the system needs to have a RINTC record in the composite APIC description table and a processor device object in the differential system description table. Depending on the interrupt controller implemented by the system, the composite APIC description table will also contain a PLIC or AIA structure. The RISC-V HART function table is a new table created specifically for RISC-V, mainly used to describe certain features of the RISC-V processor (HARTs), including ISA string information, information related to cache management operation extensions, memory management unit related information, and HARTs information.
[0079] Locate the firmware volume where the ACPI table is located, read the ACPI table one by one through the firmware file system, and load it into the memory. The architecture of ACPI in memory is as follows Figure 2As shown, the static loading process is then completed. The architecture of the ACPI table in memory includes several key components. The ACPI table starts with the root system description pointer (RSDP) and points to the root system description table (RSDT) or the extended system description table (XSDT). These tables further point to various other description tables, including the firmware ACPI description table (FADT), the difference system description table (DSDT), and the secondary system description table (SSDT). The processor property topology table (PPTT) describes the topology of the processor; the PCI Express memory mapping configuration space base address description table (MCFG) defines the configuration space of the PCIe device; the serial terminal redirection table (SPCR) configures the serial console; the system resource association table (SRAT) describes the NUMA node information; the system location information table (SLIT) provides system locality information; the composite APIC description table (MADT) describes the interrupt controller in the system; and the RISC-V Hart function table (RHCT) describes the specific properties of the RISC-V processor. Together, these tables provide the system with an interface and configuration information between hardware and software.
[0080] Dynamically modify the ACPI table based on differences in hardware platforms, including CPU, memory, and PCIE configuration information.
[0081] By detecting the specific configuration and characteristics of the hardware platform, the ACPI table is dynamically modified to adapt to different hardware environments. Different hardware platforms usually have different physical components and architectures of computer systems, including CPU, memory, storage, I / O devices, network components and their interconnection methods. Specifically, this dynamic modification includes adjusting the CPU core and thread information, the distribution and size of memory, and the number and address mapping of PCIe devices. By reading the hardware configuration during the boot process and modifying the ACPI table according to predefined policies and templates, it can ensure that the operating system can correctly identify and utilize hardware resources, thereby improving system compatibility and performance.
[0082] Add the ACPI table to the table list of the extended system description table and install it to the UEFI configuration table, including:
[0083] According to the ACPI specification, the differentiated system description table is pointed to by the firmware ACPI description table, and other ACPI tables are pointed to by the extended system description table. According to the hierarchical relationship between ACPI tables, the ACPI table is added to the table item list of the extended system description table;
[0084] Install the pointer to the root system description pointer structure into the UEFI configuration table, and calculate and update the checksum of the ACPI table. Install the pointer to the root system description pointer structure into the UEFI configuration table to provide it to the operating system. In addition, when updating the ACPI table, the checksum needs to be recalculated and updated to ensure the integrity and correctness of the data. The sum is calculated by traversing each byte of the ACPI table, and the negative value of the result is filled into the checksum field modulo 256 to ensure that the checksum of the entire table is zero.
[0085] According to the hierarchical relationship between ACPI tables, the ACPI table is added to the table item list of the extended system description table; including:
[0086] The firmware loads the firmware ACPI description table, which includes a pointer to a differentiated system description table. For other ACPI tables, pointers to other ACPI tables are added to the table entry list of the extended system description table. The structure of the extended system description table includes a fixed header and a variable-length table entry list, each of which is a 64-bit address pointing to another ACPI table. When the system starts, it finds and loads the ACPI table by parsing the extended system description table, thereby completing the system's ACPI configuration and initialization.
[0087] Example 3
[0088] A device for implementing ACPI on a RISC-V platform, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the method for implementing ACPI on a RISC-V platform described in Embodiment 1 or 2 are implemented.
[0089] Example 4
[0090] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the method for implementing ACPI on a RISC-V platform as described in Example 1 or 2.
[0091] Example 5
[0092] A system for implementing ACPI on a RISC-V platform, based on a UEFI firmware startup method, comprising:
[0093] A management module is configured to: create and initialize a root system description pointer and an extended system description table, and generate a UEFI / PI service to install, uninstall or manage an ACPI table;
[0094] The writing module is configured to: write a static ACPI table according to the requirements of the RISC-V platform and the ACPI specification, and store the ACPI table in the form of an independent firmware file;
[0095] The loading module is configured to: read the ACPI table one by one through the firmware file system, and load the ACPI table into the memory to complete the static loading process;
[0096] The dynamic modification module is configured to: after the static loading process is completed, dynamically modify the ACPI table according to the difference of the hardware platform;
[0097] The installation module is configured to: add the ACPI table to the table item list of the extended system description table, and install it to the UEFI configuration table.
[0098] The method, device, equipment and storage medium for implementing ACPI on the RISC-V platform of the above embodiment of the present invention adopts a static loading and dynamic modification method, which meets the requirements of the ACPI specification. The ACPI table is transmitted to the memory in the form of a segment of memory data. This method implements the support of ACPI on the RISC-V platform in UEFI, and improves the versatility and extensibility of the system. The present invention provides more efficient and flexible ACPI support for the computing platform of the RISC-V architecture.
[0099] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0100] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, and the computer software product is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), including a number of instructions for a terminal (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the various embodiment methods of the present invention.
[0101] The embodiments of the present invention are described above in conjunction with the accompanying drawings, but the present invention is not limited to the above-mentioned specific implementation modes, which are merely illustrative rather than restrictive. Under the guidance of the present invention, ordinary technicians in this field can also make many forms without departing from the scope of protection of the present invention and the claims, all of which are within the protection of the present invention.
Claims
1. A method for implementing ACPI on a RISC-V platform, characterized in that: UEFI firmware-based boot methods include: UEFI sets the root system description pointer in the computer system memory address space and points it to the extended system description table; According to the requirements of the RISC-V platform, a static ACPI table is written according to the ACPI specification, and the ACPI table is stored in the form of an independent firmware file; Read the ACPI tables one by one through the firmware file system and load the ACPI tables into the memory to complete the static loading process; After the static loading process is completed, the ACPI table is dynamically modified according to the differences in hardware platforms; Add the ACPI table to the list of entries in the extended system description table and install it to the UEFI configuration table.
2. The method for implementing ACPI on a RISC-V platform according to claim 1, characterized in that: UEFI sets the root system description pointer in the system memory address space and points to the extended system description table, which includes: UEFI firmware creates a root system description pointer structure and initializes the fields of the root system description pointer structure, including signature, OEM logo, version, length, and extended system description table address; Create an extended system description table, initialize the system description table header information of the extended system description table, and reserve the first table entry of the extended system description table for the firmware ACPI description table.
3. The method for implementing ACPI on a RISC-V platform according to claim 1, characterized in that: According to the requirements of the RISC-V platform, a static ACPI table is written according to the ACPI specification and stored in an independent firmware file; including: The ACPI table includes a root system description pointer, an extended system description table, a firmware ACPI description table, a difference system description table, a composite APIC description table, a processor attribute topology table, a RISC-V Hart function table, a memory mapping configuration space base address description table, a serial port terminal redirection table, a system resource association table and a system location information table.
4. The method for implementing ACPI on a RISC-V platform according to claim 1, characterized in that: Dynamically modify the ACPI table based on differences in hardware platforms, including CPU, memory, and PCIE configuration information.
5. The method for implementing ACPI on a RISC-V platform according to claim 1, characterized in that: Add the ACPI table to the table list of the extended system description table and install it to the UEFI configuration table, including: According to the ACPI specification, the differentiated system description table is pointed to by the firmware ACPI description table, and other ACPI tables are pointed to by the extended system description table. According to the hierarchical relationship between ACPI tables, the ACPI table is added to the table item list of the extended system description table; Installs a pointer to the root system description pointer structure to the UEFI configuration table, calculates and updates the checksum of the ACPI table.
6. The method for implementing ACPI on a RISC-V platform according to claim 5, characterized in that: According to the hierarchical relationship between ACPI tables, the ACPI table is added to the table item list of the extended system description table; including: The firmware loads the firmware ACPI description table, which includes a pointer to a differentiated system description table. For other ACPI tables, pointers to other ACPI tables are added to the table entry list of the extended system description table. The structure of the extended system description table includes a fixed header and a variable-length table entry list, each of which is a 64-bit address pointing to another ACPI table. When the system starts, it finds and loads the ACPI table by parsing the extended system description table, thereby completing the system's ACPI configuration and initialization.
7. A device for implementing ACPI on a RISC-V platform, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method for implementing ACPI on a RISC-V platform as described in any one of claims 1 to 6 are implemented.
8. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method for implementing ACPI on a RISC-V platform as described in any one of claims 1 to 6 are implemented.
9. A system for implementing ACPI on a RISC-V platform, characterized in that: UEFI firmware-based boot methods include: A management module is configured to: create and initialize a root system description pointer and an extended system description table, and generate a UEFI / PI service to install, uninstall or manage an ACPI table; The writing module is configured to: write a static ACPI table according to the requirements of the RISC-V platform and the ACPI specification, and store the ACPI table in the form of an independent firmware file; The loading module is configured to: read the ACPI table one by one through the firmware file system, and load the ACPI table into the memory to complete the static loading process; The dynamic modification module is configured to: after the static loading process is completed, dynamically modify the ACPI table according to the difference of the hardware platform; The installation module is configured to: add the ACPI table to the table item list of the extended system description table, and install it to the UEFI configuration table.
Citation Information
Patent Citations
Method, device and equipment for achieving ACPI on ARM platform, and storage medium
CN111198719A
UEFI firmware starting method based on RISC-V architecture embedded device
CN117785314A
UEFI firmware starting method and system based on RISCV server CPU
CN118312226A
System and method for generating ACPI machine language tables
US20040243534A1