Method and apparatus for processing runtime file of PCIE device, and device
View Patent ↗The present application relates to a method and apparatus for processing a runtime file of a PCIE device, and a device. A main technical solution includes: in response to a base input/output system loading a memory drive file of a PCIE device, acquiring identification number information of the PCIE device, determining whether the base input/output system has processed a historical PCIE device with a same model as the PCIE device according to the identification number information and pre-stored identification number information, to obtain a judgment result, and processing a runtime file in the memory drive file of the PCIE device according to the judgment result.
1 . A method for processing a runtime file of a peripheral component interconnect express (PCIE) device, comprising:
acquiring identification number information of the PCIE device in response to a base input/output system (BIOS) loading a memory drive file of the PCIE device;
determining whether the BIOS has processed a historical PCIE device with a same model as the PCIE device according to the identification number information and pre-stored identification number information, to obtain a judgment result; and
processing a runtime file in the memory drive file of the PCIE device according to the judgment result;
wherein the judgment result comprises that the historical PCIE device with the same model is already processed; and the processing a runtime file in the memory drive file of the PCIE device according to the judgment result comprises:
acquiring a historical runtime file of the historical PCIE device and a reuse space address corresponding to the historical runtime file when the judgment result is that the historical PCIE device with the same model is already processed;
determining a reuse runtime file and a private runtime file of the PCIE device according to the runtime file and the historical runtime file;
determining a private space address of the private runtime file according to the reuse space address; and
storing the private runtime file to the private space address.
2 . The method according to claim 1 , wherein the reuse space address comprises a space end address; and the determining the private space address of the private runtime file according to the reuse space address comprises:
determining a reserved space address with the space end address of the reuse space address as a space start address, as the private space address of the private runtime file when the PCIE device is a first device with the same model as the historical PCIE device.
3 . The method according to claim 2 , wherein the determining the reserved space address comprises:
acquiring the space end address of the historical runtime file after the private runtime file of the PCIE device is determined;
setting a reserved space of the private runtime file subsequent to the space end address of the historical runtime file; and
determining the reserved space address according to position information of the reserved space.
4 . The method according to claim 3 , wherein the determining the reserved space address further comprises:
calculating a space volume of the historical runtime file upon completion of loading the historical runtime file of the historical PCIE device;
determining a space start address and a space end address of the historical runtime file according to the space volume of the historical runtime file;
setting at least one reserved space subsequent to the space end address of the historical runtime file; and
determining the reserved space address according to position information of the reserved space.
5 . The method according to claim 2 , further comprising:
determining a preceding private space address of another PCIE device loaded prior to the PCIE device according to the reuse space address when the PCIE device is not the first device with the same model as the historical PCIE device; and
determining a reserved space address with a space end address of the preceding private space address as a space start address, as the private space address of the private runtime file.
6 . The method according to claim 5 , wherein the determining the reserved space address with a space end address of the preceding private space address as a space start address comprises:
acquiring the space end address of the preceding private space address after the private runtime file of the PCIE device is determined;
setting a reserved space of the private runtime file subsequent to the space end address of the preceding private space address; and
determining the reserved space address according to position information of the reserved space.
7 . The method according to claim 1 , wherein after storing the private runtime file to the private space address, the method further comprises:
invoking the runtime file according to the identification number information of the PCIE device, identification number information of the historical PCIE device, and historical device space address mapping information.
8 . The method according to claim 7 , wherein the invoking the runtime file according to the identification number information of the PCIE device and identification number information of the historical PCIE device comprises:
invoking a reuse runtime file in the runtime files when the identification number information of the PCIE device matches the identification number information of the historical PCIE device.
9 . The method according to claim 7 , wherein the historical device space address mapping information comprises the identification number information and the reuse space address of the historical PCIE device; and the invoking the runtime file according to the identification number information of the PCIE device and historical device space address mapping information comprises:
invoking a reuse runtime file in the runtime files according to the reuse space address of the historical PCIE device when the identification number information of the PCIE device successfully matches the identification number information of the historical PCIE device.
10 . The method according to claim 7 , further comprising:
recording a loading sequence value of the PCIE device in the historical PCIE device.
11 . The method according to claim 10 , wherein the invoking the runtime file according to the identification number information of the PCIE device and identification number information of the historical PCIE device comprises:
acquiring the loading sequence value of the PCIE device in the historical PCIE device;
determining a private space address of the PCIE device according to the loading sequence value when the identification number information of the PCIE device successfully matches the identification number information of the historical PCIE device; and
invoking a private runtime file in the runtime files according to the private space address of the PCIE device.
12 . The method according to claim 1 , wherein the judgment result comprises that the historical PCIE device with the same model is unprocessed; and the processing a runtime file in the memory drive file of the PCIE device according to the judgment result comprises:
creating a data storage space for the PCIE device to store the runtime file when the judgment result is that the historical PCIE device with the same model is unprocessed.
13 . The method according to claim 1 , wherein the determining whether the BIOS has processed the historical PCIE device with the same model as the PCIE device according to the identification number information and pre-stored identification number information comprises:
determining that the BIOS has processed the historical PCIE device with the same model as the PCIE device when the identification number information coincides with the pre-stored identification number information.
14 . The method according to claim 13 , further comprising:
determining that the BIOS does not process the historical PCIE device with the same model as the PCIE device when the identification number information does not coincide with the pre-stored identification number information.
15 . The method according to claim 13 , wherein the determining that the BIOS has processed the historical PCIE device with the same model as the PCIE device when the identification number information coincides with the pre-stored identification number information comprises:
in response to an identification number portion of the identification number information coincides with the pre-stored identification number information, determining that the BIOS has processed the historical PCIE device with the same model as the PCIE device.
16 . The method according to claim 15 , wherein the method further comprises:
in response to the identification number portion of the identification number information not coinciding with the pre-stored identification number information, determining that the BIOS does not process the historical PCIE device with the same model as the PCIE device.
17 . The method according to claim 1 , wherein after acquiring identification number information of the PCIE device, the method further comprises:
storing the identification number information of the PCIE device by defining a data structure; or
accessing a storage chip by the BIOS, and writing the identification number information of the PCIE device into the storage chip, to store the identification number information of the PCIE device.
18 . The method according to claim 1 , wherein the identification number information comprises a vendor identification number (ID), a device ID, a subsystem vendor ID, and a subsystem ID.
19 . A computer device, comprising:
a memory storing a computer instruction;
at least one processor configured to execute the computer instruction, wherein upon executing the computer instructions, the at least one processor is configured to:
acquire identification number information of a peripheral component interconnect express (PCIE) device in response to a base input/output system (BIOS) loading a memory drive file of the PCIE device;
determine whether the BIOS has processed a historical PCIE device with a same model as the PCIE device according to the identification number information and pre-stored identification number information, to obtain a judgment result; and
process a runtime file in the memory drive file of the PCIE device according to the judgment result;
wherein the judgment result comprises that the historical PCIE device with the same model is already processed, and wherein in order to process the runtime file in the memory drive file of the PCIE device according to the judgment result, the at least one processor, upon execution of the computer instructions, is configured to:
acquire a historical runtime file of the historical PCIE device and a reuse space address corresponding to the historical runtime file when the judgment result is that the historical PCIE device with the same model is already processed;
determine a reuse runtime file and a private runtime file of the PCIE device according to the runtime file and the historical runtime file;
determine a private space address of the private runtime file according to the reuse space address; and
store the private runtime file to the private space address.
20 . A non-transitory computer-readable storage medium having a computer instruction stored therein, wherein the computer instruction, when executed by at least one processor, is configured to cause the at least one processor to:
acquire identification number information of a peripheral component interconnect express (PCIE) device in response to a base input/output system (BIOS) loading a memory drive file of the PCIE device;
determine whether the BIOS has processed a historical PCIE device with a same model as the PCIE device according to the identification number information and pre-stored identification number information, to obtain a judgment result; and
process a runtime file in the memory drive file of the PCIE device according to the judgment result;
wherein the judgment result comprises that the historical PCIE device with the same model is already processed; and wherein in order to cause the at least one processor to process the runtime file in the memory drive file of the PCIE device according to the judgment result, the computer instruction, when executed by the at least one processor, is configured to cause the at least one processor to:
acquire a historical runtime file of the historical PCIE device and a reuse space address corresponding to the historical runtime file when the judgment result is that the historical PCIE device with the same model is already processed;
determine a reuse runtime file and a private runtime file of the PCIE device according to the runtime file and the historical runtime file;
determine a private space address of the private runtime file according to the reuse space address; and
store the private runtime file to the private space address.