From nobody Mon Feb 9 20:10:20 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+52408+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+52408+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1576757731; cv=none; d=zohomail.com; s=zohoarc; b=CWe/PS9YdvHGXG/VESd8HCFDpWm+kvbit/rjwoc365UrS5V7kymuD0jHv+2aAX7nNyJQVRbyiD5wuabmlqIopWFIY/eGZUGkwZdNc7fmTYPelFivbUc8DPojnYwPIu9W2Nbl2lqhA5v9A0DfeuBqc5l6J1wEBVQqBfQwhhYtZpY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1576757731; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=jFyX+Fa6nHkRcJEiY8rhQdl3ov2IPHkVqkzOdY6/nbo=; b=e+7hU7jHxmqFyeECWHvHVXol9aRT6tfSqrDL1BSP48ITfU7FpfkEqkgp7x9geAiuNxlSsBEyRva+xCMHo17BgPFHfE7LiJfGAOHg2CyTUCzKYRoh8P+xclAQum0h4TmMHzMQLF9NSUnOztjDcEYmi2u842WoJDawCojJme6kghE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+52408+1787277+3901457@groups.io Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1576757731837834.9808246803435; Thu, 19 Dec 2019 04:15:31 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id I551YY1788612xgiHbXYwgnM; Thu, 19 Dec 2019 04:15:30 -0800 X-Received: from mail-wr1-f67.google.com (mail-wr1-f67.google.com [209.85.221.67]) by mx.groups.io with SMTP id smtpd.web10.8828.1576757692542337503 for ; Thu, 19 Dec 2019 04:14:53 -0800 X-Received: by mail-wr1-f67.google.com with SMTP id b6so5788514wrq.0 for ; Thu, 19 Dec 2019 04:14:52 -0800 (PST) X-Gm-Message-State: RZQnQ6i708GyJ42o3JSuauECx1787277AA= X-Google-Smtp-Source: APXvYqw2RXjVUumUfRSn50Y2AYKTHP1PToifpkvU2u7AFimWefeQwRQKbm97eRHSpZPpXmdV6AO9FQ== X-Received: by 2002:adf:f64b:: with SMTP id x11mr9419176wrp.355.1576757690890; Thu, 19 Dec 2019 04:14:50 -0800 (PST) X-Received: from localhost.localdomain ([84.203.77.210]) by smtp.gmail.com with ESMTPSA id u8sm5823147wmm.15.2019.12.19.04.14.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 Dec 2019 04:14:50 -0800 (PST) From: "Pete Batard" To: devel@edk2.groups.io Cc: ard.biesheuvel@linaro.org, leif.lindholm@linaro.org, philmd@redhat.com Subject: [edk2-devel] [edk2-platforms][PATCH v2 3/7] Platform/RPi4: Improve FADT ACPI table generation Date: Thu, 19 Dec 2019 12:14:30 +0000 Message-Id: <20191219121434.2856-4-pete@akeo.ie> In-Reply-To: <20191219121434.2856-1-pete@akeo.ie> References: <20191219121434.2856-1-pete@akeo.ie> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,pete@akeo.ie Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1576757730; bh=gfZRW8u6EATLlN/ZhBosfUp+VccbUqEh9wNy5Q3AoNc=; h=Cc:Date:From:Reply-To:Subject:To; b=qydQ6np2KvLC5JcSfvh1d730/sag4ndPNqzI9QkGdX2p3UTDQODoQMHYf9kEwNdCmGM Ol6mdlG8dtQRCZ9gc59Ffh5ZZpOfbduuRRKUiqzTD2o/tqxfpmxl95ukgXLGug1rbhuGL oQVi0eJ14sHoR8IuvkjNnTOklQgyV6jr0pw= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" Use a proper aslc source to build the table. Note that we use ACPI 5.1 for this table to match the MADT constraints. Signed-off-by: Pete Batard --- Platform/RaspberryPi/RPi4/AcpiTables/Fadt.aslc | 99 ++++++++++++++------ 1 file changed, 71 insertions(+), 28 deletions(-) diff --git a/Platform/RaspberryPi/RPi4/AcpiTables/Fadt.aslc b/Platform/Rasp= berryPi/RPi4/AcpiTables/Fadt.aslc index 3ef877fde5f4..ebf58fb7fc3c 100644 --- a/Platform/RaspberryPi/RPi4/AcpiTables/Fadt.aslc +++ b/Platform/RaspberryPi/RPi4/AcpiTables/Fadt.aslc @@ -2,6 +2,7 @@ * * Fixed ACPI Description Table (FADT) * + * Copyright (c) 2019, Pete Batard * Copyright (c) 2018, Andrey Warkentin * Copyright (c) Microsoft Corporation. All rights reserved. * @@ -9,34 +10,76 @@ * **/ =20 -UINT8 Fadt[268] =3D { - 0x46, 0x41, 0x43, 0x50, 0x0C, 0x01, 0x00, 0x00, 0x05, 0x00, /* 0 */ - 0x42, 0x43, 0x32, 0x38, 0x33, 0x36, 0x45, 0x44, 0x4B, 0x32, /* 10 */ - 0x20, 0x20, 0x20, 0x20, 0x01, 0x00, 0x00, 0x00, 0x4D, 0x53, /* 20 */ - 0x46, 0x54, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 30 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, /* 40 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 50 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 60 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 70 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 80 */ - 0x00, 0x04, 0x00, 0x00, 0x00, 0xE3, 0x00, 0x00, 0x00, 0x00, /* 90 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3C, /* 100 */ - 0x00, 0x00, 0x21, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, /* 110 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, /* 120 */ - 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 130 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 140 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 150 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 160 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 170 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 180 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 190 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 200 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 210 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 220 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 230 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 240 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 250 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 /* 268 */ +#include +#include +#include + +#include "AcpiTables.h" + +/* + * Note: Use ACPI 5.1 since we need to match MADT ACPI requirements + */ +EFI_ACPI_5_1_FIXED_ACPI_DESCRIPTION_TABLE Fadt =3D { + ACPI_HEADER ( + EFI_ACPI_5_1_FIXED_ACPI_DESCRIPTION_TABLE_SIGNATURE, + EFI_ACPI_5_1_FIXED_ACPI_DESCRIPTION_TABLE, + EFI_ACPI_5_1_FIXED_ACPI_DESCRIPTION_TABLE_REVISION + ), + 0, = // UINT32 FirmwareCtrl + 0, = // UINT32 Dsdt + EFI_ACPI_RESERVED_BYTE, = // UINT8 Reserved0 + EFI_ACPI_5_1_PM_PROFILE_APPLIANCE_PC, = // UINT8 PreferredPmProfile + 0, = // UINT16 SciInt + 0, = // UINT32 SmiCmd + 0, = // UINT8 AcpiEnable + 0, = // UINT8 AcpiDisable + 0, = // UINT8 S4BiosReq + 0, = // UINT8 PstateCnt + 0, = // UINT32 Pm1aEvtBlk + 0, = // UINT32 Pm1bEvtBlk + 0, = // UINT32 Pm1aCntBlk + 0, = // UINT32 Pm1bCntBlk + 0, = // UINT32 Pm2CntBlk + 0, = // UINT32 PmTmrBlk + 0, = // UINT32 Gpe0Blk + 0, = // UINT32 Gpe1Blk + 0, = // UINT8 Pm1EvtLen + 0, = // UINT8 Pm1CntLen + 0, = // UINT8 Pm2CntLen + 0, = // UINT8 PmTmrLen + 0, = // UINT8 Gpe0BlkLen + 0, = // UINT8 Gpe1BlkLen + 0, = // UINT8 Gpe1Base + 0, = // UINT8 CstCnt + 0, = // UINT16 PLvl2Lat + 0, = // UINT16 PLvl3Lat + 0, = // UINT16 FlushSize + 0, = // UINT16 FlushStride + 0, = // UINT8 DutyOffset + 0, = // UINT8 DutyWidth + 0, = // UINT8 DayAlrm + 0, = // UINT8 MonAlrm + 0, = // UINT8 Century + EFI_ACPI_RESERVED_WORD, = // UINT16 IaPcBootArch (Reserved on ARM) + EFI_ACPI_RESERVED_BYTE, = // UINT8 Reserved1 + EFI_ACPI_5_1_WBINVD | EFI_ACPI_5_1_SLP_BUTTON | = // UINT32 Flags + EFI_ACPI_5_1_HW_REDUCED_ACPI, + NULL_GAS, = // EFI_ACPI_5_1_GENERIC_ADDRESS_STRUCTURE ResetReg + 0, = // UINT8 ResetValue + EFI_ACPI_5_1_ARM_PSCI_COMPLIANT, = // UINT16 ArmBootArchFlags + EFI_ACPI_5_1_FIXED_ACPI_DESCRIPTION_TABLE_MINOR_REVISION, = // UINT8 MinorRevision + 0, = // UINT64 XFirmwareCtrl + 0, = // UINT64 XDsdt + NULL_GAS, = // EFI_ACPI_5_1_GENERIC_ADDRESS_STRUCTURE XPm1aEvtBlk + NULL_GAS, = // EFI_ACPI_5_1_GENERIC_ADDRESS_STRUCTURE XPm1bEvtBlk + NULL_GAS, = // EFI_ACPI_5_1_GENERIC_ADDRESS_STRUCTURE XPm1aCntBlk + NULL_GAS, = // EFI_ACPI_5_1_GENERIC_ADDRESS_STRUCTURE XPm1bCntBlk + NULL_GAS, = // EFI_ACPI_5_1_GENERIC_ADDRESS_STRUCTURE XPm2CntBlk + NULL_GAS, = // EFI_ACPI_5_1_GENERIC_ADDRESS_STRUCTURE XPmTmrBlk + NULL_GAS, = // EFI_ACPI_5_1_GENERIC_ADDRESS_STRUCTURE XGpe0Blk + NULL_GAS, = // EFI_ACPI_5_1_GENERIC_ADDRESS_STRUCTURE XGpe1Blk + NULL_GAS, = // EFI_ACPI_5_1_GENERIC_ADDRESS_STRUCTURE SleepControlReg + NULL_GAS = // EFI_ACPI_5_1_GENERIC_ADDRESS_STRUCTURE SleepStatusReg }; =20 // --=20 2.21.0.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#52408): https://edk2.groups.io/g/devel/message/52408 Mute This Topic: https://groups.io/mt/68829924/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-