@@ -40,20 +40,17 @@ static int __init acpi_iomem_deny_access(struct domain *d)
/* TODO: Deny MMIO access for SMMU, GIC ITS */
status = acpi_get_table(ACPI_SIG_SPCR, 0,
- (struct acpi_table_header **)&spcr);
-
- if ( ACPI_FAILURE(status) )
+ (struct acpi_table_header **)&spcr);
+ /* SPCR may not set when the UEFI uses graphical console. */
+ if ( ACPI_SUCCESS(status) )
{
- printk("Failed to get SPCR table\n");
- return -EINVAL;
+ mfn = spcr->serial_port.address >> PAGE_SHIFT;
+ /* Deny MMIO access for UART */
+ rc = iomem_deny_access(d, mfn, mfn + 1);
+ if ( rc )
+ return rc;
}
- mfn = spcr->serial_port.address >> PAGE_SHIFT;
- /* Deny MMIO access for UART */
- rc = iomem_deny_access(d, mfn, mfn + 1);
- if ( rc )
- return rc;
-
/* Deny MMIO access for GIC regions */
return gic_iomem_deny_access(d);
}
Since there is a case that UEFI (EDK2) doesn't make the SPCR table when it is booted with graphic console, ignore it if SPCR doesn't exist. Signed-off-by: Masami Hiramatsu <masami.hiramatsu@linaro.org> --- xen/arch/arm/acpi/domain_build.c | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-)