mirror of
https://github.com/acpica/acpica/
synced 2025-02-10 18:44:12 +03:00
ACPI 5.0/ResourceManager: Extend internal table for new descriptor.
Extend the internal dispatch table in preparation for dispatch code for the new resource descriptors. Also, add a double check that the resource indeed has a valid dispatch table in the resource validation code.
This commit is contained in:
parent
8539d18bb5
commit
5c281d515c
@ -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 */
|
||||
};
|
||||
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user