From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pg1-f169.google.com (mail-pg1-f169.google.com [209.85.215.169]) by mx.groups.io with SMTP id smtpd.web08.38744.1634571593517011891 for ; Mon, 18 Oct 2021 08:39:53 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@nuviainc-com.20210112.gappssmtp.com header.s=20210112 header.b=33H+kUs2; spf=pass (domain: nuviainc.com, ip: 209.85.215.169, mailfrom: rebecca@nuviainc.com) Received: by mail-pg1-f169.google.com with SMTP id r2so16621020pgl.10 for ; Mon, 18 Oct 2021 08:39:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nuviainc-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=KVmrpzXjsTSydvbrquT6zyEgUjfohYGGNFVKWtcXaM4=; b=33H+kUs2Dpb7n4jUIC2FTLpnx127oeHvdiSrfWPZUU5UYWICmI/6HhzqTOyK2h79T4 1J6LGbcSwDHuHkgrmPxXRnCOcKKRZ8Usu2CMpT1nGJc6ZqCTu1zHoApByKjXt6rU+3PS i4WS86UfeRLIZf8EwJ64PAe53T0hlcwWUtMY2hwpUz1Tv5QxnD9cLVIU9p2Ra8b/z5Jv WpwG756UXdOgvzrV7H6/R+S/Eo/U1o9ZAhRukKoNQb0yfM5p4iqslloOFesYiBjTR1OG 2Ueei1pUucGaztOHDp4tbJ9B6khFAJfWgw4/I8JPLZotdGNET94neOlH6xhvT7JPA4ng alAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=KVmrpzXjsTSydvbrquT6zyEgUjfohYGGNFVKWtcXaM4=; b=tnykaf9u10C0EPawmumtZwqnge70FM/oAf3iXZfhHpFx6mdXvsiRF9JWlk3i42z8KQ nk/3H5pGlQxuRi6FWa3EwY0yBKiMoIXz2/glTuqRFuA9evcBcvOVFsPNMLGpAtqdJnND ziIycYRPdZiDt5DpqZs+E2GjBCZ2hUL8SDCT69EINvk7lJdrE+l95H8lnEOq6xhSmDTd FtO4Fy0CHsNPQCikkCMM66I5qO4ocuQa/Fz2ikK+mr1ZqZrIn8awxv9432Pnh8/Mv2vX 4cGKGG3h3Amtoo/R14fCEw615up9LTnsb6VDyI2vxEjO5nxNnH7/X1B5cKblmoU2k1ZT Umdw== X-Gm-Message-State: AOAM533acOGnoWoVJ5LKrx4trTIAPteyevdALRvAbOLvvhbaQPJh7FxZ uvDRpl8KtZF4eh52GNLXLIfEWHvS/Z8duQ== X-Google-Smtp-Source: ABdhPJyvasl0ELKl6pXy+Kr+pOHoUHLE4DFn/7AdsZgMJK4rq2zbT/bYeDfbiC7/c0T/ZSzuKcnyoQ== X-Received: by 2002:a05:6a00:138a:b0:44c:b200:38d7 with SMTP id t10-20020a056a00138a00b0044cb20038d7mr29692075pfg.5.1634571592971; Mon, 18 Oct 2021 08:39:52 -0700 (PDT) Return-Path: Received: from linbox.ba.nuviainc.com (c-174-52-16-57.hsd1.ut.comcast.net. [174.52.16.57]) by smtp.gmail.com with ESMTPSA id y3sm13246952pfo.188.2021.10.18.08.39.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Oct 2021 08:39:52 -0700 (PDT) From: "Rebecca Cran" To: Sami Mujawar , Ard Biesheuvel , Gerd Hoffmann , Samer El-Haj-Mahmoud , Leif Lindholm , devel@edk2.groups.io Cc: Rebecca Cran Subject: [PATCH 0/2] Add EFI_MP_SERVICES_PROTOCOL support for AARCH64 Date: Mon, 18 Oct 2021 09:39:43 -0600 Message-Id: <20211018153945.1690-1-rebecca@nuviainc.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Patch 1/2 is the start of addressing the issue that the Aff0 field of the MPIDR is no longer guaranteed to be the core, and should be referred to in a more generic way: for example it could be the thread, with Aff1 being the core and Aff2 the cluster. Clearly much more work is needed to fully remove that assumption. Patch 2/2 implements the EFI_MP_SERVICES_PROTOCOL for DXE in Library/MpInitLib. CpuDxe initializes the MP support, and as a result gains a dependency on MpInitLib. ArmVirt.dsc.inc needs updated to add the new library, as will all AARCH64 platforms. Cores are powered on and turned off using PSCI. Note that minimal CPU setup is done: for example the MMU and caches are left disabled. Rebecca Cran (2): ArmPkg: Replace CoreId and ClusterId with Mpidr in ARM_CORE_INFO struct ArmPkg: Add Library/MpInitLib to support EFI_MP_SERVICES_PROTOCOL ArmPkg/ArmPkg.dec | 4 + ArmPkg/ArmPkg.dsc | 4 + ArmPkg/Drivers/CpuDxe/AArch64/Arch.c | 22 + ArmPkg/Drivers/CpuDxe/Arm/Arch.c | 22 + ArmPkg/Drivers/CpuDxe/CpuDxe.c | 2 + ArmPkg/Drivers/CpuDxe/CpuDxe.h | 10 + ArmPkg/Drivers/CpuDxe/CpuDxe.inf | 6 + ArmPkg/Drivers/CpuDxe/CpuMpInit.c | 604 ++++++++ ArmPkg/Include/Guid/ArmMpCoreInfo.h | 3 +- ArmPkg/Include/Library/ArmLib.h | 4 + ArmPkg/Include/Library/MpInitLib.h | 366 +++++ ArmPkg/Library/MpInitLib/AArch64/MpFuncs.S | 61 + ArmPkg/Library/MpInitLib/DxeMpInitLib.inf | 53 + ArmPkg/Library/MpInitLib/DxeMpLib.c | 1498 ++++++++++++++++++++ ArmPkg/Library/MpInitLib/InternalMpInitLib.h | 358 +++++ ArmPlatformPkg/Library/ArmPlatformLibNull/ArmPlatformLibNull.c | 8 +- ArmPlatformPkg/PrePeiCore/MainMPCore.c | 2 +- ArmPlatformPkg/PrePi/MainMPCore.c | 2 +- ArmVirtPkg/ArmVirt.dsc.inc | 3 + 19 files changed, 3024 insertions(+), 8 deletions(-) create mode 100644 ArmPkg/Drivers/CpuDxe/AArch64/Arch.c create mode 100644 ArmPkg/Drivers/CpuDxe/Arm/Arch.c create mode 100644 ArmPkg/Drivers/CpuDxe/CpuMpInit.c create mode 100644 ArmPkg/Include/Library/MpInitLib.h create mode 100644 ArmPkg/Library/MpInitLib/AArch64/MpFuncs.S create mode 100644 ArmPkg/Library/MpInitLib/DxeMpInitLib.inf create mode 100644 ArmPkg/Library/MpInitLib/DxeMpLib.c create mode 100644 ArmPkg/Library/MpInitLib/InternalMpInitLib.h -- 2.31.1