]>
git.proxmox.com Git - mirror_edk2.git/blob - ArmPkg/Library/ArmLib/ArmLib.c
3 Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
4 Copyright (c) 2011 - 2014, ARM Ltd. All rights reserved.<BR>
6 This program and the accompanying materials
7 are licensed and made available under the terms and conditions of the BSD License
8 which accompanies this distribution. The full text of the license may be found at
9 http://opensource.org/licenses/bsd-license.php
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
18 #include <Library/ArmLib.h>
19 #include <Library/DebugLib.h>
20 #include <Library/PcdLib.h>
22 #include "ArmLibPrivate.h"
30 UINT32 val
= ArmReadAuxCr();
41 UINT32 val
= ArmReadAuxCr();
47 // Helper functions for accessing CPUACTLR
57 Value
= ArmReadCpuActlr ();
59 ArmWriteCpuActlr (Value
);
69 Value
= ArmReadCpuActlr ();
71 ArmWriteCpuActlr (Value
);
76 ArmDataCacheLineLength (
80 return 4 << ((ArmCacheInfo () >> 16) & 0xf); // CTR_EL0.DminLine
85 ArmInstructionCacheLineLength (
89 return 4 << (ArmCacheInfo () & 0xf); // CTR_EL0.IminLine
94 ArmCacheWritebackGranule (
100 CWG
= (ArmCacheInfo () >> 24) & 0xf; // CTR_EL0.CWG