From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Xen-devel <xen-devel@lists.xen.org>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>,
Keir Fraser <keir@xen.org>, Jan Beulich <JBeulich@suse.com>
Subject: [Patch 2/4] x86/hpet: Sanitise HPET ACPI table and warn about multiple tables
Date: Mon, 7 Oct 2013 14:26:19 +0100 [thread overview]
Message-ID: <1381152381-19744-3-git-send-email-andrew.cooper3@citrix.com> (raw)
In-Reply-To: <1381152381-19744-1-git-send-email-andrew.cooper3@citrix.com>
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
CC: Keir Fraser <keir@xen.org>
CC: Jan Beulich <JBeulich@suse.com>
---
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
next prev parent reply other threads:[~2013-10-07 13:26 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-07 13:26 [Patch 0/4] HPET general fixes Andrew Cooper
2013-10-07 13:26 ` [Patch 1/4] x86/hpet: Basic cleanup Andrew Cooper
2013-10-07 13:26 ` Andrew Cooper [this message]
2013-10-07 13:45 ` [Patch 2/4] x86/hpet: Sanitise HPET ACPI table and warn about multiple tables Jan Beulich
2013-10-07 13:55 ` Andrew Cooper
2013-10-07 14:26 ` Jan Beulich
2013-10-07 13:26 ` [Patch 3/4] x86/hpet: Fix ambiguity in broadcast info message Andrew Cooper
2013-10-07 13:48 ` Jan Beulich
2013-10-07 13:26 ` [Patch 4/4] x86/hpet: Don't clear reserved bits in the General Configuration Register Andrew Cooper
2013-10-07 13:55 ` Jan Beulich
2013-10-07 14:02 ` Andrew Cooper
2013-10-07 14:28 ` Jan Beulich
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1381152381-19744-3-git-send-email-andrew.cooper3@citrix.com \
--to=andrew.cooper3@citrix.com \
--cc=JBeulich@suse.com \
--cc=keir@xen.org \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).