Systems and methods to preconfigure a hardware module
In part, in one aspect, the disclosure relates to a method of enabling hot plugging operations in a computer system. The method mat include initializing a platform driver, wherein the platform driver is installed on a computer system running an operating system; disabling, using the platform driver, an interrupt function and a hardware detection notification function of the computer system; hot plugging a PCIe node in the computer system; detecting, using the platform driver, the hot plugging of the PCI node in the computer system; configuring the PCIe node, using the platform driver, wherein the configured PCIe node comprises a PCI hierarchy, the PCI hierarchy comprising an allocation of PCI bridges and devices of the configured PCIe node; and bringing the devices of the hot plugged configured PCIe node into service for use by the computing system.
1 . A method of enabling hot plugging operations in a computer system, the method comprising:
modifying firmware of a device;
initializing a platform driver, wherein the platform driver is installed on a computer system running an operating system, wherein the operating system does not natively support hot plug functionality;
disabling, using the platform driver, an interrupt function and a hardware detection notification function of the computer system;
hot plugging a PCIe node in the computer system, wherein the PCIe node comprises the firmware and the device;
detecting, using the platform driver, the hot plugging of the PCIe node in the computer system;
configuring the PCIe node, using the platform driver, wherein the configured PCIe node comprises a PCI hierarchy, the PCI hierarchy comprising an allocation of PCI bridges and devices of the configured PCIe node;
enabling, using the platform driver, an interrupt function and a hardware detection notification function of the computer system, wherein the platform driver handles one or more data exchanges between a kernel of the operating system and the platform driver; and
bringing the devices of the hot plugged and configured PCIe node into service for use by the computer system.
2 . The method of claim 1 , wherein the PCIe node comprises hardware that is hot pluggable into the computer system.
3 . The method of claim 2 , wherein the PCIe node is not preconfigured.
4 . The method of claim 3 , wherein the interrupt function is a hot plug interrupt function.
5 . The method of claim 4 , wherein the hardware detection notification function is a presence detect changed notification function.
6 . The method of claim 5 , wherein the platform driver communicates with a PCIe root port of a central processing unit of the computer system to disable the hot plug interrupt function and the detection notification function.
7 . The method of claim 3 , wherein the step of detecting the hot plugging of the PCIe node comprises polling a PCIe presence detect state bit of the computer system.
8 . The method of claim 5 further comprising enabling the interrupt function and the hardware detection notification function of the computer system.
9 . The method of claim 8 further comprising triggering a detection of a hot plug interrupt and provision of a presence detect changed notification to the operating system.
10 . The method of claim 9 , wherein the triggering step comprises disabling the interrupt function and the hardware detection notification function of the computer system.
11 . The method of claim 1 , wherein the enabling, using the platform driver, an interrupt function and a hardware detection notification function of the computer system step is performed temporarily or for a brief time period to support detection of a hot plugged device.
12 . The method of claim 11 further comprising processing the hot plug interrupt using the operating system.
13 . The method of claim 12 further comprising detecting configuration of the PCIe node using the operating system.
14 . The method of claim 3 , wherein the computer system is operable to support PCIe root port resource padding.
15 . The method of claim 7 , wherein a change in the presence detect state bit indicates hot plugging of the unconfigured PCIe node.
16 . The method of claim 1 , wherein detecting, using the platform driver, the hot plugging of the PCIe node in the computer system further comprises polling a PCIe presence detect state bit using the platform driver.
17 . The method of claim 1 , wherein the device is a PCIe switch.
18 . The method of claim 1 , wherein the modified firmware is configured to support communicating with the platform driver using a communication channel established therebetween.
19 . The method of claim 18 further comprising sending a memory range of a root bridge of the device to the modified firmware.