Control method of high-speed serial extension equipment and electronic equipment
By obtaining the device list after BIOS self-test and responding to user commands to control the boot items, the problem of accurate selection and management of high-speed serial expansion devices is solved, achieving fine-grained control and improving boot controllability and management efficiency.
Patent Information
- Application Number
- CN202511357708.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-22
- Publication Date
- 2025-10-28
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing technologies cannot accurately screen and manage high-speed serial expansion devices. Users cannot determine the association between startup items and devices, leading to operational errors. They also cannot control specific devices individually, affecting the efficiency of startup item management.
After the basic input/output system performs a power-on self-test, it acquires the device list, enters the input/output configuration menu, displays the device list and startup options, responds to user control commands, precisely controls the enabling or disabling status of startup items, and executes commands upon the next restart.
It enables fine-grained control of high-speed serial expansion devices, improves startup controllability and management efficiency, avoids misoperation, and optimizes startup performance and system security.
Smart Images

Figure CN120848967A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer hardware technology, and in particular to control methods and electronic devices for high-speed serial expansion devices. Background Technology
[0002] The BIOS (Basic Input / Output System), as the underlying firmware during computer startup, is responsible for initializing hardware devices and loading the operating system. Its boot management function allows users to configure the boot priority of devices, including hard drives, optical drives, USB devices, and PCIe (Peripheral Component Interconnect Express) devices (i.e., high-speed serial expansion devices such as PCIe SSDs (Solid State Drives), network cards, and graphics cards).
[0003] Currently, disabling traditional boot entries requires navigating to the global boot menu and searching for each entry individually. This approach fails to accurately filter high-speed serial expansion devices, and users may not be able to identify which device's boot entry belongs to based on its name. In other words, there's no way to associate boot entries with boot devices, potentially leading to operational errors and unnecessary problems. Furthermore, it doesn't allow for individual management of specific high-speed serial expansion devices; users can only enable or disable boot entries for all high-speed serial expansion devices globally. Summary of the Invention
[0004] This application provides a control method and electronic device for high-speed serial expansion devices, which at least solves the problems in related technologies where high-speed serial expansion devices cannot be accurately screened, and users may not be able to determine which device's startup item is based on the startup item name, i.e., there is no way to associate startup items with startup devices, which may lead to operational errors. Furthermore, specific high-speed serial expansion devices cannot be managed individually, and all high-speed serial expansion device startup items can only be enabled or disabled globally. This application enables fine-grained control of high-speed serial expansion devices, thereby improving the startup controllability and management efficiency of basic input / output systems.
[0005] This application provides a control method for a high-speed serial expansion device, applied to a basic input / output system, the method comprising: After the basic input / output system performs a power-on self-test, a device list of high-speed serial expansion devices is obtained, wherein the device list includes at least one startup path of the high-speed serial expansion device; In response to the basic input / output system setting command, the input / output configuration menu is entered based on the basic input / output system setting command. In the input / output configuration menu, in response to the startup item setting command, the device list and startup item options are displayed, wherein the startup item options are used to control the enable / disable status of the high-speed serial expansion device. Responding to a control command for the startup option of a target high-speed serial expansion device in the device list, and controlling the startup option of the target high-speed serial expansion device based on the control command, the enabled / disabled status of the target high-speed serial expansion device, and the startup path, so that the target high-speed serial expansion device operates based on the control command upon the next reboot of the basic input / output system.
[0006] This application also provides an electronic device, including a memory, a processor, and a program stored in the memory and executable on the processor, wherein when the processor executes the program, it implements the control method of the high-speed serial expansion device described above.
[0007] This application describes a method that, after the Basic Input / Output System (BIOS) performs a power-on self-test (POST), obtains a device list of high-speed serial expansion devices. This device list includes startup path paths for at least one high-speed serial expansion device. Responding to BIOS setup commands, the system enters the Input / Output Configuration Menu. Within the Configuration Menu, startup path settings are executed, displaying the device list and startup options. These startup options control the enable / disable status of the high-speed serial expansion devices. The system responds to control commands for the startup options of target high-speed serial expansion devices in the device list. Based on these control commands, the enable / disable status of the target high-speed serial expansion device, and its startup path, the system controls the startup options of the target high-speed serial expansion device to ensure it operates upon the next BIOS restart. Therefore, this method enables fine-grained control of high-speed serial expansion devices, improving the startup controllability and management efficiency of the BIOS. Attached Figure Description
[0008] 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.
[0009] Figure 1 This is a flowchart of a control method for a high-speed serial expansion device according to an embodiment of this application; Figure 2A flowchart illustrating a control method for a high-speed serial extension device according to a specific example of this application; Figure 3 This is a block diagram of an electronic device according to an embodiment of this application.
[0010] Reference numerals: 200 - electronic device, 210 - memory, 220 - processor. Detailed Implementation
[0011] The embodiments of this application are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain this application, and should not be construed as limiting this application.
[0012] The control method and electronic device of the high-speed serial expansion device proposed in this application are described below with reference to the accompanying drawings.
[0013] Figure 1 This is a flowchart of a control method for a high-speed serial expansion device according to an embodiment of this application.
[0014] like Figure 1 As shown, the control method for the high-speed serial expansion device in this application embodiment may include the following steps: S1. After the basic input / output system powers on and performs a self-test, obtain a device list of high-speed serial expansion devices, wherein the device list includes the startup path of at least one high-speed serial expansion device.
[0015] S2 responds to the basic input / output system setup command and enters the input / output configuration menu based on the basic input / output system setup command. In the input / output configuration menu, in response to the startup item setup command, the device list and startup item options are displayed. The startup item options are used to control the enable / disable status of high-speed serial expansion devices.
[0016] S3 responds to the control command for the startup option of the target high-speed serial expansion device in the device list, and controls the startup option of the target high-speed serial expansion device based on the control command, the enabled / disabled status of the target high-speed serial expansion device, and the startup path, so that the target high-speed serial expansion device runs based on the control command when the basic input / output system restarts next time.
[0017] Specifically, during computer startup, the Basic Input / Output System (BIOS) performs a Power-On Self-Test (POST), the first stage of system startup, used to detect and initialize hardware devices. During the POST, the PCIe device detection module in the BIOS scans all PCIe slots and their connected devices; this process is called PCIe enumeration. During enumeration, the BIOS obtains detailed information for each PCIe device, including device model, manufacturer ID, slot number, and boot priority. The BIOS stores this device information in a device list. Each device entry may include a unique identifier, device model, manufacturer ID, slot number, and boot priority. This device list is used for subsequent device management and configuration.
[0018] The device list also includes the boot entry path for at least one high-speed serial expansion device. The boot entry path is a structured path information used to uniquely identify a device and its boot entry. It combines the device's physical location information and logical identification information to ensure the system can accurately locate and operate the device's boot entry. For example, the boot entry includes the PCIe root port to which the device belongs, the UID (unique identifier of the root port), the device's specific location on the PCIe bus, Dev (device number), and Fun (function number). It may also include other hierarchical information, such as NVMe, HD, or other device hierarchical information, depending on the device type. During system startup, the BIOS loads and initializes devices based on the boot entry path, ensuring the system can boot correctly. The system can accurately locate and operate the device's boot entry through the boot entry path, enabling device enable / disable management.
[0019] In response to Basic Input / Output System (BIOS) setup commands, the BIOS enters the Input / Output Configuration menu based on these commands. When the computer starts, the BIOS automatically performs a series of initialization operations, including hardware detection and self-test. During this process, the BIOS listens for user input commands. Users can interrupt the normal boot process and enter the BIOS setup interface by pressing specific keys (such as Del, F2, Esc, etc., depending on the BIOS settings). After a user presses a specific key, the BIOS captures this key event and recognizes it as a command to enter the setup interface. This process is achieved through the keyboard scanning module in the BIOS, which continuously monitors keyboard input and transmits key events to the BIOS main control module. For example, if the setup command is triggered by the user, such as pressing a key (e.g., Del) to enter the BIOS setup interface, this key may be prompted to be pressed during system startup. After the user presses the Del key, the system interrupts the normal boot process and enters the BIOS setup interface, which is a text-based menu system. Users can navigate and select different settings options using keyboard operations. For example, the Input / Output Configuration menu may contain options such as: Boot Item Management, Hard Disk Settings, Network Settings, and Graphics Card Settings. This allows users to interrupt the normal boot process during startup, enter the settings interface, and configure and adjust the system. Users can enter the BIOS settings interface at any time to personalize the system according to their needs.
[0020] Once the BIOS detects a user's command to enter the setup interface, it loads the BIOS setup interface. The BIOS setup interface is typically a text-based menu-driven interface, allowing users to navigate and select different settings options using keyboard input. Within the BIOS setup interface, users can find the "I / O Configuration Menu," which is specifically designed for configuring settings related to input / output devices, including boot management and device priority. Users select and enter the "I / O Configuration Menu" using keyboard input (such as the arrow keys and Enter key). This process is implemented through the menu navigation module in the BIOS, which loads and displays the corresponding menu options based on the user's key presses. For example, if a user uses the arrow keys to navigate to the "I / O Configuration Menu" option in the BIOS setup interface and presses Enter, the BIOS will load and display the I / O Configuration Menu, allowing the user to make further settings. This centralized approach to input / output device settings in a single menu facilitates unified management, and the menu-driven interface allows users to intuitively find and select the desired settings, improving user convenience.
[0021] In the I / O configuration menu, in response to boot option setting commands, a device list and boot option options are displayed. These boot option options control the enable / disable status of high-speed serial expansion devices. Specifically, the user can find the "Boot Option Settings" option in the I / O configuration menu. This option allows the user to manage the system's boot options, including enabling or disabling boot options for specific devices. The user selects the boot option settings option via keyboard input, and the BIOS responds by loading the boot option settings interface. This interface displays the previously generated device list and the boot option options for each device. The boot option settings interface can display device information in table or list format, including device model, slot location, and current boot status. The user can select a specific device using keyboard input and manipulate its boot option options. For example, the user can use the arrow keys to navigate to a specific PCIe device in the boot option settings interface and then press Enter to enter the boot option settings for that device. At this point, the user can choose to enable or disable the boot option for that device. This allows users to enable or disable boot options for specific devices, avoiding the risk of accidental operation that might occur with global operations.
[0022] Additionally, in the boot settings interface, the BIOS displays a device list containing information on all identified high-speed serial expansion devices, as well as the boot path for each device. Boot options for each device are displayed next to the device list, allowing users to select specific devices using keyboard input and manipulate their boot options. Users can enable or disable a device's boot option through these options. If the user selects "Enable," the BIOS adds the device's boot option to the boot list, ensuring it is loaded during system startup. If the user selects "Disable," the BIOS removes the device's boot option from the boot list or marks it as unbootable. For example, the boot settings interface may display a device list showing the device's model, slot location, and current boot status. Users can select a device using the arrow keys and press Enter to access that device's boot settings. Here, users can choose to "Enable" or "Disable" the device's boot option. This allows users to enable or disable specific devices, preventing accidental errors from affecting system startup.
[0023] The boot option control module responds to control commands for the boot selection of a target high-speed serial expansion device in the device list. Based on the control commands, the enabled / disabled status of the target high-speed serial expansion device, and the boot path, it controls the boot option of the target high-speed serial expansion device, ensuring that the target high-speed serial expansion device runs based on the control commands upon the next System-on-Chips (SIBPO) reboot. Specifically, in the BIOS boot option settings interface, when a user selects a specific high-speed serial expansion device (such as a PCIe device) via keyboard input and performs an operation on its boot option (such as selecting "Enable" or "Disable"), the BIOS boot option control module captures the user's operation commands and identifies the selected device and operation type. This process is implemented through the BIOS's event handling mechanism, which listens for user key presses and transmits the operation commands to the boot option control module. For example, if a user selects device "PCIe Device 1" and chooses the "Disable" option in the boot option settings interface, the BIOS boot option control module will capture this operation command and identify that the user wishes to disable the boot option of "PCIe Device 1".
[0024] The BIOS boot option control module retrieves detailed information about the target device from the device list, including the device's boot option path and current enabled / disabled status. Based on the user's control commands, the BIOS modifies the target device's boot configuration parameters. If the user selects "disable," the BIOS removes the device's boot option from the boot option list or marks it as unbootable; if the user selects "enabled," the BIOS adds the device's boot option to the boot option list or marks it as bootable. When the system boots next time, the BIOS reads the previously set boot configuration parameters during the hardware self-test (POST). These parameters contain the boot configuration status (enabled or disabled) of each device. Based on the read configuration parameters, the BIOS decides whether to load the target device's boot option. If the device's boot option is marked "disabled," the BIOS skips it; if the device's boot option is marked "enabled," the BIOS loads it. For example, if the BIOS finds that the boot option for "PCIe device 1" is marked "disabled," it skips it during the boot process, ensuring that the device is not loaded.
[0025] Therefore, the BIOS can precisely control the boot options of the target high-speed serial expansion device according to the user's operation instructions. When the system starts up again, the BIOS will decide whether to load the boot option of the target device based on the stored configuration parameters, ensuring that the system boot process conforms to the user's settings. This process not only improves the controllability and flexibility of the system, but also optimizes boot performance and system security.
[0026] According to one embodiment of this application, the control instruction includes a disable instruction, which controls the startup option of the target high-speed serial expansion device based on the control instruction, the enable / disable state of the target high-speed serial expansion device, and the startup item path. The control includes: parsing the startup item path to determine the location information of at least one high-speed serial expansion device; determining the enable / disable state of the target high-speed expansion device based on the startup item options corresponding to the location information; and, if the target high-speed serial expansion device is enabled, controlling the startup option of the target high-speed serial expansion device based on the disable instruction to disable the target high-speed serial expansion device.
[0027] Specifically, control commands may include disable commands. When controlling the boot option of a target high-speed serial expansion device based on the control commands, the enable / disable status of the target high-speed serial expansion device, and the boot path, the boot path is first parsed to determine the location information of at least one high-speed serial expansion device. The boot path is a string describing the device's location in the system, typically containing the device's hierarchical relationship and specific location. For example, PciRoot(0x38) / Pci(0x2,0x0) indicates that the device is located at PCIe device 0x20,x0 under PCIe root port 0x38. That is, when a user selects to disable the boot entry of a device, the BIOS first needs to parse the device's boot path to determine the device's specific location in the system. The path parsing module in the BIOS will parse each part of the path step by step according to the path format. For example, PciRoot(0x38) indicates that the device is connected to PCIe root port 0x38, and Pci(0x2,0x0) indicates that the device is located under PCIe root port 0x38 with device number 0x2 and function number 0x0. By resolving the path, the BIOS can determine the specific location of the device in the hardware hierarchy, thereby accurately finding and operating the device's boot entry.
[0028] After determining the location information, the enabled / disabled status of the target high-speed expansion device can be determined based on the boot option corresponding to the location information. That is, once the BIOS parses the boot path and determines the location of the device, it will obtain the current enabled / disabled status of the device from the device list. For example, the BIOS will find that the current status of "PCIe device 1" is "enabled" from the device list.
[0029] When the target high-speed serial expansion device is enabled, its boot options can be controlled using a disable command to disable it. Specifically, if the target device is currently enabled, the BIOS will modify its boot configuration parameters based on the user's disable command. This includes removing the device's boot entry from the boot list or marking it as unbootable. For example, if the user selects to disable "PCIe Device 1," the BIOS will remove the device's boot entry from the boot list and update its boot configuration parameters to "Disabled."
[0030] Therefore, the BIOS can precisely control the boot options of the target high-speed serial expansion device based on the user's disable command, and ensure that the device is disabled at the next system startup. This process not only improves system controllability and flexibility, but also optimizes boot performance and system security.
[0031] According to one embodiment of this application, the control instruction further includes an enable instruction, which controls the startup option of the target high-speed serial expansion device based on the control instruction, the enable / disable state of the target high-speed serial expansion device, and the startup item path. The control instruction further includes: parsing the startup item path to determine the location information of at least one high-speed serial expansion device; determining the enable / disable state of the target high-speed expansion device based on the startup item option corresponding to the location information; and controlling the startup option of the target high-speed serial expansion device based on the enable instruction when the target high-speed serial expansion device is in a disabled state, so that the target high-speed serial expansion device is in an enabled state.
[0032] Specifically, the control commands also include enable commands. When controlling the boot options of a target high-speed serial expansion device based on the control commands, the enable / disable status of the target high-speed serial expansion device, and the boot path, the boot path is first parsed to determine the location information of at least one high-speed serial expansion device. The boot path is a string describing the device's location in the system, typically containing the device's hierarchical relationship and specific location. For example, PciRoot(0x38) / Pci(0x2,0x0) indicates that the device is located at PCIe device 0x20,x0 under PCIe root port 0x38. That is, when a user selects to disable the boot entry of a device, the BIOS first needs to parse the device's boot path to determine the device's specific location in the system. The path parsing module in the BIOS will parse each part of the path step by step according to the path format. For example, PciRoot(0x38) indicates that the device is connected to PCIe root port 0x38, and Pci(0x2,0x0) indicates that the device is located under PCIe root port 0x38 with device number 0x2 and function number 0x0. By resolving the path, the BIOS can determine the specific location of the device in the hardware hierarchy, thereby accurately finding and operating the device's boot entry.
[0033] After determining the location information, the enabled / disabled status of the target high-speed expansion device can be determined based on the boot option corresponding to the location information. That is, once the BIOS parses the boot path and determines the location of the device, it will obtain the current enabled / disabled status of the device from the device list. For example, the BIOS will find that the current status of "PCIe device 1" is "disabled" from the device list.
[0034] When the target high-speed serial expansion device is disabled, the boot options of the target high-speed serial expansion device can be controlled according to the enable command to enable the target high-speed serial expansion device. That is, if the target device is currently "disabled", the BIOS will modify the device's boot configuration parameters according to the user's enable command. The specific operations include: adding the device's boot option to the boot option list, or marking the device's boot option as bootable. For example, if the user selects to enable "PCIe Device 1", the BIOS will add the device's boot option to the boot option list and update its boot configuration parameters to "enabled".
[0035] Therefore, the BIOS can precisely control the boot options of the target high-speed serial expansion device based on the user's enable command, and ensure that the device is enabled at the next system startup. This process not only improves system controllability and flexibility, but also optimizes boot performance and system security.
[0036] According to one embodiment of this application, parsing the startup path to determine the location information of at least one high-speed serial expansion device includes: determining the identifier, device number, and function number of the high-speed serial expansion device based on the startup path, wherein the identifier is used to identify the root port of the high-speed serial expansion device; determining the central processing unit and processing unit corresponding to the high-speed serial expansion device based on the identifier, and determining the port corresponding to the high-speed serial expansion device based on the device number and function number; and determining the location information based on the central processing unit, processing unit, and port.
[0037] Specifically, when parsing the boot entry path to determine the location information of at least one high-speed serial expansion device, the identifier, device number, and function number of the high-speed serial expansion device can be determined based on the boot entry path. The identifier is used to identify the root port of the high-speed serial expansion device. That is, the boot entry path is a string describing the device's location in the system, typically containing the device's hierarchical relationship and specific location. For example, PciRoot(0x38) / Pci(0x2,0x0) indicates that the device is located at PCIe device 0x2,0x0 under PCIe root port 0x38. This path format follows the advanced configuration and power interface specifications, ensuring the uniqueness and resolvability of the device path. Parsing the root port identifier: The root port identifier (such as PciRoot(0x38)) indicates the PCIe root port to which the device is connected. The value in the identifier (such as 0x38) is a unique identifier used to distinguish different root ports. For example, PciRoot(0x38) indicates that the device is connected to PCIe root port 0x38. Resolving Device Numbers and Function Numbers: The device number and function number (e.g., Pci(0x2, 0x0)) indicate the specific location of the device under the root port. The device number (e.g., 0x2) represents the device ID, and the function number (e.g., 0x0) represents the device's function ID. For example, Pci(0x2, 0x0) indicates that the device is located under root port 0x38 with device number 0x2 and function number 0x0. By resolving the boot path, the BIOS can accurately locate the target device in the system, ensuring the accuracy of operations.
[0038] After determining the identifier, the corresponding central processing unit (CPU) and processing unit (CPU) of the high-speed serial expansion device can be identified based on the identifier. For example, a pre-defined correspondence can be used to determine the CPU and CPU. Once the identifier is determined, the CPU and CPU can be obtained by directly calling the correspondence. Similarly, after determining the device number and function number, the corresponding port of the high-speed serial expansion device can be identified based on these numbers. For example, the relationship between the device number, function number, and port can be pre-defined. Once the device number and function number are determined, the port can be obtained by directly calling the correspondence.
[0039] Therefore, after determining the CPU, processing unit (PE), and port, the location information can be determined based on these information. Specifically, the BIOS combines the parsed CPU, PE, and port information to form the complete location information of the target device. For example, for the path PciRoot(0x38) / Pci(0x2,0x0), the parsed root port identifier is 0x38, the corresponding CPU is 1, the corresponding PE is 0, the device number is 0x2, the function number is 0x0, and the corresponding port is A. Therefore, the location information of the target device is CPU 1, PE 0, and port A. By combining the CPU, PE, and port information, the BIOS can comprehensively locate the target device within the system, ensuring operational accuracy. Precise location information enables the BIOS to reliably execute operations on the target device, improving system stability and reliability.
[0040] Therefore, the BIOS can accurately parse the location information of the target device based on the boot path, providing an accurate basis for subsequent operations. This process not only improves the controllability and flexibility of the system, but also optimizes boot performance and system security.
[0041] According to one embodiment of this application, determining the central processing unit and processing unit corresponding to a high-speed serial expansion device based on an identifier includes: determining a source language name based on the identifier and a first preset mapping relationship; and determining the central processing unit and processing unit corresponding to the high-speed serial expansion device based on the source language name and a second preset mapping relationship table, wherein the first preset mapping relationship is used to indicate the relationship between the identifier and the source language name, and the second preset mapping relationship is used to indicate the relationship between the source language name and the central processing unit and processing unit.
[0042] Specifically, when determining the central processing unit and processing unit corresponding to a high-speed serial expansion device based on the identifier, the source language name can be determined according to the identifier and a first preset mapping relationship. The identifier is a number used to uniquely identify the PCIe root port, such as 0x38 in PciRoot (0x38). The first preset mapping relationship is a table recording the correspondence between identifiers and source language names. The source language name is an intermediate identifier used to further map to specific hardware information. For example, the first preset mapping relationship includes 0x38 -> "PC00", 0x39 -> "PC01", 0x3A -> "PC02", etc. The BIOS looks up the corresponding source language name in the first preset mapping relationship table based on the identifier. For example, for the identifier 0x38, the BIOS finds the corresponding source language name as "PC00" in the first preset mapping relationship table. Through the source language name, the BIOS can further map the identifier to specific hardware information, improving the flexibility and scalability of the mapping. Furthermore, the use of the first preset mapping relationship table allows the BIOS to adapt to different hardware configurations, improving the system's versatility and scalability.
[0043] After determining the source language name, the corresponding CPU and processing unit (PE) of the high-speed serial expansion device can be determined based on the source language name and the second preset mapping table. That is, the source language name is the intermediate identifier found in the first preset mapping table, such as "PC00". The second preset mapping table is a table that records the correspondence between the source language name and the CPU and PE. For example, the second preset mapping table includes "PC00" -> CPU: 1, PE: 0, "PC01" -> CPU: 1, PE: 1, "PC02" -> CPU: 2, PE: 0, etc. The BIOS looks up the corresponding CPU and PE in the second preset mapping table based on the source language name. For example, for the source language name "PC00", the BIOS finds the corresponding CPU as 1 and PE as 0 in the second preset mapping table. Therefore, through the second preset mapping table, the BIOS can identify the hardware topology, determine the CPU and PE of each device, and ensure the accuracy of operation. The use of the second preset mapping table enables the BIOS to adapt to different hardware configurations, improving the system's flexibility and scalability.
[0044] Therefore, the BIOS can accurately determine the corresponding CPU and processing unit of the high-speed serial expansion device based on the identifier and through two layers of preset mapping relationships, providing an accurate basis for subsequent operations. This process not only improves the controllability and flexibility of the system, but also optimizes boot performance and system security.
[0045] According to one embodiment of this application, determining the port corresponding to a high-speed serial expansion device based on a device number and a function number includes: determining the port corresponding to the high-speed serial expansion device based on a device number, a function number, and a third preset mapping relationship, wherein the third preset mapping relationship is used to indicate the relationship between the device number and the function number and the port corresponding to the high-speed serial expansion device.
[0046] Specifically, when determining the port corresponding to a high-speed serial expansion device based on the device number and function number, the port can be determined according to the device number, function number, and a third preset mapping relationship. That is, the device number is a unique identifier for a PCIe device under the root port, used to distinguish different devices under the same root port. For example, 0x2 in Pci(0x2,0x0) is the device number. The function number is the function identifier for a PCIe device, used to distinguish different functions of the same device. For example, 0x0 in Pci(0x2,0x0) is the function number. Thus, Pci(0x2,0x0) indicates that the device is located under the root port with device number 0x2 and function number 0x0.
[0047] The third preset mapping relationship is a table that records the relationship between device numbers and function numbers and the corresponding ports of high-speed serial expansion devices. This table is generated during system initialization and records the hardware topology. For example, the second preset mapping relationship table may include Pci(0x2,0x0) -> Port: A, Pci(0x3,0x0) -> Port: B, Pci(0x4,0x0) -> Port: C, Pci(0x2,0x1) -> Port: D, etc. Through this mapping table, the BIOS can quickly find the corresponding port information based on the device number and function number. Assuming the device's boot path is PciRoot(0x38) / Pci(0x2,0x0): Device number: 0x2, Function number: 0x0, searching in the second preset mapping relationship table, Pci(0x2,0x0) -> Port: A, therefore, the corresponding port for this device is A. Thus, through the third preset mapping relationship table, the BIOS can accurately map device numbers and function numbers to the corresponding ports, ensuring operational accuracy.
[0048] In summary, assuming a user wants to operate a high-speed serial expansion device named "PCIe Device 1," with a boot path of PciRoot (0x38) / Pci (0x2, 0x0), the boot path is first parsed: root port identifier: 0x38, device number: 0x2, function number: 0x0. Based on identifier 0x38, the BIOS finds the corresponding source language name "PC00" in the first preset mapping table. Based on the source language name "PC00," the BIOS finds the corresponding CPU as 1 and PE as 0 in the second preset mapping table. Based on device number 0x2 and function number 0x0, the BIOS finds the corresponding port in the third preset mapping table, finding port A. Therefore, the identifier is 0x38, the source language name is PC00, the corresponding CPU is 1, the corresponding PE is 0, the device number is 0x2, the function number is 0x0, and the corresponding port is A. Thus, the target device's location information is: CPU 1, PE 0, port A.
[0049] Therefore, the BIOS can accurately determine the port corresponding to a high-speed serial expansion device based on the device number and function number, combined with a third preset mapping relationship. This process not only improves the system's controllability and flexibility but also optimizes boot performance and system security.
[0050] According to one embodiment of this application, the control method for a high-speed serial expansion device further includes: displaying the device model, manufacturer identification number, slot number, and current enabled / disabled status of the high-speed serial expansion device in the menu directory corresponding to the location information.
[0051] Specifically, location information refers to the exact location of the high-speed serial expansion device within the system, including the central processing unit, processing unit, and port information. For example, the location information might be: CPU 1, PE 0, Port A. The menu in the BIOS setup interface is where users configure and manage devices. Based on the location information, the BIOS will display detailed device information in the corresponding menu. For instance, the BIOS might display device information in the "PCIe Device Management" submenu under the "I / O Configuration Menu".
[0052] The menu corresponding to the location information displays the device model, manufacturer ID, slot number, and current enabled / disabled status of the high-speed serial expansion device. The device model is a unique identifier assigned by the manufacturer to distinguish different models. The BIOS obtains the device model during the device detection phase and stores it in the device list. After parsing the boot path and determining the device location, the BIOS retrieves the device model from the device list and displays it in the menu. For example, the device model might be "PCIe RAID Controller 1234". The manufacturer ID is also displayed; it is a unique identifier used to distinguish devices from different manufacturers. The BIOS obtains the manufacturer ID during the device detection phase and stores it in the device list. After parsing the boot path and determining the device location, the BIOS retrieves the manufacturer ID from the device list and displays it in the menu. For example, the manufacturer ID might be "0x1234".
[0053] Displays the slot number, which is the physical location identifier of the device on the motherboard, used to distinguish devices in different slots. The BIOS obtains the slot number during the device detection phase and stores it in the device list. After parsing the boot path and determining the device location, the BIOS retrieves the slot number from the device list and displays it in the menu; for example, the slot number might be "Slot 1". Displays the current device's enabled / disabled status, indicating whether the device is loaded during system startup. The BIOS obtains the device's current status during the device detection phase and stores it in the device list. After parsing the boot path and determining the device location, the BIOS retrieves the device's enabled / disabled status from the device list and displays it in the menu. For example, the current status might be "Enabled" or "Disabled".
[0054] Therefore, suppose a user wants to view detailed information about a high-speed serial expansion device named "PCIe Device 1" in the BIOS settings interface, whose boot path is PciRoot(0x38) / Pci(0x2,0x0). The following is the specific processing procedure: Parsing the boot path: Root port identifier: 0x38, Device number: 0x2, Function number: 0x0. Finding the mapping relationship. First preset mapping table: 0x38 -> "PC00", Second preset mapping table: "PC00" -> CPU: 1, PE: 0, Port mapping table: Pci(0x2,0x0) -> Port: A. Determining the location information: Identifier: 0x38, Source name: "PC00", Corresponding CPU: 1, Corresponding PE: 0, Device number: 0x2, Function number: 0x0, Corresponding port: A. Displaying detailed device information: Device List: Device Model: PCIe RAID Controller 1234, Manufacturer Identifier: 0x1234, Slot Number: Slot 1, Current Status: Enabled. Therefore, in the "PCIe Device Management" submenu under the "I / O Configuration Menu" in the BIOS setup interface, the following information will be displayed: Device Model: PCIe RAID Controller 1234, Manufacturer Identifier: 0x1234, Slot Number: Slot 1, Current Status: Enabled.
[0055] Therefore, by displaying detailed device information in the menu directory, users can intuitively understand the device's configuration and status, facilitating management and configuration. Providing complete device information helps users fully understand the hardware configuration in the system, and providing current status information helps users decide whether to enable or disable the device, improving system controllability and flexibility.
[0056] According to one embodiment of this application, the control method for a high-speed serial expansion device further includes: after controlling the startup item option of the target high-speed serial expansion device, writing a disabled state parameter or an enabled state parameter to a non-volatile memory, wherein the disabled state parameter includes the startup item path and disabled state of the target high-speed serial expansion device, and the enabled state parameter includes the startup item path and enabled state of the target high-speed serial expansion device.
[0057] Specifically, after controlling the boot options of the target high-speed serial expansion device, disable or enable status parameters can be written to non-volatile memory. The disable status parameters include the boot path and disable status of the target high-speed serial expansion device. These parameters are used to record the device's disable information, ensuring that the device's disable status is retained after a system restart. For example, disable status parameters may include boot path: PciRoot(0x38) / Pci(0x2,0x0), disable status: Disabled. The enable status parameters also include the boot path and enable status of the target high-speed serial expansion device. These parameters are used to record the device's enable information, ensuring that the device's enable status is retained after a system restart. For example, enable status parameters may include boot path: PciRoot(0x38) / Pci(0x2,0x0), enable status: Enabled.
[0058] Non-volatile RAM (NVRAM) is a type of non-volatile memory used to store BIOS settings and configuration parameters. These parameters are retained even after system power failure or restart. NVRAM is typically used to store system boot parameters, hardware configuration information, etc. By writing disabled or enabled status parameters to NVRAM, the BIOS ensures that the enabled or disabled state of devices is correctly restored after a system restart. After the user controls the boot options of a target device (such as enabling or disabling it), the BIOS obtains the corresponding status parameters. For example, if the user disables the device, the BIOS obtains the disabled status parameters; if the user enables the device, the BIOS obtains the enabled status parameters. The BIOS writes the obtained status parameters to NVRAM. This process is implemented through the configuration storage module in the BIOS. For example, if the user disables the device, the BIOS writes the following parameters to NVRAM: Boot path: PciRoot(0x38) / Pci(0x2,0x0), Disabled status: Disabled.
[0059] Therefore, by writing the status parameters into NVRAM, the enabled or disabled state of the device is ensured to be retained after the system is powered off or restarted, which improves the stability and reliability of the system. When the system restarts, the BIOS can read the status parameters from NVRAM and restore the enabled or disabled state of the device, ensuring that the system's boot configuration is consistent with the user's settings.
[0060] According to one embodiment of this application, the control method for a high-speed serial expansion device further includes: responding to a restore default instruction; and setting the enable state of the high-speed serial expansion device in the device list to an initial value based on the restore default instruction, wherein the initial value is a value set at the factory of the basic input / output system.
[0061] Specifically, the "Restore Defaults" option is a user-selected setting in the BIOS setup interface that restores all settings to factory defaults. This option can be found in the "Advanced" or "Security" settings of the BIOS setup interface. When the user selects "Restore Defaults" or "Factory Reset" in the BIOS setup interface, the BIOS captures the user's command and begins the process of restoring default settings. This provides a simple option for users to quickly restore all settings to factory defaults, facilitating troubleshooting or system initialization.
[0062] Initial values refer to the default enabled states set at the BIOS factory. These values are typically defined in the BIOS's default configuration file to ensure the system boots correctly at the factory. The device list is generated during system startup and contains all detected high-speed serial expansion devices and their current enabled states. The BIOS reads the initial enabled state of each device from the default configuration file and updates the enabled state of each device in the device list to the initial value. Assume the BIOS's default configuration file defines the following initial values: PciRoot(0x38) / Pci(0x2,0x0) -> Enabled, PciRoot(0x38) / Pci(0x3,0x0) -> Disabled. When the user chooses to restore the default settings, the BIOS updates the device states in the device list to: PciRoot(0x38) / Pci(0x2,0x0) -> Enabled, PciRoot(0x38) / Pci(0x3,0x0) -> Disabled.
[0063] This ensures that all devices are restored to their factory default settings, guaranteeing system startup consistency and stability. In case of user error or system configuration problems, restoring default settings can quickly resolve issues and improve system availability.
[0064] In one embodiment of this application, after setting the enabled state of the high-speed serial extension device in the device list to its initial value according to the restore default instruction, these status parameters can also be written to non-volatile memory (NVRAM) to ensure that these settings can be retained after the system restarts. The OS writes the following status parameters to NVRAM: boot path: PciRoot(0x38) / Pci(0x2,0x0), enabled state: Enabled, boot path: PciRoot(0x38) / Pci(0x3,0x0), disabled state: Disabled. Thus, by writing the status parameters to NVRAM, the enabled or disabled state of the device is ensured to be retained after the system is powered off or restarted, improving the stability and reliability of the system. When the system restarts, the BIOS can read the status parameters from NVRAM, restore the enabled or disabled state of the device, and ensure that the system's boot configuration is consistent with the factory default settings.
[0065] The following is combined Figure 2 The method described in this application is used to describe the method.
[0066] As a specific example, the control method of the high-speed serial extension device of this application may include the following steps: S101, after the basic input / output system powers on and performs a self-test, obtain a device list of high-speed serial expansion devices, wherein the device list includes the startup path of at least one high-speed serial expansion device.
[0067] S102, in response to the basic input / output system setting command, enter the input / output configuration menu based on the basic input / output system setting command, and in the input / output configuration menu, in response to the startup item setting command, display the device list and startup item options, wherein the startup item options are used to control the enable / disable status of high-speed serial expansion devices.
[0068] S103, responds to control instructions for the startup option of the target high-speed serial extension device in the device list, wherein the control instructions include enable instructions and disable instructions.
[0069] S104, determine the identifier, device number, and function number of the high-speed serial expansion device based on the startup item path, wherein the identifier is used to identify the root port of the high-speed serial expansion device.
[0070] S105 determines the central processing unit and processing unit corresponding to the high-speed serial expansion device based on the identifier number, and determines the port corresponding to the high-speed serial expansion device based on the device number and function number.
[0071] S106 determines location information based on the central processing unit, processing unit, and ports.
[0072] S107, determine the enabled / disabled status of the target high-speed expansion device based on the startup item options corresponding to the location information.
[0073] S108. Determine if the target high-speed serial expansion device is enabled. If yes, proceed to step S109; otherwise, proceed to step S110.
[0074] S109, based on the disable instruction, control the startup option of the target high-speed serial expansion device to disable the target high-speed serial expansion device.
[0075] S110, determine whether the target high-speed serial expansion device is disabled. If yes, proceed to step S111; otherwise, proceed to step S101.
[0076] S111, based on the enable command, controls the startup option of the target high-speed serial expansion device to enable the target high-speed serial expansion device.
[0077] In summary, after the Basic Input / Output System (BIOS) performs a power-on self-test (POST), it acquires a device list of high-speed serial expansion devices. This device list includes the startup path for at least one high-speed serial expansion device. Responding to BIOS setup commands, it enters the Input / Output Configuration Menu. Within the Configuration Menu, in response to startup setting commands, it displays the device list and startup options. These startup options control the enable / disable status of the high-speed serial expansion devices. Responding to control commands for the startup options of target high-speed serial expansion devices in the device list, and based on these control commands, the enable / disable status of the target high-speed serial expansion device, and its startup path, it controls the startup options of the target high-speed serial expansion device to ensure that the target high-speed serial expansion device operates based on the control commands upon the next BIOS restart. Therefore, this method enables fine-grained control of high-speed serial expansion devices, improving the startup controllability and management efficiency of the BIOS.
[0078] Corresponding to the above embodiments, this application also proposes an electronic device.
[0079] like Figure 3 As shown, the electronic device 200 of this application embodiment may include: a memory 210, a processor 220, and a program stored in the memory 210 and executable on the processor 220. When the processor 220 executes the program, it implements the control method of the high-speed serial expansion device described above.
[0080] The electronic device according to the embodiments of this application can achieve fine control of the high-speed serial expansion device by executing the control method of the high-speed serial expansion device described above, so as to improve the startup controllability and management efficiency of the basic input / output system.
[0081] It should be noted that the logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be specifically implemented in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of computer-readable media include: an electrical connection having one or more wires (electronic device), a portable computer disk drive (magnetic device), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Alternatively, the computer-readable medium may be paper or other suitable media on which the program can be printed, since the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in a computer memory.
[0082] It should be understood that various parts of this application can be implemented using hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented using software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.
[0083] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0084] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this application, "multiple" means at least two, such as two, three, etc., unless otherwise explicitly specified.
[0085] In this application, unless otherwise expressly specified and limited, the terms "installation," "connection," "joining," and "fixing," etc., should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral part; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; they can refer to the internal communication of two components or the interaction between two components, unless otherwise expressly limited. Those skilled in the art can understand the specific meaning of the above terms in this application according to the specific circumstances.
[0086] Although embodiments of this application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting this application. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of this application.
Claims
1. A control method for a high-speed serial expansion device, characterized in that, Applied to a basic input / output system, the method includes: After the basic input / output system performs a power-on self-test, a device list of high-speed serial expansion devices is obtained, wherein the device list includes at least one startup path of the high-speed serial expansion device; In response to the basic input / output system setting command, the input / output configuration menu is entered based on the basic input / output system setting command. In the input / output configuration menu, in response to the startup item setting command, the device list and startup item options are displayed, wherein the startup item options are used to control the enable / disable status of the high-speed serial expansion device. Responding to a control command for the startup option of a target high-speed serial expansion device in the device list, and controlling the startup option of the target high-speed serial expansion device based on the control command, the enabled / disabled status of the target high-speed serial expansion device, and the startup path, so that the target high-speed serial expansion device operates based on the control command upon the next reboot of the basic input / output system.
2. The control method for the high-speed serial expansion device according to claim 1, characterized in that, The control command includes a disable command. Controlling the startup option of the target high-speed serial expansion device based on the control command, the enable / disable status of the target high-speed serial expansion device, and the startup path includes: Parse the startup path to determine the location information of at least one of the high-speed serial extension devices; The enabled / disabled status of the target high-speed expansion device is determined based on the startup options corresponding to the location information; When the target high-speed serial expansion device is enabled, the startup option of the target high-speed serial expansion device is controlled based on the disable command to disable the target high-speed serial expansion device.
3. The control method for the high-speed serial expansion device according to claim 1, characterized in that, The control command further includes an enable command. The control of the startup item options of the target high-speed serial expansion device based on the control command, the enable / disable status of the target high-speed serial expansion device, and the startup item path further includes: Parse the startup path to determine the location information of at least one of the high-speed serial extension devices; The enabled / disabled status of the target high-speed expansion device is determined based on the startup options corresponding to the location information; When the target high-speed serial expansion device is in the disabled state, the startup item option of the target high-speed serial expansion device is controlled based on the enable command to enable the target high-speed serial expansion device.
4. The control method for the high-speed serial expansion device according to claim 2 or 3, characterized in that, The step of parsing the startup path to determine the location information of at least one of the high-speed serial extension devices includes: The identifier, device number, and function number of the high-speed serial expansion device are determined based on the startup path, wherein the identifier is used to identify the root port of the high-speed serial expansion device; The central processing unit and processing unit corresponding to the high-speed serial expansion device are determined based on the identification number, and the port corresponding to the high-speed serial expansion device is determined based on the device number and function number. The location information is determined based on the central processing unit, the processing unit, and the port.
5. The control method for the high-speed serial expansion device according to claim 4, characterized in that, The step of determining the central processing unit and processing unit corresponding to the high-speed serial expansion device based on the identifier includes: The source language name is determined based on the identifier and the first preset mapping relationship; The central processing unit and processing unit corresponding to the high-speed serial expansion device are determined based on the source language name and the second preset mapping table, wherein the first preset mapping table is used to indicate the relationship between the identifier and the source language name, and the second preset mapping table is used to indicate the relationship between the source language name and the central processing unit and the processing unit.
6. The control method for the high-speed serial expansion device according to claim 4, characterized in that, The step of determining the port corresponding to the high-speed serial expansion device based on the device number and function number includes: The port corresponding to the high-speed serial expansion device is determined according to the device number, the function number and the third preset mapping relationship, wherein the third preset mapping relationship is used to indicate the relationship between the device number and the function number and the port corresponding to the high-speed serial expansion device.
7. The control method for the high-speed serial expansion device according to claim 4, characterized in that, The method further includes: The menu directory corresponding to the location information displays the device model, manufacturer identification number, slot number, and current enabled / disabled status of the high-speed serial expansion device.
8. The control method for the high-speed serial expansion device according to claim 3, characterized in that, The method further includes: After controlling the startup option of the target high-speed serial expansion device, the disabled status parameter or enabled status parameter is written to the non-volatile memory. The disabled status parameter includes the startup path and disabled status of the target high-speed serial expansion device, and the enabled status parameter includes the startup path and enabled status of the target high-speed serial expansion device.
9. The control method for the high-speed serial expansion device according to claim 1, characterized in that, The method further includes: Respond to the command to restore default settings; Based on the restore default instruction, the enable status of the high-speed serial expansion device in the device list is set to an initial value, wherein the initial value is the value set at the factory of the basic input / output system.
10. An electronic device, characterized in that, include: A memory, a processor, and a program stored in the memory and executable on the processor, wherein when the processor executes the program, it implements the control method for the high-speed serial expansion device according to any one of claims 1-9.
Citation Information
Patent Citations
Method for starting up computer system
CN102446104A
Startup item disabling method and device, equipment and storage medium
CN117608691A
Hard disk priority setting method and device, computer equipment and storage medium
CN119003006A
Startup item management method and device, computer equipment and storage medium
CN119806657A