-STATIC\r
-VOID\r
-SetLinuxPciProbeOnlyProperty (\r
- IN FDT_CLIENT_PROTOCOL *FdtClient\r
- )\r
-{\r
- INT32 Node;\r
- UINT32 Tmp;\r
- EFI_STATUS Status;\r
-\r
- if (!FeaturePcdGet (PcdPureAcpiBoot)) {\r
- //\r
- // Set the /chosen/linux,pci-probe-only property to 1, so that the PCI\r
- // setup we will perform in the firmware is honored by the Linux OS,\r
- // rather than torn down and done from scratch. This is generally a more\r
- // sensible approach, and aligns with what ACPI based OSes do typically.\r
- //\r
- // In case we are exposing an emulated VGA PCI device to the guest, which\r
- // may subsequently get exposed via the Graphics Output protocol and\r
- // driven as an efifb by Linux, we need this setting to prevent the\r
- // framebuffer from becoming unresponsive.\r
- //\r
- Status = FdtClient->GetOrInsertChosenNode (FdtClient, &Node);\r
-\r
- if (!EFI_ERROR (Status)) {\r
- Tmp = SwapBytes32 (1);\r
- Status = FdtClient->SetNodeProperty (FdtClient, Node,\r
- "linux,pci-probe-only", &Tmp, sizeof (Tmp));\r
- }\r
- if (EFI_ERROR (Status)) {\r
- DEBUG ((EFI_D_WARN,\r
- "Failed to set /chosen/linux,pci-probe-only property\n"));\r
- }\r
- }\r
-}\r
-\r