summaryrefslogtreecommitdiff
path: root/OptionRomPkg/CirrusLogic5430Dxe/CirrusLogic5430.h
diff options
context:
space:
mode:
authorvanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524>2008-01-03 06:44:03 +0000
committervanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524>2008-01-03 06:44:03 +0000
commit31f9e631176ef02829edcb537ec5caf04026c3f2 (patch)
treea9dadefcb240ef2830e33edbb1e4fdc29ebf9049 /OptionRomPkg/CirrusLogic5430Dxe/CirrusLogic5430.h
parentb7bef2a9fb22c891eb2a8284132bf67574d82839 (diff)
downloadedk2-31f9e631176ef02829edcb537ec5caf04026c3f2.zip
edk2-31f9e631176ef02829edcb537ec5caf04026c3f2.tar.gz
edk2-31f9e631176ef02829edcb537ec5caf04026c3f2.tar.bz2
1. add DxeI2c Library in OptionRomPkg.
2. produce EFI_EDID_DISCOVERED_PROTOCOL and EFI_EDID_ACTIVE_PROTOCOL in CirrusLogic5430 module. 3. consume EFI_OVERRIDE_PROTOCOL in CirrusLogic5430 module. 4. setup video mode according to EDID information in CirrusLogic5430 module. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4479 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'OptionRomPkg/CirrusLogic5430Dxe/CirrusLogic5430.h')
-rw-r--r--OptionRomPkg/CirrusLogic5430Dxe/CirrusLogic5430.h31
1 files changed, 30 insertions, 1 deletions
diff --git a/OptionRomPkg/CirrusLogic5430Dxe/CirrusLogic5430.h b/OptionRomPkg/CirrusLogic5430Dxe/CirrusLogic5430.h
index 719cf7c..f7d9282 100644
--- a/OptionRomPkg/CirrusLogic5430Dxe/CirrusLogic5430.h
+++ b/OptionRomPkg/CirrusLogic5430Dxe/CirrusLogic5430.h
@@ -1,7 +1,7 @@
/** @file
Cirrus Logic 5430 Controller Driver
- Copyright (c) 2006, Intel Corporation
+ Copyright (c) 2006 - 2007, Intel Corporation
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -25,6 +25,10 @@
#include <Protocol/GraphicsOutput.h>
#include <Protocol/PciIo.h>
#include <Protocol/DriverSupportedEfiVersion.h>
+#include <Protocol/EdidOverride.h>
+#include <Protocol/EdidDiscovered.h>
+#include <Protocol/EdidActive.h>
+#include <Protocol/DevicePath.h>
#include <Library/DebugLib.h>
#include <Library/UefiDriverEntryPoint.h>
@@ -32,6 +36,9 @@
#include <Library/PcdLib.h>
#include <Library/MemoryAllocationLib.h>
#include <Library/UefiBootServicesTableLib.h>
+#include <Library/BaseMemoryLib.h>
+#include <Library/DevicePathLib.h>
+#include <Library/DxeI2cLib.h>
#include <IndustryStandard/pci22.h>
//
@@ -48,6 +55,7 @@
#define CIRRUS_LOGIC_5430_MODE_COUNT 3
typedef struct {
+ UINT32 ModeNumber;
UINT32 HorizontalResolution;
UINT32 VerticalResolution;
UINT32 ColorDepth;
@@ -68,6 +76,10 @@ typedef struct {
UINT64 OriginalPciAttributes;
EFI_UGA_DRAW_PROTOCOL UgaDraw;
EFI_GRAPHICS_OUTPUT_PROTOCOL GraphicsOutput;
+ EFI_EDID_DISCOVERED_PROTOCOL EdidDiscovered;
+ EFI_EDID_ACTIVE_PROTOCOL EdidActive;
+ EFI_DEVICE_PATH_PROTOCOL *GopDevicePath;
+ EFI_DEVICE_PATH_PROTOCOL *UgaDevicePath;
UINTN CurrentMode;
UINTN MaxMode;
CIRRUS_LOGIC_5430_MODE_DATA ModeData[CIRRUS_LOGIC_5430_MODE_COUNT];
@@ -128,6 +140,18 @@ extern EFI_DRIVER_SUPPORTED_EFI_VERSION_PROTOCOL gCirrusLogic5430DriverSupporte
#define PALETTE_INDEX_REGISTER 0x3c8
#define PALETTE_DATA_REGISTER 0x3c9
+#define ACPI_ADR_DISPLAY_TYPE_VGA 1
+
+#define ACPI_DISPLAY_ADR(_DeviceIdScheme, _HeadId, _NonVgaOutput, _BiosCanDetect, _VendorInfo, _Type, _Port, _Index) \
+ ((UINT32) ( (((_DeviceIdScheme) & 0x1) << 31) | \
+ (((_HeadId) & 0x7) << 18) | \
+ (((_NonVgaOutput) & 0x1) << 17) | \
+ (((_BiosCanDetect) & 0x1) << 16) | \
+ (((_VendorInfo) & 0xf) << 12) | \
+ (((_Type) & 0xf) << 8) | \
+ (((_Port) & 0xf) << 4) | \
+ ((_Index) & 0xf) ))
+
//
// UGA Draw Hardware abstraction internal worker functions
//
@@ -407,4 +431,9 @@ inw (
UINTN Address
);
+EFI_STATUS
+CirrusLogic5430VideoModeSetup (
+ CIRRUS_LOGIC_5430_PRIVATE_DATA *Private
+ );
+
#endif