[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [Patch 2/4] x86/hpet: Sanitise HPET ACPI table and warn about multiple tables
Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> CC: Keir Fraser <keir@xxxxxxx> CC: Jan Beulich <JBeulich@xxxxxxxx> --- xen/arch/x86/acpi/boot.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/xen/arch/x86/acpi/boot.c b/xen/arch/x86/acpi/boot.c index 0e1d570..1f6cbe6 100644 --- a/xen/arch/x86/acpi/boot.c +++ b/xen/arch/x86/acpi/boot.c @@ -276,6 +276,21 @@ static int __init acpi_parse_hpet(struct acpi_table_header *table) return -1; } + if ( !hpet_tbl->address.address || !(hpet_tbl->address.address + 1) ) + { + printk(KERN_WARNING PREFIX "Bad HPET address %#lx\n", + hpet_tbl->address.address); + return -1; + } + + /* + * Hopefully someone might implement multiple HPET support in Xen. + * Until then, warn the user if multiple HPET tables are found. + */ + if ( hpet_address ) + printk(KERN_WARNING PREFIX + "Xen only supports one HPET - Using latest table\n"); + hpet_address = hpet_tbl->address.address; hpet_blockid = hpet_tbl->sequence; printk(KERN_INFO PREFIX "HPET id: %#x base: %#lx\n", -- 1.7.10.4 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |