[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH V3] hvmloader: Enable SCI in QEMU if is not.
When booting a Windows guest, the OS report an issue with the ACPI (in a BSOD). The exact issue is "SCI_EN never becomes set in PM1 Control Register." (quoted from WinDbg help). So this patch enables the flags SCI_EN if it is not yet enabled. Reported-by: Tobias Geiger <tobias.geiger@xxxxxxxxx> Signed-off-by: Anthony PERARD <anthony.perard@xxxxxxxxxx> --- tools/firmware/hvmloader/hvmloader.c | 18 ++++++++++++++++++ 1 files changed, 18 insertions(+), 0 deletions(-) diff --git a/tools/firmware/hvmloader/hvmloader.c b/tools/firmware/hvmloader/hvmloader.c index f8553bb..0637ac0 100644 --- a/tools/firmware/hvmloader/hvmloader.c +++ b/tools/firmware/hvmloader/hvmloader.c @@ -28,6 +28,7 @@ #include "apic_regs.h" #include <xen/version.h> #include <xen/hvm/params.h> +#include <xen/hvm/ioreq.h> #define ROM_INCLUDE_VGABIOS #define ROM_INCLUDE_ETHERBOOT @@ -381,6 +382,22 @@ static const struct bios_config *detect_bios(void) return NULL; } +#define SCI_EN (1 << 0) +#define SMI_CMD_IOPORT 0xb2 +#define PIIX4_ACPI_ENABLE 0xf1 + +static void enable_sci(void) +{ + int pm1a_cnt_val = 0; + + pm1a_cnt_val = inb(ACPI_PM1A_CNT_BLK_ADDRESS_V1); + if (!(pm1a_cnt_val & SCI_EN)) { + outb(SMI_CMD_IOPORT, PIIX4_ACPI_ENABLE); + } + pm1a_cnt_val = inb(ACPI_PM1A_CNT_BLK_ADDRESS_V1); + BUG_ON(!(pm1a_cnt_val & SCI_EN)); +} + int main(void) { const struct bios_config *bios; @@ -479,6 +496,7 @@ int main(void) printf("Loading ACPI ...\n"); bios->acpi_build_tables(); } + enable_sci(); hypercall_hvm_op(HVMOP_set_param, &p); } -- Anthony PERARD _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |