/* $Id$ */
/** @file
*/
/*
* Copyright (C) 2012 Oracle Corporation
*
* This file is part of VirtualBox Open Source Edition (OSE), as
* available from http://www.virtualbox.org. This file is free software;
* General Public License (GPL) as published by the Free Software
* Foundation, in version 2 as it comes in the "COPYING" file of the
* VirtualBox OSE distribution. VirtualBox OSE is distributed in the
* hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
*
* The contents of this file may alternatively be used under the terms
* of the Common Development and Distribution License Version 1.0
* (CDDL) only, as it comes in the "COPYING.CDDL" file of the
* VirtualBox OSE distribution, in which case the provisions of the
* CDDL are applicable instead of those of the GPL.
*
* You may elect to license modified versions of this file under the
* terms and conditions of either the GPL or the CDDL or both.
*/
/**@file
Platform PEI driver
Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2011, Andrei Warkentin <andreiw@motorola.com>
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
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
//
// The package level header files this module uses
//
#include <PiPei.h>
//
// The Library classes this module consumes
//
#include <Library/DebugLib.h>
#include <Library/MemoryAllocationLib.h>
#include <Library/PeimEntryPoint.h>
#include <Library/PeiServicesLib.h>
#include <Library/ResourcePublicationLib.h>
#include <Guid/MemoryTypeInformation.h>
#include <Ppi/MasterBootMode.h>
#include "Platform.h"
#include "Cmos.h"
{ EfiACPIMemoryNVS, 0x004 },
{ EfiACPIReclaimMemory, 0x008 },
{ EfiReservedMemoryType, 0x004 },
{ EfiRuntimeServicesData, 0x024 },
{ EfiRuntimeServicesCode, 0x030 },
{ EfiBootServicesCode, 0x180 },
{ EfiBootServicesData, 0xF00 },
{ EfiMaxMemoryType, 0x000 }
};
{
}
};
)
{
);
}
)
{
);
}
)
{
(
);
);
}
)
{
}
)
{
);
}
)
{
}
)
{
);
}
static VOID *
)
{
//
// First Search 0x0e0000 - 0x0fffff for RSD Ptr
//
}
}
return NULL;
}
)
{
}
)
{
//
// Create Memory Type Information HOB
//
sizeof(mDefaultMemoryTypeInformation)
);
//
// Add PCI IO Port space available for PCI resource allocations.
//
0xC000,
0x4000
);
//
// Add PCI MMIO space available to PCI resource allocations
//
if (TopOfMemory < BASE_2GB) {
} else {
}
//
// Local APIC range
//
//
// I/O APIC range
//
//
// Video memory + Legacy BIOS region
// This includes ACPI floating pointer region.
//
//
// Add ACPI memory, provided by VBox
//
ASSERT(AcpiTables != 0);
// ACPI tables 64 K
}
{
//
// Disable A20 Mask
//
//
// Build the CPU hob with 36-bit addressing and 16-bits of IO space.
//
//
// Set the PM I/O base address to 0x400
//
}
)
{
}
)
{
//
// Allocate storage for NV variables early on so it will be
// at a consistent address. Since VM memory is preserved
// across reboots, this allows the NV variable storage to survive
// a VM reboot.
//
);
DEBUG ((EFI_D_INFO,
"Reserved variable store memory: 0x%lX; size: %dkb\n",
));
}
)
{
if ((Loop % 0x10) == 0) {
}
}
}
}
/**
Perform Platform PEI initialization.
@param FileHandle Handle of the file being invoked.
@param PeiServices Describes the list of possible PEI Services.
@return EFI_SUCCESS The PEIM initialized successfully.
**/
)
{
DebugDumpCmos ();
TopOfMemory = MemDetect ();
return EFI_SUCCESS;
}