public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Laszlo Ersek <lersek@redhat.com>
To: Gerd Hoffmann <kraxel@redhat.com>, edk2-devel@lists.01.org
Subject: Re: [PATCH v2 3/4] OvmfPkg: add QemuRamfb to platform console
Date: Tue, 12 Jun 2018 17:57:19 +0200	[thread overview]
Message-ID: <d65eaa56-2826-93a3-dc86-4460e50b0e77@redhat.com> (raw)
In-Reply-To: <20180612093117.27028-4-kraxel@redhat.com>

On 06/12/18 11:31, Gerd Hoffmann wrote:
> Add QemuRamfbDxe device path to the list of platform console devices,
> so ConSplitter will pick up the device even though it isn't a PCI GPU.
> 
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
> ---
>  .../Library/PlatformBootManagerLib/PlatformData.c  | 51 ++++++++++++++++++++++
>  1 file changed, 51 insertions(+)
> 
> diff --git a/OvmfPkg/Library/PlatformBootManagerLib/PlatformData.c b/OvmfPkg/Library/PlatformBootManagerLib/PlatformData.c
> index a50cd7bcaf..1250a6d351 100644
> --- a/OvmfPkg/Library/PlatformBootManagerLib/PlatformData.c
> +++ b/OvmfPkg/Library/PlatformBootManagerLib/PlatformData.c
> @@ -14,6 +14,7 @@
>  **/
>  
>  #include "BdsPlatform.h"
> +#include <Guid/QemuRamfb.h>
>  
>  //
>  // Debug Agent UART Device Path structure
> @@ -37,6 +38,17 @@ typedef struct {
>  } USB_KEYBOARD_DEVICE_PATH;
>  #pragma pack ()
>  
> +//
> +// QemuRamfb Device Path structure
> +//
> +#pragma pack (1)
> +typedef struct {
> +  VENDOR_DEVICE_PATH        Vendor;
> +  ACPI_ADR_DEVICE_PATH      AcpiAdr;
> +  EFI_DEVICE_PATH_PROTOCOL  End;
> +} VENDOR_RAMFB_DEVICE_PATH;
> +#pragma pack ()
> +
>  ACPI_HID_DEVICE_PATH       gPnpPs2KeyboardDeviceNode  = gPnpPs2Keyboard;
>  ACPI_HID_DEVICE_PATH       gPnp16550ComPortDeviceNode = gPnp16550ComPort;
>  UART_DEVICE_PATH           gUartDeviceNode            = gUart;
> @@ -100,6 +112,41 @@ STATIC USB_KEYBOARD_DEVICE_PATH gUsbKeyboardDevicePath = {
>    gEndEntire
>  };
>  
> +STATIC VENDOR_RAMFB_DEVICE_PATH gQemuRamfbDevicePath = {
> +  {
> +    {
> +      HARDWARE_DEVICE_PATH,
> +      HW_VENDOR_DP,
> +      {
> +        (UINT8) (sizeof (VENDOR_DEVICE_PATH)),
> +        (UINT8) ((sizeof (VENDOR_DEVICE_PATH)) >> 8)
> +      }
> +    },
> +    QEMU_RAMFB_GUID,
> +  },
> +  {
> +    {
> +      ACPI_DEVICE_PATH,
> +      ACPI_ADR_DP,
> +      {
> +        (UINT8) (sizeof (ACPI_ADR_DEVICE_PATH)),
> +        (UINT8) ((sizeof (ACPI_ADR_DEVICE_PATH)) >> 8)
> +      }
> +    },
> +    ACPI_DISPLAY_ADR (
> +      1,                                       // DeviceIdScheme
> +      0,                                       // HeadId
> +      0,                                       // NonVgaOutput
> +      1,                                       // BiosCanDetect
> +      0,                                       // VendorInfo
> +      ACPI_ADR_DISPLAY_TYPE_EXTERNAL_DIGITAL,  // Type
> +      0,                                       // Port
> +      0                                        // Index
> +      ),
> +  },
> +  gEndEntire
> +};
> +
>  //
>  // Predefined platform default console device path
>  //
> @@ -113,6 +160,10 @@ PLATFORM_CONSOLE_CONNECT_ENTRY   gPlatformConsole[] = {
>      CONSOLE_IN
>    },
>    {
> +    (EFI_DEVICE_PATH_PROTOCOL *)&gQemuRamfbDevicePath,
> +    CONSOLE_OUT
> +  },
> +  {
>      NULL,
>      0
>    }
> 

Reviewed-by: Laszlo Ersek <lersek@redhat.com>


  reply	other threads:[~2018-06-12 15:57 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-12  9:31 [PATCH v2 0/4] Add QemuRamfbDxe driver Gerd Hoffmann
2018-06-12  9:31 ` [PATCH v2 1/4] OvmfPkg: add QEMU_RAMFB_GUID Gerd Hoffmann
2018-06-12 15:46   ` Laszlo Ersek
2018-06-12  9:31 ` [PATCH v2 2/4] OvmfPkg: add QemuRamfbDxe Gerd Hoffmann
2018-06-12 17:50   ` Laszlo Ersek
2018-06-12  9:31 ` [PATCH v2 3/4] OvmfPkg: add QemuRamfb to platform console Gerd Hoffmann
2018-06-12 15:57   ` Laszlo Ersek [this message]
2018-06-12  9:31 ` [PATCH v2 4/4] ArmVirtPkg: add QemuRamfbDxe Gerd Hoffmann
2018-06-12 15:59   ` Laszlo Ersek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d65eaa56-2826-93a3-dc86-4460e50b0e77@redhat.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox