DynamicTablesPkg: add validation for PcdNonBsaCompliant16550SerialHid
According to ACPI 6.4, 6.1.5 _HID states: - A valid PNP ID must be of the form "AAA####" where A is an uppercase letter and # is a hex digit. - A valid ACPI ID must be of the form "NNNN####" where N is an uppercase letter or a digit ('0'-'9') and # is a hex digit. Signed-off-by: Joey Gouly <joey.gouly@arm.com> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
This commit is contained in:
@ -148,6 +148,10 @@ FixupIds (
|
||||
// If there is a non-BSA compliant HID, use that.
|
||||
NonBsaHid = (CONST CHAR8*)PcdGetPtr (PcdNonBsaCompliant16550SerialHid);
|
||||
if ((NonBsaHid != NULL) && (AsciiStrLen (NonBsaHid) != 0)) {
|
||||
if (!(IsValidPnpId (NonBsaHid) || IsValidAcpiId (NonBsaHid))) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
HidString = NonBsaHid;
|
||||
CidString = "";
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user