From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f65.google.com (mail-wr1-f65.google.com [209.85.221.65]) by mx.groups.io with SMTP id smtpd.web12.11922.1604490272809378869 for ; Wed, 04 Nov 2020 03:44:33 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@nuviainc-com.20150623.gappssmtp.com header.s=20150623 header.b=USUMb0WC; spf=pass (domain: nuviainc.com, ip: 209.85.221.65, mailfrom: leif@nuviainc.com) Received: by mail-wr1-f65.google.com with SMTP id e6so4451406wro.1 for ; Wed, 04 Nov 2020 03:44:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nuviainc-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=MNhAoaeUeg0yhIWKAbTPh2U3bbRpFbh69yN9cxs8YQo=; b=USUMb0WC1MUzRWuKViWQlo7KQi8NO0UX21KcbTBmMWQf6ghjnTX8ilMIF06wc4M2Zw rsyw+m/0i7YEd2MVI65E6hXJUazR+zkUlidbJ+leuu6Nbq2oXcVtc5fRIcyXDmqxX7lq 7YfdOHfbB52OYZ3veMvtr6cAEn8+zM3pHk2PTjuP7hfLA+X+bvS9+mVNpAyDkrWBfRdS TzZ9NiLNynObD0pWUI9aiBOfqAX5U7gwUCsJ2KWxJ/MZsD5gUPzgeTfTbABvKMZbvlIo WL67kI+BF0t33tc8E4diWYRTwTlhLuo5V3VScMAzInu/3NiXsal2u3aHBf30TffynBin bn0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=MNhAoaeUeg0yhIWKAbTPh2U3bbRpFbh69yN9cxs8YQo=; b=pI04Jfa2odw+L50cHvbRg6G34vXA1VFAK9sqszIAOXiElEuk7JkLeuVrX2xbK25uho gcoWdEwVdhQq9cx7vJWX/KdgBdAMphdb4jdqP1F3ecPGvxRsOC40aNmGTi5hi3EwbhHD MSlXbDOmj6fobH9CzFojS5YWGhmxQIFP2JlnF1BkOtUq0Bj4D79F7WsMXY0U5AsungKF nCSHEAep9kSEpE0dSdQcm19RHWlOdWCR5g2Luv3DH6IrXQyOJaQYtDigfylr3b2isN3U ps4gTVU8xmgNE4lsEhJohn5+PTrPJydnq1hcf1UX+oasTqtlUUEZZ9WksU50bpfkQCFT PFrA== X-Gm-Message-State: AOAM531DbuJr5xeMD2ACi+ZyL7feQkqUT0Evk+hDbSj7LQ5rz9TNKoq3 mEqUnzsfmstNlphLfEh3F792Ng== X-Google-Smtp-Source: ABdhPJzx/hM0wmnB6Pa1H6X6dl3EEcH5g7qY8pGnyXp2M/wZeRvKzlCNPVjh9f070XyQc0CDncZuLQ== X-Received: by 2002:adf:f411:: with SMTP id g17mr31552293wro.404.1604490271419; Wed, 04 Nov 2020 03:44:31 -0800 (PST) Return-Path: Received: from vanye (cpc92880-cmbg19-2-0-cust79.5-4.cable.virginm.net. [82.27.104.80]) by smtp.gmail.com with ESMTPSA id u5sm1773601wml.13.2020.11.04.03.44.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Nov 2020 03:44:30 -0800 (PST) Date: Wed, 4 Nov 2020 11:44:29 +0000 From: "Leif Lindholm" To: Graeme Gregory Cc: Shashi Mallela , ard.biesheuvel@arm.com, devel@edk2.groups.io Subject: Re: [PATCH v4 1/1] Silicon/Qemu/Sbsa: Add SBSA-wdt entry to GTDT Message-ID: <20201104114429.GS1664@vanye> References: <20201102165148.10509-1-shashi.mallela@linaro.org> <20201102165148.10509-2-shashi.mallela@linaro.org> <20201102185732.avxzkuoc7bgwqfpu@xora-xps13> MIME-Version: 1.0 In-Reply-To: <20201102185732.avxzkuoc7bgwqfpu@xora-xps13> User-Agent: Mutt/1.10.1 (2018-07-13) Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Mon, Nov 02, 2020 at 18:57:32 +0000, Graeme Gregory wrote: > On Mon, Nov 02, 2020 at 11:51:48AM -0500, Shashi Mallela wrote: > > SBSA generic watchdog timer structure entry has been added > > to GTDT table as per SBSAv6.0. > > This enables acpi detection of wdt in qemu sbsa platform > > > > Reviewed-by: Graeme Gregory Acked-by: Leif Lindholm Pushed as aa0803917ac9. Thanks! > > Cc: Leif Lindholm > > Cc: Ard Biesheuvel > > Cc: Graeme Gregory > > Signed-off-by: Shashi Mallela > > --- > > Silicon/Qemu/SbsaQemu/AcpiTables/Gtdt.aslc | 57 ++++++++++++++++++---- > > 1 file changed, 47 insertions(+), 10 deletions(-) > > > > diff --git a/Silicon/Qemu/SbsaQemu/AcpiTables/Gtdt.aslc b/Silicon/Qemu/SbsaQemu/AcpiTables/Gtdt.aslc > > index d16778e01a5c..a010b908c434 100644 > > --- a/Silicon/Qemu/SbsaQemu/AcpiTables/Gtdt.aslc > > +++ b/Silicon/Qemu/SbsaQemu/AcpiTables/Gtdt.aslc > > @@ -24,27 +24,55 @@ > > #define SYSTEM_TIMER_BASE_ADDRESS 0xFFFFFFFFFFFFFFFF > > #endif > > > > -#define GTDT_TIMER_EDGE_TRIGGERED EFI_ACPI_5_0_GTDT_TIMER_FLAG_TIMER_INTERRUPT_MODE > > +#define GTDT_TIMER_EDGE_TRIGGERED EFI_ACPI_6_3_GTDT_TIMER_FLAG_TIMER_INTERRUPT_MODE > > #define GTDT_TIMER_LEVEL_TRIGGERED 0 > > -#define GTDT_TIMER_ACTIVE_LOW EFI_ACPI_5_0_GTDT_TIMER_FLAG_TIMER_INTERRUPT_POLARITY > > +#define GTDT_TIMER_ACTIVE_LOW EFI_ACPI_6_3_GTDT_TIMER_FLAG_TIMER_INTERRUPT_POLARITY > > #define GTDT_TIMER_ACTIVE_HIGH 0 > > > > #define GTDT_GTIMER_FLAGS (GTDT_TIMER_ACTIVE_LOW | GTDT_TIMER_LEVEL_TRIGGERED) > > > > +#define SBSA_PLATFORM_WATCHDOG_COUNT 1 > > +#define SBSA_PLATFORM_TIMER_COUNT (SBSA_PLATFORM_WATCHDOG_COUNT) > > + > > +#define SBSAQEMU_WDT_REFRESH_FRAME_BASE 0x50010000 > > +#define SBSAQEMU_WDT_CONTROL_FRAME_BASE 0x50011000 > > +#define SBSAQEMU_WDT_IRQ 44 > > + > > +#define GTDT_WDTIMER_EDGE_TRIGGERED EFI_ACPI_6_3_GTDT_SBSA_GENERIC_WATCHDOG_FLAG_TIMER_INTERRUPT_MODE > > +#define GTDT_WDTIMER_LEVEL_TRIGGERED 0 > > +#define GTDT_WDTIMER_ACTIVE_LOW EFI_ACPI_6_3_GTDT_SBSA_GENERIC_WATCHDOG_FLAG_TIMER_INTERRUPT_POLARITY > > +#define GTDT_WDTIMER_ACTIVE_HIGH 0 > > + > > +#define GTDT_WDTIMER_FLAGS (GTDT_WDTIMER_ACTIVE_HIGH | GTDT_WDTIMER_LEVEL_TRIGGERED) > > + > > +#define EFI_ACPI_6_3_SBSA_GENERIC_WATCHDOG_STRUCTURE_INIT( \ > > + RefreshFramePhysicalAddress, ControlFramePhysicalAddress, \ > > + WatchdogTimerGSIV, WatchdogTimerFlags) \ > > + { \ > > + EFI_ACPI_6_3_GTDT_SBSA_GENERIC_WATCHDOG, \ > > + sizeof(EFI_ACPI_6_3_GTDT_SBSA_GENERIC_WATCHDOG_STRUCTURE), \ > > + EFI_ACPI_RESERVED_WORD, \ > > + RefreshFramePhysicalAddress, \ > > + ControlFramePhysicalAddress, \ > > + WatchdogTimerGSIV, \ > > + WatchdogTimerFlags \ > > + } > > + > > #pragma pack (1) > > > > typedef struct { > > - EFI_ACPI_5_1_GENERIC_TIMER_DESCRIPTION_TABLE Gtdt; > > - } GENERIC_TIMER_DESCRIPTION_TABLE; > > + EFI_ACPI_6_3_GENERIC_TIMER_DESCRIPTION_TABLE Gtdt; > > + EFI_ACPI_6_3_GTDT_SBSA_GENERIC_WATCHDOG_STRUCTURE Gwdt; > > + } GENERIC_TIMER_DESCRIPTION_TABLES; > > > > #pragma pack () > > > > - GENERIC_TIMER_DESCRIPTION_TABLE Gtdt = { > > + GENERIC_TIMER_DESCRIPTION_TABLES Gtdt = { > > { > > SBSAQEMU_ACPI_HEADER( > > - EFI_ACPI_5_1_GENERIC_TIMER_DESCRIPTION_TABLE_SIGNATURE, > > - GENERIC_TIMER_DESCRIPTION_TABLE, > > - EFI_ACPI_5_1_GENERIC_TIMER_DESCRIPTION_TABLE_REVISION > > + EFI_ACPI_6_3_GENERIC_TIMER_DESCRIPTION_TABLE_SIGNATURE, > > + GENERIC_TIMER_DESCRIPTION_TABLES, > > + EFI_ACPI_6_3_GENERIC_TIMER_DESCRIPTION_TABLE_REVISION > > ), > > SYSTEM_TIMER_BASE_ADDRESS, // UINT64 PhysicalAddress > > 0, // UINT32 Reserved > > @@ -57,9 +85,18 @@ > > FixedPcdGet32 (PcdArmArchTimerHypIntrNum), // UINT32 NonSecurePL2TimerGSIV > > GTDT_GTIMER_FLAGS, // UINT32 NonSecurePL2TimerFlags > > 0xFFFFFFFFFFFFFFFF, // UINT64 CntReadBasePhysicalAddress > > - 0, // UINT32 PlatformTimerCount > > - 0 > > + SBSA_PLATFORM_TIMER_COUNT, // UINT32 PlatformTimerCount > > + sizeof(EFI_ACPI_6_3_GENERIC_TIMER_DESCRIPTION_TABLE), > > + // UINT32 PlatformTimerOffset > > + 0, // UINT32 VirtualPL2TimerGSIV > > + 0 // UINT32 VirtualPL2TimerFlags > > }, > > + EFI_ACPI_6_3_SBSA_GENERIC_WATCHDOG_STRUCTURE_INIT( > > + SBSAQEMU_WDT_REFRESH_FRAME_BASE, > > + SBSAQEMU_WDT_CONTROL_FRAME_BASE, > > + SBSAQEMU_WDT_IRQ, > > + GTDT_WDTIMER_FLAGS > > + ) > > }; > > > > // Reference the table being generated to prevent the optimizer from removing the > > -- > > 2.18.4 > >