]>
Commit | Line | Data |
---|---|---|
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 | |
16 | UINT32\r | |
17 | ConvertSectionAttributesToPageAttributes (\r | |
18 | IN UINT32 SectionAttributes,\r | |
19 | IN BOOLEAN IsLargePage\r | |
20 | )\r | |
21 | {\r | |
22 | UINT32 PageAttributes;\r | |
23 | \r | |
24 | PageAttributes = 0;\r | |
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 |