[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 04/17] hvmloader: add ACPI enabling for Q35
- To: Thierry Escande <thierry.escande@xxxxxxxxxx>
- From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
- Date: Tue, 28 Apr 2026 12:48:23 +0200
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=ScmrUjwHEK1f6U3CDn9Gwyk+phawh4mQ3+ZmFetVPjg=; b=YRolIm0n2r9GvtNp09863JEZWCQROW9xvdyNkvJ6tR5r0DUn7Dsmy6BczdIvOrXHCd9ZjeLTHdp+3DkeqPRU2IUTH+qcAPEls3qD5DSZRdOWBbwu7p5ss7L7EwE5oOAqEP6YXKNckjkExiisV3AbvJGGgSI4j8DvF9GQRvW3opLbx9kJBgYef4AamfGC/pZRpaeTLaGEs8gvmgf+Ic5T6F+HD5UwiZhXaMa56+qHJFToD5eN283JmcJ1jt5VP/RsCUu7476jc8VoSThOQcEbqCqy+CxRHBn1kZwKJ7mAfARzmwf00UB6v2foiPrP3BkjY9MT7pgEQgdR3dZ+AIh+/A==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=b3BN/R41B+IyuCmpSm6ilzIHH5qZkYlcdDL6AhRu4JqDr4Xd/lWuujJDUs2iScnIpUhIAwVwHbRB/RhfaGthN7k02shJQLvA1JZx58Z5t1eIwxuJwTPBYc4MRhkOR8FCOLwQz6e3r8MO+/Pk26ql7nGD1avsj39rd0fDoLzBcGdL8nMdVedjzrwYUURBBMe3pUSiQ4WMZbAaf/L7gDDWEKiM5Rmg2nHIspXqAJLMds/UDdVL4KIXuXS2242SsXdz75LROevdAxScyKV795GHkINNFDtPMfY04LfwOaaFE0D7nDRXMHePLroqskrRb58xuErY3F9NbJK2REAiyxKsuQ==
- Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=citrix.com header.i="@citrix.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck"
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
- Cc: xen-devel@xxxxxxxxxxxxxxxxxxxx, Jan Beulich <jbeulich@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Alexey Gerasimenko <x1917x@xxxxxxxxx>
- Delivery-date: Tue, 28 Apr 2026 10:48:40 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On Fri, Mar 13, 2026 at 04:35:05PM +0000, Thierry Escande wrote:
> In order to turn on ACPI for OS, we need to write a chipset-specific value
> to SMI_CMD register (sort of imitation of the APM->ACPI switch on real
> systems). Modify acpi_enable_sci() function to support both i440 and Q35
> emulation.
>
> Signed-off-by: Alexey Gerasimenko <x1917x@xxxxxxxxx>
> Signed-off-by: Thierry Escande <thierry.escande@xxxxxxxxxx>
Reviewed-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
It's not great to add more stuff into hvmloader when we want to move
out of it, but it's also not helpful to tie the Q35 addition to the
removal of hvmloader.
> ---
> tools/firmware/hvmloader/hvmloader.c | 19 +++++++++++++++++--
> 1 file changed, 17 insertions(+), 2 deletions(-)
>
> diff --git a/tools/firmware/hvmloader/hvmloader.c
> b/tools/firmware/hvmloader/hvmloader.c
> index 626cc53649..f6cc3fa4b9 100644
> --- a/tools/firmware/hvmloader/hvmloader.c
> +++ b/tools/firmware/hvmloader/hvmloader.c
> @@ -258,9 +258,24 @@ static const struct bios_config *detect_bios(void)
> static void acpi_enable_sci(void)
> {
> uint8_t pm1a_cnt_val;
> + uint8_t acpi_enable_val;
>
> -#define PIIX4_SMI_CMD_IOPORT 0xb2
> +#define SMI_CMD_IOPORT 0xb2
> #define PIIX4_ACPI_ENABLE 0xf1
> +#define ICH9_ACPI_ENABLE 0x02
> +
> + switch ( machine_type )
> + {
> + case MACHINE_TYPE_Q35:
> + acpi_enable_val = ICH9_ACPI_ENABLE;
> + break;
> + case MACHINE_TYPE_I440:
> + acpi_enable_val = PIIX4_ACPI_ENABLE;
> + break;
We might want to add a newline after the break statements.
Thanks, Roger.
|