TianoCore EDK2 master
|
#include <Guid/MemoryTypeInformation.h>
#include <Library/BaseLib.h>
#include <Library/DebugLib.h>
#include <Library/HobLib.h>
#include <Library/PcdLib.h>
#include <Library/PeiServicesLib.h>
#include <Ppi/ReadOnlyVariable2.h>
#include <Uefi/UefiMultiPhase.h>
#include "Platform.h"
Go to the source code of this file.
Macros | |
#define | MEMORY_TYPE_INFO_DEFAULT(Type) { Type, FixedPcdGet32 (PcdMemoryType ## Type) } |
Functions | |
STATIC VOID | BuildMemTypeInfoHob (VOID) |
STATIC VOID | RefreshMemTypeInfo (IN EFI_PEI_READ_ONLY_VARIABLE2_PPI *ReadOnlyVariable2) |
STATIC EFI_STATUS EFIAPI | OnReadOnlyVariable2Available (IN EFI_PEI_SERVICES **PeiServices, IN EFI_PEI_NOTIFY_DESCRIPTOR *NotifyDescriptor, IN VOID *Ppi) |
VOID | MemTypeInfoInitialization (IN OUT EFI_HOB_PLATFORM_INFO *PlatformInfoHob) |
Variables | |
STATIC EFI_MEMORY_TYPE_INFORMATION | mMemoryTypeInformation [] |
STATIC CONST EFI_PEI_NOTIFY_DESCRIPTOR | mReadOnlyVariable2Notify |
Produce the memory type information HOB.
Copyright (C) 2017-2020, Red Hat, Inc.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file MemTypeInfo.c.
#define MEMORY_TYPE_INFO_DEFAULT | ( | Type | ) | { Type, FixedPcdGet32 (PcdMemoryType ## Type) } |
Definition at line 20 of file MemTypeInfo.c.
STATIC VOID BuildMemTypeInfoHob | ( | VOID | ) |
Definition at line 34 of file MemTypeInfo.c.
VOID MemTypeInfoInitialization | ( | IN OUT EFI_HOB_PLATFORM_INFO * | PlatformInfoHob | ) |
Definition at line 205 of file MemTypeInfo.c.
STATIC EFI_STATUS EFIAPI OnReadOnlyVariable2Available | ( | IN EFI_PEI_SERVICES ** | PeiServices, |
IN EFI_PEI_NOTIFY_DESCRIPTOR * | NotifyDescriptor, | ||
IN VOID * | Ppi | ||
) |
Notification function called when EFI_PEI_READ_ONLY_VARIABLE2_PPI becomes available.
[in] | PeiServices | Indirect reference to the PEI Services Table. |
[in] | NotifyDescriptor | Address of the notification descriptor data structure. |
[in] | Ppi | Address of the PPI that was installed. |
Definition at line 180 of file MemTypeInfo.c.
STATIC VOID RefreshMemTypeInfo | ( | IN EFI_PEI_READ_ONLY_VARIABLE2_PPI * | ReadOnlyVariable2 | ) |
Refresh the mMemoryTypeInformation array (which we'll turn into the MemoryTypeInformation HOB) from the MemoryTypeInformation UEFI variable.
Normally, the DXE IPL PEIM builds the HOB from the UEFI variable. But it does so transparently. Instead, we consider the UEFI variable as a list of hints, for updating our HOB defaults:
[in] | ReadOnlyVariable2 | The EFI_PEI_READ_ONLY_VARIABLE2_PPI used for retrieving the MemoryTypeInformation UEFI variable. |
Definition at line 66 of file MemTypeInfo.c.
STATIC EFI_MEMORY_TYPE_INFORMATION mMemoryTypeInformation[] |
Definition at line 23 of file MemTypeInfo.c.
STATIC CONST EFI_PEI_NOTIFY_DESCRIPTOR mReadOnlyVariable2Notify |
Definition at line 197 of file MemTypeInfo.c.