-#\r
-# Copyright (c) 2011-2013, ARM Limited. All rights reserved.\r
-# Copyright (c) 2016-2017, Linaro Limited. All rights reserved.\r
-#\r
-# This program and the accompanying materials\r
-# are licensed and made available under the terms and conditions of the BSD License\r
-# which accompanies this distribution. The full text of the license may be found at\r
-# http://opensource.org/licenses/bsd-license.php\r
-#\r
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-#\r
-#\r
-\r
-#include <AsmMacroIoLibV8.h>\r
-\r
-//EFI_PHYSICAL_ADDRESS\r
-//GetPhysAddrTop (\r
-// VOID\r
-// );\r
-ASM_FUNC(ArmGetPhysAddrTop)\r
- mrs x0, id_aa64mmfr0_el1\r
- adr x1, .LPARanges\r
- and x0, x0, #7\r
- ldrb w1, [x1, x0]\r
- mov x0, #1\r
- lsl x0, x0, x1\r
- ret\r
-\r
-//\r
-// Bits 0..2 of the AA64MFR0_EL1 system register encode the size of the\r
-// physical address space support on this CPU:\r
-// 0 == 32 bits, 1 == 36 bits, etc etc\r
-// 6 and 7 are reserved\r
-//\r
-.LPARanges:\r
- .byte 32, 36, 40, 42, 44, 48, -1, -1\r
-\r
-ASM_FUNCTION_REMOVE_IF_UNREFERENCED\r