2020-02-26 10:36:49 +01:00
|
|
|
/** @file
|
|
|
|
* File managing the MMU for ARMv7 architecture
|
|
|
|
*
|
|
|
|
* Copyright (c) 2011-2016, ARM Limited. All rights reserved.
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: BSD-2-Clause-Patent
|
|
|
|
*
|
|
|
|
**/
|
|
|
|
|
|
|
|
#include <Uefi.h>
|
|
|
|
|
|
|
|
#include <Library/ArmLib.h>
|
|
|
|
|
|
|
|
#include <Chipset/ArmV7.h>
|
|
|
|
|
|
|
|
UINT32
|
|
|
|
ConvertSectionAttributesToPageAttributes (
|
2023-02-09 09:46:37 +01:00
|
|
|
IN UINT32 SectionAttributes
|
2020-02-26 10:36:49 +01:00
|
|
|
)
|
|
|
|
{
|
|
|
|
UINT32 PageAttributes;
|
|
|
|
|
|
|
|
PageAttributes = 0;
|
2023-02-09 09:46:37 +01:00
|
|
|
PageAttributes |= TT_DESCRIPTOR_CONVERT_TO_PAGE_CACHE_POLICY (SectionAttributes);
|
2020-02-26 10:36:49 +01:00
|
|
|
PageAttributes |= TT_DESCRIPTOR_CONVERT_TO_PAGE_AP (SectionAttributes);
|
2023-02-07 17:32:19 +01:00
|
|
|
PageAttributes |= TT_DESCRIPTOR_CONVERT_TO_PAGE_AF (SectionAttributes);
|
2023-02-09 09:46:37 +01:00
|
|
|
PageAttributes |= TT_DESCRIPTOR_CONVERT_TO_PAGE_XN (SectionAttributes);
|
2020-02-26 10:36:49 +01:00
|
|
|
PageAttributes |= TT_DESCRIPTOR_CONVERT_TO_PAGE_NG (SectionAttributes);
|
|
|
|
PageAttributes |= TT_DESCRIPTOR_CONVERT_TO_PAGE_S (SectionAttributes);
|
|
|
|
|
|
|
|
return PageAttributes;
|
|
|
|
}
|