VBoxAppleSim.c revision 6d6ef23e6fe3dd87d782207dd93d9f2bd617d0bf
/* $Id$ */
/** @file
* VBoxAppleSim.c - VirtualBox Apple Firmware simulation support
*/
/*
* Copyright (C) 2010-2011 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.
*/
/*******************************************************************************
* Header Files *
*******************************************************************************/
#include <Library/BaseMemoryLib.h>
#include <Library/DebugLib.h>
#include <Library/UefiBootServicesTableLib.h>
#include <Protocol/DevicePathToText.h>
#include <IndustryStandard/Acpi10.h>
#include <IndustryStandard/Acpi20.h>
#include <IndustryStandard/SmBios.h>
#include "VBoxPkg.h"
#include "DevEFI.h"
/*
* External functions
*/
/*
* Internal Functions *
*/
static UINT32
{
{
}
return VarLen;
}
/*
* GUIDs
*/
0x4D1EDE05, 0x38C7, 0x4A6A, {0x9C, 0xC6, 0x4B, 0xCC, 0xA8, 0xB3, 0x8C, 0x14 }
};
0x7C436110, 0xAB2A, 0x4BBB, {0xA8, 0x80, 0xFE, 0x41, 0x99, 0x5C, 0x9F, 0x82}
};
0x91BD12FE, 0xF6C3, 0x44FB, {0xA5, 0xB7, 0x51, 0x22, 0xAB, 0x30, 0x3A, 0xE0}
};
0xDD8E06AC, 0x00E2, 0x49A9, {0x88, 0x8F, 0xFA, 0x46, 0xDE, 0xD4, 0x0A, 0x52}
};
/*
* Typedefs
*/
typedef struct _APPLE_GETVAR_PROTOCOL APPLE_GETVAR_PROTOCOL;
typedef
struct _APPLE_GETVAR_PROTOCOL
{
};
{ \
/*DebugAssert(__FILE__, __LINE__, __FUNCTION__);*/ \
return EFI_SUCCESS; \
}
{
*BufferSize = DataLen;
return EFI_BUFFER_TOO_SMALL;
return EFI_SUCCESS;
}
{
/* Magic = */ 0, /** @todo figure out what's here on a real system? */
};
{
Print(L"Unknown called\n");
return EFI_SUCCESS;
}
/* array of pointers to function */
{
};
{
);
return EFI_SUCCESS;
}
{
// -legacy acpi=0xffffffff acpi_debug=0xfffffff panic_io_port=0xef11 io=0xfffffffe trace=4096 io=0xffffffef -v serial=2 serialbaud=9600
// 0x10 makes kdb default, thus 0x15e for kdb, 0x14e for gdb
//static const CHAR8 vBootArgs[] = "debug=0x15e keepsyms=1 acpi=0xffffffff acpi_debug=0xff acpi_level=7 -v -x32 -s"; // or just "debug=0x8 -legacy"
// 0x14e for serial output
//static const CHAR8 vDefBootArgs[] = "debug=0x146 keepsyms=1 -v -serial=0x1";
if (BootArgsLen <= 1)
{
BootArgsLen = sizeof vDefBootArgs;
}
sizeof(vBackgroundClear), &vBackgroundClear);
sizeof(vFwFeatures), &vFwFeatures);
sizeof(vFwFeaturesMask), &vFwFeaturesMask);
BootArgsLen, &vBootArgs);
return EFI_SUCCESS;
}
/**
* VBoxInitAppleSim entry point.
*
* @returns EFI status code.
*
* @param ImageHandle The image handle.
* @param SystemTable The system table pointer.
*/
{
);
return EFI_SUCCESS;
}
{
return EFI_SUCCESS;
}