]> git.proxmox.com Git - mirror_edk2.git/blobdiff - OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c
OvmfPkg/CloudHv: Connect serial console
[mirror_edk2.git] / OvmfPkg / Library / PlatformBootManagerLib / BdsPlatform.c
index 0918c35f1fb7ae888ad17b908392a6e077d2d5c2..51016a5548cb68dea4986e5c6c53358a9322ab9f 100644 (file)
@@ -418,10 +418,16 @@ PlatformBootManagerBeforeConsole (
     SaveS3BootScript ();\r
   }\r
 \r
+  //\r
   // We need to connect all trusted consoles for TCG PP. Here we treat all\r
   // consoles in OVMF to be trusted consoles.\r
+  //\r
+  // Cloud Hypervisor doesn't emulate any LPC bridge, which is why it must\r
+  // rely on the serial I/O port to be connected as a console. It reuses the\r
+  // definition from Xen as it is very generic.\r
+  //\r
   PlatformInitializeConsole (\r
-    XenDetected () ? gXenPlatformConsole : gPlatformConsole\r
+    (XenDetected () || PcdGet16 (PcdOvmfHostBridgePciDevId) == CLOUDHV_DEVICE_ID) ? gXenPlatformConsole : gPlatformConsole\r
     );\r
 \r
   //\r