From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.groups.io with SMTP id smtpd.web12.4629.1665150285527515737 for ; Fri, 07 Oct 2022 06:44:46 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Avuk0PAL; spf=pass (domain: redhat.com, ip: 170.10.133.124, mailfrom: osteffen@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1665150284; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=O4Y2XdPSdki2N3BEb7qKivmDJxkrxrqF5V49lp8KL2w=; b=Avuk0PALSuA+sJhu09Qsn4ryXLegJAtD4EfeNOgQ6r9EtNhWycJKe4/Mkz3tU0iBabnpLj W8SOo5O2shRQ2I1zy8aF2znBU5EZJRH7i6s62MHQhJURuH9P7loMQ2iMx/Zd3K2MgR+D4E /BbegmH+W+IHVSU4YYjB3r+obKRdg+o= Received: from mail-lf1-f70.google.com (mail-lf1-f70.google.com [209.85.167.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-50-NSYi8B11OfmcdNg2YWHUlA-1; Fri, 07 Oct 2022 09:44:43 -0400 X-MC-Unique: NSYi8B11OfmcdNg2YWHUlA-1 Received: by mail-lf1-f70.google.com with SMTP id z15-20020ac25def000000b004a060fcd1d5so1605558lfq.7 for ; Fri, 07 Oct 2022 06:44:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:subject:message-id:date:user-agent:from:references:in-reply-to :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=O4Y2XdPSdki2N3BEb7qKivmDJxkrxrqF5V49lp8KL2w=; b=ucjP6UXb09hdxVOa/XZBKdCdz5mBaQCaS2gUqQiOtpvY/4vPukkj6VsoRhAzITptEw plaF0rODxzVaa3qtLAq/PhydcM7dnV5+cwCJdkJVNgEL2Ck46ZmGVhbQ2zPQvzOXhn1q WRc2WQCfQdhfJD9TyX2DeMAmPG0Tgf+W1TbYEiSzp3qMXHBusyyB2R1jSxfJNGpsKruC t1GPUCmLOlisgzQaABD73BV1UorkPSSpcWMIyi1nsatDSTW6NfwJKJ9wxfNdWHHQN0wt f7PIP++qTAViZfzbcjDZXjAfIDmGeeZj8uDQMwP2wc5MylpRWRuEOtCXpo0t5ukXzFZU iSCQ== X-Gm-Message-State: ACrzQf1rzyazy14S3xccDqtj37PSHwfVJLfeVzpHwryDYClhZlXHUM+p suPF0CG097CfzwGR+DmBq7R34fDHi8xAs60Zj8AQ1N4OwPVPGPb6L6/xn+r/C3WRh71izW+KQVr q7dVh5qdmC2JUIGHrdSw9iZB8PD0PWQ== X-Received: by 2002:a19:490b:0:b0:49f:52cf:aeaf with SMTP id w11-20020a19490b000000b0049f52cfaeafmr1846713lfa.46.1665150281780; Fri, 07 Oct 2022 06:44:41 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7kE0qHF5oFDIcRv4cNZpmNbYOCB59jvpeQhWKf/oP/0BWvp+zMlRj6ST7OLgIQtfyW4+kYOdXMZdpjX0DZ210= X-Received: by 2002:a19:490b:0:b0:49f:52cf:aeaf with SMTP id w11-20020a19490b000000b0049f52cfaeafmr1846705lfa.46.1665150281512; Fri, 07 Oct 2022 06:44:41 -0700 (PDT) Received: from 567203818698 named unknown by gmailapi.google.com with HTTPREST; Fri, 7 Oct 2022 06:44:40 -0700 MIME-Version: 1.0 In-Reply-To: <20221007113805.43823-1-rebecca@quicinc.com> References: <20221007113805.43823-1-rebecca@quicinc.com> From: "Oliver Steffen" User-Agent: alot/0.8.1 Date: Fri, 7 Oct 2022 06:44:40 -0700 Message-ID: Subject: Re: [PATCH v2 1/1] ArmPlatformPkg/PrePeiCore: Print the firmware version early in boot To: Ard Biesheuvel , Gerd Hoffmann , Leif Lindholm , Rebecca Cran , Sami Mujawar , devel@edk2.groups.io X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Quoting Rebecca Cran (2022-10-07 13:38:05) > Copy code from PrePi to PrePeiCore that prints the firmware version > and build date early in the boot process. > > Signed-off-by: Rebecca Cran > --- > ArmPlatformPkg/PrePeiCore/PrePeiCoreMPCore.inf | 3 +++ > ArmPlatformPkg/PrePeiCore/PrePeiCoreUniCore.inf | 3 +++ > ArmPlatformPkg/PrePeiCore/PrePeiCore.c | 14 ++++++++++++++ > 3 files changed, 20 insertions(+) > > diff --git a/ArmPlatformPkg/PrePeiCore/PrePeiCoreMPCore.inf b/ArmPlatformPkg/PrePeiCore/PrePeiCoreMPCore.inf > index a5b4722459d1..4a3112b58dcb 100644 > --- a/ArmPlatformPkg/PrePeiCore/PrePeiCoreMPCore.inf > +++ b/ArmPlatformPkg/PrePeiCore/PrePeiCoreMPCore.inf > @@ -54,6 +54,9 @@ [Ppis] > gEfiTemporaryRamSupportPpiGuid > gArmMpCoreInfoPpiGuid > > +[Pcd] > + gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareVersionString > + > [FeaturePcd] > gArmPlatformTokenSpaceGuid.PcdSendSgiToBringUpSecondaryCores > > diff --git a/ArmPlatformPkg/PrePeiCore/PrePeiCoreUniCore.inf b/ArmPlatformPkg/PrePeiCore/PrePeiCoreUniCore.inf > index 466a2b01c384..ab5bf1dac2d8 100644 > --- a/ArmPlatformPkg/PrePeiCore/PrePeiCoreUniCore.inf > +++ b/ArmPlatformPkg/PrePeiCore/PrePeiCoreUniCore.inf > @@ -52,6 +52,9 @@ [LibraryClasses] > [Ppis] > gEfiTemporaryRamSupportPpiGuid > > +[Pcd] > + gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareVersionString > + > [FeaturePcd] > gArmPlatformTokenSpaceGuid.PcdSendSgiToBringUpSecondaryCores > > diff --git a/ArmPlatformPkg/PrePeiCore/PrePeiCore.c b/ArmPlatformPkg/PrePeiCore/PrePeiCore.c > index 9c4b25df953d..49df21aca92a 100644 > --- a/ArmPlatformPkg/PrePeiCore/PrePeiCore.c > +++ b/ArmPlatformPkg/PrePeiCore/PrePeiCore.c > @@ -11,6 +11,8 @@ > #include > #include > #include > +#include > +#include > > #include "PrePeiCore.h" > > @@ -58,6 +60,9 @@ CEntryPoint ( > IN EFI_PEI_CORE_ENTRY_POINT PeiCoreEntryPoint > ) > { > + CHAR8 Buffer[100]; > + UINTN CharCount; > + > // Data Cache enabled on Primary core when MMU is enabled. > ArmDisableDataCache (); > // Invalidate instruction cache > @@ -93,6 +98,15 @@ CEntryPoint ( > // Invoke "ProcessLibraryConstructorList" to have all library constructors > // called. > ProcessLibraryConstructorList (); > + CharCount = AsciiSPrint ( > + Buffer, > + sizeof (Buffer), > + "UEFI firmware (version %s built at %a on %a)\n\r", > + (CHAR16 *)PcdGetPtr (PcdFirmwareVersionString), > + __TIME__, > + __DATE__ > + ); > + SerialPortWrite ((UINT8 *)Buffer, CharCount); > > // Initialize the Debug Agent for Source Level Debugging > InitializeDebugAgent (DEBUG_AGENT_INIT_POSTMEM_SEC, NULL, NULL); > -- > 2.30.2 > Hi Rebecca, thank you! Tested-by: Oliver Steffen