diff --git a/source/components/resources/rsinfo.c b/source/components/resources/rsinfo.c index 5fca428e3..9fc3dba71 100644 --- a/source/components/resources/rsinfo.c +++ b/source/components/resources/rsinfo.c @@ -173,7 +173,7 @@ ACPI_RSCONVERT_INFO *AcpiGbl_GetResourceDispatch[] = AcpiRsConvertEndDpf, /* 0x07, ACPI_RESOURCE_NAME_END_DEPENDENT */ AcpiRsConvertIo, /* 0x08, ACPI_RESOURCE_NAME_IO */ AcpiRsConvertFixedIo, /* 0x09, ACPI_RESOURCE_NAME_FIXED_IO */ - NULL, /* 0x0A, Reserved */ + NULL, /* 0x0A, ACPI_RESOURCE_NAME_FIXED_DMA */ NULL, /* 0x0B, Reserved */ NULL, /* 0x0C, Reserved */ NULL, /* 0x0D, Reserved */ @@ -193,7 +193,10 @@ ACPI_RSCONVERT_INFO *AcpiGbl_GetResourceDispatch[] = AcpiRsConvertAddress16, /* 0x08, ACPI_RESOURCE_NAME_ADDRESS16 */ AcpiRsConvertExtIrq, /* 0x09, ACPI_RESOURCE_NAME_EXTENDED_IRQ */ AcpiRsConvertAddress64, /* 0x0A, ACPI_RESOURCE_NAME_ADDRESS64 */ - AcpiRsConvertExtAddress64 /* 0x0B, ACPI_RESOURCE_NAME_EXTENDED_ADDRESS64 */ + AcpiRsConvertExtAddress64, /* 0x0B, ACPI_RESOURCE_NAME_EXTENDED_ADDRESS64 */ + NULL, /* 0x0C, ACPI_RESOURCE_NAME_GPIO */ + NULL, /* 0x0D, Reserved */ + NULL /* 0x0E, ACPI_RESOURCE_NAME_SERIAL_BUS */ }; diff --git a/source/components/utilities/utresrc.c b/source/components/utilities/utresrc.c index 2d7290bc6..36914177f 100644 --- a/source/components/utilities/utresrc.c +++ b/source/components/utilities/utresrc.c @@ -118,6 +118,7 @@ #include "acpi.h" #include "accommon.h" +#include "acresrc.h" #include "amlresrc.h" @@ -647,13 +648,27 @@ AcpiUtValidateResource ( ((ResourceType & ACPI_RESOURCE_NAME_SMALL_MASK) >> 3); } - /* Check validity of the resource type, zero indicates name is invalid */ - + /* + * Check validity of the resource type, via AcpiGbl_ResourceTypes. Zero + * indicates an invalid resource. + */ if (!AcpiGbl_ResourceTypes[ResourceIndex]) { return (AE_AML_INVALID_RESOURCE_TYPE); } +#ifndef ACPI_ASL_COMPILER + /* + * Via AcpiGbl_GetResourceDispatch, ensure that the resource type is not + * "reserved" or not supported by the Resource Manager code. NULL + * indicates an invalid resource. This is essentially a "double check" + * to make sure that we have a valid dispatch table for the resource. + */ + if (!AcpiGbl_GetResourceDispatch[ResourceIndex]) + { + return (AE_AML_INVALID_RESOURCE_TYPE); + } +#endif /* * 2) Validate the ResourceLength field. This ensures that the length