summaryrefslogtreecommitdiff
path: root/Protocol/VgaMiniPort
diff options
context:
space:
mode:
authorraywu <raywu0301@gmail.com>2018-06-15 00:00:50 +0800
committerraywu <raywu0301@gmail.com>2018-06-15 00:00:50 +0800
commitb7c51c9cf4864df6aabb99a1ae843becd577237c (patch)
treeeebe9b0d0ca03062955223097e57da84dd618b9a /Protocol/VgaMiniPort
downloadzprj-b7c51c9cf4864df6aabb99a1ae843becd577237c.tar.xz
init. 1AQQW051HEADmaster
Diffstat (limited to 'Protocol/VgaMiniPort')
-rw-r--r--Protocol/VgaMiniPort/VgaMiniPort.c36
-rw-r--r--Protocol/VgaMiniPort/VgaMiniPort.h78
2 files changed, 114 insertions, 0 deletions
diff --git a/Protocol/VgaMiniPort/VgaMiniPort.c b/Protocol/VgaMiniPort/VgaMiniPort.c
new file mode 100644
index 0000000..e03e092
--- /dev/null
+++ b/Protocol/VgaMiniPort/VgaMiniPort.c
@@ -0,0 +1,36 @@
+/*++
+ This file contains 'Framework Code' and is licensed as such
+ under the terms of your license agreement with Intel or your
+ vendor. This file may not be modified, except as allowed by
+ additional terms of your license agreement.
+--*/
+/*
+
+Copyright (c) 1999 - 2002 Intel Corporation. All rights reserved
+This software and associated documentation (if any) is furnished
+under a license and may only be used or copied in accordance
+with the terms of the license. Except as permitted by such
+license, no part of this software or documentation may be
+reproduced, stored in a retrieval system, or transmitted in any
+form or by any means without the express written consent of
+Intel Corporation.
+
+Module Name:
+
+ VgaMiniPort.c
+
+Abstract:
+
+ EFI VGA Mini Port Protocol
+
+Revision History
+
+*/
+
+// GC_TODO: fix comment to start with /*++
+#include "Tiano.h"
+#include EFI_PROTOCOL_DEFINITION (VgaMiniPort)
+
+EFI_GUID gEfiVgaMiniPortProtocolGuid = EFI_VGA_MINI_PORT_PROTOCOL_GUID;
+
+EFI_GUID_STRING(&gEfiVgaMiniPortProtocolGuid, "VGA Mini Port Protocol", "EFI VGA Mini Port Protocol");
diff --git a/Protocol/VgaMiniPort/VgaMiniPort.h b/Protocol/VgaMiniPort/VgaMiniPort.h
new file mode 100644
index 0000000..e21a894
--- /dev/null
+++ b/Protocol/VgaMiniPort/VgaMiniPort.h
@@ -0,0 +1,78 @@
+//
+// This file contains 'Framework Code' and is licensed as such
+// under the terms of your license agreement with Intel or your
+// vendor. This file may not be modified, except as allowed by
+// additional terms of your license agreement.
+//
+/*++
+
+Copyright (c) 1999 - 2002 Intel Corporation. All rights reserved
+This software and associated documentation (if any) is furnished
+under a license and may only be used or copied in accordance
+with the terms of the license. Except as permitted by such
+license, no part of this software or documentation may be
+reproduced, stored in a retrieval system, or transmitted in any
+form or by any means without the express written consent of
+Intel Corporation.
+
+
+Module Name:
+
+ VgaMiniPort.h
+
+Abstract:
+
+ Vga Mini port binding for a VGA controller
+
+Revision History
+
+--*/
+
+#ifndef _VGA_MINI_PORT_H
+#define _VGA_MINI_PORT_H
+
+#define EFI_VGA_MINI_PORT_PROTOCOL_GUID \
+ { \
+ 0xc7735a2f, 0x88f5, 0x4882, 0xae, 0x63, 0xfa, 0xac, 0x8c, 0x8b, 0x86, 0xb3 \
+ }
+
+EFI_FORWARD_DECLARATION (EFI_VGA_MINI_PORT_PROTOCOL);
+
+typedef
+EFI_STATUS
+(EFIAPI *EFI_VGA_MINI_PORT_SET_MODE) (
+ IN EFI_VGA_MINI_PORT_PROTOCOL * This,
+ IN UINTN ModeNumber
+ );
+
+/*++
+
+ Routine Description:
+ Sets the text display mode of a VGA controller
+
+ Arguments:
+ This - Protocol instance pointer.
+ Mode - Mode number. 0 - 80x25 1-80x50
+
+ Returns:
+ EFI_SUCCESS - The mode was set
+ EFI_DEVICE_ERROR - The device is not functioning properly.
+
+--*/
+typedef struct _EFI_VGA_MINI_PORT_PROTOCOL {
+ EFI_VGA_MINI_PORT_SET_MODE SetMode;
+
+ UINT64 VgaMemoryOffset;
+ UINT64 CrtcAddressRegisterOffset;
+ UINT64 CrtcDataRegisterOffset;
+
+ UINT8 VgaMemoryBar;
+ UINT8 CrtcAddressRegisterBar;
+ UINT8 CrtcDataRegisterBar;
+
+ UINT8 MaxMode;
+} EFI_VGA_MINI_PORT_PROTOCOL;
+
+extern EFI_GUID gEfiVgaMiniPortProtocolGuid;
+
+#endif