TianoCore EDK2 master
Loading...
Searching...
No Matches
MemDetect.c File Reference
#include <IndustryStandard/Q35MchIch9.h>
#include <PiPei.h>
#include <Library/BaseLib.h>
#include <Library/BaseMemoryLib.h>
#include <Library/DebugLib.h>
#include <Library/HobLib.h>
#include <Library/IoLib.h>
#include <Library/PcdLib.h>
#include <Library/PciLib.h>
#include <Library/PeimEntryPoint.h>
#include <Library/ResourcePublicationLib.h>
#include "Platform.h"
#include "Cmos.h"

Go to the source code of this file.

Functions

VOID Q35TsegMbytesInitialization (VOID)
 
STATIC UINT64 GetHighestSystemMemoryAddress (BOOLEAN Below4gb)
 
UINT32 GetSystemMemorySizeBelow4gb (VOID)
 
VOID AddressWidthInitialization (VOID)
 
STATIC UINT32 GetPeiMemoryCap (VOID)
 
EFI_STATUS PublishPeiMemory (VOID)
 
VOID InitializeRamRegions (VOID)
 

Variables

UINT8 mPhysMemAddressWidth
 
STATIC UINT32 mS3AcpiReservedMemoryBase
 
STATIC UINT32 mS3AcpiReservedMemorySize
 
STATIC UINT16 mQ35TsegMbytes
 

Detailed Description

Memory Detection for Virtual Machines.

Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.
Copyright (c) 2019, Citrix Systems, Inc.

SPDX-License-Identifier: BSD-2-Clause-Patent

Module Name:

MemDetect.c

Definition in file MemDetect.c.

Function Documentation

◆ AddressWidthInitialization()

VOID AddressWidthInitialization ( VOID  )

Initialize the mPhysMemAddressWidth variable, based on CPUID data.

Definition at line 179 of file MemDetect.c.

◆ GetHighestSystemMemoryAddress()

STATIC UINT64 GetHighestSystemMemoryAddress ( BOOLEAN  Below4gb)

Definition at line 101 of file MemDetect.c.

◆ GetPeiMemoryCap()

STATIC UINT32 GetPeiMemoryCap ( VOID  )

Calculate the cap for the permanent PEI memory.

Definition at line 207 of file MemDetect.c.

◆ GetSystemMemorySizeBelow4gb()

UINT32 GetSystemMemorySizeBelow4gb ( VOID  )

Definition at line 140 of file MemDetect.c.

◆ InitializeRamRegions()

VOID InitializeRamRegions ( VOID  )

Publish system RAM and reserve memory regions

Definition at line 325 of file MemDetect.c.

◆ PublishPeiMemory()

EFI_STATUS PublishPeiMemory ( VOID  )

Publish PEI core memory

Returns
EFI_SUCCESS The PEIM initialized successfully.

Definition at line 274 of file MemDetect.c.

◆ Q35TsegMbytesInitialization()

VOID Q35TsegMbytesInitialization ( VOID  )

Definition at line 45 of file MemDetect.c.

Variable Documentation

◆ mPhysMemAddressWidth

UINT8 mPhysMemAddressWidth

Definition at line 37 of file MemDetect.c.

◆ mQ35TsegMbytes

STATIC UINT16 mQ35TsegMbytes

Definition at line 42 of file MemDetect.c.

◆ mS3AcpiReservedMemoryBase

STATIC UINT32 mS3AcpiReservedMemoryBase

Definition at line 39 of file MemDetect.c.

◆ mS3AcpiReservedMemorySize

STATIC UINT32 mS3AcpiReservedMemorySize

Definition at line 40 of file MemDetect.c.