diff options
author | jljusten <jljusten@6f19259b-4bc3-4df7-8a09-765794883524> | 2012-11-27 19:11:11 +0000 |
---|---|---|
committer | jljusten <jljusten@6f19259b-4bc3-4df7-8a09-765794883524> | 2012-11-27 19:11:11 +0000 |
commit | 212aac55fd13e985cebf88042f40479c01ac2e44 (patch) | |
tree | bcd42f5b5525bc76b3c86fd6825b45a4a0b77f6f /OvmfPkg/QemuVideoDxe/Qemu.h | |
parent | 8e4585bb6cdd32d7586de48662cd0aba69cbea58 (diff) | |
download | edk2-212aac55fd13e985cebf88042f40479c01ac2e44.tar.gz edk2-212aac55fd13e985cebf88042f40479c01ac2e44.tar.bz2 edk2-212aac55fd13e985cebf88042f40479c01ac2e44.zip |
QemuVideo: prepare to support more hardware
Move to a table-driven hardware detection. Add a table with PCI IDs,
card name and variant enum. Use the table for hardware detection and
initialization. Rename Cirrus-specific data and code to carry "cirrus"
in the name.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13967 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'OvmfPkg/QemuVideoDxe/Qemu.h')
-rw-r--r-- | OvmfPkg/QemuVideoDxe/Qemu.h | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/OvmfPkg/QemuVideoDxe/Qemu.h b/OvmfPkg/QemuVideoDxe/Qemu.h index 1c24a58bd5..f294901fa6 100644 --- a/OvmfPkg/QemuVideoDxe/Qemu.h +++ b/OvmfPkg/QemuVideoDxe/Qemu.h @@ -86,6 +86,18 @@ typedef struct { //
#define QEMU_VIDEO_PRIVATE_DATA_SIGNATURE SIGNATURE_32 ('Q', 'V', 'I', 'D')
+typedef enum {
+ QEMU_VIDEO_CIRRUS_5430 = 1,
+ QEMU_VIDEO_CIRRUS_5446,
+} QEMU_VIDEO_VARIANT;
+
+typedef struct {
+ UINT16 VendorId;
+ UINT16 DeviceId;
+ QEMU_VIDEO_VARIANT Variant;
+ CHAR16 *Name;
+} QEMU_VIDEO_CARD;
+
typedef struct {
UINT64 Signature;
EFI_HANDLE Handle;
@@ -98,6 +110,7 @@ typedef struct { QEMU_VIDEO_MODE_DATA *ModeData;
UINT8 *LineBuffer;
BOOLEAN HardwareNeedsStarting;
+ QEMU_VIDEO_VARIANT Variant;
} QEMU_VIDEO_PRIVATE_DATA;
///
@@ -111,7 +124,7 @@ typedef struct { UINT8 *CrtcSettings;
UINT16 *SeqSettings;
UINT8 MiscSetting;
-} QEMU_VIDEO_VIDEO_MODES;
+} QEMU_VIDEO_CIRRUS_MODES;
#define QEMU_VIDEO_PRIVATE_DATA_FROM_GRAPHICS_OUTPUT_THIS(a) \
CR(a, QEMU_VIDEO_PRIVATE_DATA, GraphicsOutput, QEMU_VIDEO_PRIVATE_DATA_SIGNATURE)
@@ -128,7 +141,7 @@ extern UINT8 Crtc_800_600_256_60[]; extern UINT16 Seq_800_600_256_60[];
extern UINT8 Crtc_1024_768_256_60[];
extern UINT16 Seq_1024_768_256_60[];
-extern QEMU_VIDEO_VIDEO_MODES QemuVideoVideoModes[];
+extern QEMU_VIDEO_CIRRUS_MODES QemuVideoCirrusModes[];
extern EFI_DRIVER_BINDING_PROTOCOL gQemuVideoDriverBinding;
extern EFI_COMPONENT_NAME_PROTOCOL gQemuVideoComponentName;
extern EFI_COMPONENT_NAME2_PROTOCOL gQemuVideoComponentName2;
@@ -358,9 +371,9 @@ QemuVideoComponentNameGetControllerName ( // Local Function Prototypes
//
VOID
-InitializeGraphicsMode (
+InitializeCirrusGraphicsMode (
QEMU_VIDEO_PRIVATE_DATA *Private,
- QEMU_VIDEO_VIDEO_MODES *ModeData
+ QEMU_VIDEO_CIRRUS_MODES *ModeData
);
VOID
@@ -411,7 +424,7 @@ inw ( );
EFI_STATUS
-QemuVideoVideoModeSetup (
+QemuVideoCirrusModeSetup (
QEMU_VIDEO_PRIVATE_DATA *Private
);
|