);\r
\r
AcpiEx->HID = EisaIdFromText (HIDStr);\r
- AcpiEx->CID = EisaIdFromText (CIDStr);\r
+ //\r
+ // According to UEFI spec, the CID parametr is optional and has a default value of 0.\r
+ // So when the CID parametr is not specified or specified as 0 in the text device node.\r
+ // Set the CID to 0 in the ACPI extension device path structure.\r
+ //\r
+ if (*CIDStr == L'\0' || *CIDStr == L'0') {\r
+ AcpiEx->CID = 0;\r
+ } else {\r
+ AcpiEx->CID = EisaIdFromText (CIDStr);\r
+ }\r
AcpiEx->UID = 0;\r
\r
AsciiStr = (CHAR8 *) ((UINT8 *)AcpiEx + sizeof (ACPI_EXTENDED_HID_DEVICE_PATH));\r