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::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-Google-Smtp-Source: AFSGD/UdPp/f46ZLxy73O7ZbHDFFFPJ5Hlv1gX7UsJOEul3MUzFt3qn/jiEWIAn9k6RHDtuu++EgYg== 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 Cc: Ard Biesheuvel , Michael D Kinney , Liming Gao , Jian J Wang , Hao Wu , Leif Lindholm , Laszlo Ersek , Eric Auger , Andrew Jones , Philippe Mathieu-Daude 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: [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: , X-List-Received-Date: Fri, 07 Dec 2018 11:23:20 -0000 Content-Transfer-Encoding: 8bit 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(+) 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. /// -- 2.19.2