Hi,
Thank you for the patch. FIY I tweak a bit the commit title before
committing.
The title is now: "xen/arm: acpi: Don't fail it SPCR table is absent".
Cheers,
On 21/10/2020 23:12, Elliott Mitchell wrote:
Absence of a SPCR table likely means the console is a framebuffer. In
such case acpi_iomem_deny_access() should NOT fail.
Signed-off-by: Elliott Mitchell <ehem+...@m5p.com>
---
xen/arch/arm/acpi/domain_build.c | 19 ++++++++++---------
1 file changed, 10 insertions(+), 9 deletions(-)
diff --git a/xen/arch/arm/acpi/domain_build.c b/xen/arch/arm/acpi/domain_build.c
index 1b1cfabb00..bbdc90f92c 100644
--- a/xen/arch/arm/acpi/domain_build.c
+++ b/xen/arch/arm/acpi/domain_build.c
@@ -42,17 +42,18 @@ static int __init acpi_iomem_deny_access(struct domain *d)
status = acpi_get_table(ACPI_SIG_SPCR, 0,
(struct acpi_table_header **)&spcr);
- if ( ACPI_FAILURE(status) )
+ 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;
+ }
+ else
+ {
+ printk("Failed to get SPCR table, Xen console may be unavailable\n");
}
-
- 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);
--
Julien Grall