Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 5 Dec 2002 21:31:59 -0800 (PST)
From:      Marcel Moolenaar <marcel@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 21996 for review
Message-ID:  <200212060531.gB65VxtI091264@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=21996

Change 21996 by marcel@marcel_nfs on 2002/12/05 21:31:16

	Recognize the DIG64 HCDP GUID. While here, dump the GUID if
	we don't recognize it. That way we have something to look
	for. For example: the Itanium prototype has an unknown
	table with GUID e18541cd-f755-4f73-928d-643c8a79b229. Alas,
	not the DIG64 HCDP table I'd hoped for, but then again we
	mostly want that for the HP box (which is running release,
	so I can't check right now :-)

Affected files ...

.. //depot/projects/ia64/sys/boot/efi/loader/main.c#9 edit

Differences ...

==== //depot/projects/ia64/sys/boot/efi/loader/main.c#9 (text+ko) ====

@@ -289,6 +289,18 @@
 COMMAND_SET(configuration, "configuration",
 	    "print configuration tables", command_configuration);
 
+static const char *
+guid_to_string(EFI_GUID *guid)
+{
+	static char buf[40];
+
+	sprintf(buf, "%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x",
+	    guid->Data1, guid->Data2, guid->Data3, guid->Data4[0],
+	    guid->Data4[1], guid->Data4[2], guid->Data4[3], guid->Data4[4],
+	    guid->Data4[5], guid->Data4[6], guid->Data4[7]);
+	return (buf);
+}
+
 static int
 command_configuration(int argc, char *argv[])
 {
@@ -301,25 +313,25 @@
 		static EFI_GUID acpi20 = ACPI_20_TABLE_GUID;
 		static EFI_GUID smbios = SMBIOS_TABLE_GUID;
 		static EFI_GUID sal = SAL_SYSTEM_TABLE_GUID;
-		
+		static EFI_GUID hcdp = HCDP_TABLE_GUID;
+		EFI_GUID *guid;
+
 		printf("  ");
-		if (!memcmp(&ST->ConfigurationTable[i].VendorGuid,
-			    &mps, sizeof(EFI_GUID)))
+		guid = &ST->ConfigurationTable[i].VendorGuid;
+		if (!memcmp(guid, &mps, sizeof(EFI_GUID)))
 			printf("MPS Table");
-		else if (!memcmp(&ST->ConfigurationTable[i].VendorGuid,
-				 &acpi, sizeof(EFI_GUID)))
+		else if (!memcmp(guid, &acpi, sizeof(EFI_GUID)))
 			printf("ACPI Table");
-		else if (!memcmp(&ST->ConfigurationTable[i].VendorGuid,
-				 &acpi20, sizeof(EFI_GUID)))
+		else if (!memcmp(guid, &acpi20, sizeof(EFI_GUID)))
 			printf("ACPI 2.0 Table");
-		else if (!memcmp(&ST->ConfigurationTable[i].VendorGuid,
-				 &smbios, sizeof(EFI_GUID)))
+		else if (!memcmp(guid, &smbios, sizeof(EFI_GUID)))
 			printf("SMBIOS Table");
-		else if (!memcmp(&ST->ConfigurationTable[i].VendorGuid,
-				 &sal, sizeof(EFI_GUID)))
+		else if (!memcmp(guid, &sal, sizeof(EFI_GUID)))
 			printf("SAL System Table");
+		else if (!memcmp(guid, &hcdp, sizeof(EFI_GUID)))
+			printf("DIG64 HCDP Table");
 		else
-			printf("Unknown Table");
+			printf("Unknown Table (%s)", guid_to_string(guid));
 		printf(" at %p\n", ST->ConfigurationTable[i].VendorTable);
 	}
 

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe p4-projects" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200212060531.gB65VxtI091264>