]>
git.proxmox.com Git - mirror_edk2.git/blob - ArmPlatformPkg/ArmRealViewEbPkg/Library/ArmRealViewEbLibRTSM/ArmRealViewEb.c
3 * Copyright (c) 2011, ARM Limited. All rights reserved.
5 * This program and the accompanying materials
6 * are licensed and made available under the terms and conditions of the BSD License
7 * which accompanies this distribution. The full text of the license may be found at
8 * http://opensource.org/licenses/bsd-license.php
10 * THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
15 #include <Library/IoLib.h>
16 #include <Library/ArmPlatformLib.h>
17 #include <Library/DebugLib.h>
18 #include <Library/PcdLib.h>
19 #include <Drivers/PL341Dmc.h>
22 Return if Trustzone is supported by your platform
24 A non-zero value must be returned if you want to support a Secure World on your platform.
25 ArmPlatformTrustzoneInit() will later set up the secure regions.
26 This function can return 0 even if Trustzone is supported by your processor. In this case,
27 the platform will continue to run in Secure World.
29 @return A non-zero value if Trustzone supported.
32 UINTN
ArmPlatformTrustzoneSupported(VOID
) {
33 // There is no Trustzone controllers (TZPC & TZASC) and no Secure Memory on RTSM
38 Initialize the Secure peripherals and memory regions
40 If Trustzone is supported by your platform then this function makes the required initialization
41 of the secure peripherals and memory regions.
44 VOID
ArmPlatformTrustzoneInit(VOID
) {
49 Remap the memory at 0x0
51 Some platform requires or gives the ability to remap the memory at the address 0x0.
52 This function can do nothing if this feature is not relevant to your platform.
55 VOID
ArmPlatformBootRemapping(VOID
) {
56 // Disable memory remapping and return to normal mapping
57 MmioOr32 (ARM_EB_SYSCTRL
, BIT8
); //EB_SP810_CTRL_BASE
61 Initialize the system (or sometimes called permanent) memory
63 This memory is generally represented by the DRAM.
66 VOID
ArmPlatformInitializeSystemMemory(VOID
) {
67 // We do not need to initialize the System Memory on RTSM