From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=209.132.183.28; helo=mx1.redhat.com; envelope-from=lersek@redhat.com; receiver=edk2-devel@lists.01.org Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 1E81421959CB2 for ; Fri, 9 Nov 2018 11:44:32 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 90D4B2D7E0; Fri, 9 Nov 2018 19:44:31 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-126-98.rdu2.redhat.com [10.10.126.98]) by smtp.corp.redhat.com (Postfix) with ESMTP id D7210600CD; Fri, 9 Nov 2018 19:44:28 +0000 (UTC) From: Laszlo Ersek To: edk2-devel@lists.01.org Cc: Anthony Perard , Ard Biesheuvel , Jordan Justen , Julien Grall , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , yuchenlin Date: Fri, 9 Nov 2018 20:44:16 +0100 Message-Id: <20181109194419.24750-2-lersek@redhat.com> In-Reply-To: <20181109194419.24750-1-lersek@redhat.com> References: <20181109194419.24750-1-lersek@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Fri, 09 Nov 2018 19:44:31 +0000 (UTC) Subject: [PATCH 1/4] Reapply "OvmfPkg: VMWare SVGA display device register definitions" X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Nov 2018 19:44:32 -0000 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 328409ce8de7f318ee9c929b64302bd361cd1dbd, reapplying 9bcca53fe466cdff397578328d9d87d257aba493. Note that the commit now being reverted is technically correct; the only reason we're reverting it is because it should not have been pushed past the Soft Feature Freeze for the edk2-stable201811 tag. Cc: Anthony Perard Cc: Ard Biesheuvel Cc: Jordan Justen Cc: Julien Grall Cc: Philippe Mathieu-Daudé Cc: yuchenlin Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1319 Signed-off-by: Laszlo Ersek --- OvmfPkg/Include/IndustryStandard/VmwareSvga.h | 104 ++++++++++++++++++++ 1 file changed, 104 insertions(+) diff --git a/OvmfPkg/Include/IndustryStandard/VmwareSvga.h b/OvmfPkg/Include/IndustryStandard/VmwareSvga.h new file mode 100644 index 000000000000..693d44bab6c3 --- /dev/null +++ b/OvmfPkg/Include/IndustryStandard/VmwareSvga.h @@ -0,0 +1,104 @@ +/** @file + + Macro and enum definitions of a subset of port numbers, register identifiers + and values required for driving the VMWare SVGA virtual display adapter, + also implemented by Qemu. + + This file's contents was extracted from file lib/vmware/svga_reg.h in commit + 329dd537456f93a806841ec8a8213aed11395def of VMWare's vmware-svga repository: + git://git.code.sf.net/p/vmware-svga/git + + + Copyright 1998-2009 VMware, Inc. All rights reserved. + Portions Copyright 2017 Phil Dennis-Jordan + + Permission is hereby granted, free of charge, to any person + obtaining a copy of this software and associated documentation + files (the "Software"), to deal in the Software without + restriction, including without limitation the rights to use, copy, + modify, merge, publish, distribute, sublicense, and/or sell copies + of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS + BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN + ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. + +**/ + +#ifndef _VMWARE_SVGA_H_ +#define _VMWARE_SVGA_H_ + +#include + +// +// IDs for recognising the device +// +#define VMWARE_PCI_VENDOR_ID_VMWARE 0x15AD +#define VMWARE_PCI_DEVICE_ID_VMWARE_SVGA2 0x0405 + +// +// I/O port BAR offsets for register selection and read/write. +// +// The register index is written to the 32-bit index port, followed by a 32-bit +// read or write on the value port to read or set that register's contents. +// +#define VMWARE_SVGA_INDEX_PORT 0x0 +#define VMWARE_SVGA_VALUE_PORT 0x1 + +// +// Some of the device's register indices for basic framebuffer functionality. +// +typedef enum { + VmwareSvgaRegId = 0, + VmwareSvgaRegEnable = 1, + VmwareSvgaRegWidth = 2, + VmwareSvgaRegHeight = 3, + VmwareSvgaRegMaxWidth = 4, + VmwareSvgaRegMaxHeight = 5, + + VmwareSvgaRegBitsPerPixel = 7, + + VmwareSvgaRegRedMask = 9, + VmwareSvgaRegGreenMask = 10, + VmwareSvgaRegBlueMask = 11, + VmwareSvgaRegBytesPerLine = 12, + + VmwareSvgaRegFbOffset = 14, + + VmwareSvgaRegFbSize = 16, + VmwareSvgaRegCapabilities = 17, + + VmwareSvgaRegHostBitsPerPixel = 28, +} VMWARE_SVGA_REGISTER; + +// +// Values used with VmwareSvgaRegId for sanity-checking the device and getting +// its version. +// +#define VMWARE_SVGA_MAGIC 0x900000U +#define VMWARE_SVGA_MAKE_ID(ver) (VMWARE_SVGA_MAGIC << 8 | (ver)) + +#define VMWARE_SVGA_VERSION_2 2 +#define VMWARE_SVGA_ID_2 VMWARE_SVGA_MAKE_ID (VMWARE_SVGA_VERSION_2) + +#define VMWARE_SVGA_VERSION_1 1 +#define VMWARE_SVGA_ID_1 VMWARE_SVGA_MAKE_ID (VMWARE_SVGA_VERSION_1) + +#define VMWARE_SVGA_VERSION_0 0 +#define VMWARE_SVGA_ID_0 VMWARE_SVGA_MAKE_ID (VMWARE_SVGA_VERSION_0) + +// +// One of the capability bits advertised by VmwareSvgaRegCapabilities. +// +#define VMWARE_SVGA_CAP_8BIT_EMULATION BIT8 + +#endif -- 2.19.1.3.g30247aa5d201