TianoCore EDK2 master
|
#include "CpuDxe.h"
Go to the source code of this file.
Functions | |
EFI_STATUS | SearchGcdMemorySpaces (IN EFI_GCD_MEMORY_SPACE_DESCRIPTOR *MemorySpaceMap, IN UINTN NumberOfDescriptors, IN EFI_PHYSICAL_ADDRESS BaseAddress, IN UINT64 Length, OUT UINTN *StartIndex, OUT UINTN *EndIndex) |
EFI_STATUS | SetGcdMemorySpaceAttributes (IN EFI_GCD_MEMORY_SPACE_DESCRIPTOR *MemorySpaceMap, IN UINTN NumberOfDescriptors, IN EFI_PHYSICAL_ADDRESS BaseAddress, IN UINT64 Length, IN UINT64 Attributes) |
EFI_STATUS EFIAPI | CpuSetMemoryAttributes (IN EFI_CPU_ARCH_PROTOCOL *This, IN EFI_PHYSICAL_ADDRESS BaseAddress, IN UINT64 Length, IN UINT64 EfiAttributes) |
Copyright (c) 2013, ARM Limited. All rights reserved. Copyright (c) 2017, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file CpuMmuCommon.c.
EFI_STATUS EFIAPI CpuSetMemoryAttributes | ( | IN EFI_CPU_ARCH_PROTOCOL * | This, |
IN EFI_PHYSICAL_ADDRESS | BaseAddress, | ||
IN UINT64 | Length, | ||
IN UINT64 | EfiAttributes | ||
) |
This function modifies the attributes for the memory region specified by BaseAddress and Length from their current attributes to the attributes specified by Attributes.
This | The EFI_CPU_ARCH_PROTOCOL instance. |
BaseAddress | The physical address that is the start address of a memory region. |
Length | The size in bytes of the memory region. |
Attributes | The bit mask of attributes to set for the memory region. |
EFI_SUCCESS | The attributes were set for the memory region. |
EFI_ACCESS_DENIED | The attributes for the memory resource range specified by BaseAddress and Length cannot be modified. |
EFI_INVALID_PARAMETER | Length is zero. |
EFI_OUT_OF_RESOURCES | There are not enough system resources to modify the attributes of the memory resource range. |
EFI_UNSUPPORTED | The processor does not support one or more bytes of the memory resource range specified by BaseAddress and Length. The bit mask of attributes is not support for the memory resource range specified by BaseAddress and Length. |
Definition at line 228 of file CpuMmuCommon.c.
EFI_STATUS SearchGcdMemorySpaces | ( | IN EFI_GCD_MEMORY_SPACE_DESCRIPTOR * | MemorySpaceMap, |
IN UINTN | NumberOfDescriptors, | ||
IN EFI_PHYSICAL_ADDRESS | BaseAddress, | ||
IN UINT64 | Length, | ||
OUT UINTN * | StartIndex, | ||
OUT UINTN * | EndIndex | ||
) |
Searches memory descriptors covered by given memory range.
This function searches into the Gcd Memory Space for descriptors (from StartIndex to EndIndex) that contains the memory range specified by BaseAddress and Length.
MemorySpaceMap | Gcd Memory Space Map as array. |
NumberOfDescriptors | Number of descriptors in map. |
BaseAddress | BaseAddress for the requested range. |
Length | Length for the requested range. |
StartIndex | Start index into the Gcd Memory Space Map. |
EndIndex | End index into the Gcd Memory Space Map. |
EFI_SUCCESS | Search successfully. |
EFI_NOT_FOUND | The requested descriptors does not exist. |
Definition at line 31 of file CpuMmuCommon.c.
EFI_STATUS SetGcdMemorySpaceAttributes | ( | IN EFI_GCD_MEMORY_SPACE_DESCRIPTOR * | MemorySpaceMap, |
IN UINTN | NumberOfDescriptors, | ||
IN EFI_PHYSICAL_ADDRESS | BaseAddress, | ||
IN UINT64 | Length, | ||
IN UINT64 | Attributes | ||
) |
Sets the attributes for a specified range in Gcd Memory Space Map.
This function sets the attributes for a specified range in Gcd Memory Space Map.
MemorySpaceMap | Gcd Memory Space Map as array |
NumberOfDescriptors | Number of descriptors in map |
BaseAddress | BaseAddress for the range |
Length | Length for the range |
Attributes | Attributes to set |
EFI_SUCCESS | Memory attributes set successfully |
EFI_NOT_FOUND | The specified range does not exist in Gcd Memory Space |
Definition at line 79 of file CpuMmuCommon.c.