apply for doxgen format.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5038 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
/*++
|
||||
/** @file
|
||||
UEFI Component Name(2) protocol implementation.
|
||||
|
||||
Copyright (c) 2004 - 2007, Intel Corporation
|
||||
All rights reserved. This program and the accompanying materials
|
||||
@ -15,7 +16,8 @@ Module Name:
|
||||
|
||||
Abstract:
|
||||
|
||||
--*/
|
||||
|
||||
**/
|
||||
|
||||
|
||||
#include <PiDxe.h>
|
||||
|
@ -1,6 +1,7 @@
|
||||
/*++
|
||||
/** @file
|
||||
CalculateCrc32 Boot Services as defined in DXE CIS.
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
Copyright (c) 2006, Intel Corporation. <BR>
|
||||
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
|
||||
@ -15,22 +16,30 @@ Module Name:
|
||||
|
||||
Abstract:
|
||||
|
||||
CalculateCrc32 Boot Services as defined in DXE CIS.
|
||||
|
||||
This Boot Services is in the Runtime Driver because this service is
|
||||
also required by SetVirtualAddressMap() when the EFI System Table and
|
||||
EFI Runtime Services Table are converted from physical address to
|
||||
virtual addresses. This requires that the 32-bit CRC be recomputed.
|
||||
|
||||
Revision History:
|
||||
|
||||
--*/
|
||||
**/
|
||||
|
||||
|
||||
#include <PiDxe.h>
|
||||
|
||||
UINT32 mCrcTable[256];
|
||||
|
||||
/**
|
||||
Calculate CRC32 for target data.
|
||||
|
||||
@param Len The target data.
|
||||
@param DataSize The target data size.
|
||||
@param CrcOut The CRC32 for target data.
|
||||
|
||||
@retval EFI_SUCCESS The CRC32 for target data is calculated successfully.
|
||||
@retval EFI_INVALID_PARAMETER Some parameter is not valid, so the CRC32 is not
|
||||
calculated.
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
RuntimeDriverCalculateCrc32 (
|
||||
@ -38,25 +47,6 @@ RuntimeDriverCalculateCrc32 (
|
||||
IN UINTN DataSize,
|
||||
OUT UINT32 *CrcOut
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
|
||||
Calculate CRC32 for target data
|
||||
|
||||
Arguments:
|
||||
|
||||
Data - The target data.
|
||||
DataSize - The target data size.
|
||||
CrcOut - The CRC32 for target data.
|
||||
|
||||
Returns:
|
||||
|
||||
EFI_SUCCESS - The CRC32 for target data is calculated successfully.
|
||||
EFI_INVALID_PARAMETER - Some parameter is not valid, so the CRC32 is not
|
||||
calculated.
|
||||
|
||||
--*/
|
||||
{
|
||||
UINT32 Crc;
|
||||
UINTN Index;
|
||||
@ -75,26 +65,20 @@ Returns:
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
Reverse bits for 32bit data.
|
||||
|
||||
@param Value The data to be reversed.
|
||||
|
||||
@retrun Data reversed.
|
||||
|
||||
**/
|
||||
STATIC
|
||||
UINT32
|
||||
ReverseBits (
|
||||
UINT32 Value
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
|
||||
Reverse bits for 32bit data.
|
||||
|
||||
Arguments:
|
||||
|
||||
Value - the data to be reversed.
|
||||
|
||||
Returns:
|
||||
|
||||
UINT32 data reversed.
|
||||
|
||||
--*/
|
||||
{
|
||||
UINTN Index;
|
||||
UINT32 NewValue;
|
||||
@ -109,25 +93,18 @@ Returns:
|
||||
return NewValue;
|
||||
}
|
||||
|
||||
/**
|
||||
Initialize CRC32 table.
|
||||
|
||||
@param None
|
||||
|
||||
@retrun None
|
||||
|
||||
**/
|
||||
VOID
|
||||
RuntimeDriverInitializeCrc32Table (
|
||||
VOID
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
|
||||
Initialize CRC32 table.
|
||||
|
||||
Arguments:
|
||||
|
||||
None.
|
||||
|
||||
Returns:
|
||||
|
||||
None.
|
||||
|
||||
--*/
|
||||
{
|
||||
UINTN TableEntry;
|
||||
UINTN Index;
|
||||
|
@ -1,6 +1,7 @@
|
||||
/*++
|
||||
/** @file
|
||||
Runtime Architectural Protocol as defined in the DXE CIS.
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
Copyright (c) 2006, Intel Corporation. <BR>
|
||||
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
|
||||
@ -15,8 +16,6 @@ Module Name:
|
||||
|
||||
Abstract:
|
||||
|
||||
Runtime Architectural Protocol as defined in the DXE CIS
|
||||
|
||||
This code is used to produce the EFI runtime virtual switch over
|
||||
|
||||
THIS IS VERY DANGEROUS CODE BE VERY CAREFUL IF YOU CHANGE IT
|
||||
@ -49,7 +48,7 @@ Revision History:
|
||||
Runtime Arch Protocol definition no longer contains CalculateCrc32. Boot Service
|
||||
Table now contains an item named CalculateCrc32.
|
||||
|
||||
--*/
|
||||
**/
|
||||
|
||||
#include "Runtime.h"
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
/*++
|
||||
/** @file
|
||||
Runtime Architectural Protocol as defined in the DXE CIS.
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
Copyright (c) 2006, Intel Corporation. <BR>
|
||||
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
|
||||
@ -9,17 +10,16 @@ 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.
|
||||
|
||||
|
||||
Module Name:
|
||||
|
||||
Runtime.h
|
||||
|
||||
Abstract:
|
||||
|
||||
Runtime Architectural Protocol as defined in the DXE CIS
|
||||
|
||||
This code is used to produce the EFI runtime architectural protocol.
|
||||
|
||||
--*/
|
||||
**/
|
||||
|
||||
#ifndef _RUNTIME_H_
|
||||
#define _RUNTIME_H_
|
||||
|
@ -1,6 +1,7 @@
|
||||
/*++
|
||||
/** @file
|
||||
UEFI Component Name(2) protocol implementation for ConPlatform driver.
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
Copyright (c) 2006, Intel Corporation. <BR>
|
||||
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
|
||||
@ -9,13 +10,7 @@ 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.
|
||||
|
||||
Module Name:
|
||||
|
||||
ComponentName.c
|
||||
|
||||
Abstract:
|
||||
|
||||
--*/
|
||||
**/
|
||||
|
||||
//
|
||||
// Include common header file for this module.
|
||||
|
@ -1,6 +1,7 @@
|
||||
/*++
|
||||
/** @file
|
||||
Console Platfrom DXE Driver, install Console protocols.
|
||||
|
||||
Copyright (c) 2006 - 2007, Intel Corporation
|
||||
Copyright (c) 2006 - 2007, Intel Corporation. <BR>
|
||||
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
|
||||
@ -9,13 +10,7 @@ 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.
|
||||
|
||||
Module Name:
|
||||
|
||||
ConPlatform.c
|
||||
|
||||
Abstract:
|
||||
|
||||
--*/
|
||||
**/
|
||||
|
||||
#include <ConPlatform.h>
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
/*++
|
||||
/** @file
|
||||
Header file for Console Platfrom DXE Driver.
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
Copyright (c) 2006 - 2007, Intel Corporation. <BR>
|
||||
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
|
||||
@ -9,13 +10,7 @@ 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.
|
||||
|
||||
Module Name:
|
||||
|
||||
ConPlatform.h
|
||||
|
||||
Abstract:
|
||||
|
||||
--*/
|
||||
**/
|
||||
|
||||
#ifndef CON_MANAGE_H_
|
||||
#define CON_MANAGE_H_
|
||||
@ -24,11 +19,12 @@ Abstract:
|
||||
#include <Protocol/SimpleTextOut.h>
|
||||
#include <Guid/GlobalVariable.h>
|
||||
#include <Guid/ConsoleInDevice.h>
|
||||
#include <Guid/StandardErrorDevice.h>
|
||||
#include <Guid/ConsoleOutDevice.h>
|
||||
#include <Protocol/DevicePath.h>
|
||||
#include <Protocol/SimpleTextIn.h>
|
||||
#include <Guid/HotPlugDevice.h>
|
||||
#include <Guid/StandardErrorDevice.h>
|
||||
#include <Guid/ConsoleOutDevice.h>
|
||||
|
||||
#include <Library/DebugLib.h>
|
||||
#include <Library/UefiDriverEntryPoint.h>
|
||||
#include <Library/UefiLib.h>
|
||||
|
@ -1,6 +1,7 @@
|
||||
/*++
|
||||
/** @file
|
||||
UEFI Component Name(2) protocol implementation for ConSplitter driver.
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
Copyright (c) 2006, Intel Corporation. <BR>
|
||||
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
|
||||
@ -9,13 +10,7 @@ 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.
|
||||
|
||||
Module Name:
|
||||
|
||||
ComponentName.c
|
||||
|
||||
Abstract:
|
||||
|
||||
--*/
|
||||
**/
|
||||
|
||||
#include "ConSplitter.h"
|
||||
|
||||
|
@ -1,6 +1,10 @@
|
||||
/*++
|
||||
/** @file
|
||||
Support for ConsoleControl protocol. Support for Graphics output spliter.
|
||||
Support for DevNull Console Out. This console uses memory buffers
|
||||
to represnt the console. It allows a console to start very early and
|
||||
when a new console is added it is synced up with the current console.
|
||||
|
||||
Copyright (c) 2006 - 2008, Intel Corporation
|
||||
Copyright (c) 2006 - 2008, Intel Corporation. <BR>
|
||||
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
|
||||
@ -9,18 +13,8 @@ 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.
|
||||
|
||||
Module Name:
|
||||
**/
|
||||
|
||||
ConSplitterGraphics.c
|
||||
|
||||
Abstract:
|
||||
|
||||
Support for ConsoleControl protocol. Support for Graphics output spliter.
|
||||
Support for DevNull Console Out. This console uses memory buffers
|
||||
to represnt the console. It allows a console to start very early and
|
||||
when a new console is added it is synced up with the current console
|
||||
|
||||
--*/
|
||||
|
||||
#include "ConSplitter.h"
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
/*++
|
||||
/** @file
|
||||
UEFI Component Name(2) protocol implementation for GraphicsConsole driver.
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
Copyright (c) 2006, Intel Corporation. <BR>
|
||||
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
|
||||
@ -9,13 +10,7 @@ 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.
|
||||
|
||||
Module Name:
|
||||
|
||||
ComponentName.c
|
||||
|
||||
Abstract:
|
||||
|
||||
--*/
|
||||
**/
|
||||
|
||||
#include "GraphicsConsole.h"
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
/*++
|
||||
/** @file
|
||||
Header file for GraphicsConsole driver.
|
||||
|
||||
Copyright (c) 2006 - 2008, Intel Corporation
|
||||
Copyright (c) 2006, Intel Corporation. <BR>
|
||||
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
|
||||
@ -9,16 +10,7 @@ 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.
|
||||
|
||||
Module Name:
|
||||
|
||||
GraphicsConsole.h
|
||||
|
||||
Abstract:
|
||||
|
||||
|
||||
Revision History
|
||||
|
||||
--*/
|
||||
**/
|
||||
|
||||
#ifndef _GRAPHICS_CONSOLE_H
|
||||
#define _GRAPHICS_CONSOLE_H
|
||||
|
@ -1,6 +1,7 @@
|
||||
/*++
|
||||
/** @file
|
||||
Narrow font Data definition for GraphicsConsole driver.
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
Copyright (c) 2006, Intel Corporation. <BR>
|
||||
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
|
||||
@ -9,16 +10,7 @@ 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.
|
||||
|
||||
Module Name:
|
||||
|
||||
LaffStd.c
|
||||
|
||||
Abstract:
|
||||
|
||||
|
||||
Revision History
|
||||
|
||||
--*/
|
||||
**/
|
||||
|
||||
#include "GraphicsConsole.h"
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
/*++
|
||||
/** @file
|
||||
UEFI Component Name(2) protocol implementation for Terminal driver.
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
Copyright (c) 2006 - 2008, Intel Corporation. <BR>
|
||||
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
|
||||
@ -9,13 +10,7 @@ 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.
|
||||
|
||||
Module Name:
|
||||
|
||||
ComponentName.c
|
||||
|
||||
Abstract:
|
||||
|
||||
--*/
|
||||
**/
|
||||
|
||||
#include "Terminal.h"
|
||||
|
||||
|
@ -1,6 +1,8 @@
|
||||
/*++
|
||||
/** @file
|
||||
Produces Simple Text Input Protocl, Simple Text Input Extended Protocol and
|
||||
Simple Text Output Protocol upon Serial IO Protocol.
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
Copyright (c) 2006 - 2008, Intel Corporation. <BR>
|
||||
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
|
||||
@ -9,15 +11,7 @@ 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.
|
||||
|
||||
Module Name:
|
||||
|
||||
Terminal.c
|
||||
|
||||
Abstract:
|
||||
|
||||
Revision History:
|
||||
|
||||
--*/
|
||||
**/
|
||||
|
||||
|
||||
#include "Terminal.h"
|
||||
|
@ -1,6 +1,7 @@
|
||||
/*++
|
||||
/** @file
|
||||
Header file for Terminal driver.
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
Copyright (c) 2006 - 2008, Intel Corporation. <BR>
|
||||
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
|
||||
@ -9,16 +10,7 @@ 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.
|
||||
|
||||
Module Name:
|
||||
|
||||
terminal.h
|
||||
|
||||
Abstract:
|
||||
|
||||
|
||||
Revision History
|
||||
|
||||
--*/
|
||||
**/
|
||||
|
||||
#ifndef _TERMINAL_H
|
||||
#define _TERMINAL_H
|
||||
|
@ -1,7 +1,7 @@
|
||||
/**@file
|
||||
Implementation for EFI_SIMPLE_TEXT_INPUT_PROTOCOL protocol.
|
||||
|
||||
Copyright (c) 2006 - 2007 Intel Corporation. <BR>
|
||||
Copyright (c) 2006 - 2007, Intel Corporation. <BR>
|
||||
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
|
||||
|
@ -1,6 +1,7 @@
|
||||
/*++
|
||||
/** @file
|
||||
Implementation for EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL protocol.
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
Copyright (c) 2006 - 2008, Intel Corporation. <BR>
|
||||
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
|
||||
@ -9,15 +10,7 @@ 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.
|
||||
|
||||
Module Name:
|
||||
|
||||
TerminalConOut.c
|
||||
|
||||
Abstract:
|
||||
|
||||
|
||||
Revision History
|
||||
--*/
|
||||
**/
|
||||
|
||||
#include "Terminal.h"
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
/*++
|
||||
/** @file
|
||||
Provides misc functions upon ansi.
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
Copyright (c) 2006, Intel Corporation. <BR>
|
||||
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
|
||||
@ -9,15 +10,7 @@ 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.
|
||||
|
||||
Module Name:
|
||||
|
||||
ansi.c
|
||||
|
||||
Abstract:
|
||||
|
||||
|
||||
Revision History
|
||||
--*/
|
||||
**/
|
||||
|
||||
|
||||
#include "Terminal.h"
|
||||
|
@ -1,6 +1,7 @@
|
||||
/*++
|
||||
/**@file
|
||||
Implementation translation among different code tyies.
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
Copyright (c) 2006, Intel Corporation. <BR>
|
||||
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
|
||||
@ -9,15 +10,7 @@ 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.
|
||||
|
||||
Module Name:
|
||||
|
||||
vtutf8.c
|
||||
|
||||
Abstract:
|
||||
|
||||
|
||||
Revision History
|
||||
--*/
|
||||
**/
|
||||
|
||||
#include "Terminal.h"
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
/*++
|
||||
/** @file
|
||||
UEFI Component Name(2) protocol implementation for DebugPort driver.
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
Copyright (c) 2006 - 2008, Intel Corporation. <BR>
|
||||
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
|
||||
@ -9,13 +10,7 @@ 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.
|
||||
|
||||
Module Name:
|
||||
ComponentName.c
|
||||
|
||||
Abstract:
|
||||
Component name protocol member functions for DebugPort...
|
||||
|
||||
--*/
|
||||
**/
|
||||
|
||||
#include "DebugPort.h"
|
||||
|
||||
|
@ -1,6 +1,10 @@
|
||||
/*++
|
||||
/** @file
|
||||
Top level C file for debugport driver. Contains initialization function.
|
||||
This driver layers on top of SerialIo.
|
||||
ALL CODE IN THE SERIALIO STACK MUST BE RE-ENTRANT AND CALLABLE FROM
|
||||
INTERRUPT CONTEXT
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
Copyright (c) 2006 - 2008, Intel Corporation. <BR>
|
||||
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
|
||||
@ -9,21 +13,7 @@ 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.
|
||||
|
||||
Module Name:
|
||||
|
||||
DebugPort.c
|
||||
|
||||
Abstract:
|
||||
|
||||
Top level C file for debugport driver. Contains initialization function.
|
||||
This driver layers on top of SerialIo.
|
||||
|
||||
ALL CODE IN THE SERIALIO STACK MUST BE RE-ENTRANT AND CALLABLE FROM
|
||||
INTERRUPT CONTEXT.
|
||||
|
||||
Revision History
|
||||
|
||||
--*/
|
||||
**/
|
||||
|
||||
|
||||
#include "DebugPort.h"
|
||||
|
@ -1,6 +1,7 @@
|
||||
/*++
|
||||
/** @file
|
||||
Definitions and prototypes for DebugPort driver.
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
Copyright (c) 2006 - 2008, Intel Corporation. <BR>
|
||||
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
|
||||
@ -9,13 +10,7 @@ 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.
|
||||
|
||||
Module Name:
|
||||
DebugPort.h
|
||||
|
||||
Abstract:
|
||||
Definitions and prototypes for DebugPort driver
|
||||
|
||||
--*/
|
||||
**/
|
||||
|
||||
#ifndef __DEBUGPORT_H__
|
||||
#define __DEBUGPORT_H__
|
||||
|
@ -1,6 +1,7 @@
|
||||
/*++
|
||||
/** @file
|
||||
Top level C file for debug support driver. Contains initialization function.
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
Copyright (c) 2006 - 2008, Intel Corporation. <BR>
|
||||
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
|
||||
@ -9,17 +10,7 @@ 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.
|
||||
|
||||
Module Name:
|
||||
|
||||
DebugSupport.c
|
||||
|
||||
Abstract:
|
||||
|
||||
Top level C file for debug support driver. Contains initialization function.
|
||||
|
||||
Revision History
|
||||
|
||||
--*/
|
||||
**/
|
||||
|
||||
//
|
||||
// private header files
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,4 +1,7 @@
|
||||
/*++
|
||||
/** @file
|
||||
Header file for Virtual Machine support. Contains EBC defines that can
|
||||
be of use to a disassembler for the most part. Also provides function
|
||||
prototypes for VM functions.
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
All rights reserved. This program and the accompanying materials
|
||||
@ -9,17 +12,7 @@ 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.
|
||||
|
||||
Module Name:
|
||||
|
||||
EbcExecute.h
|
||||
|
||||
Abstract:
|
||||
|
||||
Header file for Virtual Machine support. Contains EBC defines that can
|
||||
be of use to a disassembler for the most part. Also provides function
|
||||
prototypes for VM functions.
|
||||
|
||||
--*/
|
||||
**/
|
||||
|
||||
#ifndef _EBC_EXECUTE_H_
|
||||
#define _EBC_EXECUTE_H_
|
||||
|
@ -1,4 +1,7 @@
|
||||
/*++
|
||||
/** @file
|
||||
Top level module for the EBC virtual machine implementation.
|
||||
Provides auxilliary support routines for the VM. That is, routines
|
||||
that are not particularly related to VM execution of EBC instructions.
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
All rights reserved. This program and the accompanying materials
|
||||
@ -9,17 +12,7 @@ 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.
|
||||
|
||||
Module Name:
|
||||
|
||||
EbcInt.c
|
||||
|
||||
Abstract:
|
||||
|
||||
Top level module for the EBC virtual machine implementation.
|
||||
Provides auxilliary support routines for the VM. That is, routines
|
||||
that are not particularly related to VM execution of EBC instructions.
|
||||
|
||||
--*/
|
||||
**/
|
||||
|
||||
#include "EbcInt.h"
|
||||
#include "EbcExecute.h"
|
||||
@ -188,28 +181,23 @@ static UINTN mStackNum = 0;
|
||||
static EFI_EVENT mEbcPeriodicEvent;
|
||||
VM_CONTEXT *mVmPtr = NULL;
|
||||
|
||||
|
||||
/**
|
||||
Initializes the VM EFI interface. Allocates memory for the VM interface
|
||||
and registers the VM protocol.
|
||||
|
||||
@param ImageHandle EFI image handle.
|
||||
@param SystemTable Pointer to the EFI system table.
|
||||
|
||||
@return Standard EFI status code.
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
InitializeEbcDriver (
|
||||
IN EFI_HANDLE ImageHandle,
|
||||
IN EFI_SYSTEM_TABLE *SystemTable
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
|
||||
Initializes the VM EFI interface. Allocates memory for the VM interface
|
||||
and registers the VM protocol.
|
||||
|
||||
Arguments:
|
||||
|
||||
ImageHandle - EFI image handle.
|
||||
SystemTable - Pointer to the EFI system table.
|
||||
|
||||
Returns:
|
||||
Standard EFI status code.
|
||||
|
||||
--*/
|
||||
{
|
||||
EFI_EBC_PROTOCOL *EbcProtocol;
|
||||
EFI_EBC_PROTOCOL *OldEbcProtocol;
|
||||
@ -384,6 +372,24 @@ ErrorExit:
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
This is the top-level routine plugged into the EBC protocol. Since thunks
|
||||
are very processor-specific, from here we dispatch directly to the very
|
||||
processor-specific routine EbcCreateThunks().
|
||||
|
||||
@param This protocol instance pointer
|
||||
@param ImageHandle handle to the image. The EBC interpreter may use
|
||||
this to keep track of any resource allocations
|
||||
performed in loading and executing the image.
|
||||
@param EbcEntryPoint the entry point for the image (as defined in the
|
||||
file header)
|
||||
@param Thunk pointer to thunk pointer where the address of the
|
||||
created thunk is returned.
|
||||
|
||||
@return EFI_STATUS
|
||||
|
||||
**/
|
||||
STATIC
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
@ -393,29 +399,6 @@ EbcCreateThunk (
|
||||
IN VOID *EbcEntryPoint,
|
||||
OUT VOID **Thunk
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
|
||||
This is the top-level routine plugged into the EBC protocol. Since thunks
|
||||
are very processor-specific, from here we dispatch directly to the very
|
||||
processor-specific routine EbcCreateThunks().
|
||||
|
||||
Arguments:
|
||||
|
||||
This - protocol instance pointer
|
||||
ImageHandle - handle to the image. The EBC interpreter may use this to keep
|
||||
track of any resource allocations performed in loading and
|
||||
executing the image.
|
||||
EbcEntryPoint - the entry point for the image (as defined in the file header)
|
||||
Thunk - pointer to thunk pointer where the address of the created
|
||||
thunk is returned.
|
||||
|
||||
Returns:
|
||||
|
||||
EFI_STATUS
|
||||
|
||||
--*/
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
|
||||
@ -428,6 +411,18 @@ Returns:
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
This EBC debugger protocol service is called by the debug agent
|
||||
|
||||
@param This pointer to the caller's debug support protocol
|
||||
interface
|
||||
@param MaxProcessorIndex pointer to a caller allocated UINTN in which the
|
||||
maximum processor index is returned.
|
||||
|
||||
@return Standard EFI_STATUS
|
||||
|
||||
**/
|
||||
STATIC
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
@ -435,28 +430,23 @@ EbcDebugGetMaximumProcessorIndex (
|
||||
IN EFI_DEBUG_SUPPORT_PROTOCOL *This,
|
||||
OUT UINTN *MaxProcessorIndex
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
|
||||
This EBC debugger protocol service is called by the debug agent
|
||||
|
||||
Arguments:
|
||||
|
||||
This - pointer to the caller's debug support protocol interface
|
||||
MaxProcessorIndex - pointer to a caller allocated UINTN in which the maximum
|
||||
processor index is returned.
|
||||
|
||||
Returns:
|
||||
|
||||
Standard EFI_STATUS
|
||||
|
||||
--*/
|
||||
{
|
||||
*MaxProcessorIndex = 0;
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
This protocol service is called by the debug agent to register a function
|
||||
for us to call on a periodic basis.
|
||||
|
||||
@param This pointer to the caller's debug support protocol
|
||||
interface
|
||||
@param PeriodicCallback pointer to the function to call periodically
|
||||
|
||||
@return Always EFI_SUCCESS
|
||||
|
||||
**/
|
||||
STATIC
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
@ -465,24 +455,6 @@ EbcDebugRegisterPeriodicCallback (
|
||||
IN UINTN ProcessorIndex,
|
||||
IN EFI_PERIODIC_CALLBACK PeriodicCallback
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
|
||||
This protocol service is called by the debug agent to register a function
|
||||
for us to call on a periodic basis.
|
||||
|
||||
|
||||
Arguments:
|
||||
|
||||
This - pointer to the caller's debug support protocol interface
|
||||
PeriodicCallback - pointer to the function to call periodically
|
||||
|
||||
Returns:
|
||||
|
||||
Always EFI_SUCCESS
|
||||
|
||||
--*/
|
||||
{
|
||||
if ((mDebugPeriodicCallback == NULL) && (PeriodicCallback == NULL)) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
@ -495,6 +467,18 @@ Returns:
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
This protocol service is called by the debug agent to register a function
|
||||
for us to call when we detect an exception.
|
||||
|
||||
@param This pointer to the caller's debug support protocol
|
||||
interface
|
||||
@param ExceptionCallback pointer to the function to the exception
|
||||
|
||||
@return Always EFI_SUCCESS
|
||||
|
||||
**/
|
||||
STATIC
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
@ -504,24 +488,6 @@ EbcDebugRegisterExceptionCallback (
|
||||
IN EFI_EXCEPTION_CALLBACK ExceptionCallback,
|
||||
IN EFI_EXCEPTION_TYPE ExceptionType
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
|
||||
This protocol service is called by the debug agent to register a function
|
||||
for us to call when we detect an exception.
|
||||
|
||||
|
||||
Arguments:
|
||||
|
||||
This - pointer to the caller's debug support protocol interface
|
||||
ExceptionCallback - pointer to the function to the exception
|
||||
|
||||
Returns:
|
||||
|
||||
Always EFI_SUCCESS
|
||||
|
||||
--*/
|
||||
{
|
||||
if ((ExceptionType < 0) || (ExceptionType > MAX_EBC_EXCEPTION)) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
@ -536,6 +502,15 @@ Returns:
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
This EBC debugger protocol service is called by the debug agent. Required
|
||||
for DebugSupport compliance but is only stubbed out for EBC.
|
||||
|
||||
|
||||
@return EFI_SUCCESS
|
||||
|
||||
**/
|
||||
STATIC
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
@ -545,45 +520,26 @@ EbcDebugInvalidateInstructionCache (
|
||||
IN VOID *Start,
|
||||
IN UINT64 Length
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
|
||||
This EBC debugger protocol service is called by the debug agent. Required
|
||||
for DebugSupport compliance but is only stubbed out for EBC.
|
||||
|
||||
Arguments:
|
||||
|
||||
Returns:
|
||||
|
||||
EFI_SUCCESS
|
||||
|
||||
--*/
|
||||
{
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
The VM interpreter calls this function when an exception is detected.
|
||||
|
||||
@param VmPtr pointer to a VM context for passing info to the
|
||||
EFI debugger.
|
||||
|
||||
@return EFI_SUCCESS if it returns at all
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
EbcDebugSignalException (
|
||||
IN EFI_EXCEPTION_TYPE ExceptionType,
|
||||
IN EXCEPTION_FLAGS ExceptionFlags,
|
||||
IN VM_CONTEXT *VmPtr
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
|
||||
The VM interpreter calls this function when an exception is detected.
|
||||
|
||||
Arguments:
|
||||
|
||||
VmPtr - pointer to a VM context for passing info to the EFI debugger.
|
||||
|
||||
Returns:
|
||||
|
||||
EFI_SUCCESS if it returns at all
|
||||
|
||||
--*/
|
||||
{
|
||||
EFI_SYSTEM_CONTEXT_EBC EbcContext;
|
||||
EFI_SYSTEM_CONTEXT SystemContext;
|
||||
@ -645,26 +601,20 @@ Returns:
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
To install default Callback function for the VM interpreter.
|
||||
|
||||
@param This pointer to the instance of DebugSupport protocol
|
||||
|
||||
@return None
|
||||
|
||||
**/
|
||||
STATIC
|
||||
EFI_STATUS
|
||||
InitializeEbcCallback (
|
||||
IN EFI_DEBUG_SUPPORT_PROTOCOL *This
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
|
||||
To install default Callback function for the VM interpreter.
|
||||
|
||||
Arguments:
|
||||
|
||||
This - pointer to the instance of DebugSupport protocol
|
||||
|
||||
Returns:
|
||||
|
||||
None
|
||||
|
||||
--*/
|
||||
{
|
||||
INTN Index;
|
||||
EFI_STATUS Status;
|
||||
@ -707,30 +657,24 @@ Returns:
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
The default Exception Callback for the VM interpreter.
|
||||
In this function, we report status code, and print debug information
|
||||
about EBC_CONTEXT, then dead loop.
|
||||
|
||||
@param InterruptType Interrupt type.
|
||||
@param SystemContext EBC system context.
|
||||
|
||||
@return None
|
||||
|
||||
**/
|
||||
STATIC
|
||||
VOID
|
||||
CommonEbcExceptionHandler (
|
||||
IN EFI_EXCEPTION_TYPE InterruptType,
|
||||
IN EFI_SYSTEM_CONTEXT SystemContext
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
|
||||
The default Exception Callback for the VM interpreter.
|
||||
In this function, we report status code, and print debug information
|
||||
about EBC_CONTEXT, then dead loop.
|
||||
|
||||
Arguments:
|
||||
|
||||
InterruptType - Interrupt type.
|
||||
SystemContext - EBC system context.
|
||||
|
||||
Returns:
|
||||
|
||||
None
|
||||
|
||||
--*/
|
||||
{
|
||||
//
|
||||
// We deadloop here to make it easy to debug this issue.
|
||||
@ -740,6 +684,17 @@ Returns:
|
||||
return ;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
The periodic callback function for EBC VM interpreter, which is used
|
||||
to support the EFI debug support protocol.
|
||||
|
||||
@param Event The Periodic Callback Event.
|
||||
@param Context It should be the address of VM_CONTEXT pointer.
|
||||
|
||||
@return None.
|
||||
|
||||
**/
|
||||
STATIC
|
||||
VOID
|
||||
EFIAPI
|
||||
@ -747,23 +702,6 @@ EbcPeriodicNotifyFunction (
|
||||
IN EFI_EVENT Event,
|
||||
IN VOID *Context
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
|
||||
The periodic callback function for EBC VM interpreter, which is used
|
||||
to support the EFI debug support protocol.
|
||||
|
||||
Arguments:
|
||||
|
||||
Event - The Periodic Callback Event.
|
||||
Context - It should be the address of VM_CONTEXT pointer.
|
||||
|
||||
Returns:
|
||||
|
||||
None.
|
||||
|
||||
--*/
|
||||
{
|
||||
VM_CONTEXT *VmPtr;
|
||||
|
||||
@ -776,27 +714,22 @@ Returns:
|
||||
return ;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
The VM interpreter calls this function on a periodic basis to support
|
||||
the EFI debug support protocol.
|
||||
|
||||
@param VmPtr pointer to a VM context for passing info to the
|
||||
debugger.
|
||||
|
||||
@return Standard EFI status.
|
||||
|
||||
**/
|
||||
STATIC
|
||||
EFI_STATUS
|
||||
EbcDebugPeriodic (
|
||||
IN VM_CONTEXT *VmPtr
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
|
||||
The VM interpreter calls this function on a periodic basis to support
|
||||
the EFI debug support protocol.
|
||||
|
||||
Arguments:
|
||||
|
||||
VmPtr - pointer to a VM context for passing info to the debugger.
|
||||
|
||||
Returns:
|
||||
|
||||
Standard EFI status.
|
||||
|
||||
--*/
|
||||
{
|
||||
EFI_SYSTEM_CONTEXT_EBC EbcContext;
|
||||
EFI_SYSTEM_CONTEXT SystemContext;
|
||||
@ -842,6 +775,20 @@ Returns:
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
This routine is called by the core when an image is being unloaded from
|
||||
memory. Basically we now have the opportunity to do any necessary cleanup.
|
||||
Typically this will include freeing any memory allocated for thunk-creation.
|
||||
|
||||
@param This protocol instance pointer
|
||||
@param ImageHandle handle to the image being unloaded.
|
||||
|
||||
@retval EFI_INVALID_PARAMETER the ImageHandle passed in was not found in the
|
||||
internal list of EBC image handles.
|
||||
@retval EFI_STATUS completed successfully
|
||||
|
||||
**/
|
||||
STATIC
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
@ -849,26 +796,6 @@ EbcUnloadImage (
|
||||
IN EFI_EBC_PROTOCOL *This,
|
||||
IN EFI_HANDLE ImageHandle
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
|
||||
This routine is called by the core when an image is being unloaded from
|
||||
memory. Basically we now have the opportunity to do any necessary cleanup.
|
||||
Typically this will include freeing any memory allocated for thunk-creation.
|
||||
|
||||
Arguments:
|
||||
|
||||
This - protocol instance pointer
|
||||
ImageHandle - handle to the image being unloaded.
|
||||
|
||||
Returns:
|
||||
|
||||
EFI_INVALID_PARAMETER - the ImageHandle passed in was not found in
|
||||
the internal list of EBC image handles.
|
||||
EFI_STATUS - completed successfully
|
||||
|
||||
--*/
|
||||
{
|
||||
EBC_THUNK_LIST *ThunkList;
|
||||
EBC_THUNK_LIST *NextThunkList;
|
||||
@ -922,32 +849,26 @@ Returns:
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
Add a thunk to our list of thunks for a given image handle.
|
||||
Also flush the instruction cache since we've written thunk code
|
||||
to memory that will be executed eventually.
|
||||
|
||||
@param ImageHandle the image handle to which the thunk is tied
|
||||
@param ThunkBuffer the buffer we've created/allocated
|
||||
@param ThunkSize the size of the thunk memory allocated
|
||||
|
||||
@retval EFI_OUT_OF_RESOURCES memory allocation failed
|
||||
@retval EFI_SUCCESS successful completion
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
EbcAddImageThunk (
|
||||
IN EFI_HANDLE ImageHandle,
|
||||
IN VOID *ThunkBuffer,
|
||||
IN UINT32 ThunkSize
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
|
||||
Add a thunk to our list of thunks for a given image handle.
|
||||
Also flush the instruction cache since we've written thunk code
|
||||
to memory that will be executed eventually.
|
||||
|
||||
Arguments:
|
||||
|
||||
ImageHandle - the image handle to which the thunk is tied
|
||||
ThunkBuffer - the buffer we've created/allocated
|
||||
ThunkSize - the size of the thunk memory allocated
|
||||
|
||||
Returns:
|
||||
|
||||
EFI_OUT_OF_RESOURCES - memory allocation failed
|
||||
EFI_SUCCESS - successful completion
|
||||
|
||||
--*/
|
||||
{
|
||||
EBC_THUNK_LIST *ThunkList;
|
||||
EBC_IMAGE_LIST *ImageList;
|
||||
@ -1113,27 +1034,21 @@ FreeEBCStack(
|
||||
}
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
/**
|
||||
Produce an EBC VM test protocol that can be used for regression tests.
|
||||
|
||||
@param IHandle handle on which to install the protocol.
|
||||
|
||||
@retval EFI_OUT_OF_RESOURCES memory allocation failed
|
||||
@retval EFI_SUCCESS successful completion
|
||||
|
||||
**/
|
||||
STATIC
|
||||
EFI_STATUS
|
||||
InitEbcVmTestProtocol (
|
||||
IN EFI_HANDLE *IHandle
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
|
||||
Produce an EBC VM test protocol that can be used for regression tests.
|
||||
|
||||
Arguments:
|
||||
|
||||
IHandle - handle on which to install the protocol.
|
||||
|
||||
Returns:
|
||||
|
||||
EFI_OUT_OF_RESOURCES - memory allocation failed
|
||||
EFI_SUCCESS - successful completion
|
||||
|
||||
--*/
|
||||
{
|
||||
EFI_HANDLE Handle;
|
||||
EFI_STATUS Status;
|
||||
|
@ -1,4 +1,6 @@
|
||||
/*++
|
||||
/** @file
|
||||
Main routines for the EBC interpreter. Includes the initialization and
|
||||
main interpreter routines.
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
All rights reserved. This program and the accompanying materials
|
||||
@ -9,16 +11,7 @@ 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.
|
||||
|
||||
Module Name:
|
||||
|
||||
EbcInt.h
|
||||
|
||||
Abstract:
|
||||
|
||||
Main routines for the EBC interpreter. Includes the initialization and
|
||||
main interpreter routines.
|
||||
|
||||
--*/
|
||||
**/
|
||||
|
||||
#ifndef _EBC_INT_H_
|
||||
#define _EBC_INT_H_
|
||||
|
@ -1,4 +1,6 @@
|
||||
/*++
|
||||
/** @file
|
||||
This module contains EBC support routines that are customized based on
|
||||
the target processor.
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
All rights reserved. This program and the accompanying materials
|
||||
@ -9,16 +11,7 @@ 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.
|
||||
|
||||
Module Name:
|
||||
|
||||
EbcSupport.c
|
||||
|
||||
Abstract:
|
||||
|
||||
This module contains EBC support routines that are customized based on
|
||||
the target processor.
|
||||
|
||||
--*/
|
||||
**/
|
||||
|
||||
#include "EbcInt.h"
|
||||
#include "EbcExecute.h"
|
||||
@ -33,6 +26,25 @@ Abstract:
|
||||
#define EBC_THUNK_SIZE 32
|
||||
|
||||
#define STACK_REMAIN_SIZE (1024 * 4)
|
||||
|
||||
|
||||
/**
|
||||
This function is called to execute an EBC CALLEX instruction.
|
||||
The function check the callee's content to see whether it is common native
|
||||
code or a thunk to another piece of EBC code.
|
||||
If the callee is common native code, use EbcLLCAllEXASM to manipulate,
|
||||
otherwise, set the VM->IP to target EBC code directly to avoid another VM
|
||||
be startup which cost time and stack space.
|
||||
|
||||
@parm VmPtr Pointer to a VM context.
|
||||
@parm FuncAddr Callee's address
|
||||
@parm NewStackPointer New stack pointer after the call
|
||||
@parm FramePtr New frame pointer after the call
|
||||
@parm Size The size of call instruction
|
||||
|
||||
@return None.
|
||||
|
||||
**/
|
||||
VOID
|
||||
EbcLLCALLEX (
|
||||
IN VM_CONTEXT *VmPtr,
|
||||
@ -41,30 +53,6 @@ EbcLLCALLEX (
|
||||
IN VOID *FramePtr,
|
||||
IN UINT8 Size
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
|
||||
This function is called to execute an EBC CALLEX instruction.
|
||||
The function check the callee's content to see whether it is common native
|
||||
code or a thunk to another piece of EBC code.
|
||||
If the callee is common native code, use EbcLLCAllEXASM to manipulate,
|
||||
otherwise, set the VM->IP to target EBC code directly to avoid another VM
|
||||
be startup which cost time and stack space.
|
||||
|
||||
Arguments:
|
||||
|
||||
VmPtr - Pointer to a VM context.
|
||||
FuncAddr - Callee's address
|
||||
NewStackPointer - New stack pointer after the call
|
||||
FramePtr - New frame pointer after the call
|
||||
Size - The size of call instruction
|
||||
|
||||
Returns:
|
||||
|
||||
None.
|
||||
|
||||
--*/
|
||||
{
|
||||
UINTN IsThunk;
|
||||
UINTN TargetEbcAddr;
|
||||
@ -143,6 +131,19 @@ Action:
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
Begin executing an EBC image. The address of the entry point is passed
|
||||
in via a processor register, so we'll need to make a call to get the
|
||||
value.
|
||||
|
||||
None. Since we're called from a fixed up thunk (which we want to keep
|
||||
small), our only so-called argument is the EBC entry point passed in
|
||||
to us in a processor register.
|
||||
|
||||
@return The value returned by the EBC application we're going to run.
|
||||
|
||||
**/
|
||||
STATIC
|
||||
UINT64
|
||||
EbcInterpret (
|
||||
@ -163,25 +164,6 @@ EbcInterpret (
|
||||
IN OUT UINTN Arg15,
|
||||
IN OUT UINTN Arg16
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
|
||||
Begin executing an EBC image. The address of the entry point is passed
|
||||
in via a processor register, so we'll need to make a call to get the
|
||||
value.
|
||||
|
||||
Arguments:
|
||||
|
||||
None. Since we're called from a fixed up thunk (which we want to keep
|
||||
small), our only so-called argument is the EBC entry point passed in
|
||||
to us in a processor register.
|
||||
|
||||
Returns:
|
||||
|
||||
The value returned by the EBC application we're going to run.
|
||||
|
||||
--*/
|
||||
{
|
||||
//
|
||||
// Create a new VM context on the stack
|
||||
@ -298,30 +280,24 @@ Returns:
|
||||
return (UINT64) VmContext.R[7];
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
Begin executing an EBC image. The address of the entry point is passed
|
||||
in via a processor register, so we'll need to make a call to get the
|
||||
value.
|
||||
|
||||
@param ImageHandle image handle for the EBC application we're executing
|
||||
@param SystemTable standard system table passed into an driver's entry point
|
||||
|
||||
@return The value returned by the EBC application we're going to run.
|
||||
|
||||
**/
|
||||
STATIC
|
||||
UINT64
|
||||
ExecuteEbcImageEntryPoint (
|
||||
IN EFI_HANDLE ImageHandle,
|
||||
IN EFI_SYSTEM_TABLE *SystemTable
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
|
||||
Begin executing an EBC image. The address of the entry point is passed
|
||||
in via a processor register, so we'll need to make a call to get the
|
||||
value.
|
||||
|
||||
Arguments:
|
||||
|
||||
ImageHandle - image handle for the EBC application we're executing
|
||||
SystemTable - standard system table passed into an driver's entry point
|
||||
|
||||
Returns:
|
||||
|
||||
The value returned by the EBC application we're going to run.
|
||||
|
||||
--*/
|
||||
{
|
||||
//
|
||||
// Create a new VM context on the stack
|
||||
@ -407,6 +383,17 @@ Returns:
|
||||
return (UINT64) VmContext.R[7];
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
Create an IA32 thunk for the given EBC entry point.
|
||||
|
||||
@param ImageHandle Handle of image for which this thunk is being created
|
||||
@param EbcEntryPoint Address of the EBC code that the thunk is to call
|
||||
@param Thunk Returned thunk we create here
|
||||
|
||||
@return Standard EFI status.
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
EbcCreateThunks (
|
||||
IN EFI_HANDLE ImageHandle,
|
||||
@ -414,23 +401,6 @@ EbcCreateThunks (
|
||||
OUT VOID **Thunk,
|
||||
IN UINT32 Flags
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
|
||||
Create an IA32 thunk for the given EBC entry point.
|
||||
|
||||
Arguments:
|
||||
|
||||
ImageHandle - Handle of image for which this thunk is being created
|
||||
EbcEntryPoint - Address of the EBC code that the thunk is to call
|
||||
Thunk - Returned thunk we create here
|
||||
|
||||
Returns:
|
||||
|
||||
Standard EFI status.
|
||||
|
||||
--*/
|
||||
{
|
||||
UINT8 *Ptr;
|
||||
UINT8 *ThunkBase;
|
||||
|
@ -1,4 +1,6 @@
|
||||
/*++
|
||||
/** @file
|
||||
This module contains EBC support routines that are customized based on
|
||||
the target processor.
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
All rights reserved. This program and the accompanying materials
|
||||
@ -9,16 +11,7 @@ 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.
|
||||
|
||||
Module Name:
|
||||
|
||||
EbcSupport.c
|
||||
|
||||
Abstract:
|
||||
|
||||
This module contains EBC support routines that are customized based on
|
||||
the target processor.
|
||||
|
||||
--*/
|
||||
**/
|
||||
|
||||
#include "EbcInt.h"
|
||||
#include "EbcExecute.h"
|
||||
@ -194,32 +187,27 @@ EbcInterpret (
|
||||
return (UINT64) VmContext.R[7];
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
IPF implementation.
|
||||
Begin executing an EBC image. The address of the entry point is passed
|
||||
in via a processor register, so we'll need to make a call to get the
|
||||
value.
|
||||
|
||||
@param ImageHandle image handle for the EBC application we're
|
||||
executing
|
||||
@param SystemTable standard system table passed into an driver's
|
||||
entry point
|
||||
|
||||
@return The value returned by the EBC application we're going to run.
|
||||
|
||||
**/
|
||||
STATIC
|
||||
UINT64
|
||||
ExecuteEbcImageEntryPoint (
|
||||
IN EFI_HANDLE ImageHandle,
|
||||
IN EFI_SYSTEM_TABLE *SystemTable
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
|
||||
IPF implementation.
|
||||
|
||||
Begin executing an EBC image. The address of the entry point is passed
|
||||
in via a processor register, so we'll need to make a call to get the
|
||||
value.
|
||||
|
||||
Arguments:
|
||||
|
||||
ImageHandle - image handle for the EBC application we're executing
|
||||
SystemTable - standard system table passed into an driver's entry point
|
||||
|
||||
Returns:
|
||||
|
||||
The value returned by the EBC application we're going to run.
|
||||
|
||||
--*/
|
||||
{
|
||||
//
|
||||
// Create a new VM context on the stack
|
||||
@ -320,6 +308,19 @@ Returns:
|
||||
return (UINT64) VmContext.R[7];
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
Create thunks for an EBC image entry point, or an EBC protocol service.
|
||||
|
||||
@param ImageHandle Image handle for the EBC image. If not null, then
|
||||
we're creating a thunk for an image entry point.
|
||||
@param EbcEntryPoint Address of the EBC code that the thunk is to call
|
||||
@param Thunk Returned thunk we create here
|
||||
@param Flags Flags indicating options for creating the thunk
|
||||
|
||||
@return Standard EFI status.
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
EbcCreateThunks (
|
||||
IN EFI_HANDLE ImageHandle,
|
||||
@ -327,25 +328,6 @@ EbcCreateThunks (
|
||||
OUT VOID **Thunk,
|
||||
IN UINT32 Flags
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
|
||||
Create thunks for an EBC image entry point, or an EBC protocol service.
|
||||
|
||||
Arguments:
|
||||
|
||||
ImageHandle - Image handle for the EBC image. If not null, then we're
|
||||
creating a thunk for an image entry point.
|
||||
EbcEntryPoint - Address of the EBC code that the thunk is to call
|
||||
Thunk - Returned thunk we create here
|
||||
Flags - Flags indicating options for creating the thunk
|
||||
|
||||
Returns:
|
||||
|
||||
Standard EFI status.
|
||||
|
||||
--*/
|
||||
{
|
||||
UINT8 *Ptr;
|
||||
UINT8 *ThunkBase;
|
||||
@ -680,6 +662,21 @@ Returns:
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
Given raw bytes of Itanium based code, format them into a bundle and
|
||||
write them out.
|
||||
|
||||
@param MemPtr pointer to memory location to write the bundles to
|
||||
@param Template 5-bit template
|
||||
@param Slot0-2 instruction slot data for the bundle
|
||||
|
||||
@retval EFI_INVALID_PARAMETER Pointer is not aligned
|
||||
@retval No more than 5 bits in template
|
||||
@retval More than 41 bits used in code
|
||||
@retval EFI_SUCCESS All data is written.
|
||||
|
||||
**/
|
||||
STATIC
|
||||
EFI_STATUS
|
||||
WriteBundle (
|
||||
@ -689,27 +686,6 @@ WriteBundle (
|
||||
IN UINT64 Slot1,
|
||||
IN UINT64 Slot2
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
|
||||
Given raw bytes of Itanium based code, format them into a bundle and
|
||||
write them out.
|
||||
|
||||
Arguments:
|
||||
|
||||
MemPtr - pointer to memory location to write the bundles to
|
||||
Template - 5-bit template
|
||||
Slot0-2 - instruction slot data for the bundle
|
||||
|
||||
Returns:
|
||||
|
||||
EFI_INVALID_PARAMETER - Pointer is not aligned
|
||||
- No more than 5 bits in template
|
||||
- More than 41 bits used in code
|
||||
EFI_SUCCESS - All data is written.
|
||||
|
||||
--*/
|
||||
{
|
||||
UINT8 *BPtr;
|
||||
UINT32 Index;
|
||||
@ -760,6 +736,24 @@ Returns:
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
This function is called to execute an EBC CALLEX instruction.
|
||||
The function check the callee's content to see whether it is common native
|
||||
code or a thunk to another piece of EBC code.
|
||||
If the callee is common native code, use EbcLLCAllEXASM to manipulate,
|
||||
otherwise, set the VM->IP to target EBC code directly to avoid another VM
|
||||
be startup which cost time and stack space.
|
||||
|
||||
@param VmPtr Pointer to a VM context.
|
||||
@param FuncAddr Callee's address
|
||||
@param NewStackPointer New stack pointer after the call
|
||||
@param FramePtr New frame pointer after the call
|
||||
@param Size The size of call instruction
|
||||
|
||||
@return None.
|
||||
|
||||
**/
|
||||
VOID
|
||||
EbcLLCALLEX (
|
||||
IN VM_CONTEXT *VmPtr,
|
||||
@ -768,30 +762,6 @@ EbcLLCALLEX (
|
||||
IN VOID *FramePtr,
|
||||
IN UINT8 Size
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
|
||||
This function is called to execute an EBC CALLEX instruction.
|
||||
The function check the callee's content to see whether it is common native
|
||||
code or a thunk to another piece of EBC code.
|
||||
If the callee is common native code, use EbcLLCAllEXASM to manipulate,
|
||||
otherwise, set the VM->IP to target EBC code directly to avoid another VM
|
||||
be startup which cost time and stack space.
|
||||
|
||||
Arguments:
|
||||
|
||||
VmPtr - Pointer to a VM context.
|
||||
FuncAddr - Callee's address
|
||||
NewStackPointer - New stack pointer after the call
|
||||
FramePtr - New frame pointer after the call
|
||||
Size - The size of call instruction
|
||||
|
||||
Returns:
|
||||
|
||||
None.
|
||||
|
||||
--*/
|
||||
{
|
||||
UINTN IsThunk;
|
||||
UINTN TargetEbcAddr;
|
||||
|
@ -1,4 +1,5 @@
|
||||
/*++
|
||||
/** @file
|
||||
Definition of EBC Support function.
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
All rights reserved. This program and the accompanying materials
|
||||
@ -9,17 +10,7 @@ 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.
|
||||
|
||||
Module Name:
|
||||
|
||||
EbcSupport.h
|
||||
|
||||
Abstract:
|
||||
|
||||
Definition of EBC Support function
|
||||
|
||||
Revision History
|
||||
|
||||
--*/
|
||||
**/
|
||||
|
||||
#ifndef _IPF_EBC_SUPPORT_H_
|
||||
#define _IPF_EBC_SUPPORT_H_
|
||||
|
@ -1,4 +1,6 @@
|
||||
/*++
|
||||
/** @file
|
||||
This module contains EBC support routines that are customized based on
|
||||
the target x64 processor.
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
All rights reserved. This program and the accompanying materials
|
||||
@ -9,16 +11,7 @@ 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.
|
||||
|
||||
Module Name:
|
||||
|
||||
EbcSupport.c
|
||||
|
||||
Abstract:
|
||||
|
||||
This module contains EBC support routines that are customized based on
|
||||
the target x64 processor.
|
||||
|
||||
--*/
|
||||
**/
|
||||
|
||||
#include "EbcInt.h"
|
||||
#include "EbcExecute.h"
|
||||
@ -66,6 +59,19 @@ Returns:
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
Begin executing an EBC image. The address of the entry point is passed
|
||||
in via a processor register, so we'll need to make a call to get the
|
||||
value.
|
||||
|
||||
This is a thunk function. Microsoft x64 compiler only provide fast_call
|
||||
calling convention, so the first four arguments are passed by rcx, rdx,
|
||||
r8, and r9, while other arguments are passed in stack.
|
||||
|
||||
@return The value returned by the EBC application we're going to run.
|
||||
|
||||
**/
|
||||
STATIC
|
||||
UINT64
|
||||
EbcInterpret (
|
||||
@ -86,25 +92,6 @@ EbcInterpret (
|
||||
UINTN Arg15,
|
||||
UINTN Arg16
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
|
||||
Begin executing an EBC image. The address of the entry point is passed
|
||||
in via a processor register, so we'll need to make a call to get the
|
||||
value.
|
||||
|
||||
Arguments:
|
||||
|
||||
This is a thunk function. Microsoft x64 compiler only provide fast_call
|
||||
calling convention, so the first four arguments are passed by rcx, rdx,
|
||||
r8, and r9, while other arguments are passed in stack.
|
||||
|
||||
Returns:
|
||||
|
||||
The value returned by the EBC application we're going to run.
|
||||
|
||||
--*/
|
||||
{
|
||||
//
|
||||
// Create a new VM context on the stack
|
||||
@ -225,30 +212,25 @@ Returns:
|
||||
return (UINT64) VmContext.R[7];
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
Begin executing an EBC image. The address of the entry point is passed
|
||||
in via a processor register, so we'll need to make a call to get the
|
||||
value.
|
||||
|
||||
@param ImageHandle image handle for the EBC application we're executing
|
||||
@param SystemTable standard system table passed into an driver's entry
|
||||
point
|
||||
|
||||
@return The value returned by the EBC application we're going to run.
|
||||
|
||||
**/
|
||||
STATIC
|
||||
UINT64
|
||||
ExecuteEbcImageEntryPoint (
|
||||
IN EFI_HANDLE ImageHandle,
|
||||
IN EFI_SYSTEM_TABLE *SystemTable
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
|
||||
Begin executing an EBC image. The address of the entry point is passed
|
||||
in via a processor register, so we'll need to make a call to get the
|
||||
value.
|
||||
|
||||
Arguments:
|
||||
|
||||
ImageHandle - image handle for the EBC application we're executing
|
||||
SystemTable - standard system table passed into an driver's entry point
|
||||
|
||||
Returns:
|
||||
|
||||
The value returned by the EBC application we're going to run.
|
||||
|
||||
--*/
|
||||
{
|
||||
//
|
||||
// Create a new VM context on the stack
|
||||
@ -344,6 +326,17 @@ Returns:
|
||||
return (UINT64) VmContext.R[7];
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
Create an IA32 thunk for the given EBC entry point.
|
||||
|
||||
@param ImageHandle Handle of image for which this thunk is being created
|
||||
@param EbcEntryPoint Address of the EBC code that the thunk is to call
|
||||
@param Thunk Returned thunk we create here
|
||||
|
||||
@return Standard EFI status.
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
EbcCreateThunks (
|
||||
IN EFI_HANDLE ImageHandle,
|
||||
@ -351,23 +344,6 @@ EbcCreateThunks (
|
||||
OUT VOID **Thunk,
|
||||
IN UINT32 Flags
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
|
||||
Create an IA32 thunk for the given EBC entry point.
|
||||
|
||||
Arguments:
|
||||
|
||||
ImageHandle - Handle of image for which this thunk is being created
|
||||
EbcEntryPoint - Address of the EBC code that the thunk is to call
|
||||
Thunk - Returned thunk we create here
|
||||
|
||||
Returns:
|
||||
|
||||
Standard EFI status.
|
||||
|
||||
--*/
|
||||
{
|
||||
UINT8 *Ptr;
|
||||
UINT8 *ThunkBase;
|
||||
@ -496,6 +472,24 @@ Returns:
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
This function is called to execute an EBC CALLEX instruction.
|
||||
The function check the callee's content to see whether it is common native
|
||||
code or a thunk to another piece of EBC code.
|
||||
If the callee is common native code, use EbcLLCAllEXASM to manipulate,
|
||||
otherwise, set the VM->IP to target EBC code directly to avoid another VM
|
||||
be startup which cost time and stack space.
|
||||
|
||||
@param VmPtr Pointer to a VM context.
|
||||
@param FuncAddr Callee's address
|
||||
@param NewStackPointer New stack pointer after the call
|
||||
@param FramePtr New frame pointer after the call
|
||||
@param Size The size of call instruction
|
||||
|
||||
@return None.
|
||||
|
||||
**/
|
||||
VOID
|
||||
EbcLLCALLEX (
|
||||
IN VM_CONTEXT *VmPtr,
|
||||
@ -504,30 +498,6 @@ EbcLLCALLEX (
|
||||
IN VOID *FramePtr,
|
||||
IN UINT8 Size
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
|
||||
This function is called to execute an EBC CALLEX instruction.
|
||||
The function check the callee's content to see whether it is common native
|
||||
code or a thunk to another piece of EBC code.
|
||||
If the callee is common native code, use EbcLLCAllEXASM to manipulate,
|
||||
otherwise, set the VM->IP to target EBC code directly to avoid another VM
|
||||
be startup which cost time and stack space.
|
||||
|
||||
Arguments:
|
||||
|
||||
VmPtr - Pointer to a VM context.
|
||||
FuncAddr - Callee's address
|
||||
NewStackPointer - New stack pointer after the call
|
||||
FramePtr - New frame pointer after the call
|
||||
Size - The size of call instruction
|
||||
|
||||
Returns:
|
||||
|
||||
None.
|
||||
|
||||
--*/
|
||||
{
|
||||
UINTN IsThunk;
|
||||
UINTN TargetEbcAddr;
|
||||
|
@ -1,6 +1,7 @@
|
||||
/*++
|
||||
/** @file
|
||||
Produced the Monotonic Counter Services as defined in the DXE CIS.
|
||||
|
||||
Copyright (c) 2006 - 2007, Intel Corporation
|
||||
Copyright (c) 2006, 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
|
||||
@ -9,17 +10,8 @@ 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.
|
||||
|
||||
Module Name:
|
||||
**/
|
||||
|
||||
MonotonicCounter.c
|
||||
|
||||
Abstract:
|
||||
|
||||
Produced the Monotonic Counter Services as defined in the DXE CIS
|
||||
|
||||
Revision History:
|
||||
|
||||
--*/
|
||||
|
||||
#include "MonotonicCounter.h"
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
/*++
|
||||
/** @file
|
||||
Header file for MonotonicCounter driver.
|
||||
|
||||
Copyright (c) 2006, Intel Corporation
|
||||
All rights reserved. This program and the accompanying materials
|
||||
@ -9,15 +10,7 @@ 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.
|
||||
|
||||
Module Name:
|
||||
|
||||
MonotonicCounter.h
|
||||
|
||||
Abstract:
|
||||
|
||||
Produces the Monotonic Counter services as defined in the DXE CIS
|
||||
|
||||
--*/
|
||||
**/
|
||||
|
||||
#ifndef _MONOTONIC_COUNTER_DRIVER_H_
|
||||
#define _MONOTONIC_COUNTER_DRIVER_H_
|
||||
|
@ -1,4 +1,8 @@
|
||||
/*++
|
||||
/** @file
|
||||
This file contains two sets of callback routines for undi3.0 and undi3.1.
|
||||
the callback routines for Undi3.1 have an extra parameter UniqueId which
|
||||
stores the interface context for the NIC that snp is trying to talk.
|
||||
|
||||
Copyright (c) 2006, 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
|
||||
@ -8,16 +12,7 @@ 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.
|
||||
|
||||
Module name:
|
||||
callback.c
|
||||
|
||||
Abstract:
|
||||
This file contains two sets of callback routines for undi3.0 and undi3.1.
|
||||
the callback routines for Undi3.1 have an extra parameter UniqueId which
|
||||
stores the interface context for the NIC that snp is trying to talk..
|
||||
|
||||
--*/
|
||||
|
||||
**/
|
||||
|
||||
#include "Snp.h"
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
/*++
|
||||
/** @file
|
||||
Provides Set/Get time operations.
|
||||
|
||||
Copyright (c) 2006 - 2007 Intel Corporation. <BR>
|
||||
Copyright (c) 2006 - 2007, 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
|
||||
@ -9,15 +10,7 @@ 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.
|
||||
|
||||
|
||||
|
||||
Module Name:
|
||||
|
||||
Ia32PcRtc.c
|
||||
|
||||
Abstract:
|
||||
|
||||
--*/
|
||||
**/
|
||||
|
||||
#include "PcRtc.h"
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
/*++
|
||||
/** @file
|
||||
RTC Architectural Protocol GUID as defined in DxeCis 0.96.
|
||||
|
||||
Copyright (c) 2006 - 2007 Intel Corporation. <BR>
|
||||
Copyright (c) 2006 - 2007, 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
|
||||
@ -9,17 +10,7 @@ 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.
|
||||
|
||||
|
||||
|
||||
Module Name:
|
||||
|
||||
PcRtc.c
|
||||
|
||||
Abstract:
|
||||
|
||||
RTC Architectural Protocol GUID as defined in DxeCis 0.96
|
||||
|
||||
--*/
|
||||
**/
|
||||
|
||||
#include "PcRtc.h"
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
/*++
|
||||
/** @file
|
||||
Header file for real time clock driver.
|
||||
|
||||
Copyright (c) 2006 - 2007 Intel Corporation. <BR>
|
||||
Copyright (c) 2006 - 2007, 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
|
||||
@ -9,19 +10,8 @@ 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.
|
||||
|
||||
**/
|
||||
|
||||
Module Name:
|
||||
|
||||
PcRtc.h
|
||||
|
||||
Abstract:
|
||||
|
||||
Include for real time clock driver
|
||||
|
||||
Revision History
|
||||
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef _RTC_H_
|
||||
#define _RTC_H_
|
||||
|
@ -1,4 +1,5 @@
|
||||
/**
|
||||
/** @file
|
||||
Installs Single Segment Pci Configuration PPI.
|
||||
|
||||
Copyright (c) 2006 - 2007, Intel Corporation
|
||||
All rights reserved. This program and the accompanying materials
|
||||
|
Reference in New Issue
Block a user