]> git.proxmox.com Git - mirror_edk2.git/blame - ArmPkg/Library/ArmMmuLib/Arm/ArmMmuLibConvert.c
ArmPkg: Apply uncrustify changes
[mirror_edk2.git] / ArmPkg / Library / ArmMmuLib / Arm / ArmMmuLibConvert.c
CommitLineData
eaaaece4
AB
1/** @file\r
2* File managing the MMU for ARMv7 architecture\r
3*\r
4* Copyright (c) 2011-2016, ARM Limited. All rights reserved.\r
5*\r
6* SPDX-License-Identifier: BSD-2-Clause-Patent\r
7*\r
8**/\r
9\r
10#include <Uefi.h>\r
11\r
12#include <Library/ArmLib.h>\r
13\r
14#include <Chipset/ArmV7.h>\r
15\r
16UINT32\r
17ConvertSectionAttributesToPageAttributes (\r
18 IN UINT32 SectionAttributes,\r
19 IN BOOLEAN IsLargePage\r
20 )\r
21{\r
429309e0 22 UINT32 PageAttributes;\r
eaaaece4 23\r
429309e0 24 PageAttributes = 0;\r
eaaaece4
AB
25 PageAttributes |= TT_DESCRIPTOR_CONVERT_TO_PAGE_CACHE_POLICY (SectionAttributes, IsLargePage);\r
26 PageAttributes |= TT_DESCRIPTOR_CONVERT_TO_PAGE_AP (SectionAttributes);\r
27 PageAttributes |= TT_DESCRIPTOR_CONVERT_TO_PAGE_XN (SectionAttributes, IsLargePage);\r
28 PageAttributes |= TT_DESCRIPTOR_CONVERT_TO_PAGE_NG (SectionAttributes);\r
29 PageAttributes |= TT_DESCRIPTOR_CONVERT_TO_PAGE_S (SectionAttributes);\r
30\r
31 return PageAttributes;\r
32}\r