EDK2 doxygen online documents - Firmware Encoding Index 1
EDK2 doxygen online documents - Firmware Encoding Index
Functions

MdeModulePkg/Core/DxeIplPeim/X64/VirtualMemory.c File Reference

#include "DxeIpl.h"
#include "VirtualMemory.h"

Go to the source code of this file.

Functions

UINTN CreateIdentityMappingPageTables (VOID)

Detailed Description

x64 Virtual Memory Management Services in the form of an IA-32 driver. Used to establish a 1:1 Virtual to Physical Mapping that is required to enter Long Mode (x64 64-bit mode).

While we make a 1:1 mapping (identity mapping) for all physical pages we still need to use the MTRR's to ensure that the cachability attributes for all memory regions is correct.

The basic idea is to use 2MB page table entries where ever possible. If more granularity of cachability is required then 4K page tables are used.

References: 1) IA-32 Intel(R) Architecture Software Developer's Manual Volume 1:Basic Architecture, Intel 2) IA-32 Intel(R) Architecture Software Developer's Manual Volume 2:Instruction Set Reference, Intel 3) IA-32 Intel(R) Architecture Software Developer's Manual Volume 3:System Programmer's Guide, Intel

Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at http://opensource.org/licenses/bsd-license.php

THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.

Definition in file VirtualMemory.c.


Function Documentation

UINTN CreateIdentityMappingPageTables ( VOID  )

Allocates and fills in the Page Directory and Page Table Entries to establish a 1:1 Virtual to Physical mapping.

Parameters:
NumberOfProcessorPhysicalAddressBitsNumber of processor address bits to use. Limits the number of page table entries to the physical address space.
Returns:
The address of 4 level page map.

Definition at line 45 of file VirtualMemory.c.

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Defines