From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-vk0-x244.google.com (mail-vk0-x244.google.com [IPv6:2607:f8b0:400c:c05::244]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 745D221BC6ADB for ; Sun, 2 Apr 2017 15:49:01 -0700 (PDT) Received: by mail-vk0-x244.google.com with SMTP id d188so15735212vka.3 for ; Sun, 02 Apr 2017 15:49:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=philjordan-eu.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=2DP/ycuABvtCNsNdyBv4vnPPhqawrXNClvY5Dcx8cjI=; b=Kxjyl5N8b/bVvupG1X9vlbJPoFaC3VTH+tLl1JtraggGh/IpR0pe8Qn3rZfaXlCmBX MC0eW/0738lYkfah+Cvm7f1r5bNPNdPUxSDqYFm07Aj/jzS7a9omz+vxrfuc90Lr3FEI 9HyVlCaGRRhJRkPf24RXDTzwAb//PzEcw9unzyT1LSvsqdtZCoS0TGRMpgnaQ9m1xkXB K5LvbWa7uKfzaWkOcvpeVKNYgt72qOzsWAeceNb3p3JHJyjlSx8DXnRyKIfMCVJ9b8M6 3Y0pmfnXIcdri01y09bfEHHNxWoTt+jQeHEpjHI2hamrEGwuBWOKa6/ewGmqQyECZLBT Nk5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=2DP/ycuABvtCNsNdyBv4vnPPhqawrXNClvY5Dcx8cjI=; b=npNvz3MWV0rm5f+4/egjD6UkydkOc5teazwCjekwNSAK4txa+AgdqNlaZNFtLmRB/q HEchUyqGSrk276tSZ8tg4lDsOzFpABSAtP6AwiJiwAUOd0gL3tWqpi5BrYAwnS6wGkXq WUu06IiErE2USaRYpmFNJU3C5LXBM0weRcRwlnKegR25eNLuOGaUyTJV3a8cJehrW+U0 pr9Wbzm/+HZGotcRB6PweBECroL8WFamUfBHtSJDuV7tcfMvQYvyp9KlptMpqnJa65yF b0fnDvnNhQNm3C/si9lrlRlrlr3CPhobQgfOGpZCYHgkXJ9jEHYiElig6SIypC6YALqv wY3Q== X-Gm-Message-State: AFeK/H0+Vv6H5IzsWQTUkktgMdZT/jHbkFaMCVAHSBzGRC1j+6+kNv3Ci0ZIcMSBspHkpzdNtSSqurB9J/EINQ== X-Received: by 10.159.48.81 with SMTP id i17mr7129078uab.65.1491173340153; Sun, 02 Apr 2017 15:49:00 -0700 (PDT) MIME-Version: 1.0 Received: by 10.31.58.83 with HTTP; Sun, 2 Apr 2017 15:48:39 -0700 (PDT) In-Reply-To: <1491173097-37305-1-git-send-email-lists@philjordan.eu> References: <1491173097-37305-1-git-send-email-lists@philjordan.eu> From: Phil Dennis-Jordan Date: Mon, 3 Apr 2017 10:48:39 +1200 Message-ID: To: edk2-devel-01 Subject: Re: [PATCH v2 0/3] OvmfPkg/QemuVideoDxe: Add VMWare SVGA2 framebuffer support X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 02 Apr 2017 22:49:01 -0000 Content-Type: text/plain; charset=UTF-8 Looks like I missed off the branch link, sorry: https://github.com/pmj/edk2/commits/ovmf_vmware_svga2_v2 On Mon, Apr 3, 2017 at 10:44 AM, Phil Dennis-Jordan wrote: > This extends the QemuVideoDxe driver to support the VMWare SVGA2 display > device implemented by Qemu. Drivers for this device exist for guest OSes > which do not support Qemu's other display adapters, so supporting it in > OVMF is useful in conjunction with those OSes. > > I've tried to follow the existing pattern for device-specific code in > OVMF's QemuVideoDxe driver as much as possible, with a minimum of > additional code. > > For the functionality this driver uses, 2 I/O ports are used with > 32-bit wide reads and writes. Unfortunately, one of them is not 32-bit > aligned. This is fine as far as x86/x86-64 is concerned, but neither > EDK2's IoLib nor other platforms support such an access pattern. > This issue was already encountered/discussed on the edk2-devel list 4 > years ago: http://edk2-devel.narkive.com/bwH3r0us/unaligned-i-o > I've therefore added UnalignedIoWrite/Read32() helper functions for > Ia32/X64, which I've based on IoLib's aligned ones. > > v2: > - Unaligned I/O helpers are now in a separate commit. [Laszlo] > - New header file with only essential device constants [Laszlo] > - ArmVirtPkg build failures fixed [Laszlo] > - Code formatting improvements in main driver code. > > Phil Dennis-Jordan (3): > OvmfPkg: VMWare SVGA2 display device register definitions > OvmfPkg/QemuVideoDxe: Helper functions for unaligned port I/O. > OvmfPkg/QemuVideoDxe: VMWare SVGA II device support. > > OvmfPkg/QemuVideoDxe/QemuVideoDxe.inf | 6 ++ > OvmfPkg/Include/IndustryStandard/VMWareSVGA2.h | 102 +++++++++++++++++++ > OvmfPkg/QemuVideoDxe/Qemu.h | 37 +++++++ > OvmfPkg/QemuVideoDxe/UnalignedIoInternal.h | 59 +++++++++++ > OvmfPkg/QemuVideoDxe/Driver.c | 76 ++++++++++++++ > OvmfPkg/QemuVideoDxe/Gop.c | 74 +++++++++++++- > OvmfPkg/QemuVideoDxe/Initialize.c | 107 ++++++++++++++++++++ > OvmfPkg/QemuVideoDxe/UnalignedIoGcc.c | 69 +++++++++++++ > OvmfPkg/QemuVideoDxe/UnalignedIoIcc.c | 79 +++++++++++++++ > OvmfPkg/QemuVideoDxe/UnalignedIoMsc.c | 81 +++++++++++++++ > OvmfPkg/QemuVideoDxe/UnalignedIoUnsupported.c | 65 ++++++++++++ > 11 files changed, 754 insertions(+), 1 deletion(-) > create mode 100644 OvmfPkg/Include/IndustryStandard/VMWareSVGA2.h > create mode 100644 OvmfPkg/QemuVideoDxe/UnalignedIoInternal.h > create mode 100644 OvmfPkg/QemuVideoDxe/UnalignedIoGcc.c > create mode 100644 OvmfPkg/QemuVideoDxe/UnalignedIoIcc.c > create mode 100644 OvmfPkg/QemuVideoDxe/UnalignedIoMsc.c > create mode 100644 OvmfPkg/QemuVideoDxe/UnalignedIoUnsupported.c > > -- > 2.3.2 (Apple Git-55) >