summaryrefslogtreecommitdiff
path: root/EdkNt32Pkg/Library
diff options
context:
space:
mode:
authorwuyizhong <wuyizhong@6f19259b-4bc3-4df7-8a09-765794883524>2006-12-26 02:26:02 +0000
committerwuyizhong <wuyizhong@6f19259b-4bc3-4df7-8a09-765794883524>2006-12-26 02:26:02 +0000
commit72b695f33b0f5056ad4706f65e50fbdda7406fe5 (patch)
treee380e3113ac11b302a0ff28eba2e3e3ac209b9eb /EdkNt32Pkg/Library
parent7432a2144462a36cd8a613a5620963152f03a3f9 (diff)
downloadedk2-platforms-72b695f33b0f5056ad4706f65e50fbdda7406fe5.tar.xz
Migrate GOP driver from R8.6 for NT32. Add a new PCD "PcdWinNtGop". Setting NT32 platform using GOP driver instead of UGA driver.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2137 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'EdkNt32Pkg/Library')
-rw-r--r--EdkNt32Pkg/Library/EdkGenericBdsLib/BdsBoot.c6
-rw-r--r--EdkNt32Pkg/Library/EdkGenericBdsLib/DevicePath.c143
2 files changed, 147 insertions, 2 deletions
diff --git a/EdkNt32Pkg/Library/EdkGenericBdsLib/BdsBoot.c b/EdkNt32Pkg/Library/EdkGenericBdsLib/BdsBoot.c
index 05e1b26348..3963dbcd54 100644
--- a/EdkNt32Pkg/Library/EdkGenericBdsLib/BdsBoot.c
+++ b/EdkNt32Pkg/Library/EdkGenericBdsLib/BdsBoot.c
@@ -158,9 +158,11 @@ Returns:
//
return EFI_SUCCESS;
}
-
+ //
+ // Signal the EFI_EVENT_SIGNAL_READY_TO_BOOT event
+ //
EfiSignalEventReadyToBoot ();
-
+
//
// Set Boot Current
//
diff --git a/EdkNt32Pkg/Library/EdkGenericBdsLib/DevicePath.c b/EdkNt32Pkg/Library/EdkGenericBdsLib/DevicePath.c
index de854103cb..094140f14d 100644
--- a/EdkNt32Pkg/Library/EdkGenericBdsLib/DevicePath.c
+++ b/EdkNt32Pkg/Library/EdkGenericBdsLib/DevicePath.c
@@ -27,6 +27,7 @@ EFI_GUID UnknownDeviceGuid = UNKNOWN_DEVICE_GUID;
EFI_GUID mEfiWinNtThunkProtocolGuid = EFI_WIN_NT_THUNK_PROTOCOL_GUID;
EFI_GUID mEfiWinNtUgaGuid = EFI_WIN_NT_UGA_GUID;
+EFI_GUID mEfiWinNtGopGuid = EFI_WIN_NT_GOP_GUID;
EFI_GUID mEfiWinNtSerialPortGuid = EFI_WIN_NT_SERIAL_PORT_GUID;
EFI_GUID mEfiMsgPcAnsiGuid = DEVICE_PATH_MESSAGING_PC_ANSI;
EFI_GUID mEfiMsgVt100Guid = DEVICE_PATH_MESSAGING_VT_100;
@@ -313,6 +314,9 @@ Returns:
} else if (CompareGuid (&Vendor->Guid, &mEfiWinNtUgaGuid)) {
CatPrint (Str, L"%s", L"UGA");
return ;
+ } else if (CompareGuid (&Vendor->Guid, &mEfiWinNtGopGuid)) {
+ CatPrint (Str, L"%s", L"GOP");
+ return ;
} else if (CompareGuid (&Vendor->Guid, &mEfiWinNtSerialPortGuid)) {
CatPrint (Str, L"%s", L"Serial");
return ;
@@ -371,6 +375,139 @@ DevPathAcpi (
}
VOID
+DevPathExtendedAcpi (
+ IN OUT POOL_PRINT *Str,
+ IN VOID *DevPath
+ )
+{
+ ACPI_EXTENDED_HID_DEVICE_PATH *ExtendedAcpi;
+ //
+ // Index for HID, UID and CID strings, 0 for non-exist
+ //
+ UINT16 HIDSTRIdx;
+ UINT16 UIDSTRIdx;
+ UINT16 CIDSTRIdx;
+ UINT16 Index;
+ UINT16 Length;
+ UINT16 Anchor;
+ CHAR8 *AsChar8Array;
+
+ ASSERT (Str != NULL);
+ ASSERT (DevPath != NULL);
+
+ HIDSTRIdx = 0;
+ UIDSTRIdx = 0;
+ CIDSTRIdx = 0;
+ ExtendedAcpi = DevPath;
+ Length = DevicePathNodeLength ((EFI_DEVICE_PATH_PROTOCOL *) ExtendedAcpi);
+
+ ASSERT (Length >= 19);
+ AsChar8Array = (CHAR8 *) ExtendedAcpi;
+
+ //
+ // find HIDSTR
+ //
+ Anchor = 16;
+ for (Index = Anchor; Index < Length && AsChar8Array[Index]; Index++) {
+ ;
+ }
+ if (Index > Anchor) {
+ HIDSTRIdx = Anchor;
+ }
+ //
+ // find UIDSTR
+ //
+ Anchor = Index + 1;
+ for (Index = Anchor; Index < Length && AsChar8Array[Index]; Index++) {
+ ;
+ }
+ if (Index > Anchor) {
+ UIDSTRIdx = Anchor;
+ }
+ //
+ // find CIDSTR
+ //
+ Anchor = Index + 1;
+ for (Index = Anchor; Index < Length && AsChar8Array[Index]; Index++) {
+ ;
+ }
+ if (Index > Anchor) {
+ CIDSTRIdx = Anchor;
+ }
+
+ if (HIDSTRIdx == 0 && CIDSTRIdx == 0 && ExtendedAcpi->UID == 0) {
+ CatPrint (Str, L"AcpiExp(");
+ if ((ExtendedAcpi->HID & PNP_EISA_ID_MASK) == PNP_EISA_ID_CONST) {
+ CatPrint (Str, L"PNP%04x,", EISA_ID_TO_NUM (ExtendedAcpi->HID));
+ } else {
+ CatPrint (Str, L"%08x,", ExtendedAcpi->HID);
+ }
+ if ((ExtendedAcpi->CID & PNP_EISA_ID_MASK) == PNP_EISA_ID_CONST) {
+ CatPrint (Str, L"PNP%04x,", EISA_ID_TO_NUM (ExtendedAcpi->CID));
+ } else {
+ CatPrint (Str, L"%08x,", ExtendedAcpi->CID);
+ }
+ if (UIDSTRIdx != 0) {
+ CatPrint (Str, L"%a)", AsChar8Array + UIDSTRIdx);
+ } else {
+ CatPrint (Str, L"\"\")");
+ }
+ } else {
+ CatPrint (Str, L"AcpiEx(");
+ if ((ExtendedAcpi->HID & PNP_EISA_ID_MASK) == PNP_EISA_ID_CONST) {
+ CatPrint (Str, L"PNP%04x,", EISA_ID_TO_NUM (ExtendedAcpi->HID));
+ } else {
+ CatPrint (Str, L"%08x,", ExtendedAcpi->HID);
+ }
+ if ((ExtendedAcpi->CID & PNP_EISA_ID_MASK) == PNP_EISA_ID_CONST) {
+ CatPrint (Str, L"PNP%04x,", EISA_ID_TO_NUM (ExtendedAcpi->CID));
+ } else {
+ CatPrint (Str, L"%08x,", ExtendedAcpi->CID);
+ }
+ CatPrint (Str, L"%x,", ExtendedAcpi->UID);
+
+ if (HIDSTRIdx != 0) {
+ CatPrint (Str, L"%a,", AsChar8Array + HIDSTRIdx);
+ } else {
+ CatPrint (Str, L"\"\",");
+ }
+ if (CIDSTRIdx != 0) {
+ CatPrint (Str, L"%a,", AsChar8Array + CIDSTRIdx);
+ } else {
+ CatPrint (Str, L"\"\",");
+ }
+ if (UIDSTRIdx != 0) {
+ CatPrint (Str, L"%a)", AsChar8Array + UIDSTRIdx);
+ } else {
+ CatPrint (Str, L"\"\")");
+ }
+ }
+
+}
+
+VOID
+DevPathAdrAcpi (
+ IN OUT POOL_PRINT *Str,
+ IN VOID *DevPath
+ )
+{
+ ACPI_ADR_DEVICE_PATH *AcpiAdr;
+ UINT16 Index;
+ UINT16 Length;
+ UINT16 AdditionalAdrCount;
+
+ AcpiAdr = DevPath;
+ Length = DevicePathNodeLength ((EFI_DEVICE_PATH_PROTOCOL *) AcpiAdr);
+ AdditionalAdrCount = (Length - 8) / 4;
+
+ CatPrint (Str, L"AcpiAdr(%x", AcpiAdr->ADR);
+ for (Index = 0; Index < AdditionalAdrCount; Index++) {
+ CatPrint (Str, L",%x", *(UINT32 *) ((UINT8 *) AcpiAdr + 8 + Index * 4));
+ }
+ CatPrint (Str, L")");
+}
+
+VOID
DevPathAtapi (
IN OUT POOL_PRINT *Str,
IN VOID *DevPath
@@ -783,6 +920,12 @@ DEVICE_PATH_STRING_TABLE DevPathTable[] = {
ACPI_DEVICE_PATH,
ACPI_DP,
DevPathAcpi,
+ ACPI_DEVICE_PATH,
+ ACPI_EXTENDED_DP,
+ DevPathExtendedAcpi,
+ ACPI_DEVICE_PATH,
+ ACPI_ADR_DP,
+ DevPathAdrAcpi,
MESSAGING_DEVICE_PATH,
MSG_ATAPI_DP,
DevPathAtapi,