From patchwork Fri Dec 7 11:23:04 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 153142 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp376445ljp; Fri, 7 Dec 2018 03:23:37 -0800 (PST) X-Google-Smtp-Source: AFSGD/X5IO+GSyaS5WYbJRH/uduP8Vsr+hK7qGct2nILK7kzx3IPVav4Ok4A+1ywugzHgG6Efwen X-Received: by 2002:a17:902:9345:: with SMTP id g5mr1736169plp.148.1544181817052; Fri, 07 Dec 2018 03:23:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544181817; cv=none; d=google.com; s=arc-20160816; b=KBqJQWWul8UWAHuZQT+grXmqYJ8HBKxoDU0+QEHdYfh7gscWSC6iDfoW8w+zDgEW/k TsQdV4XoKV1yr0XH7DhKlX+7jhDcWi/J3VcJF6LpnYinFdwqU7WMzqgQnO1mSIne05Cr 0U1P0I0u35jdVByT3meKE5GhXc1XEhpNs9/hLD6PFAzTqKvWeWrNOmykq21ToyNoiqZq ONYJxYAf0XGjANFU0mHep82U7InimyvUs66cZ1lb8at//b0gcF2sp7rbHboSVg1Aa5wc XBp6TuPR6aogm6IWcQw2YKZ3SNPkv18D9D9RJBYCMnxs2vVULI6K/Zdya9v529/MHC+E qISQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:references:in-reply-to:message-id :date:to:from:dkim-signature:delivered-to; bh=cDCxsYetRBH27A+GBqIi1BCWgv4gGzIxfLrJt4CJu2Q=; b=K3QYrgbtlrvTwXNXIIdP1jbLk6Cb++rCkz+SeV+Ot6VZEmWa8q0iZveIuXCOzO87Di Tedclfieu9UZBczD2od4YKleIN6sGOFqnCEP0L3/GEs5Uxw+JuBWsVJ3V3rkn0w+veIl Z5SUmMtPyUHWkPu9z6l48YV8jAV6Nlh4Q8f0gSCbO7IxbEhK+Be9Gnh16OCCk47cXVdk MmfzP3qx3QxF2iFUTMtZ5ZROgwXaHB8gDKgiF8Zq8VmeNb50LOYiquABwSZDcQ6dyJtq Ud0BIsEK78Xwq4P+466iqoGz1j54hXmV/TBp5H0h2py9poezDXa2EFJZHldNpiKXeJPj j2Og== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=ZSRwNwfH; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from ml01.01.org (ml01.01.org. [2001:19d0:306:5::1]) by mx.google.com with ESMTPS id b91si2779542plb.11.2018.12.07.03.23.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 07 Dec 2018 03:23:37 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) client-ip=2001:19d0:306:5::1; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=ZSRwNwfH; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id A913C21199B12; Fri, 7 Dec 2018 03:23:21 -0800 (PST) X-Original-To: edk2-devel@lists.01.org Delivered-To: edk2-devel@lists.01.org Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2a00:1450:4864:20::441; helo=mail-wr1-x441.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-wr1-x441.google.com (mail-wr1-x441.google.com [IPv6:2a00:1450:4864:20::441]) (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 30A6321199B13 for ; Fri, 7 Dec 2018 03:23:20 -0800 (PST) Received: by mail-wr1-x441.google.com with SMTP id r10so3421213wrs.10 for ; Fri, 07 Dec 2018 03:23:20 -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=jP4a319MdppnHukW2bJYz6cGZyZ1NgoG/PyFmZObgxo=; b=ZSRwNwfHDLUtQiFWo4mSMSzNTIA7YsvHKX1uRT6TFanUyfx8ELd3fyvP+CW3cnzbE6 woUZkqBdzHSPTxdVpMSjWiJk1f9I3IeIBakmXTBbssA84pvrfwzAsn4U7XvS2FPzX3Ye sWlz5XVJzt1nDQtuKWXX75wlZJnudgRuVeZZY= 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=jP4a319MdppnHukW2bJYz6cGZyZ1NgoG/PyFmZObgxo=; b=gMiLpvNQZi9TbAnoo/Qr0h4eybiLU53dBwDgDKWAqFrl+FLsrJj8LiZ0rBo1vYuJgL +w/ix1ZRN7NqZgLV5vhdmcFizUIDlqIRrujiBCC8W97Hzut9ZBMEhtdH7tBT9Jr+zaAL E24SkqBU5IIMYIBR3ts2JQrfCuFDMZ4mK2v9Y3VrXkSfuQj8PM9//51uw7XWPtndSEKi M3norSPrLwmcRRzMiGLVnWuHd+vsFJ3YGxjNrr0VLCGpZPyd2zs/pTdSIzQHpArFB7gy A4FuwgYolaWQS5XoowWA3ImqM3xocZ3VVz1wU8f8CKyKs4TM5/k4E36NhqMPjKHxo/lw sP2g== X-Gm-Message-State: AA+aEWYaRKELysrdZnJzwHodcsBq+ejncf8VjoOyO41MWyH+TxlQINXq wT+P7/a9i4zt3QV27B3fvm+wzGjTxLfeLg== X-Received: by 2002:a5d:6187:: with SMTP id j7mr1474668wru.300.1544181798413; Fri, 07 Dec 2018 03:23:18 -0800 (PST) Received: from harold.home ([2a01:cb1d:112:6f00:2cd0:a19e:84ff:4800]) by smtp.gmail.com with ESMTPSA id f187sm2813542wma.4.2018.12.07.03.23.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 07 Dec 2018 03:23:17 -0800 (PST) From: Ard Biesheuvel To: edk2-devel@lists.01.org Date: Fri, 7 Dec 2018 12:23:04 +0100 Message-Id: <20181207112304.19765-8-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.19.2 In-Reply-To: <20181207112304.19765-1-ard.biesheuvel@linaro.org> References: <20181207112304.19765-1-ard.biesheuvel@linaro.org> MIME-Version: 1.0 Subject: [edk2] [RFC PATCH 7/7] MdePkg/ProcessorBind AARCH64: limit MAX_ALLOC_ADDRESS to 48 bits 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: , Cc: Andrew Jones , Hao Wu , Liming Gao , Michael D Kinney , Laszlo Ersek Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" Limit MAX_ALLOC_ADDRESS to 48 bits on AArch64 so that the memory handling routines running at boot time take care not to allocate memory that the CPU itself cannot access due to the fact that it runs with 4 KB pages and thus an address space that is limited to 256 TB. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel --- MdePkg/Include/AArch64/ProcessorBind.h | 5 +++++ 1 file changed, 5 insertions(+) -- 2.19.2 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel Reviewed-by: Laszlo Ersek diff --git a/MdePkg/Include/AArch64/ProcessorBind.h b/MdePkg/Include/AArch64/ProcessorBind.h index 968c18f915ae..a8c698484a1d 100644 --- a/MdePkg/Include/AArch64/ProcessorBind.h +++ b/MdePkg/Include/AArch64/ProcessorBind.h @@ -142,6 +142,11 @@ typedef INT64 INTN; /// #define MAX_ADDRESS 0xFFFFFFFFFFFFFFFFULL +/// +/// Maximum address usable at boot services time (48 bits for 4 KB pages) +/// +#define MAX_ALLOC_ADDRESS 0xFFFFFFFFFFFFULL + /// /// Maximum legal AArch64 INTN and UINTN values. ///