From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-x232.google.com (mail-wr0-x232.google.com [IPv6:2a00:1450:400c:c0c::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id D9C9021A0480E for ; Wed, 5 Apr 2017 06:17:26 -0700 (PDT) Received: by mail-wr0-x232.google.com with SMTP id w43so13748743wrb.0 for ; Wed, 05 Apr 2017 06:17:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=WbBzkHNjqhRpSZuI3Jjl9odxoVSnDiKSnTTQgUP8qSI=; b=NBSbjVDcAgm3uVJiDcIklnLmujo85qCmFGQguJdq05jWFnN0Lwsmu+3RPvWIQVe1xx PVk0PU5p1bv6WnQqO8mDAqe7NECnq3DT2724Yb0g3YJTDzS1CYwO5mdkUnlnFUVV9zE2 iV/LRP6fTFpUbjI+eVh+GmNAN2OUQ/EFu4LcU= 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=WbBzkHNjqhRpSZuI3Jjl9odxoVSnDiKSnTTQgUP8qSI=; b=Mnf+dEnvjK4d5ECfoEZyLYfSFsFTNyKd2ohip24rMjQytZbl8mjCLc58RdTocxu3sb F6Ef6tJosxqpDYyaKzTJOAkQYk3VFxEvcbZDMSGdgF5iQJSYr/fWnJD2jTrfrNt7ctbW KhSnhD9Hxo79Mk57qdcuH+NnlGooHM/gtBXqBXWjKkaqgMO2nO/A7IG/VdtsS1YSRJ1q RugJZGN1xgQ7HewXIvNtpesOHCg8NWaAqqlQm3/Q7Rjdj0F7m4aOC9rbTeRUcBf/aH6C 3cKz5y0oVzHobpLBccsklLp8BkRQljsSNZki/i892L+17PTXXzWVzOwWIOajF6zF5sW4 RxBA== X-Gm-Message-State: AFeK/H2GuS350fLto9allkmEchfJoBhCSIKNjHeYCgpYmJI8IOpOaO5i7jZQZSuYnHXbRFIm X-Received: by 10.223.148.230 with SMTP id 93mr17734283wrr.34.1491398244880; Wed, 05 Apr 2017 06:17:24 -0700 (PDT) Received: from bivouac.eciton.net (bivouac.eciton.net. [2a00:1098:0:86:1000:23:0:2]) by smtp.gmail.com with ESMTPSA id k43sm26241493wrk.42.2017.04.05.06.17.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 05 Apr 2017 06:17:23 -0700 (PDT) Date: Wed, 5 Apr 2017 14:17:22 +0100 From: Leif Lindholm To: Ard Biesheuvel Cc: edk2-devel@lists.01.org, ryan.harkin@linaro.org Message-ID: <20170405131721.GD25239@bivouac.eciton.net> References: <20170404123010.11722-1-ard.biesheuvel@linaro.org> <20170404123010.11722-5-ard.biesheuvel@linaro.org> MIME-Version: 1.0 In-Reply-To: <20170404123010.11722-5-ard.biesheuvel@linaro.org> User-Agent: Mutt/1.5.23 (2014-03-12) Subject: Re: [PATCH v3 4/6] ArmPlatformPkg/ArmJunoDxe: don't register OnEndOfDxe event on rev R0 X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Apr 2017 13:17:27 -0000 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Apr 04, 2017 at 01:30:08PM +0100, Ard Biesheuvel wrote: > The ArmJunoDxe driver code registers a callback for the EndOfDxe event, > at which time it does some manipulation of the PCI peripherals on the > board. Given that R0 has no working PCIe, we can omit the registration > of the callback altogether. This is a nice simplification. However, could the final sentence of the commit message be changed to " Given that R0 has no working PCIe, instead of conditionally performing these operations, omit the registration of the callback altogether on that platform. " With that: Reviewed-by: Leif Lindholm > > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Ard Biesheuvel > --- > ArmPlatformPkg/ArmJunoPkg/Drivers/ArmJunoDxe/ArmJunoDxe.c | 43 +++++++++----------- > 1 file changed, 19 insertions(+), 24 deletions(-) > > diff --git a/ArmPlatformPkg/ArmJunoPkg/Drivers/ArmJunoDxe/ArmJunoDxe.c b/ArmPlatformPkg/ArmJunoPkg/Drivers/ArmJunoDxe/ArmJunoDxe.c > index 14ff189a3078..f7e33961b4e7 100644 > --- a/ArmPlatformPkg/ArmJunoPkg/Drivers/ArmJunoDxe/ArmJunoDxe.c > +++ b/ArmPlatformPkg/ArmJunoPkg/Drivers/ArmJunoDxe/ArmJunoDxe.c > @@ -379,7 +379,6 @@ OnEndOfDxe ( > EFI_DEVICE_PATH_PROTOCOL* PciRootComplexDevicePath; > EFI_HANDLE Handle; > EFI_STATUS Status; > - UINT32 JunoRevision; > > // > // PCI Root Complex initialization > @@ -395,13 +394,9 @@ OnEndOfDxe ( > Status = gBS->ConnectController (Handle, NULL, PciRootComplexDevicePath, FALSE); > ASSERT_EFI_ERROR (Status); > > - GetJunoRevision (JunoRevision); > - > - if (JunoRevision != JUNO_REVISION_R0) { > - Status = ArmJunoSetNicMacAddress (); > - if (EFI_ERROR (Status)) { > - DEBUG ((DEBUG_ERROR, "ArmJunoDxe: Failed to set Marvell Yukon NIC MAC address\n")); > - } > + Status = ArmJunoSetNicMacAddress (); > + if (EFI_ERROR (Status)) { > + DEBUG ((DEBUG_ERROR, "ArmJunoDxe: Failed to set Marvell Yukon NIC MAC address\n")); > } > } > > @@ -511,22 +506,6 @@ ArmJunoEntryPoint ( > } > } > > - // > - // Create an event belonging to the "gEfiEndOfDxeEventGroupGuid" group. > - // The "OnEndOfDxe()" function is declared as the call back function. > - // It will be called at the end of the DXE phase when an event of the > - // same group is signalled to inform about the end of the DXE phase. > - // Install the INSTALL_FDT_PROTOCOL protocol. > - // > - Status = gBS->CreateEventEx ( > - EVT_NOTIFY_SIGNAL, > - TPL_CALLBACK, > - OnEndOfDxe, > - NULL, > - &gEfiEndOfDxeEventGroupGuid, > - &EndOfDxeEvent > - ); > - > // Install dynamic Shell command to run baremetal binaries. > Status = ShellDynCmdRunAxfInstall (ImageHandle); > if (EFI_ERROR (Status)) { > @@ -555,6 +534,22 @@ ArmJunoEntryPoint ( > // Enable PCI enumeration > PcdSetBool (PcdPciDisableBusEnumeration, FALSE); > > + // > + // Create an event belonging to the "gEfiEndOfDxeEventGroupGuid" group. > + // The "OnEndOfDxe()" function is declared as the call back function. > + // It will be called at the end of the DXE phase when an event of the > + // same group is signalled to inform about the end of the DXE phase. > + // Install the INSTALL_FDT_PROTOCOL protocol. > + // > + Status = gBS->CreateEventEx ( > + EVT_NOTIFY_SIGNAL, > + TPL_CALLBACK, > + OnEndOfDxe, > + NULL, > + &gEfiEndOfDxeEventGroupGuid, > + &EndOfDxeEvent > + ); > + > // Declare the related ACPI Tables > EfiCreateProtocolNotifyEvent ( > &gEfiAcpiTableProtocolGuid, > -- > 2.9.3 >