TianoCore EDK2 master
Loading...
Searching...
No Matches
LegacyRegion2.h File Reference

Go to the source code of this file.

Data Structures

struct  EFI_LEGACY_REGION_DESCRIPTOR
 
struct  _EFI_LEGACY_REGION2_PROTOCOL
 

Macros

#define EFI_LEGACY_REGION2_PROTOCOL_GUID
 

Typedefs

typedef struct _EFI_LEGACY_REGION2_PROTOCOL EFI_LEGACY_REGION2_PROTOCOL
 
typedef EFI_STATUS(EFIAPI * EFI_LEGACY_REGION2_DECODE) (IN EFI_LEGACY_REGION2_PROTOCOL *This, IN UINT32 Start, IN UINT32 Length, OUT UINT32 *Granularity, IN BOOLEAN *On)
 
typedef EFI_STATUS(EFIAPI * EFI_LEGACY_REGION2_LOCK) (IN EFI_LEGACY_REGION2_PROTOCOL *This, IN UINT32 Start, IN UINT32 Length, OUT UINT32 *Granularity)
 
typedef EFI_STATUS(EFIAPI * EFI_LEGACY_REGION2_BOOT_LOCK) (IN EFI_LEGACY_REGION2_PROTOCOL *This, IN UINT32 Start, IN UINT32 Length, OUT UINT32 *Granularity OPTIONAL)
 
typedef EFI_STATUS(EFIAPI * EFI_LEGACY_REGION2_UNLOCK) (IN EFI_LEGACY_REGION2_PROTOCOL *This, IN UINT32 Start, IN UINT32 Length, OUT UINT32 *Granularity)
 
typedef EFI_STATUS(EFIAPI * EFI_LEGACY_REGION_GET_INFO) (IN EFI_LEGACY_REGION2_PROTOCOL *This, OUT UINT32 *DescriptorCount, OUT EFI_LEGACY_REGION_DESCRIPTOR **Descriptor)
 

Enumerations

enum  EFI_LEGACY_REGION_ATTRIBUTE {
  LegacyRegionDecoded , LegacyRegionNotDecoded , LegacyRegionWriteEnabled , LegacyRegionWriteDisabled ,
  LegacyRegionBootLocked , LegacyRegionNotLocked
}
 

Variables

EFI_GUID gEfiLegacyRegion2ProtocolGuid
 

Detailed Description

The Legacy Region Protocol controls the read, write and boot-lock attributes for the region 0xC0000 to 0xFFFFF.

Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent

Revision Reference:
This Protocol is defined in UEFI Platform Initialization Specification 1.2 Volume 5: Standards

Definition in file LegacyRegion2.h.

Macro Definition Documentation

◆ EFI_LEGACY_REGION2_PROTOCOL_GUID

#define EFI_LEGACY_REGION2_PROTOCOL_GUID
Value:
{ \
0x70101eaf, 0x85, 0x440c, {0xb3, 0x56, 0x8e, 0xe3, 0x6f, 0xef, 0x24, 0xf0 } \
}

Definition at line 17 of file LegacyRegion2.h.

Typedef Documentation

◆ EFI_LEGACY_REGION2_BOOT_LOCK

typedef EFI_STATUS(EFIAPI * EFI_LEGACY_REGION2_BOOT_LOCK) (IN EFI_LEGACY_REGION2_PROTOCOL *This, IN UINT32 Start, IN UINT32 Length, OUT UINT32 *Granularity OPTIONAL)

Modify the hardware to disallow memory attribute changes in a region.

This function makes the attributes of a region read only. Once a region is boot-locked with this function, the read and write attributes of that region cannot be changed until a power cycle has reset the boot-lock attribute. Calls to Decode(), Lock() and Unlock() will have no effect.

Parameters
This[in]Indicates the EFI_LEGACY_REGION2_PROTOCOL instance.
Start[in]The beginning of the physical address of the region whose attributes should be modified.
Length[in]The number of bytes of memory whose attributes should be modified. The actual number of bytes modified may be greater than the number specified.
Granularity[out]The number of bytes in the last region affected. This may be less than the total number of bytes affected if the starting address was not aligned to a region's starting address or if the length was greater than the number of bytes in the first region.
Return values
EFI_SUCCESSThe region's attributes were successfully modified.
EFI_INVALID_PARAMETERIf Start or Length describe an address not in the Legacy Region.
EFI_UNSUPPORTEDThe chipset does not support locking the configuration registers in a way that will not affect memory regions outside the legacy memory region.

Definition at line 113 of file LegacyRegion2.h.

◆ EFI_LEGACY_REGION2_DECODE

typedef EFI_STATUS(EFIAPI * EFI_LEGACY_REGION2_DECODE) (IN EFI_LEGACY_REGION2_PROTOCOL *This, IN UINT32 Start, IN UINT32 Length, OUT UINT32 *Granularity, IN BOOLEAN *On)

Modify the hardware to allow (decode) or disallow (not decode) memory reads in a region.

If the On parameter evaluates to TRUE, this function enables memory reads in the address range Start to (Start + Length - 1). If the On parameter evaluates to FALSE, this function disables memory reads in the address range Start to (Start + Length - 1).

Parameters
This[in]Indicates the EFI_LEGACY_REGION2_PROTOCOL instance.
Start[in]The beginning of the physical address of the region whose attributes should be modified.
Length[in]The number of bytes of memory whose attributes should be modified. The actual number of bytes modified may be greater than the number specified.
Granularity[out]The number of bytes in the last region affected. This may be less than the total number of bytes affected if the starting address was not aligned to a region's starting address or if the length was greater than the number of bytes in the first region.
On[in]Decode / Non-Decode flag.
Return values
EFI_SUCCESSThe region's attributes were successfully modified.
EFI_INVALID_PARAMETERIf Start or Length describe an address not in the Legacy Region.

Definition at line 49 of file LegacyRegion2.h.

◆ EFI_LEGACY_REGION2_LOCK

typedef EFI_STATUS(EFIAPI * EFI_LEGACY_REGION2_LOCK) (IN EFI_LEGACY_REGION2_PROTOCOL *This, IN UINT32 Start, IN UINT32 Length, OUT UINT32 *Granularity)

Modify the hardware to disallow memory writes in a region.

This function changes the attributes of a memory range to not allow writes.

Parameters
This[in]Indicates the EFI_LEGACY_REGION2_PROTOCOL instance.
Start[in]The beginning of the physical address of the region whose attributes should be modified.
Length[in]The number of bytes of memory whose attributes should be modified. The actual number of bytes modified may be greater than the number specified.
Granularity[out]The number of bytes in the last region affected. This may be less than the total number of bytes affected if the starting address was not aligned to a region's starting address or if the length was greater than the number of bytes in the first region.
Return values
EFI_SUCCESSThe region's attributes were successfully modified.
EFI_INVALID_PARAMETERIf Start or Length describe an address not in the Legacy Region.

Definition at line 79 of file LegacyRegion2.h.

◆ EFI_LEGACY_REGION2_PROTOCOL

Definition at line 22 of file LegacyRegion2.h.

◆ EFI_LEGACY_REGION2_UNLOCK

typedef EFI_STATUS(EFIAPI * EFI_LEGACY_REGION2_UNLOCK) (IN EFI_LEGACY_REGION2_PROTOCOL *This, IN UINT32 Start, IN UINT32 Length, OUT UINT32 *Granularity)

Modify the hardware to allow memory writes in a region.

This function changes the attributes of a memory range to allow writes.

Parameters
This[in]Indicates the EFI_LEGACY_REGION2_PROTOCOL instance.
Start[in]The beginning of the physical address of the region whose attributes should be modified.
Length[in]The number of bytes of memory whose attributes should be modified. The actual number of bytes modified may be greater than the number specified.
Granularity[out]The number of bytes in the last region affected. This may be less than the total number of bytes affected if the starting address was not aligned to a region's starting address or if the length was greater than the number of bytes in the first region.
Return values
EFI_SUCCESSThe region's attributes were successfully modified.
EFI_INVALID_PARAMETERIf Start or Length describe an address not in the Legacy Region.

Definition at line 142 of file LegacyRegion2.h.

◆ EFI_LEGACY_REGION_GET_INFO

typedef EFI_STATUS(EFIAPI * EFI_LEGACY_REGION_GET_INFO) (IN EFI_LEGACY_REGION2_PROTOCOL *This, OUT UINT32 *DescriptorCount, OUT EFI_LEGACY_REGION_DESCRIPTOR **Descriptor)

Get region information for the attributes of the Legacy Region.

This function is used to discover the granularity of the attributes for the memory in the legacy region. Each attribute may have a different granularity and the granularity may not be the same for all memory ranges in the legacy region.

Parameters
This[in]Indicates the EFI_LEGACY_REGION2_PROTOCOL instance.
DescriptorCount[out]The number of region descriptor entries returned in the Descriptor buffer.
Descriptor[out]A pointer to a pointer used to return a buffer where the legacy region information is deposited. This buffer will contain a list of DescriptorCount number of region descriptors. This function will provide the memory for the buffer.
Return values
EFI_SUCCESSThe information structure was returned.
EFI_UNSUPPORTEDThis function is not supported.

Definition at line 202 of file LegacyRegion2.h.

Enumeration Type Documentation

◆ EFI_LEGACY_REGION_ATTRIBUTE

Enumerator
LegacyRegionDecoded 

This region is currently set to allow reads.

LegacyRegionNotDecoded 

This region is currently set to not allow reads.

LegacyRegionWriteEnabled 

This region is currently set to allow writes.

LegacyRegionWriteDisabled 

This region is currently set to write protected.

LegacyRegionBootLocked 

This region's attributes are locked, cannot be modified until after a power cycle.

LegacyRegionNotLocked 

This region's attributes are not locked.

Definition at line 150 of file LegacyRegion2.h.