diff options
author | Guo Mang <mang.guo@intel.com> | 2016-12-22 18:20:23 +0800 |
---|---|---|
committer | Guo Mang <mang.guo@intel.com> | 2016-12-26 19:14:58 +0800 |
commit | 5dce0991864ec5a10add570dca2f8dd850ea29bf (patch) | |
tree | 6805ea3a43d604ca794cfe027a75cc9ddc367ff1 /EmbeddedPkg/Include/Protocol | |
parent | 594e35c5a31f56580ef1e1df25ae491266ac9fac (diff) | |
download | edk2-platforms-5dce0991864ec5a10add570dca2f8dd850ea29bf.tar.xz |
EmbeddedPkg: Remove unused Package
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Guo Mang <mang.guo@intel.com>
Diffstat (limited to 'EmbeddedPkg/Include/Protocol')
-rw-r--r-- | EmbeddedPkg/Include/Protocol/AndroidFastbootPlatform.h | 145 | ||||
-rw-r--r-- | EmbeddedPkg/Include/Protocol/AndroidFastbootTransport.h | 131 | ||||
-rw-r--r-- | EmbeddedPkg/Include/Protocol/DebugSupportPeriodicCallback.h | 42 | ||||
-rw-r--r-- | EmbeddedPkg/Include/Protocol/EblAddCommand.h | 142 | ||||
-rw-r--r-- | EmbeddedPkg/Include/Protocol/EmbeddedDevice.h | 58 | ||||
-rw-r--r-- | EmbeddedPkg/Include/Protocol/EmbeddedExternalDevice.h | 94 | ||||
-rw-r--r-- | EmbeddedPkg/Include/Protocol/EmbeddedGpio.h | 167 | ||||
-rw-r--r-- | EmbeddedPkg/Include/Protocol/HardwareInterrupt.h | 170 | ||||
-rw-r--r-- | EmbeddedPkg/Include/Protocol/MmcHost.h | 157 | ||||
-rw-r--r-- | EmbeddedPkg/Include/Protocol/PeCoffLoader.h | 241 | ||||
-rw-r--r-- | EmbeddedPkg/Include/Protocol/UsbDevice.h | 118 |
11 files changed, 0 insertions, 1465 deletions
diff --git a/EmbeddedPkg/Include/Protocol/AndroidFastbootPlatform.h b/EmbeddedPkg/Include/Protocol/AndroidFastbootPlatform.h deleted file mode 100644 index a9b4aac482..0000000000 --- a/EmbeddedPkg/Include/Protocol/AndroidFastbootPlatform.h +++ /dev/null @@ -1,145 +0,0 @@ -/** @file
-
- Copyright (c) 2014, ARM Ltd. All rights reserved.<BR>
-
- 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.
-
-**/
-
-#ifndef __ANDROID_FASTBOOT_PLATFORM_H__
-#define __ANDROID_FASTBOOT_PLATFORM_H__
-
-extern EFI_GUID gAndroidFastbootPlatformProtocolGuid;
-
-/*
- Protocol for platform-specific operations initiated by Android Fastboot.
-
- Based on Fastboot Protocol version 0.4. See
- system/core/fastboot/fastboot_protocol.txt in the AOSP source tree for more
- info.
-
- Doesn't support image verification.
-*/
-
-/*
- Do any initialisation that needs to be done in order to be able to respond to
- commands.
-
- @retval EFI_SUCCESS Initialised successfully.
- @retval !EFI_SUCCESS Error in initialisation.
-*/
-typedef
-EFI_STATUS
-(*FASTBOOT_PLATFORM_INIT) (
- VOID
- );
-
-/*
- To be called when Fastboot is finished and we aren't rebooting or booting an
- image. Undo initialisation, free resrouces.
-*/
-typedef
-VOID
-(*FASTBOOT_PLATFORM_UN_INIT) (
- VOID
- );
-
-/*
- Flash the partition named (according to a platform-specific scheme)
- PartitionName, with the image pointed to by Buffer, whose size is BufferSize.
-
- @param[in] PartitionName Null-terminated name of partition to write.
- @param[in] BufferSize Size of Buffer in byets.
- @param[in] Buffer Data to write to partition.
-
- @retval EFI_NOT_FOUND No such partition.
- @retval EFI_DEVICE_ERROR Flashing failed.
-*/
-typedef
-EFI_STATUS
-(*FASTBOOT_PLATFORM_FLASH) (
- IN CHAR8 *PartitionName,
- IN UINTN BufferSize,
- IN VOID *Buffer
- );
-
-/*
- Erase the partition named PartitionName.
-
- @param[in] PartitionName Null-terminated name of partition to erase.
-
- @retval EFI_NOT_FOUND No such partition.
- @retval EFI_DEVICE_ERROR Erasing failed.
-*/
-typedef
-EFI_STATUS
-(*FASTBOOT_PLATFORM_ERASE) (
- IN CHAR8 *PartitionName
- );
-
-/*
- If the variable referred to by Name exists, copy it (as a null-terminated
- string) into Value. If it doesn't exist, put the Empty string in Value.
-
- Variable names and values may not be larger than 60 bytes, excluding the
- terminal null character. This is a limitation of the Fastboot protocol.
-
- The Fastboot application will handle platform-nonspecific variables
- (Currently "version" is the only one of these.)
-
- @param[in] Name Null-terminated name of Fastboot variable to retrieve.
- @param[out] Value Caller-allocated buffer for null-terminated value of
- variable.
-
- @retval EFI_SUCCESS The variable was retrieved, or it doesn't exist.
- @retval EFI_DEVICE_ERROR There was an error looking up the variable. This
- does _not_ include the variable not existing.
-*/
-typedef
-EFI_STATUS
-(*FASTBOOT_PLATFORM_GETVAR) (
- IN CHAR8 *Name,
- OUT CHAR8 *Value
- );
-
-/*
- React to an OEM-specific command.
-
- Future versions of this function might want to allow the platform to do some
- extra communication with the host. A way to do this would be to add a function
- to the FASTBOOT_TRANSPORT_PROTOCOL that allows the implementation of
- DoOemCommand to replace the ReceiveEvent with its own, and to restore the old
- one when it's finished.
-
- However at the moment although the specification allows it, the AOSP fastboot
- host application doesn't handle receiving any data from the client, and it
- doesn't support a data phase for OEM commands.
-
- @param[in] Command Null-terminated command string.
-
- @retval EFI_SUCCESS The command executed successfully.
- @retval EFI_NOT_FOUND The command wasn't recognised.
- @retval EFI_DEVICE_ERROR There was an error executing the command.
-*/
-typedef
-EFI_STATUS
-(*FASTBOOT_PLATFORM_OEM_COMMAND) (
- IN CHAR8 *Command
- );
-
-typedef struct _FASTBOOT_PLATFORM_PROTOCOL {
- FASTBOOT_PLATFORM_INIT Init;
- FASTBOOT_PLATFORM_UN_INIT UnInit;
- FASTBOOT_PLATFORM_FLASH FlashPartition;
- FASTBOOT_PLATFORM_ERASE ErasePartition;
- FASTBOOT_PLATFORM_GETVAR GetVar;
- FASTBOOT_PLATFORM_OEM_COMMAND DoOemCommand;
-} FASTBOOT_PLATFORM_PROTOCOL;
-
-#endif
diff --git a/EmbeddedPkg/Include/Protocol/AndroidFastbootTransport.h b/EmbeddedPkg/Include/Protocol/AndroidFastbootTransport.h deleted file mode 100644 index 807068717e..0000000000 --- a/EmbeddedPkg/Include/Protocol/AndroidFastbootTransport.h +++ /dev/null @@ -1,131 +0,0 @@ -/** @file
-
- Copyright (c) 2014, ARM Ltd. All rights reserved.<BR>
-
- 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.
-
-**/
-
-/*
- Transport protocol over which Android Fastboot transactions can be made.
- Fastboot is designed for USB, but this protocol is intended as an abstraction
- so that it can be implemented over any transport mechanism.
-*/
-
-#ifndef __ANDROID_FASTBOOT_TRANSPORT_H__
-#define __ANDROID_FASTBOOT_TRANSPORT_H__
-
-extern EFI_GUID gAndroidFastbootTransportProtocolGuid;
-
-/*
- Set up the transport system for use by Fastboot.
- e.g. For USB this probably means making the device enumerable. For TCP,
- preparing to accept incoming connections.
-
- It is _not_ the responsibility of this protocol's implementer to unite the
- data phase into a single buffer - that is handled by the Fastboot UEFI
- application. As the Fastboot protocol spec says: "Short packets are always
- acceptable and zero-length packets are ignored."
- However the commands and responses must be in a single packet, and the order
- of the packets must of course be maintained.
-
- If there is a fatal error in the receive channel, ReceiveEvent will be
- signalled, and a subsequent call to Receive() will return an error. This
- allows data transported prior to the error to be received.
-
- @param[in] ReceiveEvent Event to be Signalled when a packet has been received
- and is ready to be retrieved via Receive().
-
- @retval EFI_SUCCESS Initialised successfully.
- @retval EFI_DEVICE_ERROR Error in initialising hardware
- @retval (other) Error return from LocateProtocol functions.
-*/
-typedef
-EFI_STATUS
-(*FASTBOOT_TRANSPORT_START) (
- IN EFI_EVENT ReceiveEvent
- );
-
-/*
- Function to be called when all Fastboot transactions are finished, to
- de-initialise the transport system.
- e.g. A USB OTG system might want to get out of peripheral mode so it can be
- a USB host.
-
- Note that this function will be called after an error is reported by Send or
- Receive
-
- @retval EFI_SUCCESS De-initialised successfully.
- @retval EFI_DEVICE_ERROR Error de-initialising hardware.
-*/
-typedef
-EFI_STATUS
-(* FASTBOOT_TRANSPORT_STOP) (
- VOID
- );
-
-/*
- Send data. This function can be used both for command responses like "OKAY"
- and for the data phase (the protocol doesn't describe any situation when the
- latter might be necessary, but does allow it)
-
- Transmission need not finish before the function returns.
- If there is an error in transmission from which the transport system cannot
- recover, FatalErrorEvent will be signalled. Otherwise, it is assumed that all
- data was delivered successfully.
-
- @param[in] BufferSize Size in bytes of data to send.
- @param[in] Buffer Data to send.
- @param[in] FatalErrorEvent Event to signal if there was an error in
- transmission from which the transport system
- cannot recover.
-
- @retval EFI_SUCCESS The data was sent or queued for send.
- @retval EFI_DEVICE_ERROR There was an error preparing to send the data.
- */
-typedef
-EFI_STATUS
-(*FASTBOOT_TRANSPORT_SEND) (
- IN UINTN BufferSize,
- IN CONST VOID *Buffer,
- IN EFI_EVENT *FatalErrorEvent
- );
-
-/*
- When the event has been Signalled to say data is available from the host,
- this function is used to get data. In order to handle the case where several
- packets are received before ReceiveEvent's notify function is called, packets
- received are queued, and each call to this function returns the next packet in
- the queue. It should therefore be called in a loop, the exit condition being a
- return of EFI_NOT_READY.
-
- @param[out] Buffer Pointer to received data. Callee allocated - the
- caller must free it with FreePool.
- @param[out] BufferSize The size of received data in bytes
-
- @retval EFI_NOT_READY There is no data available
- @retval EFI_DEVICE_ERROR There was a fatal error in the receive channel.
- e.g. for USB the cable was unplugged or for TCP the
- connection was closed by the remote host..
-*/
-typedef
-EFI_STATUS
-(*FASTBOOT_TRANSPORT_RECEIVE) (
- OUT UINTN *BufferSize,
- OUT VOID **Buffer
- );
-
-typedef struct _FASTBOOT_TRANSPORT_PROTOCOL {
- FASTBOOT_TRANSPORT_START Start;
- FASTBOOT_TRANSPORT_STOP Stop;
- FASTBOOT_TRANSPORT_SEND Send;
- FASTBOOT_TRANSPORT_RECEIVE Receive;
-} FASTBOOT_TRANSPORT_PROTOCOL;
-
-#endif
diff --git a/EmbeddedPkg/Include/Protocol/DebugSupportPeriodicCallback.h b/EmbeddedPkg/Include/Protocol/DebugSupportPeriodicCallback.h deleted file mode 100644 index 3d95f930b9..0000000000 --- a/EmbeddedPkg/Include/Protocol/DebugSupportPeriodicCallback.h +++ /dev/null @@ -1,42 +0,0 @@ -/** @file
- Protocol is used to help implement DebugSupport.RegisterPeriodicCallback() functionality.
- This enables the DXE timer driver to support the periodic callback function so the
- DebugSupport driver does not need to contain platform specific information about how a timer
- works.
-
- Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
-
- 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.
-
-**/
-
-
-#ifndef __DEBUG_SUPPORT_PERIODIC_CALLBACK_H__
-#define __DEBUG_SUPPORT_PERIODIC_CALLBACK_H__
-
-#include <Protocol/DebugSupport.h>
-
-typedef struct _EFI_DEBUG_SUPPORT_PERIODIC_CALLBACK_PROTOCOL EFI_DEBUG_SUPPORT_PERIODIC_CALLBACK_PROTOCOL;
-
-
-// {9546E07C-2CBB-4c88-986C-CD341086F044}
-#define EFI_DEBUG_SUPPORT_PERIODIC_CALLBACK_PROTOCOL_GUID \
- { 0x9546e07c, 0x2cbb, 0x4c88, { 0x98, 0x6c, 0xcd, 0x34, 0x10, 0x86, 0xf0, 0x44 } }
-
-
-//
-// DebugSupport protocol definition
-//
-struct _EFI_DEBUG_SUPPORT_PERIODIC_CALLBACK_PROTOCOL {
- EFI_PERIODIC_CALLBACK PeriodicCallback;
-};
-
-extern EFI_GUID gEfiDebugSupportPeriodicCallbackProtocolGuid;
-
-#endif
diff --git a/EmbeddedPkg/Include/Protocol/EblAddCommand.h b/EmbeddedPkg/Include/Protocol/EblAddCommand.h deleted file mode 100644 index 4a9f494c5d..0000000000 --- a/EmbeddedPkg/Include/Protocol/EblAddCommand.h +++ /dev/null @@ -1,142 +0,0 @@ -/** @file
-
- Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
-
- 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.
-
-**/
-
-
-#ifndef __EBL_ADD_COMMAND_H__
-#define __EBL_ADD_COMMAND_H__
-
-
-
-//
-// Protocol GUID
-//
-// AEDA2428-9A22-4637-9B21-545E28FBB829
-
-#define EBL_ADD_COMMAND_PROTOCOL_GUID \
- { 0xaeda2428, 0x9a22, 0x4637, { 0x9b, 0x21, 0x54, 0x5e, 0x28, 0xfb, 0xb8, 0x29 } }
-
-
-typedef struct _EBL_ADD_COMMAND_PROTOCOL EBL_ADD_COMMAND_PROTOCOL;
-
-typedef
-EFI_STATUS
-(EFIAPI *EBL_COMMMAND) (
- IN UINTN Argc,
- IN CHAR8 **Argv
- );
-
-typedef struct {
- CHAR8 *Name;
- CHAR8 *HelpSummary;
- CHAR8 *Help;
- EBL_COMMMAND Command;
-} EBL_COMMAND_TABLE;
-
-
-/**
- Add a single command table entry.
-
- @param EntryArray Pointer EBL_COMMAND_TABLE of the command that is being added
-
-**/
-typedef
-VOID
-(EFIAPI *EBL_ADD_COMMAND) (
- IN const EBL_COMMAND_TABLE *Entry
- );
-
-
-/**
- Add a multiple command table entry.
-
- @param EntryArray Pointer EBL_COMMAND_TABLE of the commands that are being added
-
- @param ArrayCount Number of commands in the EntryArray.
-
-**/
-typedef
-VOID
-(EFIAPI *EBL_ADD_COMMANDS) (
- IN const EBL_COMMAND_TABLE *EntryArray,
- IN UINTN ArrayCount
- );
-
-
-typedef
-VOID
-(EFIAPI *EBL_GET_CHAR_CALL_BACK) (
- IN UINTN ElapsedTime
- );
-
-/**
- Return a keypress or optionally timeout if a timeout value was passed in.
- An optional callback function is called every second when waiting for a
- timeout.
-
- @param Key EFI Key information returned
- @param TimeoutInSec Number of seconds to wait to timeout
- @param CallBack Callback called every second during the timeout wait
-
- @return EFI_SUCCESS Key was returned
- @return EFI_TIMEOUT If the TimoutInSec expired
-
-**/
-typedef
-EFI_STATUS
-(EFIAPI *EBL_GET_CHAR_KEY) (
- IN OUT EFI_INPUT_KEY *Key,
- IN UINTN TimeoutInSec,
- IN EBL_GET_CHAR_CALL_BACK CallBack OPTIONAL
- );
-
-
-/**
- This routine is used prevent command output data from scrolling off the end
- of the screen. The global gPageBreak is used to turn on or off this feature.
- If the CurrentRow is near the end of the screen pause and print out a prompt
- If the use hits Q to quit return TRUE else for any other key return FALSE.
- PrefixNewline is used to figure out if a newline is needed before the prompt
- string. This depends on the last print done before calling this function.
- CurrentRow is updated by one on a call or set back to zero if a prompt is
- needed.
-
- @param CurrentRow Used to figure out if its the end of the page and updated
- @param PrefixNewline Did previous print issue a newline
-
- @return TRUE if Q was hit to quit, FALSE in all other cases.
-
-**/
-typedef
-BOOLEAN
-(EFIAPI *EBL_ANY_KEY_CONTINUE_Q_QUIT) (
- IN UINTN *CurrentRow,
- IN BOOLEAN PrefixNewline
- );
-
-
-
-struct _EBL_ADD_COMMAND_PROTOCOL {
- EBL_ADD_COMMAND AddCommand;
- EBL_ADD_COMMANDS AddCommands;
-
- // Commands to reuse EBL infrastructure
- EBL_GET_CHAR_KEY EblGetCharKey;
- EBL_ANY_KEY_CONTINUE_Q_QUIT EblAnyKeyToContinueQtoQuit;
-};
-
-extern EFI_GUID gEfiEblAddCommandProtocolGuid;
-
-#endif
-
-
diff --git a/EmbeddedPkg/Include/Protocol/EmbeddedDevice.h b/EmbeddedPkg/Include/Protocol/EmbeddedDevice.h deleted file mode 100644 index a999a97557..0000000000 --- a/EmbeddedPkg/Include/Protocol/EmbeddedDevice.h +++ /dev/null @@ -1,58 +0,0 @@ -/** @file
- Deal with devices that just exist in memory space.
-
- To follow the EFI driver model you need a root handle to start with. An
- EFI driver will have a driver binding protocol (Supported, Start, Stop)
- that is used to layer on top of a handle via a gBS->ConnectController.
- The first handle has to just be in the system to make that work. For
- PCI it is a PCI Root Bridge IO protocol that provides the root.
-
- On an embedded system with MMIO device we need a handle to just
- show up. That handle will have this protocol and a device path
- protocol on it.
-
- For an ethernet device the device path must contain a MAC address device path
- node.
-
- Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
-
- 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.
-
-**/
-
-#ifndef __EMBEDDED_DEVICE_PROTOCOL_H__
-#define __EMBEDDED_DEVICE_PROTOCOL_H__
-
-
-//
-// Protocol GUID
-//
-// BF4B9D10-13EC-43dd-8880-E90B718F27DE
-
-#define EMBEDDED_DEVICE_PROTOCOL_GUID \
- { 0xbf4b9d10, 0x13ec, 0x43dd, { 0x88, 0x80, 0xe9, 0xb, 0x71, 0x8f, 0x27, 0xde } }
-
-
-
-typedef struct {
- UINT16 VendorId;
- UINT16 DeviceId;
- UINT16 RevisionId;
- UINT16 SubsystemId;
- UINT16 SubsystemVendorId;
- UINT8 ClassCode[3];
- UINT8 HeaderSize;
- UINTN BaseAddress;
-} EMBEDDED_DEVICE_PROTOCOL;
-
-extern EFI_GUID gEmbeddedDeviceGuid;
-
-#endif
-
-
diff --git a/EmbeddedPkg/Include/Protocol/EmbeddedExternalDevice.h b/EmbeddedPkg/Include/Protocol/EmbeddedExternalDevice.h deleted file mode 100644 index 06d2f034d0..0000000000 --- a/EmbeddedPkg/Include/Protocol/EmbeddedExternalDevice.h +++ /dev/null @@ -1,94 +0,0 @@ -/** @file
-
- Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
-
- 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.
-
-**/
-
-#ifndef __EMBEDDED_EXTERNAL_DEVICE_H__
-#define __EMBEDDED_EXTERNAL_DEVICE_H__
-
-//
-// Protocol GUID
-//
-#define EMBEDDED_EXTERNAL_DEVICE_PROTOCOL_GUID { 0x735F8C64, 0xD696, 0x44D0, { 0xBD, 0xF2, 0x44, 0x7F, 0xD0, 0x5A, 0x54, 0x06 }}
-
-//
-// Protocol interface structure
-//
-typedef struct _EMBEDDED_EXTERNAL_DEVICE EMBEDDED_EXTERNAL_DEVICE;
-
-//
-// Function Prototypes
-//
-typedef
-EFI_STATUS
-(EFIAPI *EMBEDDED_EXTERNAL_DEVICE_READ) (
- IN EMBEDDED_EXTERNAL_DEVICE *This,
- IN UINTN Register,
- IN UINTN Length,
- OUT VOID *Buffer
- )
-/*++
-
-Routine Description:
-
- Read a set of contiguous external device registers.
-
-Arguments:
-
- This - pointer to protocol
- Offset - starting register number
- Length - number of bytes to read
- Buffer - destination buffer
-
-Returns:
-
- EFI_SUCCESS - registers read successfully
-
---*/
-;
-
-typedef
-EFI_STATUS
-(EFIAPI *EMBEDDED_EXTERNAL_DEVICE_WRITE) (
- IN EMBEDDED_EXTERNAL_DEVICE *This,
- IN UINTN Register,
- IN UINTN Length,
- IN VOID *Buffer
- )
-/*++
-
-Routine Description:
-
- Write to a set of contiguous external device registers.
-
-Arguments:
-
- This - pointer to protocol
- Offset - starting register number
- Length - number of bytes to write
- Buffer - source buffer
-
-Returns:
-
- EFI_SUCCESS - registers written successfully
-
---*/
-;
-
-struct _EMBEDDED_EXTERNAL_DEVICE {
- EMBEDDED_EXTERNAL_DEVICE_READ Read;
- EMBEDDED_EXTERNAL_DEVICE_WRITE Write;
-};
-
-extern EFI_GUID gEmbeddedExternalDeviceProtocolGuid;
-
-#endif // __EMBEDDED_EXTERNAL_DEVICE_H__
diff --git a/EmbeddedPkg/Include/Protocol/EmbeddedGpio.h b/EmbeddedPkg/Include/Protocol/EmbeddedGpio.h deleted file mode 100644 index 4e7c8dbcd6..0000000000 --- a/EmbeddedPkg/Include/Protocol/EmbeddedGpio.h +++ /dev/null @@ -1,167 +0,0 @@ -/** @file
-
- Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
-
- 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.
-
-**/
-
-#ifndef __EMBEDDED_GPIO_H__
-#define __EMBEDDED_GPIO_H__
-
-//
-// Protocol interface structure
-//
-typedef struct _EMBEDDED_GPIO EMBEDDED_GPIO;
-
-//
-// Data Types
-//
-typedef UINTN EMBEDDED_GPIO_PIN;
-
-#define GPIO(Port, Pin) ((EMBEDDED_GPIO_PIN)(((Port) << (16)) | (Pin)))
-#define GPIO_PIN(x) ((EMBEDDED_GPIO_PIN)(x) & (0xFFFF))
-#define GPIO_PORT(x) ((EMBEDDED_GPIO_PIN)(x) >> (16))
-
-typedef enum {
- GPIO_MODE_INPUT = 0x00,
- GPIO_MODE_OUTPUT_0 = 0x0E,
- GPIO_MODE_OUTPUT_1 = 0x0F,
- GPIO_MODE_SPECIAL_FUNCTION_2 = 0x02,
- GPIO_MODE_SPECIAL_FUNCTION_3 = 0x03,
- GPIO_MODE_SPECIAL_FUNCTION_4 = 0x04,
- GPIO_MODE_SPECIAL_FUNCTION_5 = 0x05,
- GPIO_MODE_SPECIAL_FUNCTION_6 = 0x06,
- GPIO_MODE_SPECIAL_FUNCTION_7 = 0x07
-} EMBEDDED_GPIO_MODE;
-
-typedef enum {
- GPIO_PULL_NONE,
- GPIO_PULL_UP,
- GPIO_PULL_DOWN
-} EMBEDDED_GPIO_PULL;
-
-//
-// Function Prototypes
-//
-typedef
-EFI_STATUS
-(EFIAPI *EMBEDDED_GPIO_GET) (
- IN EMBEDDED_GPIO *This,
- IN EMBEDDED_GPIO_PIN Gpio,
- OUT UINTN *Value
- );
-/*++
-
-Routine Description:
-
- Gets the state of a GPIO pin
-
-Arguments:
-
- This - pointer to protocol
- Gpio - which pin to read
- Value - state of the pin
-
-Returns:
-
- EFI_SUCCESS - GPIO state returned in Value
-
---*/
-
-
-typedef
-EFI_STATUS
-(EFIAPI *EMBEDDED_GPIO_SET) (
- IN EMBEDDED_GPIO *This,
- IN EMBEDDED_GPIO_PIN Gpio,
- IN EMBEDDED_GPIO_MODE Mode
- );
-/*++
-
-Routine Description:
-
- Sets the state of a GPIO pin
-
-Arguments:
-
- This - pointer to protocol
- Gpio - which pin to modify
- Mode - mode to set
-
-Returns:
-
- EFI_SUCCESS - GPIO set as requested
-
---*/
-
-
-typedef
-EFI_STATUS
-(EFIAPI *EMBEDDED_GPIO_GET_MODE) (
- IN EMBEDDED_GPIO *This,
- IN EMBEDDED_GPIO_PIN Gpio,
- OUT EMBEDDED_GPIO_MODE *Mode
- );
-/*++
-
-Routine Description:
-
- Gets the mode (function) of a GPIO pin
-
-Arguments:
-
- This - pointer to protocol
- Gpio - which pin
- Mode - pointer to output mode value
-
-Returns:
-
- EFI_SUCCESS - mode value retrieved
-
---*/
-
-
-typedef
-EFI_STATUS
-(EFIAPI *EMBEDDED_GPIO_SET_PULL) (
- IN EMBEDDED_GPIO *This,
- IN EMBEDDED_GPIO_PIN Gpio,
- IN EMBEDDED_GPIO_PULL Direction
- );
-/*++
-
-Routine Description:
-
- Sets the pull-up / pull-down resistor of a GPIO pin
-
-Arguments:
-
- This - pointer to protocol
- Gpio - which pin
- Direction - pull-up, pull-down, or none
-
-Returns:
-
- EFI_SUCCESS - pin was set
-
---*/
-
-
-
-struct _EMBEDDED_GPIO {
- EMBEDDED_GPIO_GET Get;
- EMBEDDED_GPIO_SET Set;
- EMBEDDED_GPIO_GET_MODE GetMode;
- EMBEDDED_GPIO_SET_PULL SetPull;
-};
-
-extern EFI_GUID gEmbeddedGpioProtocolGuid;
-
-#endif
diff --git a/EmbeddedPkg/Include/Protocol/HardwareInterrupt.h b/EmbeddedPkg/Include/Protocol/HardwareInterrupt.h deleted file mode 100644 index c4b5b9fa62..0000000000 --- a/EmbeddedPkg/Include/Protocol/HardwareInterrupt.h +++ /dev/null @@ -1,170 +0,0 @@ -/** @file
- Abstraction for hardware based interrupt routine
-
- On non IA-32 systems it is common to have a single hardware interrupt vector
- and a 2nd layer of software that routes the interrupt handlers based on the
- interrupt source. This protocol enables this routing. The driver implementing
- this protocol is responsible for clearing the pending interrupt in the
- interrupt routing hardware. The HARDWARE_INTERRUPT_HANDLER is responsible
- for clearing interrupt sources from individual devices.
-
-
- Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
-
- 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.
-
-**/
-
-#ifndef __HARDWARE_INTERRUPT_H__
-#define __HARDWARE_INTERRUPT_H__
-
-#include <Protocol/DebugSupport.h>
-
-
-//
-// Protocol GUID
-//
-// EAB39028-3D05-4316-AD0C-D64808DA3FF1
-
-#define EFI_HARDWARE_INTERRUPT_PROTOCOL_GGUID \
- { 0x2890B3EA, 0x053D, 0x1643, { 0xAD, 0x0C, 0xD6, 0x48, 0x08, 0xDA, 0x3F, 0xF1 } }
-
-
-typedef struct _EFI_HARDWARE_INTERRUPT_PROTOCOL EFI_HARDWARE_INTERRUPT_PROTOCOL;
-
-
-typedef UINTN HARDWARE_INTERRUPT_SOURCE;
-
-
-/**
- C Interrupt Handler calledin the interrupt context when Source interrupt is active.
-
- @param Source Source of the interrupt. Hardware routing off a specific platform defines
- what source means.
- @param SystemContext Pointer to system register context. Mostly used by debuggers and will
- update the system context after the return from the interrupt if
- modified. Don't change these values unless you know what you are doing
-
-**/
-typedef
-VOID
-(EFIAPI *HARDWARE_INTERRUPT_HANDLER) (
- IN HARDWARE_INTERRUPT_SOURCE Source,
- IN EFI_SYSTEM_CONTEXT SystemContext
- );
-
-
-/**
- Register Handler for the specified interrupt source.
-
- @param This Instance pointer for this protocol
- @param Source Hardware source of the interrupt
- @param Handler Callback for interrupt. NULL to unregister
-
- @retval EFI_SUCCESS Source was updated to support Handler.
- @retval EFI_DEVICE_ERROR Hardware could not be programmed.
-
-**/
-typedef
-EFI_STATUS
-(EFIAPI *HARDWARE_INTERRUPT_REGISTER) (
- IN EFI_HARDWARE_INTERRUPT_PROTOCOL *This,
- IN HARDWARE_INTERRUPT_SOURCE Source,
- IN HARDWARE_INTERRUPT_HANDLER Handler
- );
-
-
-/**
- Enable interrupt source Source.
-
- @param This Instance pointer for this protocol
- @param Source Hardware source of the interrupt
-
- @retval EFI_SUCCESS Source interrupt enabled.
- @retval EFI_DEVICE_ERROR Hardware could not be programmed.
-
-**/
-typedef
-EFI_STATUS
-(EFIAPI *HARDWARE_INTERRUPT_ENABLE) (
- IN EFI_HARDWARE_INTERRUPT_PROTOCOL *This,
- IN HARDWARE_INTERRUPT_SOURCE Source
- );
-
-
-
-/**
- Disable interrupt source Source.
-
- @param This Instance pointer for this protocol
- @param Source Hardware source of the interrupt
-
- @retval EFI_SUCCESS Source interrupt disabled.
- @retval EFI_DEVICE_ERROR Hardware could not be programmed.
-
-**/
-typedef
-EFI_STATUS
-(EFIAPI *HARDWARE_INTERRUPT_DISABLE) (
- IN EFI_HARDWARE_INTERRUPT_PROTOCOL *This,
- IN HARDWARE_INTERRUPT_SOURCE Source
- );
-
-
-/**
- Return current state of interrupt source Source.
-
- @param This Instance pointer for this protocol
- @param Source Hardware source of the interrupt
- @param InterruptState TRUE: source enabled, FALSE: source disabled.
-
- @retval EFI_SUCCESS InterruptState is valid
- @retval EFI_DEVICE_ERROR InterruptState is not valid
-
-**/
-typedef
-EFI_STATUS
-(EFIAPI *HARDWARE_INTERRUPT_INTERRUPT_STATE) (
- IN EFI_HARDWARE_INTERRUPT_PROTOCOL *This,
- IN HARDWARE_INTERRUPT_SOURCE Source,
- IN BOOLEAN *InterruptState
- );
-
-/**
- Signal to the hardware that the End Of Intrrupt state
- has been reached.
-
- @param This Instance pointer for this protocol
- @param Source Hardware source of the interrupt
-
- @retval EFI_SUCCESS Source interrupt EOI'ed.
- @retval EFI_DEVICE_ERROR Hardware could not be programmed.
-
-**/
-typedef
-EFI_STATUS
-(EFIAPI *HARDWARE_INTERRUPT_END_OF_INTERRUPT) (
- IN EFI_HARDWARE_INTERRUPT_PROTOCOL *This,
- IN HARDWARE_INTERRUPT_SOURCE Source
- );
-
-
-struct _EFI_HARDWARE_INTERRUPT_PROTOCOL {
- HARDWARE_INTERRUPT_REGISTER RegisterInterruptSource;
- HARDWARE_INTERRUPT_ENABLE EnableInterruptSource;
- HARDWARE_INTERRUPT_DISABLE DisableInterruptSource;
- HARDWARE_INTERRUPT_INTERRUPT_STATE GetInterruptSourceState;
- HARDWARE_INTERRUPT_END_OF_INTERRUPT EndOfInterrupt;
-};
-
-extern EFI_GUID gHardwareInterruptProtocolGuid;
-
-#endif
-
-
diff --git a/EmbeddedPkg/Include/Protocol/MmcHost.h b/EmbeddedPkg/Include/Protocol/MmcHost.h deleted file mode 100644 index 89f2e80b5c..0000000000 --- a/EmbeddedPkg/Include/Protocol/MmcHost.h +++ /dev/null @@ -1,157 +0,0 @@ -/** @file
- Definition of the MMC Host Protocol
-
- Copyright (c) 2011-2014, ARM Limited. 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.
-
-**/
-
-#ifndef __MMC_HOST_H__
-#define __MMC_HOST_H__
-
-///
-/// Global ID for the MMC Host Protocol
-///
-#define EFI_MMC_HOST_PROTOCOL_GUID \
- { 0x3e591c00, 0x9e4a, 0x11df, {0x92, 0x44, 0x00, 0x02, 0xA5, 0xD5, 0xC5, 0x1B } }
-
-#define MMC_RESPONSE_TYPE_R1 0
-#define MMC_RESPONSE_TYPE_R1b 0
-#define MMC_RESPONSE_TYPE_R2 1
-#define MMC_RESPONSE_TYPE_R3 0
-#define MMC_RESPONSE_TYPE_R6 0
-#define MMC_RESPONSE_TYPE_R7 0
-#define MMC_RESPONSE_TYPE_OCR 0
-#define MMC_RESPONSE_TYPE_CID 1
-#define MMC_RESPONSE_TYPE_CSD 1
-#define MMC_RESPONSE_TYPE_RCA 0
-
-typedef UINT32 MMC_RESPONSE_TYPE;
-
-typedef UINT32 MMC_CMD;
-
-#define MMC_CMD_WAIT_RESPONSE (1 << 16)
-#define MMC_CMD_LONG_RESPONSE (1 << 17)
-#define MMC_CMD_NO_CRC_RESPONSE (1 << 18)
-
-#define MMC_INDX(Index) ((Index) & 0xFFFF)
-#define MMC_GET_INDX(MmcCmd) ((MmcCmd) & 0xFFFF)
-
-#define MMC_CMD0 (MMC_INDX(0) | MMC_CMD_NO_CRC_RESPONSE)
-#define MMC_CMD1 (MMC_INDX(1) | MMC_CMD_WAIT_RESPONSE | MMC_CMD_NO_CRC_RESPONSE)
-#define MMC_CMD2 (MMC_INDX(2) | MMC_CMD_WAIT_RESPONSE | MMC_CMD_LONG_RESPONSE)
-#define MMC_CMD3 (MMC_INDX(3) | MMC_CMD_WAIT_RESPONSE)
-#define MMC_CMD5 (MMC_INDX(5) | MMC_CMD_WAIT_RESPONSE | MMC_CMD_NO_CRC_RESPONSE)
-#define MMC_CMD7 (MMC_INDX(7) | MMC_CMD_WAIT_RESPONSE)
-#define MMC_CMD8 (MMC_INDX(8) | MMC_CMD_WAIT_RESPONSE)
-#define MMC_CMD9 (MMC_INDX(9) | MMC_CMD_WAIT_RESPONSE | MMC_CMD_LONG_RESPONSE)
-#define MMC_CMD11 (MMC_INDX(11) | MMC_CMD_WAIT_RESPONSE)
-#define MMC_CMD12 (MMC_INDX(12) | MMC_CMD_WAIT_RESPONSE)
-#define MMC_CMD13 (MMC_INDX(13) | MMC_CMD_WAIT_RESPONSE)
-#define MMC_CMD16 (MMC_INDX(16) | MMC_CMD_WAIT_RESPONSE)
-#define MMC_CMD17 (MMC_INDX(17) | MMC_CMD_WAIT_RESPONSE)
-#define MMC_CMD18 (MMC_INDX(18) | MMC_CMD_WAIT_RESPONSE)
-#define MMC_CMD20 (MMC_INDX(20) | MMC_CMD_WAIT_RESPONSE)
-#define MMC_CMD23 (MMC_INDX(23) | MMC_CMD_WAIT_RESPONSE)
-#define MMC_CMD24 (MMC_INDX(24) | MMC_CMD_WAIT_RESPONSE)
-#define MMC_CMD55 (MMC_INDX(55) | MMC_CMD_WAIT_RESPONSE)
-#define MMC_ACMD41 (MMC_INDX(41) | MMC_CMD_WAIT_RESPONSE | MMC_CMD_NO_CRC_RESPONSE)
-
-// Valid responses for CMD1 in eMMC
-#define EMMC_CMD1_CAPACITY_LESS_THAN_2GB 0x00FF8080 // Capacity <= 2GB, byte addressing used
-#define EMMC_CMD1_CAPACITY_GREATER_THAN_2GB 0x40FF8080 // Capacity > 2GB, 512-byte sector addressing used
-
-typedef enum _MMC_STATE {
- MmcInvalidState = 0,
- MmcHwInitializationState,
- MmcIdleState,
- MmcReadyState,
- MmcIdentificationState,
- MmcStandByState,
- MmcTransferState,
- MmcSendingDataState,
- MmcReceiveDataState,
- MmcProgrammingState,
- MmcDisconnectState,
-} MMC_STATE;
-
-///
-/// Forward declaration for EFI_MMC_HOST_PROTOCOL
-///
-typedef struct _EFI_MMC_HOST_PROTOCOL EFI_MMC_HOST_PROTOCOL;
-
-typedef BOOLEAN (EFIAPI *MMC_ISCARDPRESENT) (
- IN EFI_MMC_HOST_PROTOCOL *This
- );
-
-typedef BOOLEAN (EFIAPI *MMC_ISREADONLY) (
- IN EFI_MMC_HOST_PROTOCOL *This
- );
-
-typedef EFI_STATUS (EFIAPI *MMC_BUILDDEVICEPATH) (
- IN EFI_MMC_HOST_PROTOCOL *This,
- OUT EFI_DEVICE_PATH_PROTOCOL **DevicePath
- );
-
-typedef EFI_STATUS (EFIAPI *MMC_NOTIFYSTATE) (
- IN EFI_MMC_HOST_PROTOCOL *This,
- IN MMC_STATE State
- );
-
-typedef EFI_STATUS (EFIAPI *MMC_SENDCOMMAND) (
- IN EFI_MMC_HOST_PROTOCOL *This,
- IN MMC_CMD Cmd,
- IN UINT32 Argument
- );
-
-typedef EFI_STATUS (EFIAPI *MMC_RECEIVERESPONSE) (
- IN EFI_MMC_HOST_PROTOCOL *This,
- IN MMC_RESPONSE_TYPE Type,
- IN UINT32 *Buffer
- );
-
-typedef EFI_STATUS (EFIAPI *MMC_READBLOCKDATA) (
- IN EFI_MMC_HOST_PROTOCOL *This,
- IN EFI_LBA Lba,
- IN UINTN Length,
- OUT UINT32 *Buffer
- );
-
-typedef EFI_STATUS (EFIAPI *MMC_WRITEBLOCKDATA) (
- IN EFI_MMC_HOST_PROTOCOL *This,
- IN EFI_LBA Lba,
- IN UINTN Length,
- IN UINT32 *Buffer
- );
-
-
-struct _EFI_MMC_HOST_PROTOCOL {
-
- UINT32 Revision;
- MMC_ISCARDPRESENT IsCardPresent;
- MMC_ISREADONLY IsReadOnly;
- MMC_BUILDDEVICEPATH BuildDevicePath;
-
- MMC_NOTIFYSTATE NotifyState;
-
- MMC_SENDCOMMAND SendCommand;
- MMC_RECEIVERESPONSE ReceiveResponse;
-
- MMC_READBLOCKDATA ReadBlockData;
- MMC_WRITEBLOCKDATA WriteBlockData;
-
-};
-
-#define MMC_HOST_PROTOCOL_REVISION 0x00010001 // 1.1
-
-extern EFI_GUID gEfiMmcHostProtocolGuid;
-
-#endif
-
diff --git a/EmbeddedPkg/Include/Protocol/PeCoffLoader.h b/EmbeddedPkg/Include/Protocol/PeCoffLoader.h deleted file mode 100644 index 1f93cefd17..0000000000 --- a/EmbeddedPkg/Include/Protocol/PeCoffLoader.h +++ /dev/null @@ -1,241 +0,0 @@ -/** @file
-
- Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
- Portions copyright (c) 2010, Apple Inc. All rights reserved.<BR>
- 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.
-
-**/
-
-#ifndef __PE_COFF_LOADER_H__
-#define __PE_COFF_LOADER_H__
-
-// Needed for PE_COFF_LOADER_IMAGE_CONTEXT
-#include <Library/PeCoffLib.h>
-
-// B323179B-97FB-477E-B0FE-D88591FA11AB
-#define PE_COFF_LOADER_PROTOCOL_GUID \
- { 0xB323179B, 0x97FB, 0x477E, { 0xB0, 0xFE, 0xD8, 0x85, 0x91, 0xFA, 0x11, 0xAB } }
-
-
-typedef struct _PE_COFF_LOADER_PROTOCOL PE_COFF_LOADER_PROTOCOL;
-
-
-
-/**
- Retrieves information about a PE/COFF image.
-
- Computes the PeCoffHeaderOffset, IsTeImage, ImageType, ImageAddress, ImageSize,
- DestinationAddress, RelocationsStripped, SectionAlignment, SizeOfHeaders, and
- DebugDirectoryEntryRva fields of the ImageContext structure.
- If ImageContext is NULL, then return RETURN_INVALID_PARAMETER.
- If the PE/COFF image accessed through the ImageRead service in the ImageContext
- structure is not a supported PE/COFF image type, then return RETURN_UNSUPPORTED.
- If any errors occur while computing the fields of ImageContext,
- then the error status is returned in the ImageError field of ImageContext.
- If the image is a TE image, then SectionAlignment is set to 0.
- The ImageRead and Handle fields of ImageContext structure must be valid prior
- to invoking this service.
-
- @param ImageContext Pointer to the image context structure that describes the PE/COFF
- image that needs to be examined by this function.
-
- @retval RETURN_SUCCESS The information on the PE/COFF image was collected.
- @retval RETURN_INVALID_PARAMETER ImageContext is NULL.
- @retval RETURN_UNSUPPORTED The PE/COFF image is not supported.
-
-**/
-typedef
-RETURN_STATUS
-(EFIAPI *PE_COFF_LOADER_GET_IMAGE_INFO) (
- IN OUT PE_COFF_LOADER_IMAGE_CONTEXT *ImageContext
- );
-
-
-/**
- Applies relocation fixups to a PE/COFF image that was loaded with PeCoffLoaderLoadImage().
-
- If the DestinationAddress field of ImageContext is 0, then use the ImageAddress field of
- ImageContext as the relocation base address. Otherwise, use the DestinationAddress field
- of ImageContext as the relocation base address. The caller must allocate the relocation
- fixup log buffer and fill in the FixupData field of ImageContext prior to calling this function.
-
- The ImageRead, Handle, PeCoffHeaderOffset, IsTeImage, Machine, ImageType, ImageAddress,
- ImageSize, DestinationAddress, RelocationsStripped, SectionAlignment, SizeOfHeaders,
- DebugDirectoryEntryRva, EntryPoint, FixupDataSize, CodeView, PdbPointer, and FixupData of
- the ImageContext structure must be valid prior to invoking this service.
-
- If ImageContext is NULL, then ASSERT().
-
- Note that if the platform does not maintain coherency between the instruction cache(s) and the data
- cache(s) in hardware, then the caller is responsible for performing cache maintenance operations
- prior to transferring control to a PE/COFF image that is loaded using this library.
-
- @param ImageContext Pointer to the image context structure that describes the PE/COFF
- image that is being relocated.
-
- @retval RETURN_SUCCESS The PE/COFF image was relocated.
- Extended status information is in the ImageError field of ImageContext.
- @retval RETURN_LOAD_ERROR The image in not a valid PE/COFF image.
- Extended status information is in the ImageError field of ImageContext.
- @retval RETURN_UNSUPPORTED A relocation record type is not supported.
- Extended status information is in the ImageError field of ImageContext.
-
-**/
-typedef
-RETURN_STATUS
-(EFIAPI *PE_COFF_LOADER_RELOCATE_IMAGE) (
- IN OUT PE_COFF_LOADER_IMAGE_CONTEXT *ImageContext
- );
-
-
-/**
- Loads a PE/COFF image into memory.
-
- Loads the PE/COFF image accessed through the ImageRead service of ImageContext into the buffer
- specified by the ImageAddress and ImageSize fields of ImageContext. The caller must allocate
- the load buffer and fill in the ImageAddress and ImageSize fields prior to calling this function.
- The EntryPoint, FixupDataSize, CodeView, PdbPointer and HiiResourceData fields of ImageContext are computed.
- The ImageRead, Handle, PeCoffHeaderOffset, IsTeImage, Machine, ImageType, ImageAddress, ImageSize,
- DestinationAddress, RelocationsStripped, SectionAlignment, SizeOfHeaders, and DebugDirectoryEntryRva
- fields of the ImageContext structure must be valid prior to invoking this service.
-
- If ImageContext is NULL, then ASSERT().
-
- Note that if the platform does not maintain coherency between the instruction cache(s) and the data
- cache(s) in hardware, then the caller is responsible for performing cache maintenance operations
- prior to transferring control to a PE/COFF image that is loaded using this library.
-
- @param ImageContext Pointer to the image context structure that describes the PE/COFF
- image that is being loaded.
-
- @retval RETURN_SUCCESS The PE/COFF image was loaded into the buffer specified by
- the ImageAddress and ImageSize fields of ImageContext.
- Extended status information is in the ImageError field of ImageContext.
- @retval RETURN_BUFFER_TOO_SMALL The caller did not provide a large enough buffer.
- Extended status information is in the ImageError field of ImageContext.
- @retval RETURN_LOAD_ERROR The PE/COFF image is an EFI Runtime image with no relocations.
- Extended status information is in the ImageError field of ImageContext.
- @retval RETURN_INVALID_PARAMETER The image address is invalid.
- Extended status information is in the ImageError field of ImageContext.
-
-**/
-typedef
-RETURN_STATUS
-(EFIAPI *PE_COFF_LOADER_LOAD_IMAGE) (
- IN OUT PE_COFF_LOADER_IMAGE_CONTEXT *ImageContext
- );
-
-
-
-/**
- Reads contents of a PE/COFF image from a buffer in system memory.
-
- This is the default implementation of a PE_COFF_LOADER_READ_FILE function
- that assumes FileHandle pointer to the beginning of a PE/COFF image.
- This function reads contents of the PE/COFF image that starts at the system memory
- address specified by FileHandle. The read operation copies ReadSize bytes from the
- PE/COFF image starting at byte offset FileOffset into the buffer specified by Buffer.
- The size of the buffer actually read is returned in ReadSize.
-
- If FileHandle is NULL, then ASSERT().
- If ReadSize is NULL, then ASSERT().
- If Buffer is NULL, then ASSERT().
-
- @param FileHandle Pointer to base of the input stream
- @param FileOffset Offset into the PE/COFF image to begin the read operation.
- @param ReadSize On input, the size in bytes of the requested read operation.
- On output, the number of bytes actually read.
- @param Buffer Output buffer that contains the data read from the PE/COFF image.
-
- @retval RETURN_SUCCESS Data is read from FileOffset from the Handle into
- the buffer.
-**/
-typedef
-RETURN_STATUS
-(EFIAPI *PE_COFF_LOADER_READ_FROM_MEMORY) (
- IN VOID *FileHandle,
- IN UINTN FileOffset,
- IN OUT UINTN *ReadSize,
- OUT VOID *Buffer
- );
-
-
-
-/**
- Reapply fixups on a fixed up PE32/PE32+ image to allow virutal calling at EFI
- runtime.
-
- This function reapplies relocation fixups to the PE/COFF image specified by ImageBase
- and ImageSize so the image will execute correctly when the PE/COFF image is mapped
- to the address specified by VirtualImageBase. RelocationData must be identical
- to the FiuxupData buffer from the PE_COFF_LOADER_IMAGE_CONTEXT structure
- after this PE/COFF image was relocated with PeCoffLoaderRelocateImage().
-
- Note that if the platform does not maintain coherency between the instruction cache(s) and the data
- cache(s) in hardware, then the caller is responsible for performing cache maintenance operations
- prior to transferring control to a PE/COFF image that is loaded using this library.
-
- @param ImageBase Base address of a PE/COFF image that has been loaded
- and relocated into system memory.
- @param VirtImageBase The request virtual address that the PE/COFF image is to
- be fixed up for.
- @param ImageSize The size, in bytes, of the PE/COFF image.
- @param RelocationData A pointer to the relocation data that was collected when the PE/COFF
- image was relocated using PeCoffLoaderRelocateImage().
-
-**/
-typedef
-VOID
-(EFIAPI *PE_COFF_LOADER_RELOCATE_IMAGE_FOR_RUNTIME) (
- IN PHYSICAL_ADDRESS ImageBase,
- IN PHYSICAL_ADDRESS VirtImageBase,
- IN UINTN ImageSize,
- IN VOID *RelocationData
- );
-
-
-
-/**
- Unloads a loaded PE/COFF image from memory and releases its taken resource.
- Releases any environment specific resources that were allocated when the image
- specified by ImageContext was loaded using PeCoffLoaderLoadImage().
-
- For NT32 emulator, the PE/COFF image loaded by system needs to release.
- For real platform, the PE/COFF image loaded by Core doesn't needs to be unloaded,
- this function can simply return RETURN_SUCCESS.
-
- If ImageContext is NULL, then ASSERT().
-
- @param ImageContext Pointer to the image context structure that describes the PE/COFF
- image to be unloaded.
-
- @retval RETURN_SUCCESS The PE/COFF image was unloaded successfully.
-**/
-typedef
-RETURN_STATUS
-(EFIAPI *PE_COFF_LOADER_UNLOAD_IMAGE) (
- IN OUT PE_COFF_LOADER_IMAGE_CONTEXT *ImageContext
- );
-
-
-struct _PE_COFF_LOADER_PROTOCOL {
- PE_COFF_LOADER_GET_IMAGE_INFO GetImageInfo;
- PE_COFF_LOADER_LOAD_IMAGE LoadImage;
- PE_COFF_LOADER_RELOCATE_IMAGE RelocateImage;
- PE_COFF_LOADER_READ_FROM_MEMORY ReadFromMemory;
- PE_COFF_LOADER_RELOCATE_IMAGE_FOR_RUNTIME RelocateImageForRuntime;
- PE_COFF_LOADER_UNLOAD_IMAGE UnloadImage;
-};
-
-
-extern EFI_GUID gPeCoffLoaderProtocolGuid;
-
-
-#endif
-
diff --git a/EmbeddedPkg/Include/Protocol/UsbDevice.h b/EmbeddedPkg/Include/Protocol/UsbDevice.h deleted file mode 100644 index 13a48dda07..0000000000 --- a/EmbeddedPkg/Include/Protocol/UsbDevice.h +++ /dev/null @@ -1,118 +0,0 @@ -/** @file
-
- Copyright (c) 2013-2014, ARM Ltd. All rights reserved.<BR>
-
- 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.
-
-**/
-
-#ifndef __USB_DEVICE_PROTOCOL_H__
-#define __USB_DEVICE_PROTOCOL_H__
-
-#include <IndustryStandard/Usb.h>
-
-extern EFI_GUID gUsbDeviceProtocolGuid;
-
-/*
- * Note: This Protocol is just the bare minimum for Android Fastboot. It
- * only makes sense for devices that only do Bulk Transfers and only have one
- * endpoint.
- */
-
-/*
- Callback to be called when data is received.
- Buffer is callee-allocated and it's the caller's responsibility to free it with
- FreePool.
-
- @param[in] Size Size in bytes of data.
- @param[in] Buffer Pointer to data.
-*/
-typedef
-VOID
-(*USB_DEVICE_RX_CALLBACK) (
- IN UINTN Size,
- IN VOID *Buffer
- );
-
-/*
- Callback to be called when the host asks for data by sending an IN token
- (excluding during the data stage of a control transfer).
- When this function is called, data previously buffered by calling Send() has
- been sent.
-
- @param[in]Endpoint Endpoint index, as specified in endpoint descriptors, of
- the endpoint the IN token was sent to.
-*/
-typedef
-VOID
-(*USB_DEVICE_TX_CALLBACK) (
- IN UINT8 EndpointIndex
- );
-
-/*
- Put data in the Tx buffer to be sent on the next IN token.
- Don't call this function again until the TxCallback has been called.
-
- @param[in]Endpoint Endpoint index, as specified in endpoint descriptors, of
- the endpoint to send the data from.
- @param[in]Size Size in bytes of data.
- @param[in]Buffer Pointer to data.
-
- @retval EFI_SUCCESS The data was queued successfully.
- @retval EFI_INVALID_PARAMETER There was an error sending the data.
-*/
-typedef
-EFI_STATUS
-(*USB_DEVICE_SEND) (
- IN UINT8 EndpointIndex,
- IN UINTN Size,
- IN CONST VOID *Buffer
- );
-
-/*
- Restart the USB peripheral controller and respond to enumeration.
-
- @param[in] DeviceDescriptor pointer to device descriptor
- @param[in] Descriptors Array of pointers to buffers, where
- Descriptors[n] contains the response to a
- GET_DESCRIPTOR request for configuration n. From
- USB Spec section 9.4.3:
- "The first interface descriptor follows the
- configuration descriptor. The endpoint
- descriptors for the first interface follow the
- first interface descriptor. If there are
- additional interfaces, their interface
- descriptor and endpoint descriptors follow the
- first interface’s endpoint descriptors".
-
- The size of each buffer is the TotalLength
- member of the Configuration Descriptor.
-
- The size of the array is
- DeviceDescriptor->NumConfigurations.
- @param[in]RxCallback See USB_DEVICE_RX_CALLBACK
- @param[in]TxCallback See USB_DEVICE_TX_CALLBACK
-*/
-typedef
-EFI_STATUS
-(*USB_DEVICE_START) (
- IN USB_DEVICE_DESCRIPTOR *DeviceDescriptor,
- IN VOID **Descriptors,
- IN USB_DEVICE_RX_CALLBACK RxCallback,
- IN USB_DEVICE_TX_CALLBACK TxCallback
- );
-
-struct _USB_DEVICE_PROTOCOL {
- USB_DEVICE_START Start;
- USB_DEVICE_SEND Send;
-};
-
-typedef struct _USB_DEVICE_PROTOCOL USB_DEVICE_PROTOCOL;
-
-#endif //ifndef __USB_DEVICE_PROTOCOL_H__
|