InOsEmuPkg: Rename package to EmulatorPkg & Sec to Host

* Rename InOsEmuPkg to EmulatorPkg
* Rename Unix/Sec to Unix/Host

Signed-off-by: jljusten
Reviewed-by: andrewfish
Reviewed-by: geekboy15a

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11918 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
jljusten
2011-06-28 16:47:23 +00:00
parent d3e0289ccf
commit bb89ec1a7e
191 changed files with 220 additions and 220 deletions

View File

@@ -0,0 +1,88 @@
/*++ @file
Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
Portions copyright (c) 2011, Apple Inc. 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.
**/
#include <PiDxe.h>
#include <Library/DebugLib.h>
#include <Library/HobLib.h>
#include <Library/EmuThunkLib.h>
#include <Library/BaseMemoryLib.h>
EMU_THUNK_PROTOCOL *gEmuThunk = NULL;
/**
The constructor function caches the pointer of EMU Thunk protocol.
@param ImageHandle The firmware allocated handle for the EFI image.
@param SystemTable A pointer to the EFI System Table.
@retval EFI_SUCCESS The constructor always returns EFI_SUCCESS.
**/
EFI_STATUS
EFIAPI
DxeEmuLibConstructor (
IN EFI_HANDLE ImageHandle,
IN EFI_SYSTEM_TABLE *SystemTable
)
{
EFI_HOB_GUID_TYPE *GuidHob;
GuidHob = GetFirstGuidHob (&gEmuThunkProtocolGuid);
ASSERT (GuidHob != NULL);
gEmuThunk = (EMU_THUNK_PROTOCOL *)(*(UINTN *)(GET_GUID_HOB_DATA (GuidHob)));
ASSERT (gEmuThunk != NULL);
return EFI_SUCCESS;
}
/**
Serach the EMU IO Thunk database for a matching EMU IO Thunk
Protocol instance.
@param Protocol Protocol to search for.
@param Instance Instance of protocol to search for.
@retval NULL Protocol and Instance not found.
@retval other EMU IO Thunk protocol that matched.
**/
EMU_IO_THUNK_PROTOCOL *
EFIAPI
GetIoThunkInstance (
IN EFI_GUID *Protocol,
IN UINTN Instance
)
{
EFI_STATUS Status;
EMU_IO_THUNK_PROTOCOL *EmuIoThunk;
for (Status = EFI_SUCCESS, EmuIoThunk = NULL; !EFI_ERROR (Status); ) {
Status = gEmuThunk->GetNextProtocol (FALSE, &EmuIoThunk);
if (EFI_ERROR (Status)) {
break;
}
if (EmuIoThunk->Instance == Instance) {
if (CompareGuid (EmuIoThunk->Protocol, Protocol)) {
return EmuIoThunk;
}
}
}
return NULL;
}

View File

@@ -0,0 +1,46 @@
## @file
# A library to produce the global variable 'gEmuThunk'
#
# This library contains a single global variable 'gEmuThunk' along with a constructor to
# initialize that global.
# Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
# Portions copyright (c) 2011, Apple Inc. 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.
#
#
##
[Defines]
INF_VERSION = 0x00010005
BASE_NAME = DxeEmuLib
FILE_GUID = 31479AFD-B06F-4E4A-863B-A8F7E7710778
MODULE_TYPE = DXE_DRIVER
VERSION_STRING = 1.0
LIBRARY_CLASS = EmuThunkLib
CONSTRUCTOR = DxeEmuLibConstructor
[Sources]
DxeEmuLib.c
[Packages]
MdePkg/MdePkg.dec
EmulatorPkg/EmulatorPkg.dec
[LibraryClasses]
HobLib
DebugLib
BaseMemoryLib
[Protocols]
gEmuThunkProtocolGuid # PROTOCOL ALWAYS_CONSUMED