[go: up one dir, main page]

CN119292677A - A method, system, device and storage medium for implementing ACPI on a RISC-V platform - Google Patents

A method, system, device and storage medium for implementing ACPI on a RISC-V platform Download PDF

Info

Publication number
CN119292677A
CN119292677A CN202411210461.1A CN202411210461A CN119292677A CN 119292677 A CN119292677 A CN 119292677A CN 202411210461 A CN202411210461 A CN 202411210461A CN 119292677 A CN119292677 A CN 119292677A
Authority
CN
China
Prior art keywords
acpi
risc
system description
platform
description table
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202411210461.1A
Other languages
Chinese (zh)
Inventor
戴鸿君
蔡雨晴
李冰
翟明杰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shandong University
Original Assignee
Shandong University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shandong University filed Critical Shandong University
Priority to CN202411210461.1A priority Critical patent/CN119292677A/en
Publication of CN119292677A publication Critical patent/CN119292677A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/26Power supply means, e.g. regulation thereof
    • G06F1/32Means for saving power
    • G06F1/3203Power management, i.e. event-based initiation of a power-saving mode
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping
    • G06F9/4403Processor initialisation
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping
    • G06F9/4406Loading of operating system

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Stored Programmes (AREA)

Abstract

本发明涉及一种RISC‑V平台实现ACPI的方法、系统、设备及存储介质;包括:UEFI在计算机系统内存地址空间中设定根系统描述指针,并指向扩展系统描述表;根据RISC‑V平台的需求,按照ACPI规范编写静态的ACPI表,并将ACPI表以独立的固件文件形式存储;通过固件文件系统逐个读取ACPI表,并将ACPI表加载到内存中,完成静态加载过程;静态加载过程完成后,根据硬件平台的差异,对ACPI表进行动态修改;将ACPI表添加到扩展系统描述表的表项列表中,并安装到UEFI配置表。本发明提升了系统的通用性和可扩展性。本发明为RISC‑V架构的计算平台提供了更为高效和灵活的ACPI支持。

The present invention relates to a method, system, device and storage medium for implementing ACPI on a RISC‑V platform; including: UEFI sets a root system description pointer in a computer system memory address space and points to an extended system description table; according to the requirements of the RISC‑V platform, a static ACPI table is written in accordance with the ACPI specification, and the ACPI table is stored in the form of an independent firmware file; the ACPI table is read one by one through a firmware file system, and the ACPI table is loaded 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 difference in hardware platforms; the ACPI table is added to the table item list of the extended system description table, and installed to the UEFI configuration table. The present invention improves the versatility and scalability of the system. The present invention provides more efficient and flexible ACPI support for computing platforms of the RISC‑V architecture.

Description

Method, system, equipment and storage medium for realizing ACPI (advanced personal computer interface) by RISC-V (reduced instruction set computer-virtual machine) platform
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method, a system, an apparatus, and a storage medium for implementing ACPI by using a RISC-V platform.
Background
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 a computer system. The ACPI specification defines a set of data structures that describe the hierarchy of system hardware, capabilities, and how to respond to various events. However, with the widespread use of RISC-V architecture in computing platforms, the need for ACPI support on RISC-V platforms has increased.
Traditional ACPI implementation is mainly oriented to an x86 and ARM architecture, ACPI support of an x86 and ARM platform is already realized in UEFI, and ACPI implementation on a RISC-V platform is not yet supported. The uniqueness of the RISC-V platform requires a targeted ACPI solution. Migration on RISC-V platforms may involve hardware differences, memory management, interrupt handling issues, all of which result in complexity and difficulty in ACPI migration on RISC-V platforms. Therefore, it is desirable to provide an ACPI implementation method for RISC-V platforms in UEFI, thereby providing more flexible, efficient and versatile energy management and hardware configuration support on RISC-V computing platforms.
Disclosure of Invention
Aiming at the requirements of the RISC-V platform for efficient energy management and hardware configuration, the invention provides a method, a system, equipment and a storage medium for realizing ACPI by the RISC-V platform so as to provide extensible, efficient and universal energy management and hardware configuration support.
Term interpretation:
1. RISC-V is an open-source instruction set architecture that uses reduced instruction sets, modular design and scalability concepts. This allows the RISC-V processor to be simple in design, low in cost, and flexible in extension as desired. This design flexibility makes RISC-V suitable for a variety of different application scenarios, including embedded systems, servers, high performance computing, and internet of things devices, among others.
2. UEFI (Unified Extensible FIRMWARE INTERFACE) UEFI is a firmware interface specification intended 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.
3. UEFI/PI services UEFI and PI (Platform Initialization) services are key firmware architectures and functional sets in the startup and operation of modern computer systems. UEFI replaces the conventional BIOS, providing a more flexible, extensible boot environment and rich interface to support interaction between the operating system and firmware. The PI services define a modular framework for hardware initialization and system boot, including initialization of processors, chipsets and devices, ensuring specification and compatibility of the system boot process. The two together form the basic firmware framework of modern computing platforms, providing security boot, device driver management, and system configuration.
4. Firmware File System (FIRMWARE FILE SYSTEM, FFS) FFS is a special file system for embedded systems, typically stored in non-volatile memory (e.g., flash, EEPROM). It is mainly used to store firmware, configuration data and other static information of the device, and is intended to provide efficient reading and updating operations while protecting the data from power failures and other problems. FFS can implement reliable firmware upgrades, configuration management, and boot procedures, and are widely used in embedded devices (e.g., routers, smart appliances, ioT devices).
5. UEFI configuration table is a set of data structures created by firmware at system start-up that provide hardware information and platform configuration for the operating system and boot loader. The configuration table includes various types of information such as a system memory map, an ACPI table, an SMBIOS (SYSTEM MANAGEMENT BIOS) table, EFI system partition information, and the like. These tables are accessed through the EFI system Table (EFI SYSTEM Table) and are used to support booting of the operating system and hardware initialization.
6. Advanced configuration and Power interface (Advanced Configuration and Power Interface, ACPI) ACPI is a standard interface for implementing advanced configuration and power management, aimed at providing a unified interface between an operating system and computer hardware for energy management and hardware configuration.
7. OSPM (Open Source Power Management) OSPM is an open source energy management framework that aims to provide an efficient energy management and optimization solution for computer systems. OSPM is dedicated to developing portable, flexible and extensible software tools to support a variety of operating systems and hardware platforms.
8. Root system description pointer (Root System Description Pointer, RSDP) RSDP is a pointer used in computer systems to identify Advanced Configuration and Power Interface (ACPI) data structures. Typically, BIOS or UEFI firmware will specify an RSDP in the memory of the system that points to a data structure containing ACPI information.
9. The extended system description table (Extended System Description Table, XSDT) XSDT is a data table that is primarily used to provide a list of pointers to other ACPI data tables in the system for quick access to the location and contents of the other ACPI data tables.
10. Firmware ACPI description table (Fixed ACPIDescription Table, FADT) FADT is an important table in the ACPI specification for providing fixed information about a computer system, including parameters in terms of energy management and configuration of system hardware. FADT contain critical 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 power state and hardware configuration of the system.
11. Differential system description tables (DIFFERENTIATED SYSTEM Description Table, DSDT) DSDT contains information related to the specific hardware of the system, providing key information for the operating system and firmware to dynamically configure the hardware and manage power at run-time by defining devices, resources, methods, events, etc. in the ACPI namespace.
12. Processor attribute topology table (Processor Properties Topology Table, PPTT) is commonly used to describe the topology of a processor, including the cache hierarchy of the processor, core attributes, and other information related to the processor topology.
13. Memory-mapped configuration space base address description table (Memory-Mapped Configuration Space Base Address 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 the Memory mapping, simplifying the configuration and management process of the PCIe device.
14. Serial port terminal redirection table (Serial Port Console Redirection Table, SPCR) defines the way system firmware redirects the output of the system console to the serial port.
15. A system resource association table (System Resource Affinity Table, SRAT) for describing the topology of CPUs, memory and I/O devices in the system and their association with NUMA (Non-Uniform Memory Access) nodes.
16. A system location information table (System Locality Information Table, SLIT) defines relative access delays between different processors and memory nodes within the system. It provides a matrix table indicating the delay values between each pair of nodes.
17. Advanced programmable interrupt controller (Advanced Programmable Interrupt Controller, APIC) APIC is an advanced programmable interrupt controller for managing and distributing interrupts in a computer system. APIC allows multiple processors in the system to work in concert to efficiently process and respond to interrupt requests.
18. A composite APIC description table (Multiple APIC Description Table, MADT) describes configuration information of Local interrupt controllers (Local APICs) and I/O interrupt controllers (I/O APICs) in the system, as well as other interrupt-related hardware information.
19. RISC-V Hart function Table (RHCT), a new ACPI table, is used to communicate certain functions of RISC-V Hart to the operating system.
20. RINTC (RISC-V Hart Local Interrupt Controller) a simple RISC-V platform available in supervisor mode each Hart (hardware thread) interrupt controller.
21. PLIC (Platform Level Interrupt Controller) the PLIC is a platform-level interrupt controller in the RISC-V architecture, responsible for managing and distributing various interrupt signals to ensure efficient and reliable handling of interrupt events in the system.
22. AIA (Advanced Interrupt Architecture) AIA is an interrupt controller specification newly proposed by RISC-V communities to address the defects of PLICs. Two components, IMSIC (Incoming MSI Controller) and APLIC (Advanced platform level interrupt controller), are defined in AIA. IMSIC is to collect and process MSI interrupts. APLIC is to collect and process line interrupts and then pass these interrupts to Hart in a line connection or MSI fashion.
23. PCIe (Peripheral Component Interconnect Express) PCIe is a high-speed serial computer expansion bus standard used for connecting a computer motherboard with high-speed components such as a display card, a solid state disk and a network adapter. PCIe provides higher data transfer rates and better scalability than traditional parallel PCI, improving bandwidth and efficiency through the use of point-to-point serial connections and multiple data lanes (referred to as "lanes"). PCIe standards support hot-plug functionality and their versions are continually upgraded, providing progressively increasing bandwidth and performance improvements, and are widely used in modern computer and server systems.
The technical scheme adopted by the invention is as follows:
a method for realizing ACPI by RISC-V platform based on the starting mode of UEFI firmware comprises:
UEFI sets a root system description pointer in a memory address space of a computer system and points to an extended system description table;
According to the requirements of a RISC-V platform, writing a static ACPI table according to the ACPI specification, and storing the ACPI table in an independent firmware file form;
Reading the ACPI tables one by one through a firmware file system, and loading the ACPI tables into a memory to complete a static loading process;
after the static loading process is completed, dynamically modifying the ACPI table according to the difference of the hardware platform;
The ACPI table is added to the list of entries of the extended system description table and is installed into the UEFI configuration table.
According to the invention, the UEFI sets a root system description pointer in a system memory address space and points to an extended system description table, and specifically comprises:
The UEFI firmware creates a root system description pointer structure, and initializes the fields of the root system description pointer structure, including a signature, an OEM identifier, a version, a length and an extended system description table address;
Creating an extended system description table, initializing system description table header information of the extended system description table, and reserving a first table entry of the extended system description table for the firmware ACPI description table.
According to the invention, static ACPI tables are written according to the ACPI specification and stored in the form of independent firmware files according to the requirements of a RISC-V platform, and the method comprises the following steps:
The ACPI table comprises a root system description pointer, an extended system description table, a firmware ACPI description table, a differential 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 position information table.
According to the invention, the ACPI table is dynamically modified according to the difference of the hardware platforms, wherein the ACPI table comprises configuration information of a CPU, a memory and PCIE.
According to the present invention, the ACPI table is preferably added to the entry list of the extended system description table and is installed in the UEFI configuration table, and specifically includes:
According to the ACPI specification, the differentiated system description table is pointed by the firmware ACPI description table, other ACPI tables are pointed by the expansion system description table, and according to the hierarchical relationship among the ACPI tables, the ACPI tables are added into the table item list of the expansion system description table;
a pointer to the root system description pointer structure is installed into the UEFI configuration table, and the checksum of the ACPI table is calculated and updated.
Further preferably, according to the hierarchical relationship between the ACPI tables, the ACPI tables are added to the list of the table items of the extended system description table, and the method comprises the following steps:
The firmware loads a firmware ACPI description table, wherein the firmware ACPI description table comprises pointers pointing to a differentiated system description table, pointers of other ACPI tables are added to an item list of an extended system description table for other ACPI tables, the structure of the extended system description table comprises a fixed head and a variable-length item list, each item is a 64-bit address pointing to the other ACPI tables, and the system finds and loads the ACPI tables by analyzing the extended system description table when starting up, so that ACPI configuration and initialization of the system are completed.
An apparatus for implementing ACPI by 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 by the RISC-V platform when executing the computer program.
A computer readable storage medium storing a computer program which, when executed by a processor, implements the steps of the method for implementing ACPI for a RISC-V platform as described above.
A system for implementing ACPI for a RISC-V platform based on UEFI firmware initiation, comprising:
A management module configured to create and initialize a root system description pointer and an extended system description table and generate UEFI/PI services to install, uninstall, or manage ACPI tables;
the writing module is configured to write a static ACPI table according to the ACPI specification according to the requirements of the RISC-V platform and store the ACPI table in an independent firmware file form;
the loading module is configured to read the ACPI tables one by one through the firmware file system, load the ACPI tables into the memory and complete the static loading process;
the dynamic modification module is configured to dynamically modify the ACPI table according to the difference of the hardware platform after the static loading process is completed;
and an installation module configured to add the ACPI table to an entry list of the extended system description table and install the ACPI table to the UEFI configuration table.
The invention has the beneficial effects that:
1. The invention fully considers the uniqueness of the RISC-V architecture, and optimizes the special requirements of RISC-V in the design and the realization of the ACPI, thereby improving the universality of the ACPI on a RISC-V platform.
2. The invention can provide high-efficiency energy management and improve the system performance. ACPI not only enables efficient power management, but also provides a detailed description of the hierarchy and capabilities of the system hardware, enabling the operating system to more precisely configure the hardware to optimize system performance.
3. The invention improves the expandability of hardware configuration. The hardware structure on the RISC-V platform can be described and managed more accurately by means of static loading and dynamic modification, so that the RISC-V platform has better expandability and adaptability.
4. The present invention, taking into account the particularities of the RISC-V platform, helps to improve compatibility with different operating systems by following specifications and standards in ACPI implementations.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to the structures shown in these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a method for implementing ACPI by the RISC-V platform of the present invention.
FIG. 2 is a schematic diagram of an ACPI memory architecture according to the present invention.
Detailed Description
It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
Example 1
A method for realizing ACPI by RISC-V platform based on the starting mode of UEFI firmware is shown in figure 1, comprising the following steps:
UEFI sets a root system description pointer in a memory address space of a computer system and points to an extended system description table;
According to the requirements of a RISC-V platform, writing a static ACPI table according to the ACPI specification, and storing the ACPI table in an independent firmware file form;
Reading the ACPI tables one by one through a firmware file system, and loading the ACPI tables into a memory to complete a static loading process;
after the static loading process is completed, dynamically modifying the ACPI table according to the difference of the hardware platform;
The ACPI table is added to the list of entries of the extended system description table and is installed into the UEFI configuration table.
Example 2
A method for implementing ACPI by a RISC-V platform according to embodiment 1, wherein:
the UEFI sets a root system description pointer in a system memory address space and points to an extended system description table, and specifically comprises the following steps:
The UEFI firmware creates a root system description pointer structure, and initializes the fields of the root system description pointer structure, including a signature, an OEM identifier, a version, a length and an extended system description table address;
Creating an extended system description table, initializing system description table header information of the extended system description table, and reserving a first table entry of the extended system description table for the firmware ACPI description table.
In UEFI enabled systems, the use of EFI system tables extends through the entire development phase of UEFI applications and drivers. The pointer to the EFI configuration table is contained in the EFI system table and there is a pointer to the RSDP structure in the EFI configuration table. The operating system loader provides a pointer to the EFI configuration table when called. The operating system loader must retrieve the pointer to the RSDP structure from the EFI configuration table and pass the pointer to the OSPM using the data structure associated with the operating system as part of the operating system loader handing over control to the operating system. The EFI configuration table entry consists of GUID (global Unique Identifier)/table pointer pairs. EFI GUID pointing to ACPI 2.0 and RSDP architecture of the above specification is 8868e871-e4f1-11d3-bc22-0080c73c8881.
According to the requirements of RISC-V platform, writing static ACPI table according to ACPI specification and storing ACPI table in independent firmware file form, comprising:
The ACPI table comprises a root system description pointer, an extended system description table, a firmware ACPI description table, a differential 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 position information table. Among other things, considering the uniqueness of RISC-V platforms, including differences in hardware architecture, different requirements for memory management, and unique design of interrupt handling mechanisms, it is desirable to implement ACPI tables that conform to RISC-V architecture characteristics. The ACPI interrupt model is implemented with a unified interrupt model to describe all interrupts for the entire system. Composite APIC description table for RISC-V processor based systems, OSPM is provided with the information needed to operate on the system implementing the ritc, AIA and PLIC. Wherein each Hart in the system requires a RINTC record in the composite APIC description table and a processor device object in the differential system description table. Depending on the system implemented interrupt controller, the composite APIC description table will also contain PLIC or AIA structures. RISC-V Hart function tables are new tables created specifically for RISC-V, and are mainly used to describe certain characteristics of RISC-V processor (Harts), including ISA string information, cache management operation extension related information, memory management unit related information, harts information.
And positioning the firmware volume where the ACPI table is located, reading the ACPI table one by one through a firmware file system, loading the ACPI table into a memory, constructing the ACPI in the memory as shown in fig. 2, and then completing a static loading process. The in-memory architecture of the ACPI table includes a plurality of key components, and the ACPI table starts with a Root System Description Pointer (RSDP) and points to a Root System Description Table (RSDT) or an extended system description table (XSDT). These tables are further directed to various other description tables, including Firmware ACPI Description Table (FADT), differential System Description Table (DSDT), and Secondary System Description Table (SSDT). The processor attribute topology table (PPTT) describes the topology of the processor, the PCI Express memory mapped configuration space base address description table (MCFG) defines the configuration space of the PCIe device, the serial port terminal redirection table (SPCR) configures the serial port console, the System Resource Association Table (SRAT) describes NUMA node information, the System Location Information Table (SLIT) provides system locality information, the composite APIC description table (MADT) describes interrupt controllers in the system, and the RISC-VHart function table (RHCT) describes specific attributes of the RISC-V processor. Together, these tables provide the system with interfaces and configuration information between hardware and software.
And dynamically modifying the ACPI table according to the difference of the hardware platforms, wherein the ACPI table comprises configuration information of a CPU, a memory and PCIE.
The ACPI table is dynamically modified by detecting the specific configuration and characteristics of the hardware platform so as to adapt to different hardware environments. Different hardware platforms typically have different physical components and architectures of computer systems, including CPUs, memory, storage, I/O devices, network components, and their interconnection. In particular, such dynamic modifications include adjusting the core and thread information of the CPU, 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 tables according to predefined policies and templates, it is ensured that the operating system can correctly identify and utilize hardware resources, thereby improving compatibility and performance of the system.
Adding the ACPI table to an entry list of an extended system description table and installing the ACPI table to a UEFI configuration table, wherein the ACPI table specifically comprises:
According to the ACPI specification, the differentiated system description table is pointed by the firmware ACPI description table, other ACPI tables are pointed by the expansion system description table, and according to the hierarchical relationship among the ACPI tables, the ACPI tables are added into the table item list of the expansion system description table;
A pointer to the root system description pointer structure is installed into the UEFI configuration table, and the checksum of the ACPI table is calculated and updated. A pointer to the root system description pointer structure is installed to the UEFI configuration table for provision to the operating system. In addition, when updating the ACPI tables, the checksum needs to be recalculated and updated to ensure the integrity and correctness of the data. The checksum is calculated by traversing each byte of the ACPI table and filling the checksum field with the negative modulus 256 of the result to ensure that the checksum of the entire table is zero.
According to the hierarchical relationship between ACPI tables, adding the ACPI tables into an item list of an extended system description table, wherein the method comprises the following steps:
The firmware loads a firmware ACPI description table, wherein the firmware ACPI description table comprises pointers pointing to a differentiated system description table, pointers of other ACPI tables are added to an item list of an extended system description table for other ACPI tables, the structure of the extended system description table comprises a fixed head and a variable-length item list, each item is a 64-bit address pointing to the other ACPI tables, and the system finds and loads the ACPI tables by analyzing the extended system description table when starting up, so that ACPI configuration and initialization of the system are completed.
Example 3
An apparatus for implementing ACPI by a RISC-V platform, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, the processor implementing the steps of the method for implementing ACPI by a RISC-V platform as described in embodiment 1 or 2 when the computer program is executed by the processor.
Example 4
A computer readable storage medium storing a computer program which when executed by a processor performs the steps of the RISC-V platform ACPI method of embodiments 1 or 2.
Example 5
A system for implementing ACPI for a RISC-V platform based on UEFI firmware initiation, comprising:
A management module configured to create and initialize a root system description pointer and an extended system description table and generate UEFI/PI services to install, uninstall, or manage ACPI tables;
the writing module is configured to write a static ACPI table according to the ACPI specification according to the requirements of the RISC-V platform and store the ACPI table in an independent firmware file form;
the loading module is configured to read the ACPI tables one by one through the firmware file system, load the ACPI tables into the memory and complete the static loading process;
the dynamic modification module is configured to dynamically modify the ACPI table according to the difference of the hardware platform after the static loading process is completed;
and an installation module configured to add the ACPI table to an entry list of the extended system description table and install the ACPI table to the UEFI configuration table.
The method, the device, the equipment and the storage medium for realizing the ACPI by the RISC-V platform adopt a static loading and dynamic modification mode, meet the requirements of ACPI standards, and transmit the ACPI table into a memory in the form of a section of memory data. The invention provides more efficient and flexible ACPI support for computing platforms of RISC-V architecture.
The foregoing embodiment numbers of the present invention are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk), and includes several instructions for causing a terminal (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the methods of the embodiments of the present invention.
The embodiments of the present invention have been described above with reference to the accompanying drawings, but the present invention is not limited to the above-described embodiments, which are merely illustrative and not restrictive, and many forms may be made by those having ordinary skill in the art without departing from the spirit of the present invention and the scope of the claims, which are to be protected by the present invention.

Claims (9)

1. The method for realizing ACPI by the RISC-V platform is characterized by comprising the following steps of:
UEFI sets a root system description pointer in a memory address space of a computer system and points to an extended system description table;
According to the requirements of a RISC-V platform, writing a static ACPI table according to the ACPI specification, and storing the ACPI table in an independent firmware file form;
Reading the ACPI tables one by one through a firmware file system, and loading the ACPI tables into a memory to complete a static loading process;
after the static loading process is completed, dynamically modifying the ACPI table according to the difference of the hardware platform;
The ACPI table is added to the list of entries of the extended system description table and is installed into the UEFI configuration table.
2. The method for implementing ACPI by a RISC-V platform according to claim 1, wherein the UEFI sets a root system description pointer in a system memory address space and points to an extended system description table, and specifically includes:
The UEFI firmware creates a root system description pointer structure, and initializes the fields of the root system description pointer structure, including a signature, an OEM identifier, a version, a length and an extended system description table address;
Creating an extended system description table, initializing system description table header information of the extended system description table, and reserving a first table entry of the extended system description table for the firmware ACPI description table.
3. The method for implementing ACPI by RISC-V platform according to claim 1, wherein writing static ACPI tables according to ACPI specification and storing ACPI tables in the form of independent firmware files according to requirements of RISC-V platform comprises:
The ACPI table comprises a root system description pointer, an extended system description table, a firmware ACPI description table, a differential 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 position information table.
4. The method for implementing ACPI on RISC-V platform according to claim 1, wherein the ACPI table is dynamically modified according to differences of hardware platforms, including configuration information of CPU, memory and PCIE.
5. The method for implementing ACPI by a RISC-V platform according to claim 1, wherein the ACPI table is added to an entry list of an extended system description table and is installed in a UEFI configuration table, specifically comprising:
According to the ACPI specification, the differentiated system description table is pointed by the firmware ACPI description table, other ACPI tables are pointed by the expansion system description table, and according to the hierarchical relationship among the ACPI tables, the ACPI tables are added into the table item list of the expansion system description table;
a pointer to the root system description pointer structure is installed into the UEFI configuration table, and the checksum of the ACPI table is calculated and updated.
6. The method for implementing ACPI by RISC-V platform according to claim 5, wherein the ACPI table is added to the list of entries of the extended system description table according to the hierarchical relationship between ACPI tables, comprising:
The firmware loads a firmware ACPI description table, wherein the firmware ACPI description table comprises pointers pointing to a differentiated system description table, pointers of other ACPI tables are added to an item list of an extended system description table for other ACPI tables, the structure of the extended system description table comprises a fixed head and a variable-length item list, each item is a 64-bit address pointing to the other ACPI tables, and the system finds and loads the ACPI tables by analyzing the extended system description table when starting up, so that ACPI configuration and initialization of the system are completed.
7. An ACPI-enabled device for 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, when executing the computer program, implements the steps of the ACPI-enabled method for a RISC-V platform according to any one of claims 1-6.
8. A computer readable storage medium storing a computer program, wherein the computer program when executed by a processor performs the steps of the method of implementing ACPI for a RISC-V platform according to any one of claims 1 to 6.
9. A system for implementing ACPI on a RISC-V platform, wherein the system is based on UEFI firmware initiation, comprising:
A management module configured to create and initialize a root system description pointer and an extended system description table and generate UEFI/PI services to install, uninstall, or manage ACPI tables;
the writing module is configured to write a static ACPI table according to the ACPI specification according to the requirements of the RISC-V platform and store the ACPI table in an independent firmware file form;
the loading module is configured to read the ACPI tables one by one through the firmware file system, load the ACPI tables into the memory and complete the static loading process;
the dynamic modification module is configured to dynamically modify the ACPI table according to the difference of the hardware platform after the static loading process is completed;
and an installation module configured to add the ACPI table to an entry list of the extended system description table and install the ACPI table to the UEFI configuration table.
CN202411210461.1A 2024-08-30 2024-08-30 A method, system, device and storage medium for implementing ACPI on a RISC-V platform Pending CN119292677A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202411210461.1A CN119292677A (en) 2024-08-30 2024-08-30 A method, system, device and storage medium for implementing ACPI on a RISC-V platform

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202411210461.1A CN119292677A (en) 2024-08-30 2024-08-30 A method, system, device and storage medium for implementing ACPI on a RISC-V platform

Publications (1)

Publication Number Publication Date
CN119292677A true CN119292677A (en) 2025-01-10

Family

ID=94162358

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202411210461.1A Pending CN119292677A (en) 2024-08-30 2024-08-30 A method, system, device and storage medium for implementing ACPI on a RISC-V platform

Country Status (1)

Country Link
CN (1) CN119292677A (en)

Similar Documents

Publication Publication Date Title
US7134007B2 (en) Method for sharing firmware across heterogeneous processor architectures
US7934209B2 (en) Method for firmware variable storage with eager compression, fail-safe extraction and restart time compression scan
US7082509B2 (en) Method and system for allocating memory during system boot to reduce operating system memory resource consumption at run-time
US7454547B1 (en) Data exchange between a runtime environment and a computer firmware in a multi-processor computing system
US9395968B1 (en) Uniquely identifying and validating computer system firmware
CN101091163B (en) Manageable extension method, device and system for system firmware
US7162626B2 (en) Use of common language infrastructure for sharing drivers and executable content across execution environments
US7974987B1 (en) Database for storing device handle data in an extensible firmware interface environment
Zimmer et al. Beyond BIOS: developing with the unified extensible firmware interface
US20040230963A1 (en) Method for updating firmware in an operating system agnostic manner
US8539214B1 (en) Execution of a program module within both a PEI phase and a DXE phase of an EFI firmware
CN112905472A (en) Kernel debugging system and method
US11106457B1 (en) Updating firmware runtime components
US6961848B2 (en) System and method for supporting legacy operating system booting in a legacy-free system
US10838861B1 (en) Distribution of memory address resources to bus devices in a multi-processor computing system
US9727390B1 (en) Invoking a firmware function
US7558724B2 (en) Operation region describing a virtual device
US20040064620A1 (en) Device representation apparatus and methods
EP3724757B1 (en) Firmware publication of multiple binary images
US7873807B1 (en) Relocating a program module from NVRAM to RAM during the PEI phase of an EFI-compatible firmware
US10684976B1 (en) Automatic bus resource adjustment in a multiple root bridge computing system
US20250251942A1 (en) Processor Environment Agnostic Information Handling System Firmware Unified Runtime Trusted Communication Operation
US20250245015A1 (en) Processor Environment Architecture Agnostic Unified BIOS Memory Mapping Operation
US11200203B1 (en) Accessing files stored in a firmware volume from a pre-boot application
US8078637B1 (en) Memory efficient peim-to-peim interface database

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination