Server memory mapping space configuration method and electronic device
By dynamically identifying and automatically adjusting MMIOH resources, the problem of insufficient resource reservation for servers in high-performance computing scenarios is solved, enabling intelligent planning and efficient deployment, and improving server stability and operational efficiency.
Patent Information
- Application Number
- CN202611520187.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-29
- Publication Date
- 2026-11-06
AI Technical Summary
In existing technologies, in high-performance computing and large-scale data processing scenarios, insufficient MMIOH resource reservations on servers can lead to device enumeration failures, abnormal system startups, or performance degradation. Furthermore, manual intervention is inefficient and makes it difficult to support large-scale automated deployment.
By dynamically identifying server hardware configurations and automatically adjusting MMIOH resources, intelligent planning of memory-mapped space is achieved. Combined with a policy-driven interface and automated deployment, manual intervention and configuration errors are reduced.
It improves the stability, scalability, and operational efficiency of servers in complex scenarios, avoids device enumeration failures and system crashes, and meets the massive resource demands of high-performance devices such as multi-GPU and AI accelerator cards.
Smart Images

Figure CN123048230A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of server technology, and in particular to a server memory mapping space configuration method and electronic device. Background Technology
[0002] In server system architecture, the BIOS (Basic Input Output System) is responsible for hardware initialization and resource configuration during the boot phase. The reserved size of the MMIOH (Memory-Mapped I / O High) space is a critical parameter, directly affecting whether PCIe (High-Speed Serial Computer Expansion Bus) devices can be correctly identified and used efficiently. Common solutions typically involve setting a small default MMIOH value (e.g., 512MB) in the BIOS or requiring manual adjustment by the user after boot. However, with the rapid development of high-performance computing, artificial intelligence, and large-scale data processing, the number of PCIe devices that servers need to connect to has surged, and bandwidth requirements have increased significantly. The existing fixed or manual configuration methods have revealed the following problems: insufficient MMIOH resource reservation is prone to occur, leading to device enumeration failures, system boot anomalies, or severe performance degradation. Furthermore, manual intervention is inefficient, error-prone, and difficult to support large-scale automated deployment. Therefore, there is an urgent need for a method that can automatically and intelligently identify hardware requirements and dynamically adjust MMIOH resource configuration during server boot to improve system reliability, compatibility, and operational efficiency. Summary of the Invention
[0003] This application provides a server memory mapping space configuration method and electronic device to at least solve the problems in related technologies, such as insufficient MMIOH resource reservation, which leads to device enumeration failure, abnormal system startup or severe performance degradation. At the same time, manual intervention is inefficient, error-prone and difficult to support large-scale automated deployment.
[0004] This application provides a method for configuring server memory mapping space, including: In response to the server being in the initialization phase, the device type of the devices in the server is obtained, and it is determined whether the device type of the devices in the server conforms to the preset standard; In response to the device type of the device in the server conforming to the preset standard, the token identifier in the corresponding token member data structure of the server is obtained, and it is determined whether the token identifier is activated. The token member data structure is used to define the configuration strategy of the configuration parameters in the firmware. In response to the token being activated, the preset memory mapping space size value is provided as an optional option in the firmware settings interface; Obtain the device's dependencies and motherboard identifier, and determine whether the dependencies and motherboard identifier support enabling the preset memory mapping space size value; In response to the support being enabled and the server being in the driver execution environment stage, the preset memory mapping space size value corresponding to the selected optional option is read, and the memory mapping space allocation strategy is updated based on the preset memory mapping space size value to plan the corresponding memory mapping space for the device.
[0005] This application also provides an electronic device, comprising: a memory for storing a computer program; and a processor for implementing the following steps of the server memory mapping space configuration method when executing the computer program: In response to the server being in the initialization phase, the device type of the devices in the server is obtained, and it is determined whether the device type of the devices in the server conforms to the preset standard; In response to the device type of the device in the server conforming to the preset standard, the token identifier in the corresponding token member data structure of the server is obtained, and it is determined whether the token identifier is activated. The token member data structure is used to define the configuration strategy of the configuration parameters in the firmware. In response to the token being activated, the preset memory mapping space size value is provided as an optional option in the firmware settings interface; Obtain the device's dependencies and motherboard identifier, and determine whether the dependencies and motherboard identifier support enabling the preset memory mapping space size value; In response to the support being enabled and the server being in the driver execution environment stage, the preset memory mapping space size value corresponding to the selected optional option is read, and the memory mapping space allocation strategy is updated based on the preset memory mapping space size value to plan the corresponding memory mapping space for the device.
[0006] This application also provides a computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, it implements the following steps of a server memory-mapped space configuration method: In response to the server being in the initialization phase, the device type of the devices in the server is obtained, and it is determined whether the device type of the devices in the server conforms to the preset standard; In response to the device type of the device in the server conforming to the preset standard, the token identifier in the corresponding token member data structure of the server is obtained, and it is determined whether the token identifier is activated. The token member data structure is used to define the configuration strategy of the configuration parameters in the firmware. In response to the token being activated, the preset memory mapping space size value is provided as an optional option in the firmware settings interface; Obtain the device's dependencies and motherboard identifier, and determine whether the dependencies and motherboard identifier support enabling the preset memory mapping space size value; In response to the support being enabled and the server being in the driver execution environment stage, the preset memory mapping space size value corresponding to the selected optional option is read, and the memory mapping space allocation strategy is updated based on the preset memory mapping space size value to plan the corresponding memory mapping space for the device.
[0007] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the following steps of a server memory-mapped space configuration method: In response to the server being in the initialization phase, the device type of the devices in the server is obtained, and it is determined whether the device type of the devices in the server conforms to the preset standard; In response to the device type of the device in the server conforming to the preset standard, the token identifier in the corresponding token member data structure of the server is obtained, and it is determined whether the token identifier is activated. The token member data structure is used to define the configuration strategy of the configuration parameters in the firmware. In response to the token being activated, the preset memory mapping space size value is provided as an optional option in the firmware settings interface; Obtain the device's dependencies and motherboard identifier, and determine whether the dependencies and motherboard identifier support enabling the preset memory mapping space size value; In response to the support being enabled and the server being in the driver execution environment stage, the preset memory mapping space size value corresponding to the selected optional option is read, and the memory mapping space allocation strategy is updated based on the preset memory mapping space size value to plan the corresponding memory mapping space for the device.
[0008] This application achieves intelligent planning of memory mapping space at system startup by dynamically identifying server hardware configuration and automatically adjusting MMIOH resources. This enables the system to meet the massive resource requirements of high-performance devices such as multi-GPU and AI accelerator cards, avoiding device enumeration failures or system crashes due to insufficient configuration. At the same time, through policy-driven interfaces and automated deployment, manual intervention and configuration errors are reduced, improving the stability, scalability, and operational efficiency of the server in complex scenarios. Attached Figure Description
[0009] To more clearly illustrate the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0010] Figure 1 This application provides an application environment diagram for a server memory mapping space configuration method according to an embodiment of the present application. Figure 2This application provides an overall flowchart of a server memory mapping space configuration method according to an embodiment of the present application. Figure 3 This application provides another overall flowchart illustrating a server memory mapping space configuration method according to an embodiment of the present application. Figure 4 This is a diagram of the internal structure of an electronic device in one embodiment. Detailed Implementation
[0011] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the protection scope of this application.
[0012] It should be noted that, in the description of this application, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. The terms "first," "second," etc., in this application are used to distinguish similar objects and are not used to describe a specific order or sequence.
[0013] It should be noted that the terms "S1," "S2," etc., are used only for descriptive purposes and do not specifically refer to the order or sequence, nor are they intended to limit this application. They are merely for the convenience of describing the method of this application and should not be construed as indicating the sequential order of the steps. Furthermore, the technical solutions of the various embodiments can be combined with each other, but this must be based on the ability of those skilled in the art to implement them. When the combination of technical solutions is contradictory or impossible to implement, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection claimed in this application.
[0014] As the background technology indicates, the BIOS (Basic Input Output System) is a crucial component of a server, responsible for hardware initialization and system settings during server startup. MMIOHSize (Memory-Mapped I / O High Size) directly affects the size of the memory-mapped address space available to PCIe devices in the server, making it a critical configuration item for system memory allocation. It is typically used to optimize resource allocation when multiple devices are running simultaneously, thus impacting server performance and system resource utilization. Most servers typically have an MMIOHSize of 512MB at system startup, which meets performance requirements. However, when a server has many PCIe devices or needs to process large amounts of data (such as in high-performance computing scenarios, large-scale device connections, and complex data transmission), insufficient MMIOHSize resources can occur. This can lead to hardware devices failing to be correctly identified, initialization failures, or even system startup anomalies and crashes, severely impacting server stability and compatibility. Therefore, increasing the MMIOHSize is necessary to improve bandwidth and efficiency, thereby enhancing server performance and system resource utilization. However, related technologies have the following drawbacks: 1. Using macro definitions or conventional methods such as TOKEN (markers or symbols) requires manually modifying multiple files, which results in low efficiency, error-proneness, and difficulty in maintenance; 2. A server MMIOH Size of 512M is sufficient for common scenarios, but it does not meet the requirements for highly scalable scenarios such as servers, workstations, and AI (Artificial Intelligence) computing. 3. The server experiences problems such as inability to enumerate normally, BAR (Base Address Register) mapping failure, and performance degradation. 4. The system failed to start due to the MMIOH not meeting the requirements during the server device startup process.
[0015] To address the aforementioned technical issues, this application provides a server memory mapping space configuration method and electronic device. For scenarios with numerous PCIe devices or requiring the processing of large amounts of data, the BIOS boot process automatically identifies and adjusts the reserved MMIOH size resource during server startup to adapt to different hardware configuration requirements and thus meet server performance demands. Based on this, by dynamically identifying server hardware configurations and automatically adjusting MMIOH resources, intelligent planning of memory mapping space during system startup is achieved. This satisfies the massive resource demands of high-performance devices such as multi-GPU and AI accelerator cards, avoiding device enumeration failures or system crashes due to insufficient configuration. Furthermore, through a policy-driven interface and automated deployment, manual intervention and configuration errors are reduced, improving server stability, scalability, and operational efficiency in complex scenarios.
[0016] To enable those skilled in the art to better understand the present application, the present application will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0017] The server memory mapping space configuration method provided in this application can be applied to, for example... Figure 1 In the application environment shown, terminal 102 communicates with a data processing platform set on server 104 via a network. Terminal 102 can be, but is not limited to, various personal computers, laptops, smartphones, tablets, and portable wearable devices. Server 104 can be implemented as a standalone server or a server cluster consisting of multiple servers.
[0018] like Figure 2 As shown, embodiments of this application provide a server memory mapping space configuration method, which is applied to... Figure 1 Taking the terminal in the example, the explanation includes the following steps: S1: In response to the server being in the initialization phase, obtain the device type of the devices in the server and determine whether the device type of the devices in the server conforms to the preset standard.
[0019] It should be noted that the initialization phase refers to the process of early hardware detection and initialization performed by the BIOS (Basic Input / Output System) / UEFI (Unified Extensible Firmware Interface) firmware after the server is powered on. This mainly includes the PEI (Pre-EFI Initialization) and DXE (Driver Execution Environment) phases. This phase is responsible for identifying core hardware such as the CPU (Central Processing Unit), memory, chipset, and PCIe devices, preparing for subsequent boot. Devices in the server refer to hardware components or expansion cards installed inside the server and connected via the PCIe (High-Speed Serial Computer Expansion Bus Standard) bus, such as GPUs (Graphics Processing Units), NVMe SSDs (Solid State Drives), AI (Artificial Intelligence) accelerator cards, FPGAs (Field-Programmable Gate Arrays), and high-speed network cards. Device type refers to the classification of devices according to function or category, such as graphics processors, storage controllers, network controllers, and accelerated computing devices. This information is usually recorded in the device's PCI (Local Parallel Bus Standard) configuration space to identify its purpose and resource requirements; preset standards refer to the rules or thresholds used to determine whether a device is a high-performance device that requires a large amount of PCIe resources or a device that needs to transfer a large amount of data, such as whether it is a GPU / AI accelerator card, or whether its required memory-mapped address space exceeds a certain set value.
[0020] S2: In response to the device type of the device in the server conforming to the preset standard, obtain the token identifier in the token member data structure corresponding to the server, and determine whether the token identifier is activated. The token member data structure is used to define the configuration strategy of the configuration parameters in the firmware.
[0021] It should be noted that the token manager data structure refers to a metadata structure in firmware that centrally manages configuration parameters. It includes fields such as token identifier, dependency, default value, and activation condition, and is used to define and automate the execution of configuration policies. The token identifier is a symbol or variable name that uniquely identifies a specific configuration item (such as whether it supports a 2048 GMMIOH size), such as SET_MMIOHSIZE_2048G_SUPPORT. Its activation status is dynamically determined by the dependency and activation condition. The configuration policy refers to a set of rules that describe the dependency relationships, activation conditions, and assignment logic between configuration parameters. It is used to automatically decide whether to enable specific functions based on the hardware environment during firmware runtime.
[0022] S3: In response to the token being activated, the preset memory mapping space size value is provided as an optional option in the firmware settings interface.
[0023] It should be noted that the firmware setup interface refers to the interactive interface provided by the BIOS / UEFI firmware for users to view and modify system configurations. It is usually accessed through a VGA monitor or a remote management console. Through the monitor, one can enter the Uncore Configuration of the server device's BIOS firmware Setup (display interface) and see that the MMIOH Size is automatically set to 2048G (2TB) after the device boots up, without user intervention. The preset memory mapping space size value refers to the set large memory mapping I / O space capacity value, with a preferred value of 2048G (2TB) to meet the address space requirements of high-performance PCIe devices. The optional options refer to the specific configuration values that users can select in the firmware setup interface. In this embodiment, 2048G will only appear as a valid option in the interface when the relevant token is activated.
[0024] S4: Obtain the device's dependencies and motherboard identifier, and determine whether the dependencies and motherboard identifier support enabling the preset memory mapping space size value.
[0025] It should be noted that dependencies refer to the hardware or software prerequisites that must be met to enable a certain configuration (such as 2048G MMIOH), such as requiring the existence of a specific model of PCIe switch or a BMC (Baseboard Management Controller) firmware version not lower than a certain value; the motherboard identifier refers to a string or code that uniquely identifies the server motherboard model and version, usually stored in the motherboard firmware, and is used to verify whether the hardware platform supports specific advanced functions.
[0026] S5: In response to the support being enabled and the server being in the driver execution environment stage, read the preset memory mapping space size value corresponding to the selected optional option, and update the memory mapping space allocation strategy based on the preset memory mapping space size value to plan the corresponding memory mapping space for the device.
[0027] It should be noted that the driver execution environment stage refers to the DXE stage, which is the core stage of the UEFI firmware initialization process. In this stage, various hardware drivers are loaded and executed, and system resources (such as memory and PCIe) are further enumerated and allocated. The selected optional options refer to the configuration values that the user actually selects and saves in the firmware settings interface or the default values specified by the automation strategy. These values will be used by the firmware for subsequent resource allocation. The memory mapping space allocation strategy refers to the rules and methods by which the firmware divides and allocates MMIO regions in the physical address space, including determining the location and size of the regions and registering them as system reserved resources to avoid conflicts with memory. Planning the corresponding memory mapping space refers to calculating and reserving a continuous address range at the high end of the system physical address space according to the preset size for mapping the BAR space of PCIe devices, and ensuring that this region is correctly recorded and passed to the operating system.
[0028] In the above implementation, by dynamically identifying server hardware configuration and automatically adjusting MMIOH resources, intelligent planning of memory mapping space at system startup is achieved, thereby meeting the massive resource requirements of high-performance devices such as multi-GPU and AI accelerator cards, avoiding device enumeration failure or system crash due to insufficient configuration. At the same time, through policy-driven interface and automated deployment, manual intervention and configuration errors are reduced, improving the stability, scalability and operation and maintenance efficiency of the server in complex scenarios.
[0029] In some specific implementations, obtaining the device type of the devices in the server and determining whether the device type of the devices in the server meets the preset standards includes: Obtain the macro switches predefined during firmware compilation and determine whether the macro switches are activated. Macro switches refer to preprocessed macro definitions used to conditionally enable or disable specific functional modules (such as high-performance device detection process) when compiling server firmware source code. By checking whether the corresponding preprocessed macro has been defined (i.e., its value is true) during firmware compilation, it is determined whether the macro switch is activated. When the value is true, the macro switch is activated. In response to the macro switch being activated, the device configuration space information of the device is read to determine the number of high-performance devices in the server and / or the number of devices whose data transmission volume is greater than a first preset threshold. The device configuration space information includes the device type, wherein high-performance devices may include PCIe devices, etc. The first preset threshold can be set according to actual needs. In response to the number of high-performance devices exceeding the second preset threshold and / or the number of devices requiring data transmission exceeding the first preset threshold exceeding the third preset threshold, it is determined that the device types of the devices in the server meet the preset standards. The second and third preset thresholds can be set according to actual needs.
[0030] Specifically, such as Figure 3 As shown, the process starts from the system initialization phase, which is usually located in the early execution environment of the UEFI firmware (such as the PEI or DXE phase). The compiler macro definition determines whether to distinguish between commonly used devices and devices with more PCIe devices or those that need to transmit a large amount of data. If there is no need to distinguish between device types, the process directly enters the process of setting the device's MMIOH Size to the default value Auto. If it is necessary to distinguish, the next step is executed.
[0031] In the above implementation, the detection process is intelligently started and stopped by a compile-time macro switch. The fine-grained scanning and resource requirement assessment of high-performance devices are activated only when needed, effectively avoiding unnecessary system overhead. At the same time, the quantitative threshold judgment based on the number of devices and resource requirements ensures the objectivity and accuracy of resource reservation decisions, providing a reliable basis for subsequent adaptive configuration and improving system startup efficiency and configuration accuracy.
[0032] In some specific implementations, the token collector data structure includes: Determine the structure template for the token collector data structure. The structure template includes token identifier, dependencies, default values, effective conditions, configuration owner information, and version number information. Construct a centralized token mapping table and input the association rules of device parameters of devices in the server into the centralized token mapping table. Device parameters include motherboard identifier, device type and device configuration space information. The compiler uses a tool to associate the data in the structure template and the centralized token mapping table to generate the token holder data structure.
[0033] Specifically, a custom configuration token holder data structure is used to record a centralized token mapping table and automatically generated fields, including token identifiers, dependencies, default values, and activation conditions. This constructs tokens and their dependency rules, automatically generating consistent compilation configurations, reducing configuration conflicts caused by human intervention, and improving development efficiency. Members of the automatically generated configuration token holder data structure serve as identifiers to determine whether the MMIOHHigh Granularity Size option value appears in the values of frequently used devices and devices with many PCIe devices and large data transmission volumes. The configuration token holder data structure is shown below: typedef struct ConfigTokenMetadata{ char* token_id; char* description; TokenDependency* dependencies; int num_rules; char* owner; char* version; time_t created_at; time_t updated_at; }ConfigTokenMetadata; Furthermore, the synergistic effect of configuring the token identifier, dependency array, responsible person, version number, and other combinations in the token member data structure automatically identifies the server and the MMIOH Size resource reservation settings. During the DXE stage, the default value is read by the ChipsetDXE Driver or System Memory Map Driver, and the memory management library (MmioAllocationLib) is called to perform address space planning. After the server system starts, the MMIOH region is automatically placed at the high end of the physical address to avoid conflicts with DRAM. The interactive implementation of the MMIOH Size option value includes: in the HFR (HTML FormRepresentation) configuration file, the display status of the MMIOH Size option is controlled by the SuppressIf conditional statement. When certain preconditions are met (such as token identifier, dependency, responsible person, version number, etc.), the option will be automatically hidden; otherwise, the MMIOH Size will be displayed normally as 2048G (2TB).
[0034] In the above implementation, the decentralized configurations are integrated into a unified structured policy library through a centralized token mapping and automated generation mechanism, which reduces manual configuration errors and conflicts. Combined with compile-time generation and runtime condition judgment, intelligent adaptation of firmware parameters and hardware environment is achieved, ensuring the consistency and maintainability of resource configuration and providing underlying support for the flexible deployment and reliable operation of high-performance servers.
[0035] In some specific implementations, before obtaining the token identifier from the token collector data structure corresponding to the server, the method further includes: Obtain the token holder data structure corresponding to the server; Check if a token identifier exists in the token holder data structure; In response to the existence of a token identifier, retrieve the token identifier from the corresponding token holder data structure on the server.
[0036] In some specific implementations, determining whether the token is activated includes: Read the token identifier status field in the token collector data structure. The token identifier status field refers to a dedicated data field in the token collector data structure or its associated runtime database, which is used to record in real time and identify whether a specific configuration token (such as SET_MMIOHSIZE_2048G_SUPPORT) is currently in a state of being effective, available, or activated. Obtain the server's current device configuration information, which includes at least dependencies and motherboard identifier. The device configuration information is compared with the activation conditions corresponding to the token identifier in the token member data structure, and it is determined whether the token identifier status field is enabled. The activation conditions corresponding to the token identifier refer to the logical expressions or rule sets defined in the token member data structure, which are used to dynamically determine whether the token should be activated during firmware runtime. These conditions are evaluated in real time based on available system status variables (such as current motherboard ID, CPU model, memory size, existence of specific hardware, etc.). Only when the calculation result is true will the corresponding configuration function (such as enabling 2048G MMIOH) be allowed to take effect, thereby achieving precise matching between configuration strategies and specific hardware environments. When the token identifier status field is enabled and the device configuration information is successfully compared with the effective conditions, that is, the device configuration information is successfully compared with all the effective conditions, it is determined that the token identifier has been activated; If the token identifier status field is disabled and / or the hardware configuration information fails to match at least one effective condition, it is determined that the token identifier is not activated.
[0037] Specifically, the process determines whether to enable 2048G MMIOH Size by configuring the TOKEN value in the token holder data structure (e.g., SET_MMIOHSIZE_2048G_SUPPORT). If the TOKEN value exists and is activated, the “MMIOH High Granularity Size” option is allowed to be selected in the Setup interface, and a 2048G (2TB) option is provided. Otherwise, the process directly proceeds to setting the device’s MMIOH Size to the default value Auto. The process then checks whether the device’s dependencies and BoardId support and require enabling 2048G MMIOH Size. If so, the MMIOH Size is set; otherwise, the process directly proceeds to setting the device’s MMIOH Size to the default value Auto. After the checks are completed, the process finds devices that require 2048G MMIOH Size, have the necessary dependencies, and meet the BoardId requirements. In the DXE stage, the BoardId and MMIOH Size are populated using the PcdSet function.
[0038] In the above implementation, by dynamically comparing the real-time hardware configuration with the predefined effective conditions, the token activation status is accurately and automatically determined, and the configuration decision is upgraded from static preset to environment adaptation. This ensures that advanced functions are enabled only on fully compatible hardware platforms, effectively preventing system instability or configuration errors caused by software and hardware incompatibility, and improving the reliability and security of the configuration.
[0039] In some specific implementations, in response to the token being activated, providing a preset memory mapping space size value as an optional option in the firmware settings interface includes: Based on the interface description file corresponding to the firmware, the configuration option control corresponding to the preset memory mapping space size value is associated with the dynamic display condition logic, which includes the judgment of the activation status of the token identifier. In response to receiving an access request to the firmware settings interface, the dynamic display condition logic is parsed and evaluated; In response to the evaluation result indicating that the token has been activated, the configuration option control in the firmware settings interface is set to be visible and operable, and the preset memory mapping space size value is included as a valid option in the list of possible values of the configuration option control; In response to the evaluation result indicating that the token identifier is not activated, the configuration option control is hidden in the firmware settings interface, or the preset memory mapping space size value is removed from the list of available values, or the option corresponding to the configuration option control is set to an unavailable state.
[0040] Specifically, the system loads a file describing the BIOS settings interface. In UEFI, this file is typically part of the HII (Human Interface Infrastructure) database, or defined using formats such as HFR (HTML Form Representation). This file defines all possible setting options and their attributes. Within the interface description file, the system locates the interface control definition corresponding to the specific configuration item, such as MMIOH High Granularity Size or memory-mapped space size. Within this control definition, a dynamic judgment logic (such as UEFI...) is embedded. (In the HII standard, there are SuppressIf, GrayOutIf, or similar conditional display / disable statements). The judgment condition of this logic is directly related to the activation state of the target token, such as $(TOKEN.SET_MMIOHSIZE_2048G_SUPPORT) == TRUE, and also includes the hardware dependency verification result, such as $(BOARD_ID) IN [List_of_Supported_Boards]. At the same time, the option value 2048G is dynamically added or marked in the optional value list attribute of this control. This operation is also controlled by the above token activation state. Only when the token is activated is 2048G added to the list as a valid option. Otherwise, the option is excluded or marked as invalid. When the user enters the BIOS settings interface, the firmware's HII engine or interface rendering module will calculate the conditional logic associated with each control at runtime. For the MMIOH size control, the engine evaluates its SuppressIf condition. The control will only be displayed normally when the condition is false (i.e., the token is activated and the hardware dependency is met), and the 2048G option will appear in the drop-down menu or list. If the condition is true (the token is not activated), the entire control may be hidden, or the 2048G option may be hidden / grayed out, so that it cannot be seen or selected by the user.
[0041] In the above implementation, by dynamically binding the background configuration strategy to the front-end interface logic, intelligent adaptation of the user interface is achieved. This ensures that users can only see and select high-specification configuration options under conditions of hardware compatibility and policy allowance, effectively shielding invalid or conflicting settings, improving the accuracy, security and user experience of configuration operations, and eliminating system risks caused by misconfiguration from the interaction level.
[0042] In some specific implementations, obtaining the device dependencies and motherboard identifier, and determining whether the dependencies and motherboard identifier support enabling the preset memory mapping space size value, includes: Based on the token collector data structure, obtain the hardware configuration information associated with the preset memory mapping space size value. The hardware configuration information includes a list of supported motherboard identifiers and at least one device dependency. The device dependency includes the device type or version requirement corresponding to enabling the preset memory mapping space size value. Read the server's actual motherboard identifier, as well as the installed devices and their version information; Match the actual motherboard identifier with the items in the list of supported motherboard identifiers, and match the device and its version information with the device dependencies; Upon successful matching, the dependencies and motherboard identifier are determined to support enabling the preset memory mapping space size value.
[0043] Specifically, the system reads the server's Board ID, which is typically stored in the motherboard's firmware (such as the BMC or a specific EEPROM) and is a key string or value that uniquely identifies the motherboard model and version. It then retrieves a list of supported hardware bound to the target preset memory mapping space size (e.g., 2048G) from the hardware compatibility database or the associated fields of the token holder data structure stored within the firmware. This list includes motherboard IDs that have been verified to stably support this configuration, such as [MB-ABC-REV2.0, MB-XYZ-REV3.1]. The system performs an exact match or pattern match between the current motherboard ID and the supported hardware list, supporting wildcards such as MB-ABC. If a match is successful, the motherboard ID support is verified; otherwise, it is considered unsupported. Simultaneously, the system parses the device dependencies required to enable the preset value from the token collector data structure or independent device dependency specifications. These dependencies may include: the required device type, such as requiring at least one specific model of PCIe switch chip in the system, and the minimum firmware / driver version requirement, such as requiring the BMC firmware version to be higher than v2.5. The system scans the actual devices in the current server, checks whether the required devices specified by the dependency exist, reads their version information, and compares the actual status with the dependency requirements. Only when the motherboard ID matches successfully and all specified device dependencies are satisfied will the system ultimately determine that the preset memory mapping space size value is supported. If any condition is not met, it is determined that it is not supported.
[0044] In the above implementation, by performing dual hardware compatibility checks of motherboard ID whitelist verification and device ecosystem dependency checks, it is ensured that advanced resource configuration functions are enabled only on specific hardware platforms that have been fully verified. This fundamentally prevents system instability, device enumeration failure, or performance abnormalities that may be caused by differences in hardware batches, incompatible components, or insufficient firmware versions, thereby improving the reliability and security boundaries of the server in large-scale deployments and heterogeneous environments.
[0045] In some specific implementations, in response to enabling support and the server being in the driver execution environment phase, reading the preset memory mapping space size value corresponding to the selected optional option includes: In response to the support being enabled and the server being in the driver execution environment stage, monitor the configuration commit event sent by the firmware settings interface. That is, when the user completes the configuration modification in the BIOS settings interface, such as selecting 2048G from the drop-down menu and performing a save and exit or similar operation, the firmware's human-machine interface infrastructure (such as UEFI HII) will trigger a configuration commit event. In response to receiving a configuration commit event, the associated data of the configuration commit event is parsed to obtain the selected value of the corresponding memory mapping space size configuration item. The associated data refers to the data packet submitted by the system from the interface, and the selected value is the aforementioned 2048G. The selected value is set to the value of the platform configuration database variable that is uniquely associated with the memory-mapped space size configuration item. This defines the preset memory-mapped space size value as a runtime configuration that is globally accessible to the server. Specifically, during the driver execution environment phase, the driver responsible for chipset or system memory mapping (such as ChipsetDxe or MemoryMapDxe) performs a write operation through the standard platform configuration database interface. Specifically, it calls functions similar to the PcdSet series to write the extracted 2048G configuration value into a token variable (e.g., PcdMmioHighGranularitySize) that uniquely corresponds to the configuration item in the UEFI runtime PCD database, thereby updating the firmware global runtime database.
[0046] In some specific implementations, updating the memory mapping space allocation strategy based on a preset memory mapping space size value to plan the corresponding memory mapping space for the device includes: Based on the preset memory mapping space size, the current server physical address space range, and the layout of other allocated resources, determine the high-end physical address region corresponding to the preset memory mapping space size, and define the high-end physical address region as the target memory mapping reserved area. Register the range information of the target memory-mapped reserved area to the server's global memory-mapped descriptor table, and mark the range information of the target memory-mapped reserved area; Based on the global memory mapping descriptor table, the device is allocated the memory mapping input / output address windows it needs. The memory mapping input / output address windows are all located in the target memory mapping reserved area.
[0047] Specifically, the system memory management driver (such as the caller of MemoryAllocationLib) reads the pre-defined preset memory mapping space size (e.g., 2048G) through the Platform Configuration Database (PCD) interface; the memory management module executes the core algorithm based on the following key inputs: (1) Input: the obtained preset MMIOH size, the total amount of physical memory detected by the current system, and the layout of other allocated fixed address resources (such as ACPI table, firmware reserved area).
[0048] (2) Calculation: Determine the starting address of the MMIOH region: It is usually planned in the high-end region of the system physical address space, adjacent to or above the large-capacity physical memory, so as to avoid conflicts with the DRAM address available to the operating system to the greatest extent; Calculate the ending address of the MMIOH region according to the preset size, such as starting address = highest system address - preset size + 1, where the preset size can be set according to actual needs.
[0049] (3) The calculated MMIOH region (starting address, size) is registered as a reserved memory region in the system's global memory mapping table or descriptor list (such as the UEFI's EFI_MEMORY_DESCRIPTOR array). This operation marks this address range as "occupied and not available for DRAM or other purposes".
[0050] (4) In the subsequent PCIe bus enumeration and resource allocation sub-stage, the PCIe host controller driver or resource allocation module will query this global memory mapping table. When allocating the address window required for each PCIe device's BAR, it will allocate from the reserved MMIOH area to ensure that the MMIO resources of all PCIe devices fall within this area.
[0051] (5) Finally, the updated complete memory mapping table (including the newly planned MMIOH reserved area) is passed to the operating system bootloader and operating system kernel through the UEFI system table or ACPI table (such as MCFG, E820 / EFI memory map) to ensure that the operating system and its drivers can correctly identify and use these planned address spaces. The process ends and the system enters the BDS (Boot Device Select) stage to prepare to start the operating system.
[0052] In the above implementation, by transforming user configuration decisions into system-level physical address space planning and registration, the final implementation of resource configuration and full-stack collaboration are realized. This ensures that the MMIO space reserved for the PCIe device group is accurate in location, sufficient in size, and does not conflict with system memory. Furthermore, the resource layout is completely passed to the operating system through standardized interfaces, providing underlying guarantees for the stable enumeration and efficient operation of high-performance devices, and improving the overall reliability and compatibility of the system.
[0053] In some specific implementations, it also includes: During the operating system runtime phase, the memory-mapped input / output access load of at least one target PCIe device in the server is monitored, and the expected load demand for future periods is predicted based on historical load data. That is, within the operating system, key load indicators such as MMIO access frequency, data throughput, and DMA transaction rate of server PCIe devices (especially GPUs, FPGAs, etc.) are continuously monitored through drivers or BMC-side agents, and their changing patterns over time (such as daily or weekly) are recorded. Based on historical data (such as using machine learning models or heuristic algorithms), the MMIO load demand for specific future periods (such as the next computing task cycle or business peak period) is predicted, and it is determined whether the currently allocated MMIOH size is sufficient. In response to a mismatch between the expected load demand and the current reserved memory mapping space size, a corresponding memory mapping space size adjustment request is generated; The adjustment request is passed to the firmware management layer. That is, when it is predicted that the future load will exceed the current capacity or the current load will be far below the allocated capacity for a long period of time, a resource adjustment request will be generated and passed to the firmware management layer through standard interfaces (such as ACPI control methods and BMCIPMI commands). In the trusted execution environment of the firmware, verify the legitimacy of the adjustment request and its compatibility with the current hardware configuration; Upon successful verification, the system dynamically updates the configuration value corresponding to the memory-mapped space size in the platform configuration database and adjusts the address window configuration of the PCIe controller to change the size of the memory-mapped space reserved for PCIe devices. Specifically, after receiving a request, the firmware first verifies the legality of the request and hardware compatibility in a secure environment (such as SMM system management mode). After successful verification, without completely restarting the system, the system dynamically expands or shrinks the MMIOH reserved area by dynamically updating UEFI runtime variables and fine-tuning the PCIe host controller configuration. For the expansion of the MMIOH area, the system needs to coordinate with the operating system kernel memory manager to hot-add the new address range to the address window available on the PCIe bus. This process involves a small amount of transparent remapping of allocated addresses to ensure service continuity. After the adjustment is completed, the system continues to monitor the consistency between the actual load and the prediction, forming a closed-loop optimization.
[0054] In the above implementation, the MMIOH resource configuration is upgraded from static preset to dynamic elastic adjustment based on runtime load prediction, which realizes on-demand scaling, improves address space utilization, can proactively predict and respond to sudden loads, avoid resource bottlenecks, and completes the adjustment without restarting through the hot update mechanism, thereby enhancing the server's high availability, resource adaptability and intelligent level of long-term operation and maintenance.
[0055] The above-mentioned server memory mapping space configuration method includes: responding to the server being in the initialization phase, obtaining the device type of the device in the server and determining whether the device type of the device in the server conforms to a preset standard; responding to the device type of the device in the server conforming to the preset standard, obtaining the token identifier in the token member data structure corresponding to the server and determining whether the token identifier is activated, the token member data structure being used to define the configuration strategy of the configuration parameters in the firmware; responding to the token identifier being activated, providing the preset memory mapping space size value as an optional option in the firmware settings interface; obtaining the device's dependencies and motherboard identifier, and determining whether the dependencies and motherboard identifier support enabling the preset memory mapping space size value; responding to support enabling and the server being in the driver execution environment phase, reading the preset memory mapping space size value corresponding to the selected optional option, and updating the memory mapping space allocation strategy based on the preset memory mapping space size value to plan the corresponding memory mapping space for the device; based on this, the beneficial effects include: (1) Deployment automation: The server does not require manual intervention in the BIOS Setup interface MMIOH Size setting. It is suitable for remote automated deployment by BMC through a centralized TOKEN mapping table and automatically generated field identification, completely eliminating the dependence on manual on-site operation in related deployment modes, and automatically completing the configuration of key BIOS parameters of the server according to preset strategies.
[0056] (2) Strong compatibility: It forward-lookingly supports the expansion capability of high-density PCIe devices in servers, ensuring that current platform server devices can seamlessly adapt to the ever-evolving hardware ecosystem in the future, and avoiding the problem of new server devices being unable to be recognized or having limited performance due to underlying resource limitations.
[0057] (3) Reduce maintenance costs: Reduce troubleshooting time caused by configuration errors. Through automated firmware configuration strategies, significantly reduce server system failures caused by BIOS settings errors, thereby reducing maintenance complexity and manpower investment, and improving the overall availability of the server.
[0058] (4) Future-oriented configuration: The 2048G (2TB) MMIOH size fully meets the stringent requirements of cutting-edge application scenarios such as artificial intelligence, high-performance computing (HPC), and big data analysis for massive PCIe device connections on the server, and meets the needs of AI architecture.
[0059] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method.
[0060] It should be understood that, although Figures 2-3 The steps in the flowchart are shown sequentially as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order in which these steps are executed, and they can be performed in other orders. Figures 2-3 At least some of the steps in the process may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least some of the sub-steps or stages of other steps.
[0061] In one embodiment, an electronic device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 4 As shown, the electronic device includes a processor, memory, network interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage medium. The network interface is used to communicate with external terminals via a network connection. When the computer program is executed by the processor, it implements a server memory mapping space configuration method. The display screen can be a liquid crystal display (LCD) or an e-ink display. The input devices can be a touch layer covering the display screen, buttons, a trackball, or a touchpad mounted on the device's casing, or an external keyboard, touchpad, or mouse.
[0062] Those skilled in the art will understand that Figure 4The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the electronic device to which the present application is applied. The specific electronic device may include more or fewer components than shown in the figure, or combine certain components, or have different component arrangements.
[0063] Embodiments of this application provide an electronic device, including a memory and a processor. The memory stores a computer program, and the processor is configured to run the computer program to perform the steps in the server memory-mapped space configuration method embodiment, including: S1: In response to the server being in the initialization phase, obtain the device type of the device in the server and determine whether the device type of the device in the server conforms to the preset standard; S2: In response to the device type of the device in the server conforming to the preset standard, obtain the token identifier in the token member data structure corresponding to the server, and determine whether the token identifier is activated. The token member data structure is used to define the configuration strategy of the configuration parameters in the firmware. S3: In response to the token being activated, the preset memory mapping space size value is provided as an optional option in the firmware settings interface; S4: Obtain the device's dependencies and motherboard identifier, and determine whether the dependencies and motherboard identifier support enabling the preset memory mapping space size value; S5: In response to the support being enabled and the server being in the driver execution environment stage, read the preset memory mapping space size value corresponding to the selected optional option, and update the memory mapping space allocation strategy based on the preset memory mapping space size value to plan the corresponding memory mapping space for the device.
[0064] Embodiments of this application also provide a computer-readable storage medium storing a computer program, wherein the computer program is configured to execute the steps in the embodiments of the server memory-mapped space configuration method at runtime, including: S1: In response to the server being in the initialization phase, obtain the device type of the device in the server and determine whether the device type of the device in the server conforms to the preset standard; S2: In response to the device type of the device in the server conforming to the preset standard, obtain the token identifier in the token member data structure corresponding to the server, and determine whether the token identifier is activated. The token member data structure is used to define the configuration strategy of the configuration parameters in the firmware. S3: In response to the token being activated, the preset memory mapping space size value is provided as an optional option in the firmware settings interface; S4: Obtain the device's dependencies and motherboard identifier, and determine whether the dependencies and motherboard identifier support enabling the preset memory mapping space size value; S5: In response to the support being enabled and the server being in the driver execution environment stage, read the preset memory mapping space size value corresponding to the selected optional option, and update the memory mapping space allocation strategy based on the preset memory mapping space size value to plan the corresponding memory mapping space for the device.
[0065] In one exemplary embodiment, the aforementioned computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard disk, magnetic disk, or optical disk.
[0066] Embodiments of this application also provide a computer program product, which includes a computer program that, when executed by a processor, implements the steps in the server memory mapping space configuration method embodiment, including: S1: In response to the server being in the initialization phase, obtain the device type of the device in the server and determine whether the device type of the device in the server conforms to the preset standard; S2: In response to the device type of the device in the server conforming to the preset standard, obtain the token identifier in the token member data structure corresponding to the server, and determine whether the token identifier is activated. The token member data structure is used to define the configuration strategy of the configuration parameters in the firmware. S3: In response to the token being activated, the preset memory mapping space size value is provided as an optional option in the firmware settings interface; S4: Obtain the device's dependencies and motherboard identifier, and determine whether the dependencies and motherboard identifier support enabling the preset memory mapping space size value; S5: In response to the support being enabled and the server being in the driver execution environment stage, read the preset memory mapping space size value corresponding to the selected optional option, and update the memory mapping space allocation strategy based on the preset memory mapping space size value to plan the corresponding memory mapping space for the device.
[0067] Embodiments of this application also provide another computer program product, including a non-volatile computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it implements the steps in the server memory mapping space configuration method embodiment, including: S1: In response to the server being in the initialization phase, obtain the device type of the device in the server and determine whether the device type of the device in the server conforms to the preset standard; S2: In response to the device type of the device in the server conforming to the preset standard, obtain the token identifier in the token member data structure corresponding to the server, and determine whether the token identifier is activated. The token member data structure is used to define the configuration strategy of the configuration parameters in the firmware. S3: In response to the token being activated, the preset memory mapping space size value is provided as an optional option in the firmware settings interface; S4: Obtain the device's dependencies and motherboard identifier, and determine whether the dependencies and motherboard identifier support enabling the preset memory mapping space size value; S5: In response to the support being enabled and the server being in the driver execution environment stage, read the preset memory mapping space size value corresponding to the selected optional option, and update the memory mapping space allocation strategy based on the preset memory mapping space size value to plan the corresponding memory mapping space for the device.
[0068] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0069] The foregoing has provided a detailed description of a server memory mapping space configuration method, apparatus, electronic device, and storage medium provided in this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the embodiments above are only intended to help understand the method and core ideas of this application. It should be noted that those skilled in the art can make various improvements and modifications to this application without departing from its principles, and these improvements and modifications also fall within the protection scope of this application.
Claims
1. A method for configuring server memory mapping space, characterized in that, The method includes: In response to the server being in the initialization phase, the device type of the device in the server is obtained, and it is determined whether the device type of the device in the server conforms to a preset standard; In response to the fact that the device type of the device in the server conforms to the preset standard, the token identifier in the token member data structure corresponding to the server is obtained, and it is determined whether the token identifier is activated. The token member data structure is used to define the configuration strategy of the configuration parameters in the firmware. In response to the activation of the token identifier, the preset memory mapping space size value is provided as an optional option in the firmware settings interface; Obtain the device's dependencies and motherboard identifier, and determine whether the dependencies and motherboard identifier support enabling the preset memory mapping space size value; In response to the support being enabled and the server being in the driver execution environment stage, the preset memory mapping space size value corresponding to the selected optional option is read, and the memory mapping space allocation strategy is updated based on the preset memory mapping space size value to plan the corresponding memory mapping space for the device.
2. The server memory mapping space configuration method according to claim 1, characterized in that, Obtaining the device type of the devices in the server and determining whether the device type of the devices in the server meets the preset standard includes: Obtain macro switches predefined in the firmware during compilation and determine whether the macro switches are activated; In response to the macro switch being activated, the device configuration space information of the device is read to determine the number of high-performance devices in the server and / or the number of devices that need to transmit more data than a first preset threshold. The device configuration space information includes the device type. In response to the number of high-performance devices exceeding a second preset threshold and / or the number of devices requiring data transmission exceeding a first preset threshold exceeding a third preset threshold, it is determined that the device types of the devices in the server conform to preset standards.
3. The server memory mapping space configuration method according to claim 1, characterized in that, The token collector data structure includes: Determine the structure template of the token collector data structure, the structure template including token identifier, dependency relationship, default value, effective conditions, configuration manager information and version number information; A centralized token mapping table is constructed, and the association rules of the device parameters of the devices in the server are input into the centralized token mapping table. The device parameters include motherboard identifier, device type and device configuration space information. The compiler uses a tool to associate the data in the structure template and the centralized token mapping table to generate the token member data structure.
4. The server memory mapping space configuration method according to claim 1, characterized in that, Before obtaining the token identifier from the token collector data structure corresponding to the server, the method further includes: Obtain the token holder data structure corresponding to the server; Detect whether the token identifier exists in the token collector data structure; In response to the existence of the token identifier, the token identifier in the token collector data structure corresponding to the server is obtained.
5. The server memory mapping space configuration method according to claim 1, characterized in that, Determining whether the token is activated includes: Read the token identifier status field from the token collector data structure; Obtain the current device configuration information of the server, which includes at least dependencies and motherboard identifier; The device configuration information is compared with the effective conditions corresponding to the token identifier in the token member data structure, and it is determined whether the token identifier status field is in an enabled state. In response to the token identifier status field being enabled and the device configuration information successfully matching the activation condition, it is determined that the token identifier has been activated; In response to the token identifier status field being disabled and / or the hardware configuration information failing to match at least one of the activation conditions, it is determined that the token identifier is not activated.
6. The server memory mapping space configuration method according to claim 1, characterized in that, In response to the activation of the token identifier, the preset memory mapping space size value is provided as an optional option in the firmware settings interface, including: Based on the interface description file corresponding to the firmware, the configuration option control corresponding to the preset memory mapping space size value is associated with the dynamic display condition logic, which includes the determination of the activation status of the token identifier. In response to receiving an access request for the firmware settings interface, the dynamic display condition logic is parsed and evaluated; In response to the evaluation result indicating that the token identifier has been activated, the configuration option control in the firmware settings interface is set to be visible and operable, and the preset memory mapping space size value is included as a valid option in the list of selectable values of the configuration option control; In response to the evaluation result indicating that the token identifier is not activated, the configuration option control is hidden in the firmware settings interface, or the preset memory mapping space size value is removed from the list of optional values, or the option corresponding to the configuration option control is set to an unselectable state.
7. The server memory mapping space configuration method according to claim 1, characterized in that, Obtaining the device's dependencies and motherboard identifier, and determining whether the dependencies and motherboard identifier support enabling the preset memory mapping space size value, includes: Based on the token member data structure, obtain hardware configuration information associated with the preset memory mapping space size value. The hardware configuration information includes a list of supported motherboard identifiers and at least one device dependency. The device dependency includes the device type or version requirement for enabling the preset memory mapping space size value. Read the actual motherboard identifier of the server, as well as the installed devices and their version information; The actual motherboard identifier is matched with the items in the list of supported motherboard identifiers, and the device and its version information are matched with the device dependencies. In response to a successful match, it is determined that the dependency relationship and the motherboard identifier support enabling the preset memory mapping space size value.
8. The server memory mapping space configuration method according to claim 1, characterized in that, In response to the support being enabled and the server being in the driver execution environment phase, reading the preset memory mapping space size value corresponding to the selected optional option includes: In response to the support being enabled and the server being in the driver execution environment phase, monitor the configuration submission event sent by the firmware settings interface; In response to receiving the configuration commit event, the associated data of the configuration commit event is parsed to obtain the selected value of the corresponding memory mapping space size configuration item; The selected value is set to the value of a platform configuration database variable that is uniquely associated with the memory-mapped space size configuration item, so that the preset memory-mapped space size value is defined as a runtime configuration that is globally accessible to the server.
9. The server memory mapping space configuration method according to claim 1, characterized in that, Based on the preset memory mapping space size value, the memory mapping space allocation strategy is updated to plan the corresponding memory mapping space for the device, including: Based on the preset memory mapping space size value, the current server physical address space range, and the layout of other allocated resources, determine the high-end physical address region corresponding to the preset memory mapping space size value, and define the high-end physical address region as the target memory mapping reserved area. Register the range information of the target memory mapping reserved area to the global memory mapping descriptor table of the server, and mark the range information of the target memory mapping reserved area; Based on the global memory mapping descriptor table, the device is allocated the memory mapping input / output address windows it needs, and the memory mapping input / output address windows are all located within the target memory mapping reserved area.
10. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor, configured to implement the steps of the server memory-mapped space configuration method as described in any one of claims 1 to 9 when executing the computer program.
