- Update for new NFIT table GUIDs.

- Fix ill-formed GUID strings for NFIT tables.
- Fix a possible fault when performing a UUID search.

https://github.com/acpica/acpica/commit/83727be
https://github.com/acpica/acpica/commit/6005294
https://github.com/acpica/acpica/commit/4a1cca9
This commit is contained in:
jkim 2015-06-03 19:27:36 +00:00
parent 10842bd3d0
commit 9f0cd39e7c
3 changed files with 91 additions and 45 deletions

View File

@ -43,6 +43,7 @@
#include "acpi.h"
#include "accommon.h"
#include "acuuid.h"
#define _COMPONENT ACPI_UTILITIES
ACPI_MODULE_NAME ("ahuuids")
@ -52,44 +53,36 @@
*/
const AH_UUID AcpiUuids[] =
{
{"PCI Host Bridge Device",
"33db4d5b-1ff7-401c-9657-7441c03dd766"},
{"[Controllers]", NULL},
{"GPIO Controller", UUID_GPIO_CONTROLLER},
{"USB Controller", UUID_USB_CONTROLLER},
{"SATA Controller", UUID_SATA_CONTROLLER},
{"Platform-wide Capabilities",
"0811b06e-4a27-44f9-8d60-3cbbc22e7b48"},
{"[Devices]", NULL},
{"PCI Host Bridge Device", UUID_PCI_HOST_BRIDGE},
{"HID I2C Device", UUID_I2C_DEVICE},
{"Power Button Device", UUID_POWER_BUTTON},
{"Dynamic Enumeration",
"d8c1a3a6-be9b-4c9b-91bf-c3cb81fc5daf"},
{"[Interfaces]", NULL},
{"Device Labeling Interface", UUID_DEVICE_LABELING},
{"Physical Presence Interface", UUID_PHYSICAL_PRESENCE},
{"GPIO Controller",
"4f248f40-d5e2-499f-834c-27758ea1cd3f"},
{"[Non-volatile DIMM and NFIT table]", NULL},
{"Volatile Memory Region", UUID_VOLATILE_MEMORY},
{"Persistent Memory Region", UUID_PERSISTENT_MEMORY},
{"NVDIMM Control Region", UUID_CONTROL_REGION},
{"NVDIMM Data Region", UUID_DATA_REGION},
{"Volatile Virtual Disk", UUID_VOLATILE_VIRTUAL_DISK},
{"Volatile Virtual CD", UUID_VOLATILE_VIRTUAL_CD},
{"Persistent Virtual Disk", UUID_PERSISTENT_VIRTUAL_DISK},
{"Persistent Virtual CD", UUID_PERSISTENT_VIRTUAL_CD},
{"Battery Thermal Limit",
"4c2067e3-887d-475c-9720-4af1d3ed602e"},
{"Thermal Extensions",
"14d399cd-7a27-4b18-8fb4-7cb7b9f4e500"},
{"USB Controller",
"ce2ee385-00e6-48cb-9f05-2edb927c4899"},
{"HID I2C Device",
"3cdff6f7-4267-4555-ad05-b30a3d8938de"},
{"Power Button Device",
"dfbcf3c5-e7a5-44e6-9c1f-29c76f6e059c"},
{"Device Labeling Interface",
"e5c937d0-3553-4d7a-9117-ea4d19c3434d"},
{"SATA Controller",
"e4db149b-fcfe-425b-a6d8-92357d78fc7f"},
{"Physical Presence Interface",
"3dddfaa6-361b-4eb4-a424-8d10089d1653"},
{"Device Properties for _DSD",
"daffd814-6eba-4d8c-8a91-bc9bbf4aa301"},
{"[Miscellaneous]", NULL},
{"Platform-wide Capabilities", UUID_PLATFORM_CAPABILITIES},
{"Dynamic Enumeration", UUID_DYNAMIC_ENUMERATION},
{"Battery Thermal Limit", UUID_BATTERY_THERMAL_LIMIT},
{"Thermal Extensions", UUID_THERMAL_EXTENSIONS},
{"Device Properties for _DSD", UUID_DEVICE_PROPERTIES},
{NULL, NULL}
};
@ -120,6 +113,13 @@ AcpiAhMatchUuid (
for (Info = AcpiUuids; Info->Description; Info++)
{
/* Null string means desciption is a UUID class */
if (!Info->String)
{
continue;
}
AcpiUtConvertStringToUuid (Info->String, UuidBuffer);
if (!ACPI_MEMCMP (Data, UuidBuffer, UUID_BUFFER_LENGTH))

View File

@ -50,15 +50,41 @@
* Note2: This file is standalone and should remain that way.
*/
/* NFIT/NVDIMM */
/* Controllers */
#define UUID_GPIO_CONTROLLER "4f248f40-d5e2-499f-834c-27758ea1cd3f"
#define UUID_USB_CONTROLLER "ce2ee385-00e6-48cb-9f05-2edb927c4899"
#define UUID_SATA_CONTROLLER "e4db149b-fcfe-425b-a6d8-92357d78fc7f"
/* Devices */
#define UUID_PCI_HOST_BRIDGE "33db4d5b-1ff7-401c-9657-7441c03dd766"
#define UUID_I2C_DEVICE "3cdff6f7-4267-4555-ad05-b30a3d8938de"
#define UUID_POWER_BUTTON "dfbcf3c5-e7a5-44e6-9c1f-29c76f6e059c"
/* Interfaces */
#define UUID_DEVICE_LABELING "e5c937d0-3553-4d7a-9117-ea4d19c3434d"
#define UUID_PHYSICAL_PRESENCE "3dddfaa6-361b-4eb4-a424-8d10089d1653"
/* NVDIMM - NFIT table */
#define UUID_VOLATILE_MEMORY "7305944f-fdda-44e3-b16c-3f22d252e5d0"
#define UUID_PERSISTENT_MEMORY "66f0d379-b4f3-4074-ac43-0d3318b78cdb"
#define UUID_CONTROL_REGION "92f701f6-13b4-405d-910b-299367e8234c"
#define UUID_DATA_REGION "91af0530-5d86-470e-a6b0-0a2db9408249"
#define UUID_VOLATILE_VIRTUAL_DISK "77ab535a-45fc-624b-5560-f7b281d1f96e"
#define UUID_VOLATILE_VIRTUAL_CD "3d5abd30-4175-87ce-6d64-d2ade523c4bb"
#define UUID_PERSISTENT_VIRTUAL_DISK "5cea02c9-4d07-69d3-269f-4496fbe096f9"
#define UUID_PERSISTENT_VIRTUAL_CD "08018188-42cd-bb48-100f-5387d53ded3d"
/* Miscellaneous */
#define UUID_PLATFORM_CAPABILITIES "0811b06e-4a27-44f9-8d60-3cbbc22e7b48"
#define UUID_DYNAMIC_ENUMERATION "d8c1a3a6-be9b-4c9b-91bf-c3cb81fc5daf"
#define UUID_BATTERY_THERMAL_LIMIT "4c2067e3-887d-475c-9720-4af1d3ed602e"
#define UUID_THERMAL_EXTENSIONS "14d399cd-7a27-4b18-8fb4-7cb7b9f4e500"
#define UUID_DEVICE_PROPERTIES "daffd814-6eba-4d8c-8a91-bc9bbf4aa301"
#define UUID_VOLATILE_MEMORY "4F940573-DAFD-E344-B16C-3F22D252E5D0"
#define UUID_PERSISTENT_MEMORY "79D3F066-F3B4-7440-AC43-0D3318B78CDB"
#define UUID_CONTROL_REGION "F601F792-B413-5D40-910B-299367E8234C"
#define UUID_DATA_REGION "3005AF91-865D-0E47-A6B0-0A2DB9408249"
#define UUID_VOLATILE_VIRTUAL_DISK "5A53AB77-FC45-4B62-5560-F7B281D1F96E"
#define UUID_VOLATILE_VIRTUAL_CD "30BD5A3D-7541-CE87-6D64-D2ADE523C4BB"
#define UUID_PERSISTENT_VIRTUAL_DISK "C902EA5C-074D-69D3-269F-4496FBE096F9"
#define UUID_PERSISTENT_VIRTUAL_CD "88810108-CD42-48BB-100F-5387D53DED3D"
#endif /* __AUUID_H__ */

View File

@ -912,12 +912,32 @@ AhDisplayUuids (
const AH_UUID *Info;
printf ("ACPI-related UUIDs:\n\n");
printf ("ACPI-related UUIDs/GUIDs:\n");
/* Display entire table of known ACPI-related UUIDs/GUIDs */
for (Info = AcpiUuids; Info->Description; Info++)
{
printf ("%32s : %s\n", Info->Description, Info->String);
if (!Info->String) /* Null UUID string means group description */
{
printf ("\n%36s\n", Info->Description);
}
else
{
printf ("%32s : %s\n", Info->Description, Info->String);
}
}
/* Help info on how UUIDs/GUIDs strings are encoded */
printf ("\n\nByte encoding of UUID/GUID strings"
" into ACPI Buffer objects (use ToUUID from ASL):\n\n");
printf ("%32s : %s\n", "Input UUID/GUID String format",
"aabbccdd-eeff-gghh-iijj-kkllmmnnoopp");
printf ("%32s : %s\n", "Expected output ACPI buffer",
"dd,cc,bb,aa, ff,ee, hh,gg, ii,jj, kk,ll,mm,nn,oo,pp");
}