From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2a00:1450:4864:20::442; helo=mail-wr1-x442.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-wr1-x442.google.com (mail-wr1-x442.google.com [IPv6:2a00:1450:4864:20::442]) (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 852102194D3AE for ; Mon, 26 Nov 2018 14:38:33 -0800 (PST) Received: by mail-wr1-x442.google.com with SMTP id p4so20665903wrt.7 for ; Mon, 26 Nov 2018 14:38:33 -0800 (PST) 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 :mime-version:content-transfer-encoding; bh=ynicutrS9BlDWKykqGtt6Amc2Qylqt/36mhMiGAjv0g=; b=hh51/T1NJfq85DaJSLU1fgIsukyga/apVbUI/AsyXHGAy7KE/DBmuaVGLPDW1W31/7 41+KHtWNGeG5oc8qRvYLIcpGiSOrfrGGOITzuLj2EpJ8IoMoswFmv8qYZNu6TPNjyztf W4f2iSqK9cnxnv9YGXjKOnJHl6xChfgLDQTXo= 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:mime-version:content-transfer-encoding; bh=ynicutrS9BlDWKykqGtt6Amc2Qylqt/36mhMiGAjv0g=; b=b4jXT3fIOsT88xxH3FAf9lUW8XkEeYiRRx0ViqQGDvSafHUhCqOZ8wSSIbk2QcuKcc VeNla0HUPH4pyY9peMH/1rIIg6UgmOiEaM4VLTTJu/injDwbXi9oEO0Ucfj+R7UJHTFX UZG4K18Pv1LG9/Ly7Ur1Et5kSkhhfVEjabVkkdgy6tXzbOxsIk+feHNrSaMPes4F59CA p3E3B2iUTbP0ci7iPVh6rAck4QzY3ZIVd8LT5HE7uiZ0uHAuEr0thm5coh/U6F6Q+C4O iDkP5WZZ22Li4Cc/JaKzDN/hYNMizZKKmKzugFTmu4XANHwVaePMxgAw/F9yPoczT20e z9aQ== X-Gm-Message-State: AA+aEWbC4M2wN3d88qRSDJymFttHjrHRPTFOutKpWVJWgFnHO14GTTzV 1iIR6gAbX3d5GxwzjcjIJ5+VlBvtVFI= X-Google-Smtp-Source: AFSGD/VUYJSM7MEkfPDasPFwbOEZm0vBQve1lBxq0FCmgh5QCo7Vc5ctqzb5H9HzYvI8ZEZTPjBJnw== X-Received: by 2002:adf:8143:: with SMTP id 61mr3691302wrm.47.1543271911866; Mon, 26 Nov 2018 14:38:31 -0800 (PST) Received: from harold.home ([2a01:cb1d:112:6f00:8571:4c23:4f5c:5eb7]) by smtp.gmail.com with ESMTPSA id v5sm2641916wrn.71.2018.11.26.14.38.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 26 Nov 2018 14:38:30 -0800 (PST) From: Ard Biesheuvel To: edk2-devel@lists.01.org Cc: Ard Biesheuvel , Laszlo Ersek , Leif Lindholm , Eric Auger , Andrew Jones , Philippe Mathieu-Daude , Julien Grall Date: Mon, 26 Nov 2018 23:37:52 +0100 Message-Id: <20181126223801.17121-5-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181126223801.17121-1-ard.biesheuvel@linaro.org> References: <20181126223801.17121-1-ard.biesheuvel@linaro.org> MIME-Version: 1.0 Subject: [PATCH v2 04/13] ArmPkg/CpuPei: base GCD memory space size on CPU's PA range X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Nov 2018 22:38:33 -0000 Content-Transfer-Encoding: 8bit Derive the size of the GCD memory space map directly from the CPU's information registers rather than from the PcdPrePiCpuMemorySize PCD, which will be removed. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel --- ArmPkg/Drivers/CpuPei/CpuPei.inf | 1 - ArmPkg/Drivers/CpuPei/CpuPei.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/ArmPkg/Drivers/CpuPei/CpuPei.inf b/ArmPkg/Drivers/CpuPei/CpuPei.inf index eafccd600983..dcea012fd8f9 100644 --- a/ArmPkg/Drivers/CpuPei/CpuPei.inf +++ b/ArmPkg/Drivers/CpuPei/CpuPei.inf @@ -50,7 +50,6 @@ [Guids] gArmMpCoreInfoGuid [FixedPcd] - gEmbeddedTokenSpaceGuid.PcdPrePiCpuMemorySize gEmbeddedTokenSpaceGuid.PcdPrePiCpuIoSize [Depex] diff --git a/ArmPkg/Drivers/CpuPei/CpuPei.c b/ArmPkg/Drivers/CpuPei/CpuPei.c index d54f42acfcc8..e63519ff6481 100644 --- a/ArmPkg/Drivers/CpuPei/CpuPei.c +++ b/ArmPkg/Drivers/CpuPei/CpuPei.c @@ -73,7 +73,7 @@ InitializeCpuPeim ( ArmEnableBranchPrediction (); // Publish the CPU memory and io spaces sizes - BuildCpuHob (PcdGet8 (PcdPrePiCpuMemorySize), PcdGet8 (PcdPrePiCpuIoSize)); + BuildCpuHob (ArmGetPhysicalAddressBits (), PcdGet8 (PcdPrePiCpuIoSize)); // Only MP Core platform need to produce gArmMpCoreInfoPpiGuid Status = PeiServicesLocatePpi (&gArmMpCoreInfoPpiGuid, 0, NULL, (VOID**)&ArmMpCoreInfoPpi); -- 2.19.1