From nobody Sat Nov 2 12:16:43 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Authentication-Results: mx.zoho.com; dkim=fail spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org; Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1491309031607146.3310624400707; Tue, 4 Apr 2017 05:30:31 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 66FFB21DFA903; Tue, 4 Apr 2017 05:30:30 -0700 (PDT) Received: from mail-wr0-x234.google.com (mail-wr0-x234.google.com [IPv6:2a00:1450:400c:c0c::234]) (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 5BFC12193930E for ; Tue, 4 Apr 2017 05:30:28 -0700 (PDT) Received: by mail-wr0-x234.google.com with SMTP id k6so208512058wre.2 for ; Tue, 04 Apr 2017 05:30:28 -0700 (PDT) Received: from localhost.localdomain ([160.163.145.113]) by smtp.gmail.com with ESMTPSA id 24sm22162490wrw.46.2017.04.04.05.30.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 04 Apr 2017 05:30:26 -0700 (PDT) X-Original-To: edk2-devel@lists.01.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=sArk6YDiaQZekt4onjdWGiFpb3bRS72Vklzx6IgVWEs=; b=H6XvOaMSgwEq/jCbsCN5aDqNEBbg0V97SIPSwdxSzHfioX9a9VDn2fIU9CfwRCbqkk 2/aNP/lIZVTkRo3jmmBtEDPve/87+EC8vjCWwjxGg222d/ebsd9rgEDRYrBmt9at+Vbd mRI+dXMMiLGRRd8pTEGOW27PXDDX8KIY4nHa4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=sArk6YDiaQZekt4onjdWGiFpb3bRS72Vklzx6IgVWEs=; b=uC9o03kDMnNd8Lgrk3MvHQaM/+ZMedlzPTbkQ2aH+0Iyk3ysLnggdyyxw7g64/abIj +iLLS0QUlknKzRhRpd6IiVxcr/hYmYpw71dxWptxizczw7f9D87W4fICNDOtaB7DCtrT taGQxJEx07zZTr3AaxdqvGtAFuQ8Lei4sL3re0II4dPc3miGPwdvXWx7RV5PbmaLm4uN d4AW6kCxv9udxjBD7csULe3RQmGbtDgLe9o8053SEDEHZZ8tVn9brZrMsr5FOWaKXlRI Q//BPV1CNg2oKtHFJQGpeQxeLQDwpTOns4/6A8vJKvJLVk3DS6zgSekqBMqojw1qPnNq ym5A== X-Gm-Message-State: AFeK/H2VyNM7WXjdirEF71CyFNhjXRh6vWSDgexXp+4lYq00zagDTdqgyo+Ntd8gYE+vlt2X X-Received: by 10.223.176.202 with SMTP id j10mr1874966wra.10.1491309026610; Tue, 04 Apr 2017 05:30:26 -0700 (PDT) From: Ard Biesheuvel To: edk2-devel@lists.01.org, leif.lindholm@linaro.org, ryan.harkin@linaro.org Date: Tue, 4 Apr 2017 13:30:08 +0100 Message-Id: <20170404123010.11722-5-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170404123010.11722-1-ard.biesheuvel@linaro.org> References: <20170404123010.11722-1-ard.biesheuvel@linaro.org> Subject: [edk2] [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: , Cc: Ard Biesheuvel MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" 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. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel Reviewed-by: Leif Lindholm --- ArmPlatformPkg/ArmJunoPkg/Drivers/ArmJunoDxe/ArmJunoDxe.c | 43 +++++++++--= --------- 1 file changed, 19 insertions(+), 24 deletions(-) diff --git a/ArmPlatformPkg/ArmJunoPkg/Drivers/ArmJunoDxe/ArmJunoDxe.c b/Ar= mPlatformPkg/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; =20 // // PCI Root Complex initialization @@ -395,13 +394,9 @@ OnEndOfDxe ( Status =3D gBS->ConnectController (Handle, NULL, PciRootComplexDevicePat= h, FALSE); ASSERT_EFI_ERROR (Status); =20 - GetJunoRevision (JunoRevision); - - if (JunoRevision !=3D JUNO_REVISION_R0) { - Status =3D ArmJunoSetNicMacAddress (); - if (EFI_ERROR (Status)) { - DEBUG ((DEBUG_ERROR, "ArmJunoDxe: Failed to set Marvell Yukon NIC MA= C address\n")); - } + Status =3D ArmJunoSetNicMacAddress (); + if (EFI_ERROR (Status)) { + DEBUG ((DEBUG_ERROR, "ArmJunoDxe: Failed to set Marvell Yukon NIC MAC = address\n")); } } =20 @@ -511,22 +506,6 @@ ArmJunoEntryPoint ( } } =20 - // - // 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 =3D gBS->CreateEventEx ( - EVT_NOTIFY_SIGNAL, - TPL_CALLBACK, - OnEndOfDxe, - NULL, - &gEfiEndOfDxeEventGroupGuid, - &EndOfDxeEvent - ); - // Install dynamic Shell command to run baremetal binaries. Status =3D ShellDynCmdRunAxfInstall (ImageHandle); if (EFI_ERROR (Status)) { @@ -555,6 +534,22 @@ ArmJunoEntryPoint ( // Enable PCI enumeration PcdSetBool (PcdPciDisableBusEnumeration, FALSE); =20 + // + // 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 =3D gBS->CreateEventEx ( + EVT_NOTIFY_SIGNAL, + TPL_CALLBACK, + OnEndOfDxe, + NULL, + &gEfiEndOfDxeEventGroupGuid, + &EndOfDxeEvent + ); + // Declare the related ACPI Tables EfiCreateProtocolNotifyEvent ( &gEfiAcpiTableProtocolGuid, --=20 2.9.3 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel