Add in the 1st version of ECP.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2832 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
35
EdkCompatibilityPkg/Foundation/Efi/Guid/Acpi/Acpi.c
Normal file
35
EdkCompatibilityPkg/Foundation/Efi/Guid/Acpi/Acpi.c
Normal file
@@ -0,0 +1,35 @@
|
||||
/*++
|
||||
|
||||
Copyright (c) 2004 - 2005, 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
|
||||
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:
|
||||
|
||||
Acpi.c
|
||||
|
||||
Abstract:
|
||||
|
||||
GUIDs used for ACPI entries in the EFI 1.0 system table
|
||||
|
||||
--*/
|
||||
|
||||
#include "EfiSpec.h"
|
||||
#include EFI_GUID_DEFINITION (Acpi)
|
||||
|
||||
EFI_GUID gEfiAcpiTableGuid = EFI_ACPI_TABLE_GUID;
|
||||
|
||||
EFI_GUID_STRING(&gEfiAcpiTableGuid, "ACPI Table", "ACPI 1.0 Table GUID in EFI System Table");
|
||||
|
||||
EFI_GUID gEfiAcpi20TableGuid = EFI_ACPI_20_TABLE_GUID;
|
||||
|
||||
EFI_GUID_STRING(&gEfiAcpi20TableGuid, "ACPI 2.0 Table", "ACPI 2.0 Table GUID in EFI System Table");
|
||||
|
||||
EFI_GUID gEfiAcpi30TableGuid = EFI_ACPI_30_TABLE_GUID;
|
||||
|
||||
EFI_GUID_STRING(&gEfiAcpi30TableGuid, "ACPI 3.0 Table", "ACPI 3.0 Table GUID in EFI System Table");
|
44
EdkCompatibilityPkg/Foundation/Efi/Guid/Acpi/Acpi.h
Normal file
44
EdkCompatibilityPkg/Foundation/Efi/Guid/Acpi/Acpi.h
Normal file
@@ -0,0 +1,44 @@
|
||||
/*++
|
||||
|
||||
Copyright (c) 2004 - 2005, 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
|
||||
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:
|
||||
|
||||
Acpi.h
|
||||
|
||||
Abstract:
|
||||
|
||||
GUIDs used for ACPI entries in the in the EFI 1.0 system table
|
||||
|
||||
These GUIDs point the ACPI tables as defined in the ACPI specifications.
|
||||
ACPI 2.0 specification defines the ACPI 2.0 GUID. EFI 1.0 defines the
|
||||
ACPI 1.0 GUID.
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef _ACPI_GUID_H_
|
||||
#define _ACPI_GUID_H_
|
||||
|
||||
#define EFI_ACPI_TABLE_GUID \
|
||||
{ \
|
||||
0xeb9d2d30, 0x2d88, 0x11d3, 0x9a, 0x16, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d \
|
||||
}
|
||||
|
||||
#define EFI_ACPI_20_TABLE_GUID \
|
||||
{ \
|
||||
0x8868e871, 0xe4f1, 0x11d3, 0xbc, 0x22, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81 \
|
||||
}
|
||||
|
||||
#define EFI_ACPI_30_TABLE_GUID EFI_ACPI_20_TABLE_GUID
|
||||
|
||||
extern EFI_GUID gEfiAcpiTableGuid;
|
||||
extern EFI_GUID gEfiAcpi20TableGuid;
|
||||
extern EFI_GUID gEfiAcpi30TableGuid;
|
||||
#endif
|
@@ -0,0 +1,28 @@
|
||||
/*++
|
||||
|
||||
Copyright (c) 2004, 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
|
||||
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:
|
||||
|
||||
DebugImageInfoTable.c
|
||||
|
||||
Abstract:
|
||||
|
||||
GUID used to locate the Debug Image Info table in the EFI 1.0 system table.
|
||||
|
||||
--*/
|
||||
|
||||
#include "EfiSpec.h"
|
||||
#include EFI_GUID_DEFINITION (DebugImageInfoTable)
|
||||
|
||||
EFI_GUID gEfiDebugImageInfoTableGuid = EFI_DEBUG_IMAGE_INFO_TABLE_GUID;
|
||||
|
||||
EFI_GUID_STRING
|
||||
(&gEfiDebugImageInfoTableGuid, "Debug Image Info Table", "Debug Image Info Table GUID in EFI System Table");
|
@@ -0,0 +1,63 @@
|
||||
/*++
|
||||
|
||||
Copyright (c) 2004 - 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
|
||||
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:
|
||||
|
||||
DebugImageInfoTable.h
|
||||
|
||||
Abstract:
|
||||
|
||||
GUID and related data structures used with the Debug Image Info Table.
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef _DEBUG_IMAGE_INFO_GUID_H_
|
||||
#define _DEBUG_IMAGE_INFO_GUID_H_
|
||||
|
||||
#include "EfiSpec.h"
|
||||
#include EFI_PROTOCOL_DEFINITION (LoadedImage)
|
||||
|
||||
#define EFI_DEBUG_IMAGE_INFO_TABLE_GUID \
|
||||
{ \
|
||||
0x49152e77, 0x1ada, 0x4764, 0xb7, 0xa2, 0x7a, 0xfe, 0xfe, 0xd9, 0x5e, 0x8b \
|
||||
}
|
||||
|
||||
extern EFI_GUID gEfiDebugImageInfoTableGuid;
|
||||
|
||||
#define EFI_DEBUG_IMAGE_INFO_UPDATE_IN_PROGRESS 0x01
|
||||
#define EFI_DEBUG_IMAGE_INFO_TABLE_MODIFIED 0x02
|
||||
#define EFI_DEBUG_IMAGE_INFO_INITIAL_SIZE (EFI_PAGE_SIZE / sizeof (UINTN))
|
||||
#define EFI_DEBUG_IMAGE_INFO_TYPE_NORMAL 0x01
|
||||
|
||||
typedef struct {
|
||||
UINT64 Signature;
|
||||
EFI_PHYSICAL_ADDRESS EfiSystemTableBase;
|
||||
UINT32 Crc32;
|
||||
} EFI_SYSTEM_TABLE_POINTER;
|
||||
|
||||
typedef struct {
|
||||
UINT32 ImageInfoType;
|
||||
EFI_LOADED_IMAGE_PROTOCOL *LoadedImageProtocolInstance;
|
||||
EFI_HANDLE *ImageHandle;
|
||||
} EFI_DEBUG_IMAGE_INFO_NORMAL;
|
||||
|
||||
typedef union {
|
||||
UINT32 *ImageInfoType;
|
||||
EFI_DEBUG_IMAGE_INFO_NORMAL *NormalImage;
|
||||
} EFI_DEBUG_IMAGE_INFO;
|
||||
|
||||
typedef struct {
|
||||
volatile UINT32 UpdateStatus;
|
||||
UINT32 TableSize;
|
||||
EFI_DEBUG_IMAGE_INFO *EfiDebugImageInfoTable;
|
||||
} EFI_DEBUG_IMAGE_INFO_TABLE_HEADER;
|
||||
|
||||
#endif
|
59
EdkCompatibilityPkg/Foundation/Efi/Guid/EfiGuidLib.inf
Normal file
59
EdkCompatibilityPkg/Foundation/Efi/Guid/EfiGuidLib.inf
Normal file
@@ -0,0 +1,59 @@
|
||||
#/*++
|
||||
#
|
||||
# Copyright (c) 2004 - 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
|
||||
# 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:
|
||||
#
|
||||
# EfiGuidLib.inf
|
||||
#
|
||||
# Abstract:
|
||||
#
|
||||
# Component description file.
|
||||
#
|
||||
#--*/
|
||||
|
||||
[defines]
|
||||
BASE_NAME= EfiGuidLib
|
||||
COMPONENT_TYPE= LIBRARY
|
||||
|
||||
[includes.common]
|
||||
$(EDK_SOURCE)\Foundation\Efi
|
||||
$(EDK_SOURCE)\Foundation\Include
|
||||
$(EDK_SOURCE)\Foundation\Efi\Include
|
||||
$(EDK_SOURCE)\Foundation\Framework\Include
|
||||
$(EDK_SOURCE)\Foundation\Include\IndustryStandard
|
||||
$(EDK_SOURCE)\Foundation\Core\Dxe
|
||||
$(EDK_SOURCE)\Foundation\Include\Pei
|
||||
$(EDK_SOURCE)\Foundation\Library\Pei\Include
|
||||
|
||||
[nmake.common]
|
||||
|
||||
[sources.common]
|
||||
Acpi\Acpi.h
|
||||
Acpi\Acpi.c
|
||||
DebugImageInfoTable\DebugImageInfoTable.h
|
||||
DebugImageInfoTable\DebugImageInfoTable.c
|
||||
EventGroup\EventGroup.h
|
||||
EventGroup\EventGroup.c
|
||||
GlobalVariable\GlobalVariable.h
|
||||
GlobalVariable\GlobalVariable.c
|
||||
Gpt\Gpt.h
|
||||
Gpt\Gpt.c
|
||||
HardwareErrorVariable\HardwareErrorVariable.h
|
||||
HardwareErrorVariable\HardwareErrorVariable.c
|
||||
Mps\Mps.h
|
||||
Mps\Mps.c
|
||||
PcAnsi\PcAnsi.h
|
||||
PcAnsi\PcAnsi.c
|
||||
SmBios\SmBios.h
|
||||
SmBios\SmBios.c
|
||||
[sources.ipf]
|
||||
SalSystemTable\SalSystemTable.h
|
||||
SalSystemTable\SalSystemTable.c
|
@@ -0,0 +1,30 @@
|
||||
/*++
|
||||
|
||||
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
|
||||
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:
|
||||
|
||||
EfiGroup.c
|
||||
|
||||
--*/
|
||||
#include "Tiano.h"
|
||||
|
||||
#include EFI_GUID_DEFINITION (EventGroup)
|
||||
|
||||
EFI_GUID gEfiEventExitBootServicesGuid = EFI_EVENT_GROUP_EXIT_BOOT_SERVICES;
|
||||
EFI_GUID gEfiEventVirtualAddressChangeGuid = EFI_EVENT_GROUP_VIRTUAL_ADDRESS_CHANGE;
|
||||
EFI_GUID gEfiEventMemoryMapChangeGuid = EFI_EVENT_GROUP_MEMORY_MAP_CHANGE;
|
||||
EFI_GUID gEfiEventReadyToBootGuid = EFI_EVENT_GROUP_READY_TO_BOOT;
|
||||
|
||||
EFI_GUID_STRING (&gEfiEventExitBootServicesGuid, "EventExitBS", "Event Exit Boot Service GUID");
|
||||
EFI_GUID_STRING (&gEfiEventVirtualAddressChangeGuid, "EventVirtualAddrChange", "Event Virtual Addr Change GUID");
|
||||
EFI_GUID_STRING (&gEfiEventMemoryMapChangeGuid, "EventMemMapChange", "Event Memory Map Change GUID");
|
||||
EFI_GUID_STRING (&gEfiEventReadyToBootGuid, "EventReadyToBoot", "Efi Ready To Boot GUID");
|
||||
|
@@ -0,0 +1,45 @@
|
||||
/** @file
|
||||
GUIDs for gBS->CreateEventEx Event Groups. Defined in UEFI 2.0.
|
||||
|
||||
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
|
||||
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: EventGroup.h
|
||||
|
||||
**/
|
||||
|
||||
#ifndef __EVENT_GROUP_GUID__
|
||||
#define __EVENT_GROUP_GUID__
|
||||
|
||||
|
||||
#define EFI_EVENT_GROUP_EXIT_BOOT_SERVICES \
|
||||
{ 0x27abf055, 0xb1b8, 0x4c26, { 0x80, 0x48, 0x74, 0x8f, 0x37, 0xba, 0xa2, 0xdf } }
|
||||
|
||||
extern EFI_GUID gEfiEventExitBootServicesGuid;
|
||||
|
||||
|
||||
#define EFI_EVENT_GROUP_VIRTUAL_ADDRESS_CHANGE \
|
||||
{ 0x13fa7698, 0xc831, 0x49c7, { 0x87, 0xea, 0x8f, 0x43, 0xfc, 0xc2, 0x51, 0x96 } }
|
||||
|
||||
extern EFI_GUID gEfiEventVirtualAddressChangeGuid;
|
||||
|
||||
|
||||
#define EFI_EVENT_GROUP_MEMORY_MAP_CHANGE \
|
||||
{ 0x78bee926, 0x692f, 0x48fd, { 0x9e, 0xdb, 0x1, 0x42, 0x2e, 0xf0, 0xd7, 0xab } }
|
||||
|
||||
extern EFI_GUID gEfiEventMemoryMapChangeGuid;
|
||||
|
||||
|
||||
#define EFI_EVENT_GROUP_READY_TO_BOOT \
|
||||
{ 0x7ce88fb3, 0x4bd7, 0x4679, { 0x87, 0xa8, 0xa8, 0xd8, 0xde, 0xe5, 0x0d, 0x2b } }
|
||||
|
||||
extern EFI_GUID gEfiEventReadyToBootGuid;
|
||||
|
||||
|
||||
#endif
|
@@ -0,0 +1,27 @@
|
||||
/*++
|
||||
|
||||
Copyright (c) 2004, 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
|
||||
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:
|
||||
|
||||
GlobalVariable.c
|
||||
|
||||
Abstract:
|
||||
|
||||
GUID for EFI (NVRAM) Variables. Defined in EFI 1.0.
|
||||
|
||||
--*/
|
||||
|
||||
#include "EfiSpec.h"
|
||||
#include EFI_GUID_DEFINITION (GlobalVariable)
|
||||
|
||||
EFI_GUID gEfiGlobalVariableGuid = EFI_GLOBAL_VARIABLE_GUID;
|
||||
|
||||
EFI_GUID_STRING(&gEfiGlobalVariableGuid, "Efi", "Efi Variable GUID")
|
@@ -0,0 +1,32 @@
|
||||
/*++
|
||||
|
||||
Copyright (c) 2004, 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
|
||||
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:
|
||||
|
||||
GlobalVariable.h
|
||||
|
||||
Abstract:
|
||||
|
||||
GUID for EFI (NVRAM) Variables. Defined in EFI 1.0.
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef _GLOBAL_VARIABLE_GUID_H_
|
||||
#define _GLOBAL_VARIABLE_GUID_H_
|
||||
|
||||
#define EFI_GLOBAL_VARIABLE_GUID \
|
||||
{ \
|
||||
0x8BE4DF61, 0x93CA, 0x11d2, 0xAA, 0x0D, 0x00, 0xE0, 0x98, 0x03, 0x2B, 0x8C \
|
||||
}
|
||||
|
||||
extern EFI_GUID gEfiGlobalVariableGuid;
|
||||
|
||||
#endif
|
38
EdkCompatibilityPkg/Foundation/Efi/Guid/Gpt/Gpt.c
Normal file
38
EdkCompatibilityPkg/Foundation/Efi/Guid/Gpt/Gpt.c
Normal file
@@ -0,0 +1,38 @@
|
||||
/*++
|
||||
|
||||
Copyright (c) 2004, 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
|
||||
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:
|
||||
|
||||
Gpt.c
|
||||
|
||||
Abstract:
|
||||
|
||||
Guids used for the GPT as defined in EFI 1.0
|
||||
|
||||
GPT defines a new disk partitioning scheme and also describes
|
||||
usage of the legacy Master Boot Record (MBR) partitioning scheme.
|
||||
|
||||
--*/
|
||||
|
||||
#include "EfiSpec.h"
|
||||
#include EFI_GUID_DEFINITION (Gpt)
|
||||
|
||||
EFI_GUID gEfiPartTypeUnusedGuid = EFI_PART_TYPE_UNUSED_GUID;
|
||||
|
||||
EFI_GUID_STRING(&gEfiPartTypeUnusedGuid, "G0", "Null Partition Type GUID");
|
||||
|
||||
EFI_GUID gEfiPartTypeSystemPartGuid = EFI_PART_TYPE_EFI_SYSTEM_PART_GUID;
|
||||
|
||||
EFI_GUID_STRING(&gEfiPartTypeSystemPartGuid, "ESP", "EFI System Partition GUID");
|
||||
|
||||
EFI_GUID gEfiPartTypeLegacyMbrGuid = EFI_PART_TYPE_LEGACY_MBR_GUID;
|
||||
|
||||
EFI_GUID_STRING(&gEfiPartTypeLegacyMbrGuid, "Legacy MBR", "Legacy Master Boot Record Partition GUID");
|
47
EdkCompatibilityPkg/Foundation/Efi/Guid/Gpt/Gpt.h
Normal file
47
EdkCompatibilityPkg/Foundation/Efi/Guid/Gpt/Gpt.h
Normal file
@@ -0,0 +1,47 @@
|
||||
/*++
|
||||
|
||||
Copyright (c) 2004, 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
|
||||
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:
|
||||
|
||||
Gpt.h
|
||||
|
||||
Abstract:
|
||||
|
||||
Guids used for the GPT as defined in EFI 1.0
|
||||
|
||||
GPT defines a new disk partitioning scheme and also describes
|
||||
usage of the legacy Master Boot Record (MBR) partitioning scheme.
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef _GPT_GUID_H_
|
||||
#define _GPT_GUID_H_
|
||||
|
||||
#define EFI_PART_TYPE_UNUSED_GUID \
|
||||
{ \
|
||||
0x00000000, 0x0000, 0x0000, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 \
|
||||
}
|
||||
|
||||
#define EFI_PART_TYPE_EFI_SYSTEM_PART_GUID \
|
||||
{ \
|
||||
0xc12a7328, 0xf81f, 0x11d2, 0xba, 0x4b, 0x00, 0xa0, 0xc9, 0x3e, 0xc9, 0x3b \
|
||||
}
|
||||
|
||||
#define EFI_PART_TYPE_LEGACY_MBR_GUID \
|
||||
{ \
|
||||
0x024dee41, 0x33e7, 0x11d3, 0x9d, 0x69, 0x00, 0x08, 0xc7, 0x81, 0xf3, 0x9f \
|
||||
}
|
||||
|
||||
extern EFI_GUID gEfiPartTypeUnusedGuid;
|
||||
extern EFI_GUID gEfiPartTypeSystemPartGuid;
|
||||
extern EFI_GUID gEfiPartTypeLegacyMbrGuid;
|
||||
|
||||
#endif
|
@@ -0,0 +1,27 @@
|
||||
/*++
|
||||
|
||||
Copyright (c) 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
|
||||
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:
|
||||
|
||||
HardwareErrorVariable.c
|
||||
|
||||
Abstract:
|
||||
|
||||
GUID for hardware error record variables. Defined in UEFI 2.1.
|
||||
|
||||
--*/
|
||||
|
||||
#include "EfiSpec.h"
|
||||
#include EFI_GUID_DEFINITION (HardwareErrorVariable)
|
||||
|
||||
EFI_GUID gEfiHardwareErrorVariableGuid = EFI_HARDWARE_ERROR_VARIABLE_GUID;
|
||||
|
||||
EFI_GUID_STRING(&gEfiHardwareErrorVariableGuid, "HwErr", "Hardware Error Variable GUID")
|
@@ -0,0 +1,32 @@
|
||||
/*++
|
||||
|
||||
Copyright (c) 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
|
||||
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:
|
||||
|
||||
HardwareErrorVariable.h
|
||||
|
||||
Abstract:
|
||||
|
||||
GUID for hardware error record variables. Defined in UEFI 2.1.
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef _HARDWARE_ERROR_VARIABLE_GUID_H_
|
||||
#define _HARDWARE_ERROR_VARIABLE_GUID_H_
|
||||
|
||||
#define EFI_HARDWARE_ERROR_VARIABLE_GUID \
|
||||
{ \
|
||||
0x414E6BDD, 0xE47B, 0x47cc, {0xB2, 0x44, 0xBB, 0x61, 0x02, 0x0C, 0xF5, 0x16} \
|
||||
}
|
||||
|
||||
extern EFI_GUID gEfiHardwareErrorVariableGuid;
|
||||
|
||||
#endif
|
33
EdkCompatibilityPkg/Foundation/Efi/Guid/Mps/Mps.c
Normal file
33
EdkCompatibilityPkg/Foundation/Efi/Guid/Mps/Mps.c
Normal file
@@ -0,0 +1,33 @@
|
||||
/*++
|
||||
|
||||
Copyright (c) 2004, 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
|
||||
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:
|
||||
|
||||
Mps.c
|
||||
|
||||
Abstract:
|
||||
|
||||
GUIDs used for MPS entries in the in the EFI 1.0 system table
|
||||
|
||||
These GUIDs point the MPS tables as defined in the MPS 1.4 specifications.
|
||||
|
||||
ACPI is the primary means of exporting MP information to the OS. MPS obly was
|
||||
included to support Itanium-based platform power on. So don't use it if you don't have too.
|
||||
|
||||
|
||||
--*/
|
||||
|
||||
#include "EfiSpec.h"
|
||||
#include EFI_GUID_DEFINITION (Mps)
|
||||
|
||||
EFI_GUID gEfiMpsTableGuid = EFI_MPS_TABLE_GUID;
|
||||
|
||||
EFI_GUID_STRING(&gEfiMpsTableGuid, "MPS Table", "MPS Table GUID in EFI System Table");
|
38
EdkCompatibilityPkg/Foundation/Efi/Guid/Mps/Mps.h
Normal file
38
EdkCompatibilityPkg/Foundation/Efi/Guid/Mps/Mps.h
Normal file
@@ -0,0 +1,38 @@
|
||||
/*++
|
||||
|
||||
Copyright (c) 2004, 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
|
||||
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:
|
||||
|
||||
Mps.h
|
||||
|
||||
Abstract:
|
||||
|
||||
GUIDs used for MPS entries in the in the EFI 1.0 system table
|
||||
|
||||
These GUIDs point the MPS tables as defined in the MPS 1.4 specifications.
|
||||
|
||||
ACPI is the primary means of exporting MP information to the OS. MPS obly was
|
||||
included to support Itanium-based platform power on. So don't use it if you don't have too.
|
||||
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef _MPS_GUID_H_
|
||||
#define _MPS_GUID_H_
|
||||
|
||||
#define EFI_MPS_TABLE_GUID \
|
||||
{ \
|
||||
0xeb9d2d2f, 0x2d88, 0x11d3, 0x9a, 0x16, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d \
|
||||
}
|
||||
|
||||
extern EFI_GUID gEfiMpsTableGuid;
|
||||
|
||||
#endif
|
@@ -0,0 +1,30 @@
|
||||
/*++
|
||||
|
||||
Copyright (c) 2004, 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
|
||||
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:
|
||||
|
||||
SalSystemTable.c
|
||||
|
||||
Abstract:
|
||||
|
||||
GUIDs used for SAL system table entries in the in the EFI 1.0 system table.
|
||||
|
||||
SAL System Table contains Itanium-based processor centric information about
|
||||
the system.
|
||||
|
||||
--*/
|
||||
|
||||
#include "EfiSpec.h"
|
||||
#include EFI_GUID_DEFINITION (SalSystemTable)
|
||||
|
||||
EFI_GUID gEfiSalSystemTableGuid = EFI_SAL_SYSTEM_TABLE_GUID;
|
||||
|
||||
EFI_GUID_STRING(&gEfiSalSystemTableGuid, "SAL System Table", "SAL System Table GUID in EFI System Table");
|
@@ -0,0 +1,34 @@
|
||||
/*++
|
||||
|
||||
Copyright (c) 2004, 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
|
||||
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:
|
||||
|
||||
SalSystemTable.h
|
||||
|
||||
Abstract:
|
||||
|
||||
GUIDs used for SAL system table entries in the in the EFI 1.0 system table.
|
||||
|
||||
SAL System Table contains Itanium-based processor centric information about
|
||||
the system.
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef _SAL_SYSTEM_TABLE_GUID_H_
|
||||
|
||||
#define EFI_SAL_SYSTEM_TABLE_GUID \
|
||||
{ \
|
||||
0xeb9d2d32, 0x2d88, 0x11d3, 0x9a, 0x16, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d \
|
||||
}
|
||||
|
||||
extern EFI_GUID gEfiSalSystemTableGuid;
|
||||
|
||||
#endif
|
31
EdkCompatibilityPkg/Foundation/Efi/Guid/Smbios/SmBios.c
Normal file
31
EdkCompatibilityPkg/Foundation/Efi/Guid/Smbios/SmBios.c
Normal file
@@ -0,0 +1,31 @@
|
||||
/*++
|
||||
|
||||
Copyright (c) 2004, 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
|
||||
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:
|
||||
|
||||
SmBios.c
|
||||
|
||||
Abstract:
|
||||
|
||||
GUIDs used to locate the SMBIOS tables in the EFI 1.0 system table.
|
||||
|
||||
This GUID in the system table is the only legal way to search for and
|
||||
locate the SMBIOS tables. Do not search the 0xF0000 segment to find SMBIOS
|
||||
tables.
|
||||
|
||||
--*/
|
||||
|
||||
#include "EfiSpec.h"
|
||||
#include EFI_GUID_DEFINITION (Smbios)
|
||||
|
||||
EFI_GUID gEfiSmbiosTableGuid = EFI_SMBIOS_TABLE_GUID;
|
||||
|
||||
EFI_GUID_STRING(&gEfiSmbiosTableGuid, "SMBIOS Table", "SMBIOS Table GUID in EFI System Table");
|
70
EdkCompatibilityPkg/Foundation/Efi/Guid/Smbios/SmBios.h
Normal file
70
EdkCompatibilityPkg/Foundation/Efi/Guid/Smbios/SmBios.h
Normal file
@@ -0,0 +1,70 @@
|
||||
/*++
|
||||
|
||||
Copyright (c) 2004, 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
|
||||
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:
|
||||
|
||||
SmBios.h
|
||||
|
||||
Abstract:
|
||||
|
||||
GUIDs used to locate the SMBIOS tables in the EFI 1.0 system table.
|
||||
|
||||
This GUID in the system table is the only legal way to search for and
|
||||
locate the SMBIOS tables. Do not search the 0xF0000 segment to find SMBIOS
|
||||
tables.
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef _SMBIOS_GUID_H_
|
||||
#define _SMBIOS_GUID_H_
|
||||
|
||||
#define EFI_SMBIOS_TABLE_GUID \
|
||||
{ \
|
||||
0xeb9d2d31, 0x2d88, 0x11d3, 0x9a, 0x16, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d \
|
||||
}
|
||||
|
||||
extern EFI_GUID gEfiSmbiosTableGuid;
|
||||
|
||||
//
|
||||
// Smbios Table Entry Point Structure
|
||||
//
|
||||
#pragma pack(1)
|
||||
typedef struct {
|
||||
UINT8 AnchorString[4];
|
||||
UINT8 EntryPointStructureChecksum;
|
||||
UINT8 EntryPointLength;
|
||||
UINT8 MajorVersion;
|
||||
UINT8 MinorVersion;
|
||||
UINT16 MaxStructureSize;
|
||||
UINT8 EntryPointRevision;
|
||||
UINT8 FormattedArea[5];
|
||||
UINT8 IntermediateAnchorString[5];
|
||||
UINT8 IntermediateChecksum;
|
||||
UINT16 TableLength;
|
||||
UINT32 TableAddress;
|
||||
UINT16 NumberOfSmbiosStructures;
|
||||
UINT8 SmbiosBcdRevision;
|
||||
} SMBIOS_TABLE_ENTRY_POINT;
|
||||
#pragma pack()
|
||||
//
|
||||
// The Smbios structure header
|
||||
//
|
||||
#pragma pack(1)
|
||||
typedef struct {
|
||||
|
||||
UINT8 Type;
|
||||
UINT8 Length;
|
||||
UINT16 Handle;
|
||||
|
||||
} SMBIOS_STRUCTURE;
|
||||
#pragma pack()
|
||||
|
||||
#endif
|
34
EdkCompatibilityPkg/Foundation/Efi/Guid/pcansi/PcAnsi.c
Normal file
34
EdkCompatibilityPkg/Foundation/Efi/Guid/pcansi/PcAnsi.c
Normal file
@@ -0,0 +1,34 @@
|
||||
/*++
|
||||
|
||||
Copyright (c) 2004, 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
|
||||
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:
|
||||
|
||||
PcAnsi.c
|
||||
|
||||
Abstract:
|
||||
|
||||
Terminal Device Path Vendor Guid. Defined in EFI 1.0.
|
||||
|
||||
--*/
|
||||
|
||||
#include "EfiSpec.h"
|
||||
|
||||
#include EFI_GUID_DEFINITION (PcAnsi)
|
||||
|
||||
EFI_GUID gEfiPcAnsiGuid = EFI_PC_ANSI_GUID;
|
||||
EFI_GUID gEfiVT100Guid = EFI_VT_100_GUID;
|
||||
EFI_GUID gEfiVT100PlusGuid = EFI_VT_100_PLUS_GUID;
|
||||
EFI_GUID gEfiVTUTF8Guid = EFI_VT_UTF8_GUID;
|
||||
|
||||
EFI_GUID_STRING(&gEfiPcAnsiGuid, "Efi", "Efi PC ANSI Device Path Vendor GUID")
|
||||
EFI_GUID_STRING(&gEfiVT100Guid, "Efi", "Efi VT100 Device Path Vendor GUID")
|
||||
EFI_GUID_STRING(&gEfiVT100PlusGuid, "Efi", "Efi VT100Plus Device Path Vendor GUID")
|
||||
EFI_GUID_STRING(&gEfiVTUTF8Guid, "Efi", "Efi VTUTF8 Device Path Vendor GUID")
|
50
EdkCompatibilityPkg/Foundation/Efi/Guid/pcansi/PcAnsi.h
Normal file
50
EdkCompatibilityPkg/Foundation/Efi/Guid/pcansi/PcAnsi.h
Normal file
@@ -0,0 +1,50 @@
|
||||
/*++
|
||||
|
||||
Copyright (c) 2004, 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
|
||||
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:
|
||||
|
||||
PcAnsi.h
|
||||
|
||||
Abstract:
|
||||
|
||||
Terminal Device Path Vendor Guid. Defined in EFI 1.0.
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef _PC_ANSI_H_
|
||||
#define _PC_ANSI_H_
|
||||
|
||||
#define EFI_PC_ANSI_GUID \
|
||||
{ \
|
||||
0xe0c14753, 0xf9be, 0x11d2, 0x9a, 0x0c, 0x00, 0x90, 0x27, 0x3f, 0xc1, 0x4d \
|
||||
}
|
||||
|
||||
#define EFI_VT_100_GUID \
|
||||
{ \
|
||||
0xdfa66065, 0xb419, 0x11d3, 0x9a, 0x2d, 0x00, 0x90, 0x27, 0x3f, 0xc1, 0x4d \
|
||||
}
|
||||
|
||||
#define EFI_VT_100_PLUS_GUID \
|
||||
{ \
|
||||
0x7baec70b, 0x57e0, 0x4c76, 0x8e, 0x87, 0x2f, 0x9e, 0x28, 0x08, 0x83, 0x43 \
|
||||
}
|
||||
|
||||
#define EFI_VT_UTF8_GUID \
|
||||
{ \
|
||||
0xad15a0d6, 0x8bec, 0x4acf, 0xa0, 0x73, 0xd0, 0x1d, 0xe7, 0x7e, 0x2d, 0x88 \
|
||||
}
|
||||
|
||||
extern EFI_GUID gEfiPcAnsiGuid;
|
||||
extern EFI_GUID gEfiVT100Guid;
|
||||
extern EFI_GUID gEfiVT100PlusGuid;
|
||||
extern EFI_GUID gEfiVTUTF8Guid;
|
||||
|
||||
#endif
|
1114
EdkCompatibilityPkg/Foundation/Efi/Include/EfiApi.h
Normal file
1114
EdkCompatibilityPkg/Foundation/Efi/Include/EfiApi.h
Normal file
File diff suppressed because it is too large
Load Diff
555
EdkCompatibilityPkg/Foundation/Efi/Include/EfiDevicePath.h
Normal file
555
EdkCompatibilityPkg/Foundation/Efi/Include/EfiDevicePath.h
Normal file
@@ -0,0 +1,555 @@
|
||||
/*++
|
||||
|
||||
Copyright (c) 2004 - 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
|
||||
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:
|
||||
|
||||
EfiDevicePath.h
|
||||
|
||||
Abstract:
|
||||
|
||||
EFI Device Path definitions
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef _EFI_DEVICE_PATH_H
|
||||
#define _EFI_DEVICE_PATH_H
|
||||
|
||||
|
||||
|
||||
#pragma pack(1)
|
||||
|
||||
|
||||
//
|
||||
// Device Path defines and macros
|
||||
//
|
||||
#define EFI_DP_TYPE_MASK 0x7F
|
||||
#define EFI_DP_TYPE_UNPACKED 0x80
|
||||
#define END_DEVICE_PATH_TYPE 0x7f
|
||||
#define END_ENTIRE_DEVICE_PATH_SUBTYPE 0xff
|
||||
#define END_INSTANCE_DEVICE_PATH_SUBTYPE 0x01
|
||||
#define END_DEVICE_PATH_LENGTH (sizeof(EFI_DEVICE_PATH_PROTOCOL))
|
||||
|
||||
#define DP_IS_END_TYPE(a)
|
||||
#define DP_IS_END_SUBTYPE(a) ( ((a)->SubType == END_ENTIRE_DEVICE_PATH_SUBTYPE )
|
||||
|
||||
#define DevicePathType(a) ( ((a)->Type) & EFI_DP_TYPE_MASK )
|
||||
#define DevicePathSubType(a) ( (a)->SubType )
|
||||
#define DevicePathNodeLength(a) ( ((a)->Length[0]) | ((a)->Length[1] << 8) )
|
||||
#define NextDevicePathNode(a) ( (EFI_DEVICE_PATH_PROTOCOL *) ( ((UINT8 *) (a)) + DevicePathNodeLength(a)))
|
||||
#define IsDevicePathEndType(a) ( DevicePathType(a) == END_DEVICE_PATH_TYPE )
|
||||
#define IsDevicePathEndSubType(a) ( (a)->SubType == END_ENTIRE_DEVICE_PATH_SUBTYPE )
|
||||
#define IsDevicePathEnd(a) ( IsDevicePathEndType(a) && IsDevicePathEndSubType(a) )
|
||||
#define IsDevicePathUnpacked(a) ( (a)->Type & EFI_DP_TYPE_UNPACKED )
|
||||
|
||||
|
||||
#define SetDevicePathNodeLength(a,l) { \
|
||||
(a)->Length[0] = (UINT8) (l); \
|
||||
(a)->Length[1] = (UINT8) ((l) >> 8); \
|
||||
}
|
||||
|
||||
#define SetDevicePathEndNode(a) { \
|
||||
(a)->Type = END_DEVICE_PATH_TYPE; \
|
||||
(a)->SubType = END_ENTIRE_DEVICE_PATH_SUBTYPE; \
|
||||
(a)->Length[0] = sizeof(EFI_DEVICE_PATH_PROTOCOL); \
|
||||
(a)->Length[1] = 0; \
|
||||
}
|
||||
|
||||
//
|
||||
// Hardware Device Paths
|
||||
//
|
||||
#define HARDWARE_DEVICE_PATH 0x01
|
||||
|
||||
#define HW_PCI_DP 0x01
|
||||
typedef struct {
|
||||
EFI_DEVICE_PATH_PROTOCOL Header;
|
||||
UINT8 Function;
|
||||
UINT8 Device;
|
||||
} PCI_DEVICE_PATH;
|
||||
|
||||
#define HW_PCCARD_DP 0x02
|
||||
typedef struct {
|
||||
EFI_DEVICE_PATH_PROTOCOL Header;
|
||||
UINT8 FunctionNumber;
|
||||
} PCCARD_DEVICE_PATH;
|
||||
|
||||
#define HW_MEMMAP_DP 0x03
|
||||
typedef struct {
|
||||
EFI_DEVICE_PATH_PROTOCOL Header;
|
||||
UINT32 MemoryType;
|
||||
EFI_PHYSICAL_ADDRESS StartingAddress;
|
||||
EFI_PHYSICAL_ADDRESS EndingAddress;
|
||||
} MEMMAP_DEVICE_PATH;
|
||||
|
||||
#define HW_VENDOR_DP 0x04
|
||||
typedef struct {
|
||||
EFI_DEVICE_PATH_PROTOCOL Header;
|
||||
EFI_GUID Guid;
|
||||
} VENDOR_DEVICE_PATH;
|
||||
|
||||
#define HW_CONTROLLER_DP 0x05
|
||||
typedef struct {
|
||||
EFI_DEVICE_PATH_PROTOCOL Header;
|
||||
UINT32 Controller;
|
||||
} CONTROLLER_DEVICE_PATH;
|
||||
|
||||
//
|
||||
// ACPI Device Paths
|
||||
//
|
||||
#define ACPI_DEVICE_PATH 0x02
|
||||
|
||||
#define ACPI_DP 0x01
|
||||
typedef struct {
|
||||
EFI_DEVICE_PATH_PROTOCOL Header;
|
||||
UINT32 HID;
|
||||
UINT32 UID;
|
||||
} ACPI_HID_DEVICE_PATH;
|
||||
|
||||
#define ACPI_EXTENDED_DP 0x02
|
||||
typedef struct {
|
||||
EFI_DEVICE_PATH_PROTOCOL Header;
|
||||
UINT32 HID;
|
||||
UINT32 UID;
|
||||
UINT32 CID;
|
||||
//
|
||||
// Optional variable length _HIDSTR
|
||||
// Optional variable length _UIDSTR
|
||||
//
|
||||
} ACPI_EXTENDED_HID_DEVICE_PATH;
|
||||
|
||||
#define ACPI_ADR_DP 0x03
|
||||
|
||||
typedef struct {
|
||||
EFI_DEVICE_PATH_PROTOCOL Header;
|
||||
UINT32 ADR;
|
||||
} ACPI_ADR_DEVICE_PATH;
|
||||
|
||||
#define ACPI_ADR_DISPLAY_TYPE_OTHER 0
|
||||
#define ACPI_ADR_DISPLAY_TYPE_VGA 1
|
||||
#define ACPI_ADR_DISPLAY_TYPE_TV 2
|
||||
#define ACPI_ADR_DISPLAY_TYPE_EXTERNAL_DIGITAL 3
|
||||
#define ACPI_ADR_DISPLAY_TYPE_INTERNAL_DIGITAL 4
|
||||
|
||||
#define ACPI_DISPLAY_ADR(_DeviceIdScheme, _HeadId, _NonVgaOutput, _BiosCanDetect, _VendorInfo, _Type, _Port, _Index) \
|
||||
((UINT32) ( (((_DeviceIdScheme) & 0x1) << 31) | \
|
||||
(((_HeadId) & 0x7) << 18) | \
|
||||
(((_NonVgaOutput) & 0x1) << 17) | \
|
||||
(((_BiosCanDetect) & 0x1) << 16) | \
|
||||
(((_VendorInfo) & 0xf) << 12) | \
|
||||
(((_Type) & 0xf) << 8) | \
|
||||
(((_Port) & 0xf) << 4) | \
|
||||
((_Index) & 0xf) ))
|
||||
|
||||
//
|
||||
// EISA ID Macro
|
||||
// EISA ID Definition 32-bits
|
||||
// bits[15:0] - three character compressed ASCII EISA ID.
|
||||
// bits[31:16] - binary number
|
||||
// Compressed ASCII is 5 bits per character 0b00001 = 'A' 0b11010 = 'Z'
|
||||
//
|
||||
#define PNP_EISA_ID_CONST 0x41d0
|
||||
#define EISA_ID(_Name, _Num) ((UINT32) ((_Name) | (_Num) << 16))
|
||||
#define EISA_PNP_ID(_PNPId) (EISA_ID(PNP_EISA_ID_CONST, (_PNPId)))
|
||||
#define EFI_PNP_ID(_PNPId) (EISA_ID(PNP_EISA_ID_CONST, (_PNPId)))
|
||||
|
||||
#define PNP_EISA_ID_MASK 0xffff
|
||||
#define EISA_ID_TO_NUM(_Id) ((_Id) >> 16)
|
||||
|
||||
//
|
||||
// Messaging Device Paths
|
||||
//
|
||||
#define MESSAGING_DEVICE_PATH 0x03
|
||||
|
||||
#define MSG_ATAPI_DP 0x01
|
||||
typedef struct {
|
||||
EFI_DEVICE_PATH_PROTOCOL Header;
|
||||
UINT8 PrimarySecondary;
|
||||
UINT8 SlaveMaster;
|
||||
UINT16 Lun;
|
||||
} ATAPI_DEVICE_PATH;
|
||||
|
||||
#define MSG_SCSI_DP 0x02
|
||||
typedef struct {
|
||||
EFI_DEVICE_PATH_PROTOCOL Header;
|
||||
UINT16 Pun;
|
||||
UINT16 Lun;
|
||||
} SCSI_DEVICE_PATH;
|
||||
|
||||
#define MSG_FIBRECHANNEL_DP 0x03
|
||||
typedef struct {
|
||||
EFI_DEVICE_PATH_PROTOCOL Header;
|
||||
UINT32 Reserved;
|
||||
UINT64 WWN;
|
||||
UINT64 Lun;
|
||||
} FIBRECHANNEL_DEVICE_PATH;
|
||||
|
||||
#define MSG_1394_DP 0x04
|
||||
typedef struct {
|
||||
EFI_DEVICE_PATH_PROTOCOL Header;
|
||||
UINT32 Reserved;
|
||||
UINT64 Guid;
|
||||
} F1394_DEVICE_PATH;
|
||||
|
||||
#define MSG_USB_DP 0x05
|
||||
typedef struct {
|
||||
EFI_DEVICE_PATH_PROTOCOL Header;
|
||||
UINT8 ParentPortNumber;
|
||||
UINT8 InterfaceNumber;
|
||||
} USB_DEVICE_PATH;
|
||||
|
||||
#define MSG_USB_CLASS_DP 0x0f
|
||||
typedef struct {
|
||||
EFI_DEVICE_PATH_PROTOCOL Header;
|
||||
UINT16 VendorId;
|
||||
UINT16 ProductId;
|
||||
UINT8 DeviceClass;
|
||||
UINT8 DeviceSubClass;
|
||||
UINT8 DeviceProtocol;
|
||||
} USB_CLASS_DEVICE_PATH;
|
||||
|
||||
#if (EFI_SPECIFICATION_VERSION >= 0x00020000)
|
||||
#define MSG_USB_WWID_DP 0x10
|
||||
typedef struct {
|
||||
EFI_DEVICE_PATH_PROTOCOL Header;
|
||||
UINT16 InterfaceNumber;
|
||||
UINT16 VendorId;
|
||||
UINT16 ProductId;
|
||||
//
|
||||
// CHAR16 SerialNumber[];
|
||||
//
|
||||
} USB_WWID_DEVICE_PATH;
|
||||
|
||||
#define MSG_DEVICE_LOGICAL_UNIT_DP 0x11
|
||||
typedef struct {
|
||||
EFI_DEVICE_PATH_PROTOCOL Header;
|
||||
UINT8 Lun;
|
||||
} DEVICE_LOGICAL_UNIT_DEVICE_PATH;
|
||||
#endif
|
||||
|
||||
#define MSG_SATA_DP 0x12
|
||||
typedef struct {
|
||||
EFI_DEVICE_PATH_PROTOCOL Header;
|
||||
UINT16 HBAPortNumber;
|
||||
UINT16 PortMultiplierPortNumber;
|
||||
UINT16 Lun;
|
||||
} SATA_DEVICE_PATH;
|
||||
|
||||
#define MSG_I2O_DP 0x06
|
||||
typedef struct {
|
||||
EFI_DEVICE_PATH_PROTOCOL Header;
|
||||
UINT32 Tid;
|
||||
} I2O_DEVICE_PATH;
|
||||
|
||||
#define MSG_MAC_ADDR_DP 0x0b
|
||||
typedef struct {
|
||||
EFI_DEVICE_PATH_PROTOCOL Header;
|
||||
EFI_MAC_ADDRESS MacAddress;
|
||||
UINT8 IfType;
|
||||
} MAC_ADDR_DEVICE_PATH;
|
||||
|
||||
#define MSG_IPv4_DP 0x0c
|
||||
typedef struct {
|
||||
EFI_DEVICE_PATH_PROTOCOL Header;
|
||||
EFI_IPv4_ADDRESS LocalIpAddress;
|
||||
EFI_IPv4_ADDRESS RemoteIpAddress;
|
||||
UINT16 LocalPort;
|
||||
UINT16 RemotePort;
|
||||
UINT16 Protocol;
|
||||
BOOLEAN StaticIpAddress;
|
||||
} IPv4_DEVICE_PATH;
|
||||
|
||||
#define MSG_IPv6_DP 0x0d
|
||||
typedef struct {
|
||||
EFI_DEVICE_PATH_PROTOCOL Header;
|
||||
EFI_IPv6_ADDRESS LocalIpAddress;
|
||||
EFI_IPv6_ADDRESS RemoteIpAddress;
|
||||
UINT16 LocalPort;
|
||||
UINT16 RemotePort;
|
||||
UINT16 Protocol;
|
||||
BOOLEAN StaticIpAddress;
|
||||
} IPv6_DEVICE_PATH;
|
||||
|
||||
#define MSG_INFINIBAND_DP 0x09
|
||||
typedef struct {
|
||||
EFI_DEVICE_PATH_PROTOCOL Header;
|
||||
UINT32 ResourceFlags;
|
||||
UINT8 PortGid[16];
|
||||
UINT64 ServiceId;
|
||||
UINT64 TargetPortId;
|
||||
UINT64 DeviceId;
|
||||
} INFINIBAND_DEVICE_PATH;
|
||||
|
||||
#define INFINIBAND_RESOURCE_FLAG_IOC_SERVICE 0x01
|
||||
#define INFINIBAND_RESOURCE_FLAG_EXTENDED_BOOT_ENVIRONMENT 0x02
|
||||
#define INFINIBAND_RESOURCE_FLAG_CONSOLE_PROTOCOL 0x04
|
||||
#define INFINIBAND_RESOURCE_FLAG_STORAGE_PROTOCOL 0x08
|
||||
#define INFINIBAND_RESOURCE_FLAG_NETWORK_PROTOCOL 0x10
|
||||
|
||||
#define MSG_UART_DP 0x0e
|
||||
typedef struct {
|
||||
EFI_DEVICE_PATH_PROTOCOL Header;
|
||||
UINT32 Reserved;
|
||||
UINT64 BaudRate;
|
||||
UINT8 DataBits;
|
||||
UINT8 Parity;
|
||||
UINT8 StopBits;
|
||||
} UART_DEVICE_PATH;
|
||||
|
||||
//
|
||||
// Use VENDOR_DEVICE_PATH struct
|
||||
//
|
||||
#define MSG_VENDOR_DP 0x0a
|
||||
|
||||
#define DEVICE_PATH_MESSAGING_PC_ANSI \
|
||||
{ 0xe0c14753, 0xf9be, 0x11d2, 0x9a, 0x0c, 0x00, 0x90, 0x27, 0x3f, 0xc1, 0x4d }
|
||||
|
||||
#define DEVICE_PATH_MESSAGING_VT_100 \
|
||||
{ 0xdfa66065, 0xb419, 0x11d3, 0x9a, 0x2d, 0x00, 0x90, 0x27, 0x3f, 0xc1, 0x4d }
|
||||
|
||||
#define DEVICE_PATH_MESSAGING_VT_100_PLUS \
|
||||
{ 0x7baec70b, 0x57e0, 0x4c76, 0x8e, 0x87, 0x2f, 0x9e, 0x28, 0x08, 0x83, 0x43 }
|
||||
|
||||
#define DEVICE_PATH_MESSAGING_VT_UTF8 \
|
||||
{ 0xad15a0d6, 0x8bec, 0x4acf, 0xa0, 0x73, 0xd0, 0x1d, 0xe7, 0x7e, 0x2d, 0x88 }
|
||||
|
||||
#define DEVICE_PATH_MESSAGING_UART_FLOW_CONTROL \
|
||||
{ 0x37499a9d, 0x542f, 0x4c89, 0xa0, 0x26, 0x35, 0xda, 0x14, 0x20, 0x94, 0xe4 }
|
||||
|
||||
typedef struct {
|
||||
EFI_DEVICE_PATH_PROTOCOL Header;
|
||||
EFI_GUID Guid;
|
||||
UINT32 FlowControlMap;
|
||||
} UART_FLOW_CONTROL_DEVICE_PATH;
|
||||
|
||||
#if (EFI_SPECIFICATION_VERSION >= 0x00020000)
|
||||
|
||||
#define DEVICE_PATH_MESSAGING_SAS \
|
||||
{ 0xd487ddb4, 0x008b, 0x11d9, 0xaf, 0xdc, 0x00, 0x10, 0x83, 0xff, 0xca, 0x4d }
|
||||
|
||||
typedef struct {
|
||||
EFI_DEVICE_PATH_PROTOCOL Header;
|
||||
EFI_GUID Guid;
|
||||
UINT32 Reserved;
|
||||
UINT64 SasAddress;
|
||||
UINT64 Lun;
|
||||
UINT16 DeviceTopology;
|
||||
UINT16 RelativeTargetPort;
|
||||
} SAS_DEVICE_PATH;
|
||||
|
||||
#define MSG_ISCSI_DP 0x13
|
||||
typedef struct {
|
||||
EFI_DEVICE_PATH_PROTOCOL Header;
|
||||
UINT16 NetworkProtocol;
|
||||
UINT16 LoginOption;
|
||||
UINT64 Lun;
|
||||
UINT16 TargetPortalGroupTag;
|
||||
// CHAR8 iSCSI Target Name
|
||||
} ISCSI_DEVICE_PATH;
|
||||
|
||||
#define ISCSI_LOGIN_OPTION_NO_HEADER_DIGEST 0x0000
|
||||
#define ISCSI_LOGIN_OPTION_HEADER_DIGEST_USING_CRC32C 0x0002
|
||||
#define ISCSI_LOGIN_OPTION_NO_DATA_DIGEST 0x0000
|
||||
#define ISCSI_LOGIN_OPTION_DATA_DIGEST_USING_CRC32C 0x0008
|
||||
#define ISCSI_LOGIN_OPTION_AUTHMETHOD_CHAP 0x0000
|
||||
#define ISCSI_LOGIN_OPTION_AUTHMETHOD_NON 0x1000
|
||||
#define ISCSI_LOGIN_OPTION_CHAP_BI 0x0000
|
||||
#define ISCSI_LOGIN_OPTION_CHAP_UNI 0x2000
|
||||
|
||||
#endif
|
||||
|
||||
//
|
||||
// Media Device Path
|
||||
//
|
||||
#define MEDIA_DEVICE_PATH 0x04
|
||||
|
||||
#define MEDIA_HARDDRIVE_DP 0x01
|
||||
typedef struct {
|
||||
EFI_DEVICE_PATH_PROTOCOL Header;
|
||||
UINT32 PartitionNumber;
|
||||
UINT64 PartitionStart;
|
||||
UINT64 PartitionSize;
|
||||
UINT8 Signature[16];
|
||||
UINT8 MBRType;
|
||||
UINT8 SignatureType;
|
||||
} HARDDRIVE_DEVICE_PATH;
|
||||
|
||||
#define MBR_TYPE_PCAT 0x01
|
||||
#define MBR_TYPE_EFI_PARTITION_TABLE_HEADER 0x02
|
||||
|
||||
#define SIGNATURE_TYPE_MBR 0x01
|
||||
#define SIGNATURE_TYPE_GUID 0x02
|
||||
|
||||
#define MEDIA_CDROM_DP 0x02
|
||||
typedef struct {
|
||||
EFI_DEVICE_PATH_PROTOCOL Header;
|
||||
UINT32 BootEntry;
|
||||
UINT64 PartitionStart;
|
||||
UINT64 PartitionSize;
|
||||
} CDROM_DEVICE_PATH;
|
||||
|
||||
//
|
||||
// Use VENDOR_DEVICE_PATH struct
|
||||
//
|
||||
#define MEDIA_VENDOR_DP 0x03
|
||||
|
||||
#define MEDIA_FILEPATH_DP 0x04
|
||||
typedef struct {
|
||||
EFI_DEVICE_PATH_PROTOCOL Header;
|
||||
CHAR16 PathName[1];
|
||||
} FILEPATH_DEVICE_PATH;
|
||||
|
||||
#define SIZE_OF_FILEPATH_DEVICE_PATH EFI_FIELD_OFFSET(FILEPATH_DEVICE_PATH,PathName)
|
||||
|
||||
#define MEDIA_PROTOCOL_DP 0x05
|
||||
typedef struct {
|
||||
EFI_DEVICE_PATH_PROTOCOL Header;
|
||||
EFI_GUID Protocol;
|
||||
} MEDIA_PROTOCOL_DEVICE_PATH;
|
||||
|
||||
#if (EFI_SPECIFICATION_VERSION >= 0x0002000A)
|
||||
|
||||
#define MEDIA_FV_DP 0x06
|
||||
typedef struct {
|
||||
EFI_DEVICE_PATH_PROTOCOL Header;
|
||||
EFI_GUID NameGuid;
|
||||
} MEDIA_FW_VOL_DEVICE_PATH;
|
||||
|
||||
#define MEDIA_FV_FILEPATH_DP 0x07
|
||||
typedef struct {
|
||||
EFI_DEVICE_PATH_PROTOCOL Header;
|
||||
EFI_GUID NameGuid;
|
||||
} MEDIA_FW_VOL_FILEPATH_DEVICE_PATH;
|
||||
|
||||
#endif
|
||||
|
||||
//
|
||||
// BBS Device Path
|
||||
//
|
||||
#define BBS_DEVICE_PATH 0x05
|
||||
#define BBS_BBS_DP 0x01
|
||||
typedef struct {
|
||||
EFI_DEVICE_PATH_PROTOCOL Header;
|
||||
UINT16 DeviceType;
|
||||
UINT16 StatusFlag;
|
||||
CHAR8 String[1];
|
||||
} BBS_BBS_DEVICE_PATH;
|
||||
|
||||
//
|
||||
// DeviceType definitions - from BBS specification
|
||||
//
|
||||
#define BBS_TYPE_FLOPPY 0x01
|
||||
#define BBS_TYPE_HARDDRIVE 0x02
|
||||
#define BBS_TYPE_CDROM 0x03
|
||||
#define BBS_TYPE_PCMCIA 0x04
|
||||
#define BBS_TYPE_USB 0x05
|
||||
#define BBS_TYPE_EMBEDDED_NETWORK 0x06
|
||||
#define BBS_TYPE_BEV 0x80
|
||||
#define BBS_TYPE_UNKNOWN 0xFF
|
||||
|
||||
#define UNKNOWN_DEVICE_GUID \
|
||||
{ 0xcf31fac5, 0xc24e, 0x11d2, 0x85, 0xf3, 0x0, 0xa0, 0xc9, 0x3e, 0xc9, 0x3b }
|
||||
|
||||
typedef struct {
|
||||
VENDOR_DEVICE_PATH DevicePath;
|
||||
UINT8 LegacyDriveLetter;
|
||||
} UNKNOWN_DEVICE_VENDOR_DEVICE_PATH;
|
||||
|
||||
|
||||
//
|
||||
// Union of all possible Device Paths and pointers to Device Paths
|
||||
//
|
||||
|
||||
typedef union {
|
||||
EFI_DEVICE_PATH_PROTOCOL DevPath;
|
||||
PCI_DEVICE_PATH Pci;
|
||||
PCCARD_DEVICE_PATH PcCard;
|
||||
MEMMAP_DEVICE_PATH MemMap;
|
||||
VENDOR_DEVICE_PATH Vendor;
|
||||
|
||||
UNKNOWN_DEVICE_VENDOR_DEVICE_PATH UnknownVendor;
|
||||
|
||||
CONTROLLER_DEVICE_PATH Controller;
|
||||
ACPI_HID_DEVICE_PATH Acpi;
|
||||
|
||||
ATAPI_DEVICE_PATH Atapi;
|
||||
SCSI_DEVICE_PATH Scsi;
|
||||
FIBRECHANNEL_DEVICE_PATH FibreChannel;
|
||||
SATA_DEVICE_PATH Sata;
|
||||
|
||||
F1394_DEVICE_PATH F1394;
|
||||
USB_DEVICE_PATH Usb;
|
||||
USB_CLASS_DEVICE_PATH UsbClass;
|
||||
#if (EFI_SPECIFICATION_VERSION >= 0x00020000)
|
||||
USB_WWID_DEVICE_PATH UsbWwid;
|
||||
#endif
|
||||
I2O_DEVICE_PATH I2O;
|
||||
MAC_ADDR_DEVICE_PATH MacAddr;
|
||||
IPv4_DEVICE_PATH Ipv4;
|
||||
IPv6_DEVICE_PATH Ipv6;
|
||||
INFINIBAND_DEVICE_PATH InfiniBand;
|
||||
UART_DEVICE_PATH Uart;
|
||||
UART_FLOW_CONTROL_DEVICE_PATH UartFlowControl;
|
||||
#if (EFI_SPECIFICATION_VERSION >= 0x00020000)
|
||||
SAS_DEVICE_PATH Sas;
|
||||
ISCSI_DEVICE_PATH Iscsi;
|
||||
#endif
|
||||
HARDDRIVE_DEVICE_PATH HardDrive;
|
||||
CDROM_DEVICE_PATH CD;
|
||||
|
||||
FILEPATH_DEVICE_PATH FilePath;
|
||||
MEDIA_PROTOCOL_DEVICE_PATH MediaProtocol;
|
||||
|
||||
BBS_BBS_DEVICE_PATH Bbs;
|
||||
} EFI_DEV_PATH;
|
||||
|
||||
|
||||
|
||||
typedef union {
|
||||
EFI_DEVICE_PATH_PROTOCOL *DevPath;
|
||||
PCI_DEVICE_PATH *Pci;
|
||||
PCCARD_DEVICE_PATH *PcCard;
|
||||
MEMMAP_DEVICE_PATH *MemMap;
|
||||
VENDOR_DEVICE_PATH *Vendor;
|
||||
|
||||
UNKNOWN_DEVICE_VENDOR_DEVICE_PATH *UnknownVendor;
|
||||
|
||||
CONTROLLER_DEVICE_PATH *Controller;
|
||||
ACPI_HID_DEVICE_PATH *Acpi;
|
||||
ACPI_EXTENDED_HID_DEVICE_PATH *ExtendedAcpi;
|
||||
|
||||
ATAPI_DEVICE_PATH *Atapi;
|
||||
SCSI_DEVICE_PATH *Scsi;
|
||||
FIBRECHANNEL_DEVICE_PATH *FibreChannel;
|
||||
SATA_DEVICE_PATH *Sata;
|
||||
|
||||
F1394_DEVICE_PATH *F1394;
|
||||
USB_DEVICE_PATH *Usb;
|
||||
USB_CLASS_DEVICE_PATH *UsbClass;
|
||||
I2O_DEVICE_PATH *I2O;
|
||||
MAC_ADDR_DEVICE_PATH *MacAddr;
|
||||
IPv4_DEVICE_PATH *Ipv4;
|
||||
IPv6_DEVICE_PATH *Ipv6;
|
||||
INFINIBAND_DEVICE_PATH *InfiniBand;
|
||||
UART_DEVICE_PATH *Uart;
|
||||
|
||||
HARDDRIVE_DEVICE_PATH *HardDrive;
|
||||
CDROM_DEVICE_PATH *CD;
|
||||
|
||||
FILEPATH_DEVICE_PATH *FilePath;
|
||||
MEDIA_PROTOCOL_DEVICE_PATH *MediaProtocol;
|
||||
|
||||
BBS_BBS_DEVICE_PATH *Bbs;
|
||||
UINT8 *Raw;
|
||||
} EFI_DEV_PATH_PTR;
|
||||
|
||||
#pragma pack()
|
||||
|
||||
|
||||
#endif
|
67
EdkCompatibilityPkg/Foundation/Efi/Include/EfiError.h
Normal file
67
EdkCompatibilityPkg/Foundation/Efi/Include/EfiError.h
Normal file
@@ -0,0 +1,67 @@
|
||||
/*++
|
||||
|
||||
Copyright (c) 2004, 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
|
||||
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:
|
||||
|
||||
EfiError.h
|
||||
|
||||
Abstract:
|
||||
|
||||
EFI error levels and thier associated defines
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef _EFI_ERROR_H_
|
||||
#define _EFI_ERROR_H_
|
||||
|
||||
//
|
||||
// Set the upper bit to indicate EFI Error.
|
||||
//
|
||||
#define EFIERR(a) (EFI_MAX_BIT | (a))
|
||||
|
||||
#define EFIWARN(a) (a)
|
||||
#define EFI_ERROR(a) (((INTN) (a)) < 0)
|
||||
|
||||
#define EFI_SUCCESS 0
|
||||
#define EFI_LOAD_ERROR EFIERR (1)
|
||||
#define EFI_INVALID_PARAMETER EFIERR (2)
|
||||
#define EFI_UNSUPPORTED EFIERR (3)
|
||||
#define EFI_BAD_BUFFER_SIZE EFIERR (4)
|
||||
#define EFI_BUFFER_TOO_SMALL EFIERR (5)
|
||||
#define EFI_NOT_READY EFIERR (6)
|
||||
#define EFI_DEVICE_ERROR EFIERR (7)
|
||||
#define EFI_WRITE_PROTECTED EFIERR (8)
|
||||
#define EFI_OUT_OF_RESOURCES EFIERR (9)
|
||||
#define EFI_VOLUME_CORRUPTED EFIERR (10)
|
||||
#define EFI_VOLUME_FULL EFIERR (11)
|
||||
#define EFI_NO_MEDIA EFIERR (12)
|
||||
#define EFI_MEDIA_CHANGED EFIERR (13)
|
||||
#define EFI_NOT_FOUND EFIERR (14)
|
||||
#define EFI_ACCESS_DENIED EFIERR (15)
|
||||
#define EFI_NO_RESPONSE EFIERR (16)
|
||||
#define EFI_NO_MAPPING EFIERR (17)
|
||||
#define EFI_TIMEOUT EFIERR (18)
|
||||
#define EFI_NOT_STARTED EFIERR (19)
|
||||
#define EFI_ALREADY_STARTED EFIERR (20)
|
||||
#define EFI_ABORTED EFIERR (21)
|
||||
#define EFI_ICMP_ERROR EFIERR (22)
|
||||
#define EFI_TFTP_ERROR EFIERR (23)
|
||||
#define EFI_PROTOCOL_ERROR EFIERR (24)
|
||||
#define EFI_INCOMPATIBLE_VERSION EFIERR (25)
|
||||
#define EFI_SECURITY_VIOLATION EFIERR (26)
|
||||
#define EFI_CRC_ERROR EFIERR (27)
|
||||
|
||||
#define EFI_WARN_UNKNOWN_GLYPH EFIWARN (1)
|
||||
#define EFI_WARN_DELETE_FAILURE EFIWARN (2)
|
||||
#define EFI_WARN_WRITE_FAILURE EFIWARN (3)
|
||||
#define EFI_WARN_BUFFER_TOO_SMALL EFIWARN (4)
|
||||
|
||||
#endif
|
661
EdkCompatibilityPkg/Foundation/Efi/Include/EfiImage.h
Normal file
661
EdkCompatibilityPkg/Foundation/Efi/Include/EfiImage.h
Normal file
@@ -0,0 +1,661 @@
|
||||
/*++
|
||||
|
||||
Copyright (c) 2004 - 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
|
||||
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:
|
||||
|
||||
EfiImage.h
|
||||
|
||||
Abstract:
|
||||
|
||||
EFI image format for PE32+. Please note some data structures are different
|
||||
for IA-32 and Itanium-based images, look for UINTN and the #ifdef EFI_IA64
|
||||
|
||||
BugBug: Fix text - doc as defined in MSFT EFI specification
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef _EFI_IMAGE_H_
|
||||
#define _EFI_IMAGE_H_
|
||||
|
||||
//
|
||||
// PE32+ Subsystem type for EFI images
|
||||
//
|
||||
#define EFI_IMAGE_SUBSYSTEM_EFI_APPLICATION 10
|
||||
#define EFI_IMAGE_SUBSYSTEM_EFI_BOOT_SERVICE_DRIVER 11
|
||||
#define EFI_IMAGE_SUBSYSTEM_EFI_RUNTIME_DRIVER 12
|
||||
|
||||
//
|
||||
// BugBug: Need to get a real answer for this problem. This is not in the
|
||||
// PE specification.
|
||||
//
|
||||
// A SAL runtime driver does not get fixed up when a transition to
|
||||
// virtual mode is made. In all other cases it should be treated
|
||||
// like a EFI_IMAGE_SUBSYSTEM_EFI_RUNTIME_DRIVER image
|
||||
//
|
||||
#define EFI_IMAGE_SUBSYSTEM_SAL_RUNTIME_DRIVER 13
|
||||
|
||||
//
|
||||
// PE32+ Machine type for EFI images
|
||||
//
|
||||
#define EFI_IMAGE_MACHINE_IA32 0x014c
|
||||
#define EFI_IMAGE_MACHINE_IA64 0x0200
|
||||
#define EFI_IMAGE_MACHINE_X64 0x8664
|
||||
//
|
||||
// #define EFI_IMAGE_MACHINE_FCODE 0xfc0d
|
||||
//
|
||||
#define EFI_IMAGE_MACHINE_EBC 0x0EBC
|
||||
|
||||
#define EFI_IMAGE_DOS_SIGNATURE 0x5A4D // MZ
|
||||
#define EFI_IMAGE_OS2_SIGNATURE 0x454E // NE
|
||||
#define EFI_IMAGE_OS2_SIGNATURE_LE 0x454C // LE
|
||||
#define EFI_IMAGE_NT_SIGNATURE 0x00004550 // PE00
|
||||
#define EFI_IMAGE_EDOS_SIGNATURE 0x44454550 // PEED
|
||||
//
|
||||
// PE images can start with an optional DOS header, so if an image is run
|
||||
// under DOS it can print an error message.
|
||||
//
|
||||
typedef struct {
|
||||
UINT16 e_magic; // Magic number
|
||||
UINT16 e_cblp; // Bytes on last page of file
|
||||
UINT16 e_cp; // Pages in file
|
||||
UINT16 e_crlc; // Relocations
|
||||
UINT16 e_cparhdr; // Size of header in paragraphs
|
||||
UINT16 e_minalloc; // Minimum extra paragraphs needed
|
||||
UINT16 e_maxalloc; // Maximum extra paragraphs needed
|
||||
UINT16 e_ss; // Initial (relative) SS value
|
||||
UINT16 e_sp; // Initial SP value
|
||||
UINT16 e_csum; // Checksum
|
||||
UINT16 e_ip; // Initial IP value
|
||||
UINT16 e_cs; // Initial (relative) CS value
|
||||
UINT16 e_lfarlc; // File address of relocation table
|
||||
UINT16 e_ovno; // Overlay number
|
||||
UINT16 e_res[4]; // Reserved words
|
||||
UINT16 e_oemid; // OEM identifier (for e_oeminfo)
|
||||
UINT16 e_oeminfo; // OEM information; e_oemid specific
|
||||
UINT16 e_res2[10]; // Reserved words
|
||||
UINT32 e_lfanew; // File address of new exe header
|
||||
} EFI_IMAGE_DOS_HEADER;
|
||||
|
||||
//
|
||||
// File header format.
|
||||
//
|
||||
typedef struct {
|
||||
UINT16 Machine;
|
||||
UINT16 NumberOfSections;
|
||||
UINT32 TimeDateStamp;
|
||||
UINT32 PointerToSymbolTable;
|
||||
UINT32 NumberOfSymbols;
|
||||
UINT16 SizeOfOptionalHeader;
|
||||
UINT16 Characteristics;
|
||||
} EFI_IMAGE_FILE_HEADER;
|
||||
|
||||
#define EFI_IMAGE_SIZEOF_FILE_HEADER 20
|
||||
|
||||
#define EFI_IMAGE_FILE_RELOCS_STRIPPED 0x0001 // Relocation info stripped from file.
|
||||
#define EFI_IMAGE_FILE_EXECUTABLE_IMAGE 0x0002 // File is executable (i.e. no unresolved externel references).
|
||||
#define EFI_IMAGE_FILE_LINE_NUMS_STRIPPED 0x0004 // Line nunbers stripped from file.
|
||||
#define EFI_IMAGE_FILE_LOCAL_SYMS_STRIPPED 0x0008 // Local symbols stripped from file.
|
||||
#define EFI_IMAGE_FILE_BYTES_REVERSED_LO 0x0080 // Bytes of machine word are reversed.
|
||||
#define EFI_IMAGE_FILE_32BIT_MACHINE 0x0100 // 32 bit word machine.
|
||||
#define EFI_IMAGE_FILE_DEBUG_STRIPPED 0x0200 // Debugging info stripped from file in .DBG file
|
||||
#define EFI_IMAGE_FILE_SYSTEM 0x1000 // System File.
|
||||
#define EFI_IMAGE_FILE_DLL 0x2000 // File is a DLL.
|
||||
#define EFI_IMAGE_FILE_BYTES_REVERSED_HI 0x8000 // Bytes of machine word are reversed.
|
||||
#define EFI_IMAGE_FILE_MACHINE_UNKNOWN 0
|
||||
#define EFI_IMAGE_FILE_MACHINE_I386 0x14c // Intel 386.
|
||||
#define EFI_IMAGE_FILE_MACHINE_R3000 0x162 // MIPS* little-endian, 0540 big-endian
|
||||
#define EFI_IMAGE_FILE_MACHINE_R4000 0x166 // MIPS* little-endian
|
||||
#define EFI_IMAGE_FILE_MACHINE_ALPHA 0x184 // Alpha_AXP*
|
||||
#define EFI_IMAGE_FILE_MACHINE_POWERPC 0x1F0 // IBM* PowerPC Little-Endian
|
||||
#define EFI_IMAGE_FILE_MACHINE_TAHOE 0x7cc // Intel EM machine
|
||||
//
|
||||
// * Other names and brands may be claimed as the property of others.
|
||||
//
|
||||
//
|
||||
// Directory format.
|
||||
//
|
||||
typedef struct {
|
||||
UINT32 VirtualAddress;
|
||||
UINT32 Size;
|
||||
} EFI_IMAGE_DATA_DIRECTORY;
|
||||
|
||||
#define EFI_IMAGE_NUMBER_OF_DIRECTORY_ENTRIES 16
|
||||
|
||||
typedef struct {
|
||||
UINT16 Magic;
|
||||
UINT8 MajorLinkerVersion;
|
||||
UINT8 MinorLinkerVersion;
|
||||
UINT32 SizeOfCode;
|
||||
UINT32 SizeOfInitializedData;
|
||||
UINT32 SizeOfUninitializedData;
|
||||
UINT32 AddressOfEntryPoint;
|
||||
UINT32 BaseOfCode;
|
||||
UINT32 BaseOfData;
|
||||
UINT32 BaseOfBss;
|
||||
UINT32 GprMask;
|
||||
UINT32 CprMask[4];
|
||||
UINT32 GpValue;
|
||||
} EFI_IMAGE_ROM_OPTIONAL_HEADER;
|
||||
|
||||
#define EFI_IMAGE_ROM_OPTIONAL_HDR_MAGIC 0x107
|
||||
#define EFI_IMAGE_SIZEOF_ROM_OPTIONAL_HEADER sizeof (EFI_IMAGE_ROM_OPTIONAL_HEADER)
|
||||
|
||||
typedef struct {
|
||||
EFI_IMAGE_FILE_HEADER FileHeader;
|
||||
EFI_IMAGE_ROM_OPTIONAL_HEADER OptionalHeader;
|
||||
} EFI_IMAGE_ROM_HEADERS;
|
||||
|
||||
//
|
||||
// ATTENTION!!! EFI_IMAGE_OPTIONAL_HEADER32 and EFI_IMAGE_OPTIONAL_HEADER64
|
||||
// are for use ONLY by tools. All proper EFI code MUST use
|
||||
// EFI_IMAGE_OPTIONAL_HEADER ONLY!!!
|
||||
//
|
||||
#define EFI_IMAGE_NT_OPTIONAL_HDR32_MAGIC 0x10b
|
||||
|
||||
typedef struct {
|
||||
//
|
||||
// Standard fields.
|
||||
//
|
||||
UINT16 Magic;
|
||||
UINT8 MajorLinkerVersion;
|
||||
UINT8 MinorLinkerVersion;
|
||||
UINT32 SizeOfCode;
|
||||
UINT32 SizeOfInitializedData;
|
||||
UINT32 SizeOfUninitializedData;
|
||||
UINT32 AddressOfEntryPoint;
|
||||
UINT32 BaseOfCode;
|
||||
UINT32 BaseOfData;
|
||||
//
|
||||
// NT additional fields.
|
||||
//
|
||||
UINT32 ImageBase;
|
||||
UINT32 SectionAlignment;
|
||||
UINT32 FileAlignment;
|
||||
UINT16 MajorOperatingSystemVersion;
|
||||
UINT16 MinorOperatingSystemVersion;
|
||||
UINT16 MajorImageVersion;
|
||||
UINT16 MinorImageVersion;
|
||||
UINT16 MajorSubsystemVersion;
|
||||
UINT16 MinorSubsystemVersion;
|
||||
UINT32 Win32VersionValue;
|
||||
UINT32 SizeOfImage;
|
||||
UINT32 SizeOfHeaders;
|
||||
UINT32 CheckSum;
|
||||
UINT16 Subsystem;
|
||||
UINT16 DllCharacteristics;
|
||||
UINT32 SizeOfStackReserve;
|
||||
UINT32 SizeOfStackCommit;
|
||||
UINT32 SizeOfHeapReserve;
|
||||
UINT32 SizeOfHeapCommit;
|
||||
UINT32 LoaderFlags;
|
||||
UINT32 NumberOfRvaAndSizes;
|
||||
EFI_IMAGE_DATA_DIRECTORY DataDirectory[EFI_IMAGE_NUMBER_OF_DIRECTORY_ENTRIES];
|
||||
} EFI_IMAGE_OPTIONAL_HEADER32;
|
||||
|
||||
//
|
||||
// ATTENTION!!! EFI_IMAGE_OPTIONAL_HEADER32 and EFI_IMAGE_OPTIONAL_HEADER64
|
||||
// are for use ONLY by tools. All proper EFI code MUST use
|
||||
// EFI_IMAGE_OPTIONAL_HEADER ONLY!!!
|
||||
//
|
||||
#define EFI_IMAGE_NT_OPTIONAL_HDR64_MAGIC 0x20b
|
||||
|
||||
typedef struct {
|
||||
//
|
||||
// Standard fields.
|
||||
//
|
||||
UINT16 Magic;
|
||||
UINT8 MajorLinkerVersion;
|
||||
UINT8 MinorLinkerVersion;
|
||||
UINT32 SizeOfCode;
|
||||
UINT32 SizeOfInitializedData;
|
||||
UINT32 SizeOfUninitializedData;
|
||||
UINT32 AddressOfEntryPoint;
|
||||
UINT32 BaseOfCode;
|
||||
//
|
||||
// NT additional fields.
|
||||
//
|
||||
UINT64 ImageBase;
|
||||
UINT32 SectionAlignment;
|
||||
UINT32 FileAlignment;
|
||||
UINT16 MajorOperatingSystemVersion;
|
||||
UINT16 MinorOperatingSystemVersion;
|
||||
UINT16 MajorImageVersion;
|
||||
UINT16 MinorImageVersion;
|
||||
UINT16 MajorSubsystemVersion;
|
||||
UINT16 MinorSubsystemVersion;
|
||||
UINT32 Win32VersionValue;
|
||||
UINT32 SizeOfImage;
|
||||
UINT32 SizeOfHeaders;
|
||||
UINT32 CheckSum;
|
||||
UINT16 Subsystem;
|
||||
UINT16 DllCharacteristics;
|
||||
UINT64 SizeOfStackReserve;
|
||||
UINT64 SizeOfStackCommit;
|
||||
UINT64 SizeOfHeapReserve;
|
||||
UINT64 SizeOfHeapCommit;
|
||||
UINT32 LoaderFlags;
|
||||
UINT32 NumberOfRvaAndSizes;
|
||||
EFI_IMAGE_DATA_DIRECTORY DataDirectory[EFI_IMAGE_NUMBER_OF_DIRECTORY_ENTRIES];
|
||||
} EFI_IMAGE_OPTIONAL_HEADER64;
|
||||
|
||||
//
|
||||
// ATTENTION!!! EFI_IMAGE_NT_HEADERS32 and EFI_IMAGE_HEADERS64 are for use ONLY
|
||||
// by tools. All proper EFI code MUST use EFI_IMAGE_NT_HEADERS ONLY!!!
|
||||
//
|
||||
typedef struct {
|
||||
UINT32 Signature;
|
||||
EFI_IMAGE_FILE_HEADER FileHeader;
|
||||
EFI_IMAGE_OPTIONAL_HEADER32 OptionalHeader;
|
||||
} EFI_IMAGE_NT_HEADERS32;
|
||||
|
||||
#define EFI_IMAGE_SIZEOF_NT_OPTIONAL32_HEADER sizeof (EFI_IMAGE_NT_HEADERS32)
|
||||
|
||||
typedef struct {
|
||||
UINT32 Signature;
|
||||
EFI_IMAGE_FILE_HEADER FileHeader;
|
||||
EFI_IMAGE_OPTIONAL_HEADER64 OptionalHeader;
|
||||
} EFI_IMAGE_NT_HEADERS64;
|
||||
|
||||
#define EFI_IMAGE_SIZEOF_NT_OPTIONAL64_HEADER sizeof (EFI_IMAGE_NT_HEADERS64)
|
||||
|
||||
//
|
||||
// Include processor specific definition of EFI_IMAGE_OPTIONAL_HEADER so the
|
||||
// type name EFI_IMAGE_OPTIONAL_HEADER is appropriate to the build. Same for
|
||||
// EFI_IMAGE_NT_HEADERS. These definitions MUST be used by ALL EFI code.
|
||||
//
|
||||
#include "EfiPeOptionalHeader.h"
|
||||
|
||||
#define EFI_IMAGE_FIRST_SECTION(ntheader) \
|
||||
( \
|
||||
(EFI_IMAGE_SECTION_HEADER *) \
|
||||
( \
|
||||
(UINT32) ntheader + \
|
||||
FIELD_OFFSET (EFI_IMAGE_NT_HEADERS, OptionalHeader) + \
|
||||
((EFI_IMAGE_NT_HEADERS *) (ntheader))->FileHeader.SizeOfOptionalHeader \
|
||||
) \
|
||||
)
|
||||
|
||||
//
|
||||
// Subsystem Values
|
||||
//
|
||||
#define EFI_IMAGE_SUBSYSTEM_UNKNOWN 0
|
||||
#define EFI_IMAGE_SUBSYSTEM_NATIVE 1
|
||||
#define EFI_IMAGE_SUBSYSTEM_WINDOWS_GUI 2
|
||||
#define EFI_IMAGE_SUBSYSTEM_WINDOWS_CUI 3.
|
||||
#define EFI_IMAGE_SUBSYSTEM_OS2_CUI 5
|
||||
#define EFI_IMAGE_SUBSYSTEM_POSIX_CUI 7
|
||||
|
||||
//
|
||||
// Directory Entries
|
||||
//
|
||||
#define EFI_IMAGE_DIRECTORY_ENTRY_EXPORT 0
|
||||
#define EFI_IMAGE_DIRECTORY_ENTRY_IMPORT 1
|
||||
#define EFI_IMAGE_DIRECTORY_ENTRY_RESOURCE 2
|
||||
#define EFI_IMAGE_DIRECTORY_ENTRY_EXCEPTION 3
|
||||
#define EFI_IMAGE_DIRECTORY_ENTRY_SECURITY 4
|
||||
#define EFI_IMAGE_DIRECTORY_ENTRY_BASERELOC 5
|
||||
#define EFI_IMAGE_DIRECTORY_ENTRY_DEBUG 6
|
||||
#define EFI_IMAGE_DIRECTORY_ENTRY_COPYRIGHT 7
|
||||
#define EFI_IMAGE_DIRECTORY_ENTRY_GLOBALPTR 8
|
||||
#define EFI_IMAGE_DIRECTORY_ENTRY_TLS 9
|
||||
#define EFI_IMAGE_DIRECTORY_ENTRY_LOAD_CONFIG 10
|
||||
|
||||
//
|
||||
// Section header format.
|
||||
//
|
||||
#define EFI_IMAGE_SIZEOF_SHORT_NAME 8
|
||||
|
||||
typedef struct {
|
||||
UINT8 Name[EFI_IMAGE_SIZEOF_SHORT_NAME];
|
||||
union {
|
||||
UINT32 PhysicalAddress;
|
||||
UINT32 VirtualSize;
|
||||
} Misc;
|
||||
UINT32 VirtualAddress;
|
||||
UINT32 SizeOfRawData;
|
||||
UINT32 PointerToRawData;
|
||||
UINT32 PointerToRelocations;
|
||||
UINT32 PointerToLinenumbers;
|
||||
UINT16 NumberOfRelocations;
|
||||
UINT16 NumberOfLinenumbers;
|
||||
UINT32 Characteristics;
|
||||
} EFI_IMAGE_SECTION_HEADER;
|
||||
|
||||
#define EFI_IMAGE_SIZEOF_SECTION_HEADER 40
|
||||
|
||||
#define EFI_IMAGE_SCN_TYPE_NO_PAD 0x00000008 // Reserved.
|
||||
#define EFI_IMAGE_SCN_CNT_CODE 0x00000020
|
||||
#define EFI_IMAGE_SCN_CNT_INITIALIZED_DATA 0x00000040
|
||||
#define EFI_IMAGE_SCN_CNT_UNINITIALIZED_DATA 0x00000080
|
||||
|
||||
#define EFI_IMAGE_SCN_LNK_OTHER 0x00000100 // Reserved.
|
||||
#define EFI_IMAGE_SCN_LNK_INFO 0x00000200 // Section contains comments or some other type of information.
|
||||
#define EFI_IMAGE_SCN_LNK_REMOVE 0x00000800 // Section contents will not become part of image.
|
||||
#define EFI_IMAGE_SCN_LNK_COMDAT 0x00001000
|
||||
|
||||
#define EFI_IMAGE_SCN_ALIGN_1BYTES 0x00100000
|
||||
#define EFI_IMAGE_SCN_ALIGN_2BYTES 0x00200000
|
||||
#define EFI_IMAGE_SCN_ALIGN_4BYTES 0x00300000
|
||||
#define EFI_IMAGE_SCN_ALIGN_8BYTES 0x00400000
|
||||
#define EFI_IMAGE_SCN_ALIGN_16BYTES 0x00500000
|
||||
#define EFI_IMAGE_SCN_ALIGN_32BYTES 0x00600000
|
||||
#define EFI_IMAGE_SCN_ALIGN_64BYTES 0x00700000
|
||||
|
||||
#define EFI_IMAGE_SCN_MEM_DISCARDABLE 0x02000000
|
||||
#define EFI_IMAGE_SCN_MEM_NOT_CACHED 0x04000000
|
||||
#define EFI_IMAGE_SCN_MEM_NOT_PAGED 0x08000000
|
||||
#define EFI_IMAGE_SCN_MEM_SHARED 0x10000000
|
||||
#define EFI_IMAGE_SCN_MEM_EXECUTE 0x20000000
|
||||
#define EFI_IMAGE_SCN_MEM_READ 0x40000000
|
||||
#define EFI_IMAGE_SCN_MEM_WRITE 0x80000000
|
||||
|
||||
//
|
||||
// Symbol format.
|
||||
//
|
||||
#define EFI_IMAGE_SIZEOF_SYMBOL 18
|
||||
|
||||
//
|
||||
// Section values.
|
||||
//
|
||||
// Symbols have a section number of the section in which they are
|
||||
// defined. Otherwise, section numbers have the following meanings:
|
||||
//
|
||||
#define EFI_IMAGE_SYM_UNDEFINED (UINT16) 0 // Symbol is undefined or is common.
|
||||
#define EFI_IMAGE_SYM_ABSOLUTE (UINT16) -1 // Symbol is an absolute value.
|
||||
#define EFI_IMAGE_SYM_DEBUG (UINT16) -2 // Symbol is a special debug item.
|
||||
//
|
||||
// Type (fundamental) values.
|
||||
//
|
||||
#define EFI_IMAGE_SYM_TYPE_NULL 0 // no type.
|
||||
#define EFI_IMAGE_SYM_TYPE_VOID 1 //
|
||||
#define EFI_IMAGE_SYM_TYPE_CHAR 2 // type character.
|
||||
#define EFI_IMAGE_SYM_TYPE_SHORT 3 // type short integer.
|
||||
#define EFI_IMAGE_SYM_TYPE_INT 4
|
||||
#define EFI_IMAGE_SYM_TYPE_LONG 5
|
||||
#define EFI_IMAGE_SYM_TYPE_FLOAT 6
|
||||
#define EFI_IMAGE_SYM_TYPE_DOUBLE 7
|
||||
#define EFI_IMAGE_SYM_TYPE_STRUCT 8
|
||||
#define EFI_IMAGE_SYM_TYPE_UNION 9
|
||||
#define EFI_IMAGE_SYM_TYPE_ENUM 10 // enumeration.
|
||||
#define EFI_IMAGE_SYM_TYPE_MOE 11 // member of enumeration.
|
||||
#define EFI_IMAGE_SYM_TYPE_BYTE 12
|
||||
#define EFI_IMAGE_SYM_TYPE_WORD 13
|
||||
#define EFI_IMAGE_SYM_TYPE_UINT 14
|
||||
#define EFI_IMAGE_SYM_TYPE_DWORD 15
|
||||
|
||||
//
|
||||
// Type (derived) values.
|
||||
//
|
||||
#define EFI_IMAGE_SYM_DTYPE_NULL 0 // no derived type.
|
||||
#define EFI_IMAGE_SYM_DTYPE_POINTER 1
|
||||
#define EFI_IMAGE_SYM_DTYPE_FUNCTION 2
|
||||
#define EFI_IMAGE_SYM_DTYPE_ARRAY 3
|
||||
|
||||
//
|
||||
// Storage classes.
|
||||
//
|
||||
#define EFI_IMAGE_SYM_CLASS_END_OF_FUNCTION (UINT8) -1
|
||||
#define EFI_IMAGE_SYM_CLASS_NULL 0
|
||||
#define EFI_IMAGE_SYM_CLASS_AUTOMATIC 1
|
||||
#define EFI_IMAGE_SYM_CLASS_EXTERNAL 2
|
||||
#define EFI_IMAGE_SYM_CLASS_STATIC 3
|
||||
#define EFI_IMAGE_SYM_CLASS_REGISTER 4
|
||||
#define EFI_IMAGE_SYM_CLASS_EXTERNAL_DEF 5
|
||||
#define EFI_IMAGE_SYM_CLASS_LABEL 6
|
||||
#define EFI_IMAGE_SYM_CLASS_UNDEFINED_LABEL 7
|
||||
#define EFI_IMAGE_SYM_CLASS_MEMBER_OF_STRUCT 8
|
||||
#define EFI_IMAGE_SYM_CLASS_ARGUMENT 9
|
||||
#define EFI_IMAGE_SYM_CLASS_STRUCT_TAG 10
|
||||
#define EFI_IMAGE_SYM_CLASS_MEMBER_OF_UNION 11
|
||||
#define EFI_IMAGE_SYM_CLASS_UNION_TAG 12
|
||||
#define EFI_IMAGE_SYM_CLASS_TYPE_DEFINITION 13
|
||||
#define EFI_IMAGE_SYM_CLASS_UNDEFINED_STATIC 14
|
||||
#define EFI_IMAGE_SYM_CLASS_ENUM_TAG 15
|
||||
#define EFI_IMAGE_SYM_CLASS_MEMBER_OF_ENUM 16
|
||||
#define EFI_IMAGE_SYM_CLASS_REGISTER_PARAM 17
|
||||
#define EFI_IMAGE_SYM_CLASS_BIT_FIELD 18
|
||||
#define EFI_IMAGE_SYM_CLASS_BLOCK 100
|
||||
#define EFI_IMAGE_SYM_CLASS_FUNCTION 101
|
||||
#define EFI_IMAGE_SYM_CLASS_END_OF_STRUCT 102
|
||||
#define EFI_IMAGE_SYM_CLASS_FILE 103
|
||||
#define EFI_IMAGE_SYM_CLASS_SECTION 104
|
||||
#define EFI_IMAGE_SYM_CLASS_WEAK_EXTERNAL 105
|
||||
|
||||
//
|
||||
// type packing constants
|
||||
//
|
||||
#define EFI_IMAGE_N_BTMASK 017
|
||||
#define EFI_IMAGE_N_TMASK 060
|
||||
#define EFI_IMAGE_N_TMASK1 0300
|
||||
#define EFI_IMAGE_N_TMASK2 0360
|
||||
#define EFI_IMAGE_N_BTSHFT 4
|
||||
#define EFI_IMAGE_N_TSHIFT 2
|
||||
|
||||
//
|
||||
// Communal selection types.
|
||||
//
|
||||
#define EFI_IMAGE_COMDAT_SELECT_NODUPLICATES 1
|
||||
#define EFI_IMAGE_COMDAT_SELECT_ANY 2
|
||||
#define EFI_IMAGE_COMDAT_SELECT_SAME_SIZE 3
|
||||
#define EFI_IMAGE_COMDAT_SELECT_EXACT_MATCH 4
|
||||
#define EFI_IMAGE_COMDAT_SELECT_ASSOCIATIVE 5
|
||||
|
||||
#define EFI_IMAGE_WEAK_EXTERN_SEARCH_NOLIBRARY 1
|
||||
#define EFI_IMAGE_WEAK_EXTERN_SEARCH_LIBRARY 2
|
||||
#define EFI_IMAGE_WEAK_EXTERN_SEARCH_ALIAS 3
|
||||
|
||||
//
|
||||
// Relocation format.
|
||||
//
|
||||
typedef struct {
|
||||
UINT32 VirtualAddress;
|
||||
UINT32 SymbolTableIndex;
|
||||
UINT16 Type;
|
||||
} EFI_IMAGE_RELOCATION;
|
||||
|
||||
#define EFI_IMAGE_SIZEOF_RELOCATION 10
|
||||
|
||||
//
|
||||
// I386 relocation types.
|
||||
//
|
||||
#define EFI_IMAGE_REL_I386_ABSOLUTE 0 // Reference is absolute, no relocation is necessary
|
||||
#define EFI_IMAGE_REL_I386_DIR16 01 // Direct 16-bit reference to the symbols virtual address
|
||||
#define EFI_IMAGE_REL_I386_REL16 02 // PC-relative 16-bit reference to the symbols virtual address
|
||||
#define EFI_IMAGE_REL_I386_DIR32 06 // Direct 32-bit reference to the symbols virtual address
|
||||
#define EFI_IMAGE_REL_I386_DIR32NB 07 // Direct 32-bit reference to the symbols virtual address, base not included
|
||||
#define EFI_IMAGE_REL_I386_SEG12 011 // Direct 16-bit reference to the segment-selector bits of a 32-bit virtual address
|
||||
#define EFI_IMAGE_REL_I386_SECTION 012
|
||||
#define EFI_IMAGE_REL_I386_SECREL 013
|
||||
#define EFI_IMAGE_REL_I386_REL32 024 // PC-relative 32-bit reference to the symbols virtual address
|
||||
//
|
||||
// Based relocation format.
|
||||
//
|
||||
typedef struct {
|
||||
UINT32 VirtualAddress;
|
||||
UINT32 SizeOfBlock;
|
||||
} EFI_IMAGE_BASE_RELOCATION;
|
||||
|
||||
#define EFI_IMAGE_SIZEOF_BASE_RELOCATION 8
|
||||
|
||||
//
|
||||
// Based relocation types.
|
||||
//
|
||||
#define EFI_IMAGE_REL_BASED_ABSOLUTE 0
|
||||
#define EFI_IMAGE_REL_BASED_HIGH 1
|
||||
#define EFI_IMAGE_REL_BASED_LOW 2
|
||||
#define EFI_IMAGE_REL_BASED_HIGHLOW 3
|
||||
#define EFI_IMAGE_REL_BASED_HIGHADJ 4
|
||||
#define EFI_IMAGE_REL_BASED_MIPS_JMPADDR 5
|
||||
#define EFI_IMAGE_REL_BASED_IA64_IMM64 9
|
||||
#define EFI_IMAGE_REL_BASED_DIR64 10
|
||||
|
||||
//
|
||||
// Line number format.
|
||||
//
|
||||
typedef struct {
|
||||
union {
|
||||
UINT32 SymbolTableIndex; // Symbol table index of function name if Linenumber is 0.
|
||||
UINT32 VirtualAddress; // Virtual address of line number.
|
||||
} Type;
|
||||
UINT16 Linenumber; // Line number.
|
||||
} EFI_IMAGE_LINENUMBER;
|
||||
|
||||
#define EFI_IMAGE_SIZEOF_LINENUMBER 6
|
||||
|
||||
//
|
||||
// Archive format.
|
||||
//
|
||||
#define EFI_IMAGE_ARCHIVE_START_SIZE 8
|
||||
#define EFI_IMAGE_ARCHIVE_START "!<arch>\n"
|
||||
#define EFI_IMAGE_ARCHIVE_END "`\n"
|
||||
#define EFI_IMAGE_ARCHIVE_PAD "\n"
|
||||
#define EFI_IMAGE_ARCHIVE_LINKER_MEMBER "/ "
|
||||
#define EFI_IMAGE_ARCHIVE_LONGNAMES_MEMBER "// "
|
||||
|
||||
typedef struct {
|
||||
UINT8 Name[16]; // File member name - `/' terminated.
|
||||
UINT8 Date[12]; // File member date - decimal.
|
||||
UINT8 UserID[6]; // File member user id - decimal.
|
||||
UINT8 GroupID[6]; // File member group id - decimal.
|
||||
UINT8 Mode[8]; // File member mode - octal.
|
||||
UINT8 Size[10]; // File member size - decimal.
|
||||
UINT8 EndHeader[2]; // String to end header.
|
||||
} EFI_IMAGE_ARCHIVE_MEMBER_HEADER;
|
||||
|
||||
#define EFI_IMAGE_SIZEOF_ARCHIVE_MEMBER_HDR 60
|
||||
|
||||
//
|
||||
// DLL support.
|
||||
//
|
||||
//
|
||||
// Export Format
|
||||
//
|
||||
typedef struct {
|
||||
UINT32 Characteristics;
|
||||
UINT32 TimeDateStamp;
|
||||
UINT16 MajorVersion;
|
||||
UINT16 MinorVersion;
|
||||
UINT32 Name;
|
||||
UINT32 Base;
|
||||
UINT32 NumberOfFunctions;
|
||||
UINT32 NumberOfNames;
|
||||
UINT32 AddressOfFunctions;
|
||||
UINT32 AddressOfNames;
|
||||
UINT32 AddressOfNameOrdinals;
|
||||
} EFI_IMAGE_EXPORT_DIRECTORY;
|
||||
|
||||
//
|
||||
// Import Format
|
||||
//
|
||||
typedef struct {
|
||||
UINT16 Hint;
|
||||
UINT8 Name[1];
|
||||
} EFI_IMAGE_IMPORT_BY_NAME;
|
||||
|
||||
typedef struct {
|
||||
union {
|
||||
UINT32 Function;
|
||||
UINT32 Ordinal;
|
||||
EFI_IMAGE_IMPORT_BY_NAME *AddressOfData;
|
||||
} u1;
|
||||
} EFI_IMAGE_THUNK_DATA;
|
||||
|
||||
#define EFI_IMAGE_ORDINAL_FLAG 0x80000000
|
||||
#define EFI_IMAGE_SNAP_BY_ORDINAL(Ordinal) ((Ordinal & EFI_IMAGE_ORDINAL_FLAG) != 0)
|
||||
#define EFI_IMAGE_ORDINAL(Ordinal) (Ordinal & 0xffff)
|
||||
|
||||
typedef struct {
|
||||
UINT32 Characteristics;
|
||||
UINT32 TimeDateStamp;
|
||||
UINT32 ForwarderChain;
|
||||
UINT32 Name;
|
||||
EFI_IMAGE_THUNK_DATA *FirstThunk;
|
||||
} EFI_IMAGE_IMPORT_DESCRIPTOR;
|
||||
|
||||
//
|
||||
// Debug Format
|
||||
//
|
||||
#define EFI_IMAGE_DEBUG_TYPE_CODEVIEW 2
|
||||
|
||||
typedef struct {
|
||||
UINT32 Characteristics;
|
||||
UINT32 TimeDateStamp;
|
||||
UINT16 MajorVersion;
|
||||
UINT16 MinorVersion;
|
||||
UINT32 Type;
|
||||
UINT32 SizeOfData;
|
||||
UINT32 RVA;
|
||||
UINT32 FileOffset;
|
||||
} EFI_IMAGE_DEBUG_DIRECTORY_ENTRY;
|
||||
|
||||
#define CODEVIEW_SIGNATURE_NB10 0x3031424E // "NB10"
|
||||
typedef struct {
|
||||
UINT32 Signature; // "NB10"
|
||||
UINT32 Unknown;
|
||||
UINT32 Unknown2;
|
||||
UINT32 Unknown3;
|
||||
//
|
||||
// Filename of .PDB goes here
|
||||
//
|
||||
} EFI_IMAGE_DEBUG_CODEVIEW_NB10_ENTRY;
|
||||
|
||||
#define CODEVIEW_SIGNATURE_RSDS 0x53445352 // "RSDS"
|
||||
typedef struct {
|
||||
UINT32 Signature; // "RSDS"
|
||||
UINT32 Unknown;
|
||||
UINT32 Unknown2;
|
||||
UINT32 Unknown3;
|
||||
UINT32 Unknown4;
|
||||
UINT32 Unknown5;
|
||||
//
|
||||
// Filename of .PDB goes here
|
||||
//
|
||||
} EFI_IMAGE_DEBUG_CODEVIEW_RSDS_ENTRY;
|
||||
|
||||
//
|
||||
// Header format for TE images
|
||||
//
|
||||
typedef struct {
|
||||
UINT16 Signature; // signature for TE format = "VZ"
|
||||
UINT16 Machine; // from the original file header
|
||||
UINT8 NumberOfSections; // from the original file header
|
||||
UINT8 Subsystem; // from original optional header
|
||||
UINT16 StrippedSize; // how many bytes we removed from the header
|
||||
UINT32 AddressOfEntryPoint; // offset to entry point -- from original optional header
|
||||
UINT32 BaseOfCode; // from original image -- required for ITP debug
|
||||
UINT64 ImageBase; // from original file header
|
||||
EFI_IMAGE_DATA_DIRECTORY DataDirectory[2]; // only base relocation and debug directory
|
||||
} EFI_TE_IMAGE_HEADER;
|
||||
|
||||
#define EFI_TE_IMAGE_HEADER_SIGNATURE 0x5A56 // "VZ"
|
||||
//
|
||||
// Data directory indexes in our TE image header
|
||||
//
|
||||
#define EFI_TE_IMAGE_DIRECTORY_ENTRY_BASERELOC 0
|
||||
#define EFI_TE_IMAGE_DIRECTORY_ENTRY_DEBUG 1
|
||||
|
||||
//
|
||||
// Union of PE32, PE32+, and TE headers
|
||||
//
|
||||
typedef union {
|
||||
EFI_IMAGE_NT_HEADERS32 Pe32;
|
||||
EFI_IMAGE_NT_HEADERS64 Pe32Plus;
|
||||
EFI_TE_IMAGE_HEADER Te;
|
||||
} EFI_IMAGE_OPTIONAL_HEADER_UNION;
|
||||
|
||||
typedef union {
|
||||
EFI_IMAGE_NT_HEADERS32 *Pe32;
|
||||
EFI_IMAGE_NT_HEADERS64 *Pe32Plus;
|
||||
EFI_TE_IMAGE_HEADER *Te;
|
||||
EFI_IMAGE_OPTIONAL_HEADER_UNION *Union;
|
||||
} EFI_IMAGE_OPTIONAL_HEADER_PTR_UNION;
|
||||
|
||||
#endif
|
292
EdkCompatibilityPkg/Foundation/Efi/Include/EfiTypes.h
Normal file
292
EdkCompatibilityPkg/Foundation/Efi/Include/EfiTypes.h
Normal file
@@ -0,0 +1,292 @@
|
||||
/*++
|
||||
|
||||
Copyright (c) 2004, 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
|
||||
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:
|
||||
|
||||
EfiTypes.h
|
||||
|
||||
Abstract:
|
||||
|
||||
EFI defined types. Use these types when ever possible!
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef _EFI_TYPES_H_
|
||||
#define _EFI_TYPES_H_
|
||||
|
||||
//
|
||||
// EFI Data Types based on ANSI C integer types in EfiBind.h
|
||||
//
|
||||
typedef uint8_t BOOLEAN;
|
||||
typedef intn_t INTN;
|
||||
typedef uintn_t UINTN;
|
||||
typedef int8_t INT8;
|
||||
typedef uint8_t UINT8;
|
||||
typedef int16_t INT16;
|
||||
typedef uint16_t UINT16;
|
||||
typedef int32_t INT32;
|
||||
typedef uint32_t UINT32;
|
||||
typedef int64_t INT64;
|
||||
typedef uint64_t UINT64;
|
||||
typedef uint8_t CHAR8;
|
||||
typedef uint16_t CHAR16;
|
||||
typedef UINT64 EFI_LBA;
|
||||
|
||||
//
|
||||
// Modifiers for EFI Data Types used to self document code.
|
||||
// Please see EFI coding convention for proper usage.
|
||||
//
|
||||
#ifndef IN
|
||||
//
|
||||
// Some other envirnments use this construct, so #ifndef to prevent
|
||||
// mulitple definition.
|
||||
//
|
||||
#define IN
|
||||
#define OUT
|
||||
#define OPTIONAL
|
||||
#endif
|
||||
#define UNALIGNED
|
||||
|
||||
//
|
||||
// Modifiers for EFI Runtime and Boot Services
|
||||
//
|
||||
#define EFI_RUNTIMESERVICE
|
||||
#define EFI_BOOTSERVICE
|
||||
|
||||
//
|
||||
// Boot Service add in EFI 1.1
|
||||
//
|
||||
#define EFI_BOOTSERVICE11
|
||||
|
||||
//
|
||||
// Modifiers to absract standard types to aid in debug of problems
|
||||
//
|
||||
#define CONST const
|
||||
#define STATIC static
|
||||
#define VOID void
|
||||
#define VOLATILE volatile
|
||||
|
||||
//
|
||||
// Modifier to ensure that all protocol member functions and EFI intrinsics
|
||||
// use the correct C calling convention. All protocol member functions and
|
||||
// EFI intrinsics are required to modify thier member functions with EFIAPI.
|
||||
//
|
||||
#define EFIAPI _EFIAPI
|
||||
|
||||
//
|
||||
// EFI Constants. They may exist in other build structures, so #ifndef them.
|
||||
//
|
||||
#ifndef TRUE
|
||||
#define TRUE ((BOOLEAN) 1 == 1)
|
||||
#endif
|
||||
|
||||
#ifndef FALSE
|
||||
#define FALSE ((BOOLEAN) 0 == 1)
|
||||
#endif
|
||||
|
||||
#ifndef NULL
|
||||
#define NULL ((VOID *) 0)
|
||||
#endif
|
||||
//
|
||||
// EFI Data Types derived from other EFI data types.
|
||||
//
|
||||
typedef UINTN EFI_STATUS;
|
||||
|
||||
typedef VOID *EFI_HANDLE;
|
||||
#define NULL_HANDLE ((VOID *) 0)
|
||||
|
||||
typedef VOID *EFI_EVENT;
|
||||
typedef UINTN EFI_TPL;
|
||||
|
||||
typedef struct {
|
||||
UINT32 Data1;
|
||||
UINT16 Data2;
|
||||
UINT16 Data3;
|
||||
UINT8 Data4[8];
|
||||
} EFI_GUID;
|
||||
|
||||
typedef union {
|
||||
EFI_GUID Guid;
|
||||
UINT8 Raw[16];
|
||||
} EFI_GUID_UNION;
|
||||
|
||||
//
|
||||
// EFI Time Abstraction:
|
||||
// Year: 2000 - 20XX
|
||||
// Month: 1 - 12
|
||||
// Day: 1 - 31
|
||||
// Hour: 0 - 23
|
||||
// Minute: 0 - 59
|
||||
// Second: 0 - 59
|
||||
// Nanosecond: 0 - 999,999,999
|
||||
// TimeZone: -1440 to 1440 or 2047
|
||||
//
|
||||
typedef struct {
|
||||
UINT16 Year;
|
||||
UINT8 Month;
|
||||
UINT8 Day;
|
||||
UINT8 Hour;
|
||||
UINT8 Minute;
|
||||
UINT8 Second;
|
||||
UINT8 Pad1;
|
||||
UINT32 Nanosecond;
|
||||
INT16 TimeZone;
|
||||
UINT8 Daylight;
|
||||
UINT8 Pad2;
|
||||
} EFI_TIME;
|
||||
|
||||
//
|
||||
// Bit definitions for EFI_TIME.Daylight
|
||||
//
|
||||
#define EFI_TIME_ADJUST_DAYLIGHT 0x01
|
||||
#define EFI_TIME_IN_DAYLIGHT 0x02
|
||||
|
||||
//
|
||||
// Value definition for EFI_TIME.TimeZone
|
||||
//
|
||||
#define EFI_UNSPECIFIED_TIMEZONE 0x07FF
|
||||
|
||||
//
|
||||
// Networking
|
||||
//
|
||||
typedef struct {
|
||||
UINT8 Addr[4];
|
||||
} EFI_IPv4_ADDRESS;
|
||||
|
||||
typedef struct {
|
||||
UINT8 Addr[16];
|
||||
} EFI_IPv6_ADDRESS;
|
||||
|
||||
typedef struct {
|
||||
UINT8 Addr[32];
|
||||
} EFI_MAC_ADDRESS;
|
||||
|
||||
typedef union {
|
||||
UINT32 Addr[4];
|
||||
EFI_IPv4_ADDRESS v4;
|
||||
EFI_IPv6_ADDRESS v6;
|
||||
} EFI_IP_ADDRESS;
|
||||
|
||||
typedef enum {
|
||||
EfiReservedMemoryType,
|
||||
EfiLoaderCode,
|
||||
EfiLoaderData,
|
||||
EfiBootServicesCode,
|
||||
EfiBootServicesData,
|
||||
EfiRuntimeServicesCode,
|
||||
EfiRuntimeServicesData,
|
||||
EfiConventionalMemory,
|
||||
EfiUnusableMemory,
|
||||
EfiACPIReclaimMemory,
|
||||
EfiACPIMemoryNVS,
|
||||
EfiMemoryMappedIO,
|
||||
EfiMemoryMappedIOPortSpace,
|
||||
EfiPalCode,
|
||||
EfiMaxMemoryType
|
||||
} EFI_MEMORY_TYPE;
|
||||
|
||||
typedef enum {
|
||||
AllocateAnyPages,
|
||||
AllocateMaxAddress,
|
||||
AllocateAddress,
|
||||
MaxAllocateType
|
||||
} EFI_ALLOCATE_TYPE;
|
||||
|
||||
typedef struct {
|
||||
UINT64 Signature;
|
||||
UINT32 Revision;
|
||||
UINT32 HeaderSize;
|
||||
UINT32 CRC32;
|
||||
UINT32 Reserved;
|
||||
} EFI_TABLE_HEADER;
|
||||
|
||||
//
|
||||
// possible caching types for the memory range
|
||||
//
|
||||
#define EFI_MEMORY_UC 0x0000000000000001
|
||||
#define EFI_MEMORY_WC 0x0000000000000002
|
||||
#define EFI_MEMORY_WT 0x0000000000000004
|
||||
#define EFI_MEMORY_WB 0x0000000000000008
|
||||
#define EFI_MEMORY_UCE 0x0000000000000010
|
||||
|
||||
//
|
||||
// physical memory protection on range
|
||||
//
|
||||
#define EFI_MEMORY_WP 0x0000000000001000
|
||||
#define EFI_MEMORY_RP 0x0000000000002000
|
||||
#define EFI_MEMORY_XP 0x0000000000004000
|
||||
|
||||
//
|
||||
// range requires a runtime mapping
|
||||
//
|
||||
#define EFI_MEMORY_RUNTIME 0x8000000000000000
|
||||
|
||||
typedef UINT64 EFI_PHYSICAL_ADDRESS;
|
||||
typedef UINT64 EFI_VIRTUAL_ADDRESS;
|
||||
|
||||
#define EFI_MEMORY_DESCRIPTOR_VERSION 1
|
||||
typedef struct {
|
||||
UINT32 Type;
|
||||
UINT32 Pad;
|
||||
EFI_PHYSICAL_ADDRESS PhysicalStart;
|
||||
EFI_VIRTUAL_ADDRESS VirtualStart;
|
||||
UINT64 NumberOfPages;
|
||||
UINT64 Attribute;
|
||||
} EFI_MEMORY_DESCRIPTOR;
|
||||
|
||||
//
|
||||
// The EFI memory allocation functions work in units of EFI_PAGEs that are
|
||||
// 4K. This should in no way be confused with the page size of the processor.
|
||||
// An EFI_PAGE is just the quanta of memory in EFI.
|
||||
//
|
||||
#define EFI_PAGE_SIZE 4096
|
||||
#define EFI_PAGE_MASK 0xFFF
|
||||
#define EFI_PAGE_SHIFT 12
|
||||
|
||||
#define EFI_SIZE_TO_PAGES(a) (((a) >> EFI_PAGE_SHIFT) + (((a) & EFI_PAGE_MASK) ? 1 : 0))
|
||||
|
||||
#define EFI_PAGES_TO_SIZE(a) ( (a) << EFI_PAGE_SHIFT)
|
||||
|
||||
//
|
||||
// ALIGN_POINTER - aligns a pointer to the lowest boundry
|
||||
//
|
||||
#define ALIGN_POINTER(p, s) ((VOID *) (p + ((s - ((UINTN) p)) & (s - 1))))
|
||||
|
||||
//
|
||||
// ALIGN_VARIABLE - aligns a variable up to the next natural boundry for int size of a processor
|
||||
//
|
||||
#define ALIGN_VARIABLE(Value, Adjustment) \
|
||||
(UINTN) Adjustment = 0; \
|
||||
if ((UINTN) Value % sizeof (UINTN)) { \
|
||||
(UINTN) Adjustment = sizeof (UINTN) - ((UINTN) Value % sizeof (UINTN)); \
|
||||
} \
|
||||
Value = (UINTN) Value + (UINTN) Adjustment
|
||||
|
||||
//
|
||||
// EFI_FIELD_OFFSET - returns the byte offset to a field within a structure
|
||||
//
|
||||
#define EFI_FIELD_OFFSET(TYPE,Field) ((UINTN)(&(((TYPE *) 0)->Field)))
|
||||
|
||||
//
|
||||
// CONTAINING_RECORD - returns a pointer to the structure
|
||||
// from one of it's elements.
|
||||
//
|
||||
#define _CR(Record, TYPE, Field) ((TYPE *) ((CHAR8 *) (Record) - (CHAR8 *) &(((TYPE *) 0)->Field)))
|
||||
|
||||
//
|
||||
// Define macros to build data structure signatures from characters.
|
||||
//
|
||||
#define EFI_SIGNATURE_16(A, B) ((A) | (B << 8))
|
||||
#define EFI_SIGNATURE_32(A, B, C, D) (EFI_SIGNATURE_16 (A, B) | (EFI_SIGNATURE_16 (C, D) << 16))
|
||||
#define EFI_SIGNATURE_64(A, B, C, D, E, F, G, H) \
|
||||
(EFI_SIGNATURE_32 (A, B, C, D) | ((UINT64) (EFI_SIGNATURE_32 (E, F, G, H)) << 32))
|
||||
|
||||
#endif
|
58
EdkCompatibilityPkg/Foundation/Efi/Include/Pxe.h
Normal file
58
EdkCompatibilityPkg/Foundation/Efi/Include/Pxe.h
Normal file
@@ -0,0 +1,58 @@
|
||||
/*++
|
||||
|
||||
Copyright (c) 2004, 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
|
||||
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:
|
||||
|
||||
pxe.h
|
||||
|
||||
Abstract:
|
||||
|
||||
PXE 2.1 Common Structures
|
||||
|
||||
Revision History
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef _PXE_H
|
||||
#define _PXE_H
|
||||
|
||||
//
|
||||
// Packet definitions
|
||||
//
|
||||
typedef struct {
|
||||
UINT8 BootpOpcode;
|
||||
UINT8 BootpHwType;
|
||||
UINT8 BootpHwAddrLen;
|
||||
UINT8 BootpGateHops;
|
||||
UINT32 BootpIdent;
|
||||
UINT16 BootpSeconds;
|
||||
UINT16 BootpFlags;
|
||||
UINT8 BootpCiAddr[4];
|
||||
UINT8 BootpYiAddr[4];
|
||||
UINT8 BootpSiAddr[4];
|
||||
UINT8 BootpGiAddr[4];
|
||||
UINT8 BootpHwAddr[16];
|
||||
UINT8 BootpSrvName[64];
|
||||
UINT8 BootpBootFile[128];
|
||||
UINT32 DhcpMagik;
|
||||
UINT8 DhcpOptions[56];
|
||||
} EFI_PXE_BASE_CODE_DHCPV4_PACKET;
|
||||
|
||||
typedef union {
|
||||
UINT8 Raw[1472];
|
||||
EFI_PXE_BASE_CODE_DHCPV4_PACKET Dhcpv4;
|
||||
|
||||
//
|
||||
// EFI_PXE_BASE_CODE_DHCPV6_PACKET Dhcpv6;
|
||||
//
|
||||
} EFI_PXE_BASE_CODE_PACKET;
|
||||
|
||||
#endif
|
@@ -0,0 +1,29 @@
|
||||
/*++
|
||||
|
||||
Copyright (c) 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
|
||||
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:
|
||||
|
||||
AcpiTable.c
|
||||
|
||||
Abstract:
|
||||
|
||||
ACPI Table Protocol from the UEFI 2.1 specification.
|
||||
|
||||
This protocol may be used to install or remove an ACPI table from a platform.
|
||||
|
||||
--*/
|
||||
|
||||
#include "EfiSpec.h"
|
||||
#include EFI_PROTOCOL_DEFINITION (AcpiTable)
|
||||
|
||||
EFI_GUID gEfiAcpiTableProtocolGuid = EFI_ACPI_TABLE_PROTOCOL_GUID;
|
||||
|
||||
EFI_GUID_STRING(&gEfiAcpiTableProtocolGuid, "UEFI ACPI Table Protocol", "UEFI ACPI Table Protocol");
|
@@ -0,0 +1,112 @@
|
||||
/*++
|
||||
|
||||
Copyright (c) 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
|
||||
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:
|
||||
|
||||
AcpiTable.h
|
||||
|
||||
Abstract:
|
||||
|
||||
ACPI Table Protocol from the UEFI 2.1 specification.
|
||||
|
||||
This protocol may be used to install or remove an ACPI table from a platform.
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef __ACPI_TABLE_H__
|
||||
#define __ACPI_TABLE_H__
|
||||
|
||||
#include "Acpi.h"
|
||||
|
||||
//
|
||||
// Global ID for the Acpi Table Protocol
|
||||
//
|
||||
#define EFI_ACPI_TABLE_PROTOCOL_GUID \
|
||||
{ \
|
||||
0xffe06bdd, 0x6107, 0x46a6, 0x7b, 0xb2, 0x5a, 0x9c, 0x7e, 0xc5, 0x27, 0x5c \
|
||||
}
|
||||
|
||||
EFI_FORWARD_DECLARATION (EFI_ACPI_TABLE_PROTOCOL);
|
||||
|
||||
#define UEFI_ACPI_TABLE_SIGNATURE EFI_SIGNATURE_32 ('U', 'E', 'F', 'I')
|
||||
|
||||
#pragma pack(1)
|
||||
|
||||
typedef struct {
|
||||
EFI_ACPI_DESCRIPTION_HEADER Header;
|
||||
EFI_GUID Identifier;
|
||||
UINT16 DataOffset;
|
||||
} EFI_ACPI_TABLE;
|
||||
|
||||
#pragma pack()
|
||||
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_ACPI_TABLE_INSTALL_ACPI_TABLE) (
|
||||
IN EFI_ACPI_TABLE_PROTOCOL *This,
|
||||
IN VOID *AcpiTableBuffer,
|
||||
IN UINTN AcpiTableBufferSize,
|
||||
OUT UINTN *TableKey
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
Installs an ACPI table into the RSDT/XSDT.
|
||||
|
||||
Arguments:
|
||||
This - Protocol instance pointer.
|
||||
AcpiTableBuffer - A pointer to a buffer containing the ACPI table to be installed.
|
||||
AcpiTableBufferSize - Specifies the size, in bytes, of the AcpiTableBuffer buffer.
|
||||
TableKey - Reurns a key to refer to the ACPI table.
|
||||
|
||||
Returns:
|
||||
EFI_SUCCESS - The table was successfully inserted.
|
||||
EFI_INVALID_PARAMETER - Either AcpiTableBuffer is NULL, TableKey is NULL, or AcpiTableBufferSize
|
||||
and the size field embedded in the ACPI table pointed to by AcpiTableBuffer
|
||||
are not in sync.
|
||||
EFI_OUT_OF_RESOURCES - Insufficient resources exist to complete the request.
|
||||
|
||||
--*/
|
||||
;
|
||||
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_ACPI_TABLE_UNINSTALL_ACPI_TABLE) (
|
||||
IN EFI_ACPI_TABLE_PROTOCOL *This,
|
||||
IN UINTN TableKey
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
Removes an ACPI table from the RSDT/XSDT.
|
||||
|
||||
Arguments:
|
||||
This - Protocol instance pointer.
|
||||
TableKey - Specifies the table to uninstall. The key was returned from InstallAcpiTable().
|
||||
|
||||
Returns:
|
||||
EFI_SUCCESS - The table was successfully uninstalled.
|
||||
EFI_NOT_FOUND - TableKey does not refer to a valid key for a table entry.
|
||||
|
||||
--*/
|
||||
;
|
||||
|
||||
//
|
||||
// Interface structure for the ACPI Table Protocol
|
||||
//
|
||||
typedef struct _EFI_ACPI_TABLE_PROTOCOL {
|
||||
EFI_ACPI_TABLE_INSTALL_ACPI_TABLE InstallAcpiTable;
|
||||
EFI_ACPI_TABLE_UNINSTALL_ACPI_TABLE UninstallAcpiTable;
|
||||
} EFI_ACPI_TABLE_PROTOCOL;
|
||||
|
||||
extern EFI_GUID gEfiAcpiTableProtocolGuid;
|
||||
|
||||
#endif
|
29
EdkCompatibilityPkg/Foundation/Efi/Protocol/Arp/Arp.c
Normal file
29
EdkCompatibilityPkg/Foundation/Efi/Protocol/Arp/Arp.c
Normal file
@@ -0,0 +1,29 @@
|
||||
/*++
|
||||
|
||||
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
|
||||
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:
|
||||
|
||||
Arp.c
|
||||
|
||||
Abstract:
|
||||
|
||||
UEFI Arp protocol.
|
||||
|
||||
--*/
|
||||
|
||||
#include "EfiSpec.h"
|
||||
#include EFI_PROTOCOL_DEFINITION (Arp)
|
||||
|
||||
EFI_GUID gEfiArpServiceBindingProtocolGuid = EFI_ARP_SERVICE_BINDING_PROTOCOL_GUID;
|
||||
EFI_GUID gEfiArpProtocolGuid = EFI_ARP_PROTOCOL_GUID;
|
||||
|
||||
EFI_GUID_STRING (&gEfiArpServiceBindingProtocolGuid, "ARP Service Binding Protocol", "ARP Service Binding Protocol");
|
||||
EFI_GUID_STRING (&gEfiArpProtocolGuid, "ARP Protocol", "ARP Protocol");
|
136
EdkCompatibilityPkg/Foundation/Efi/Protocol/Arp/Arp.h
Normal file
136
EdkCompatibilityPkg/Foundation/Efi/Protocol/Arp/Arp.h
Normal file
@@ -0,0 +1,136 @@
|
||||
/*++
|
||||
|
||||
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
|
||||
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:
|
||||
|
||||
Arp.h
|
||||
|
||||
Abstract:
|
||||
|
||||
UEFI Arp protocol definition.
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef _ARP_H_
|
||||
#define _ARP_H_
|
||||
|
||||
#include EFI_PROTOCOL_DEFINITION (ServiceBinding)
|
||||
|
||||
#define EFI_ARP_SERVICE_BINDING_PROTOCOL_GUID \
|
||||
{ 0xf44c00ee, 0x1f2c, 0x4a00, 0xaa, 0x9, 0x1c, 0x9f, 0x3e, 0x8, 0x0, 0xa3 }
|
||||
|
||||
#define EFI_ARP_PROTOCOL_GUID \
|
||||
{ 0xf4b427bb, 0xba21, 0x4f16, 0xbc, 0x4e, 0x43, 0xe4, 0x16, 0xab, 0x61, 0x9c }
|
||||
|
||||
EFI_FORWARD_DECLARATION (EFI_ARP_PROTOCOL);
|
||||
|
||||
typedef struct _EFI_ARP_FIND_DATA {
|
||||
UINT32 Size;
|
||||
BOOLEAN DenyFlag;
|
||||
BOOLEAN StaticFlag;
|
||||
UINT16 HwAddressType;
|
||||
UINT16 SwAddressType;
|
||||
UINT8 HwAddressLength;
|
||||
UINT8 SwAddressLength;
|
||||
} EFI_ARP_FIND_DATA;
|
||||
|
||||
|
||||
//****************************************************
|
||||
// EFI_ARP_CONFIG_DATA
|
||||
//****************************************************
|
||||
typedef struct EFI_ARP_CONFIG_DATA {
|
||||
UINT16 SwAddressType; // Host byte order
|
||||
UINT8 SwAddressLength;
|
||||
VOID *StationAddress; // Network byte order
|
||||
UINT32 EntryTimeOut;
|
||||
UINT32 RetryCount;
|
||||
UINT32 RetryTimeOut;
|
||||
} EFI_ARP_CONFIG_DATA;
|
||||
|
||||
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_ARP_CONFIGURE) (
|
||||
IN EFI_ARP_PROTOCOL *This,
|
||||
IN EFI_ARP_CONFIG_DATA *ConfigData OPTIONAL
|
||||
);
|
||||
|
||||
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_ARP_ADD) (
|
||||
IN EFI_ARP_PROTOCOL *This,
|
||||
IN BOOLEAN DenyFlag,
|
||||
IN VOID *TargetSwAddress OPTIONAL,
|
||||
IN VOID *TargetHwAddress OPTIONAL,
|
||||
IN UINT32 TimeoutValue,
|
||||
IN BOOLEAN Overwrite
|
||||
);
|
||||
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_ARP_FIND) (
|
||||
IN EFI_ARP_PROTOCOL *This,
|
||||
IN BOOLEAN BySwAddress,
|
||||
IN VOID *AddressBuffer OPTIONAL,
|
||||
OUT UINT32 *EntryLength OPTIONAL,
|
||||
OUT UINT32 *EntryCount OPTIONAL,
|
||||
OUT EFI_ARP_FIND_DATA **Entries OPTIONAL,
|
||||
IN BOOLEAN Refresh
|
||||
);
|
||||
|
||||
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_ARP_DELETE) (
|
||||
IN EFI_ARP_PROTOCOL *This,
|
||||
IN BOOLEAN BySwAddress,
|
||||
IN VOID *AddressBuffer OPTIONAL
|
||||
);
|
||||
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_ARP_FLUSH) (
|
||||
IN EFI_ARP_PROTOCOL *This
|
||||
);
|
||||
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_ARP_REQUEST) (
|
||||
IN EFI_ARP_PROTOCOL *This,
|
||||
IN VOID *TargetSwAddress OPTIONAL,
|
||||
IN EFI_EVENT ResolvedEvent OPTIONAL,
|
||||
OUT VOID *TargetHwAddress
|
||||
);
|
||||
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_ARP_CANCEL) (
|
||||
IN EFI_ARP_PROTOCOL *This,
|
||||
IN VOID *TargetSwAddress OPTIONAL,
|
||||
IN EFI_EVENT ResolvedEvent OPTIONAL
|
||||
);
|
||||
|
||||
typedef struct _EFI_ARP_PROTOCOL {
|
||||
EFI_ARP_CONFIGURE Configure;
|
||||
EFI_ARP_ADD Add;
|
||||
EFI_ARP_FIND Find;
|
||||
EFI_ARP_DELETE Delete;
|
||||
EFI_ARP_FLUSH Flush;
|
||||
EFI_ARP_REQUEST Request;
|
||||
EFI_ARP_CANCEL Cancel;
|
||||
} EFI_ARP_PROTOCOL;
|
||||
|
||||
|
||||
extern EFI_GUID gEfiArpServiceBindingProtocolGuid;
|
||||
extern EFI_GUID gEfiArpProtocolGuid;
|
||||
|
||||
#endif
|
27
EdkCompatibilityPkg/Foundation/Efi/Protocol/Bis/Bis.c
Normal file
27
EdkCompatibilityPkg/Foundation/Efi/Protocol/Bis/Bis.c
Normal file
@@ -0,0 +1,27 @@
|
||||
/*++
|
||||
|
||||
Copyright (c) 2004, 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
|
||||
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:
|
||||
|
||||
Bis.c
|
||||
|
||||
Abstract:
|
||||
|
||||
This file defines the Bis protocol
|
||||
|
||||
--*/
|
||||
|
||||
#include "EfiSpec.h"
|
||||
#include EFI_PROTOCOL_DEFINITION (Bis)
|
||||
|
||||
EFI_GUID gEfiBisProtocolGuid = EFI_BIS_PROTOCOL_GUID;
|
||||
|
||||
EFI_GUID_STRING(&gEfiBisProtocolGuid, "BIS Base Protocol", "BIS Base protocol");
|
233
EdkCompatibilityPkg/Foundation/Efi/Protocol/Bis/Bis.h
Normal file
233
EdkCompatibilityPkg/Foundation/Efi/Protocol/Bis/Bis.h
Normal file
@@ -0,0 +1,233 @@
|
||||
/*++
|
||||
|
||||
Copyright (c) 2004, 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
|
||||
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:
|
||||
|
||||
Bis.h
|
||||
|
||||
Abstract:
|
||||
|
||||
This file defines the BIS protocol.
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef _BIS_H_
|
||||
#define _BIS_H_
|
||||
|
||||
#include <EfiSpec.h>
|
||||
|
||||
//
|
||||
// Basic types
|
||||
//
|
||||
typedef VOID *BIS_APPLICATION_HANDLE;
|
||||
typedef UINT16 BIS_ALG_ID;
|
||||
typedef UINT32 BIS_CERT_ID;
|
||||
|
||||
//
|
||||
// EFI_BIS_DATA type.
|
||||
//
|
||||
// EFI_BIS_DATA instances obtained from BIS must be freed by calling Free( ).
|
||||
//
|
||||
typedef struct _EFI_BIS_DATA {
|
||||
UINT32 Length; // Length of Data in 8 bit bytes.
|
||||
UINT8 *Data; // 32 Bit Flat Address of data.
|
||||
} EFI_BIS_DATA;
|
||||
|
||||
//
|
||||
// EFI_BIS_VERSION type.
|
||||
//
|
||||
typedef struct _EFI_BIS_VERSION {
|
||||
UINT32 Major; // BIS Interface version number.
|
||||
UINT32 Minor; // Build number.
|
||||
} EFI_BIS_VERSION;
|
||||
|
||||
//
|
||||
// ----------------------------------------------------//
|
||||
// Use these values to initialize EFI_BIS_VERSION.Major
|
||||
// and to interpret results of Initialize.
|
||||
// ----------------------------------------------------//
|
||||
//
|
||||
#define BIS_CURRENT_VERSION_MAJOR BIS_VERSION_1
|
||||
#define BIS_VERSION_1 1
|
||||
|
||||
//
|
||||
// EFI_BIS_SIGNATURE_INFO type.
|
||||
//
|
||||
typedef struct _EFI_BIS_SIGNATURE_INFO {
|
||||
BIS_CERT_ID CertificateID; // Truncated hash of platform Boot Object
|
||||
// authorization certificate.
|
||||
//
|
||||
BIS_ALG_ID AlgorithmID; // A signature algorithm number.
|
||||
UINT16 KeyLength; // Length of alg. keys in bits.
|
||||
} EFI_BIS_SIGNATURE_INFO;
|
||||
|
||||
//
|
||||
// Currently defined values for EFI_BIS_SIGNATURE_INFO.AlgorithmID.
|
||||
// The exact numeric values come from
|
||||
// "Common Data Security Architecture (CDSA) Specification".
|
||||
//
|
||||
#define BIS_ALG_DSA (41) // CSSM_ALGID_DSA
|
||||
#define BIS_ALG_RSA_MD5 (42) // CSSM_ALGID_MD5_WITH_RSA
|
||||
// Currently defined values for EFI_BIS_SIGNATURE_INFO.CertificateId.
|
||||
//
|
||||
#define BIS_CERT_ID_DSA BIS_ALG_DSA // CSSM_ALGID_DSA
|
||||
#define BIS_CERT_ID_RSA_MD5 BIS_ALG_RSA_MD5 // CSSM_ALGID_MD5_WITH_RSA
|
||||
// The following is a mask value that gets applied to the truncated hash of a
|
||||
// platform Boot Object Authorization Certificate to create the certificateID.
|
||||
// A certificateID must not have any bits set to the value 1 other than bits in
|
||||
// this mask.
|
||||
//
|
||||
#define BIS_CERT_ID_MASK (0xFF7F7FFF)
|
||||
|
||||
//
|
||||
// Macros for dealing with the EFI_BIS_DATA object obtained
|
||||
// from BIS_GetSignatureInfo()
|
||||
// BIS_GET_SIGINFO_COUNT - tells how many EFI_BIS_SIGNATURE_INFO
|
||||
// elements are contained in a EFI_BIS_DATA struct pointed to
|
||||
// by the provided EFI_BIS_DATA*.
|
||||
//
|
||||
#define BIS_GET_SIGINFO_COUNT(BisDataPtr) ((BisDataPtr)->Length / sizeof (EFI_BIS_SIGNATURE_INFO))
|
||||
|
||||
//
|
||||
// BIS_GET_SIGINFO_ARRAY - produces a EFI_BIS_SIGNATURE_INFO*
|
||||
// from a given EFI_BIS_DATA*.
|
||||
//
|
||||
#define BIS_GET_SIGINFO_ARRAY(BisDataPtr) ((EFI_BIS_SIGNATURE_INFO *) (BisDataPtr)->Data)
|
||||
|
||||
//
|
||||
// Binary Value of "X-Intel-BIS-ParameterSet" Attribute.
|
||||
// (Value is Base64 encoded in actual signed manifest).
|
||||
// {EDD35E31-07B9-11d2-83A3-00A0C91FADCF}
|
||||
//
|
||||
#define BOOT_OBJECT_AUTHORIZATION_PARMSET_GUIDVALUE \
|
||||
{ \
|
||||
0xedd35e31, 0x7b9, 0x11d2, \
|
||||
{ \
|
||||
0x83, 0xa3, 0x0, 0xa0, 0xc9, 0x1f, 0xad, 0xcf \
|
||||
} \
|
||||
}
|
||||
|
||||
//
|
||||
// -----------------------------------//
|
||||
// EFI_BIS_PROTOCOL
|
||||
// -----------------------------------//
|
||||
//
|
||||
#define EFI_BIS_PROTOCOL_GUID \
|
||||
{ \
|
||||
0x0b64aab0, 0x5429, 0x11d4, 0x98, 0x16, 0x00, 0xa0, 0xc9, 0x1f, 0xad, 0xcf \
|
||||
}
|
||||
|
||||
typedef struct _EFI_BIS_PROTOCOL EFI_BIS_PROTOCOL;
|
||||
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_BIS_INITIALIZE) (
|
||||
IN EFI_BIS_PROTOCOL * This, // this
|
||||
OUT BIS_APPLICATION_HANDLE * AppHandle, // Application handle.
|
||||
IN OUT EFI_BIS_VERSION * InterfaceVersion, // ver needed/available.
|
||||
IN EFI_BIS_DATA * TargetAddress // Address of BIS platform.
|
||||
);
|
||||
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_BIS_FREE) (
|
||||
IN BIS_APPLICATION_HANDLE AppHandle, // From Initialize( ).
|
||||
IN EFI_BIS_DATA * ToFree // EFI_BIS_DATA being freed.
|
||||
);
|
||||
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_BIS_SHUTDOWN) (
|
||||
IN BIS_APPLICATION_HANDLE AppHandle // From Initialize( ).
|
||||
);
|
||||
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_BIS_GET_BOOT_OBJECT_AUTHORIZATION_CERTIFICATE) (
|
||||
IN BIS_APPLICATION_HANDLE AppHandle, // From Initialize( ).
|
||||
OUT EFI_BIS_DATA **Certificate // Pointer to certificate.
|
||||
);
|
||||
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_BIS_VERIFY_BOOT_OBJECT) (
|
||||
IN BIS_APPLICATION_HANDLE AppHandle, // From Initialize( ).
|
||||
IN EFI_BIS_DATA * Credentials, // Verification signed manifest.
|
||||
IN EFI_BIS_DATA * DataObject, // Boot object to verify.
|
||||
OUT BOOLEAN *IsVerified // Result of verifcation.
|
||||
);
|
||||
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_BIS_GET_BOOT_OBJECT_AUTHORIZATION_CHECKFLAG) (
|
||||
IN BIS_APPLICATION_HANDLE AppHandle, // From Initialize( ).
|
||||
OUT BOOLEAN *CheckIsRequired // Value of check flag.
|
||||
);
|
||||
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_BIS_GET_BOOT_OBJECT_AUTHORIZATION_UPDATE_TOKEN) (
|
||||
IN BIS_APPLICATION_HANDLE AppHandle, // From Initialize( ).
|
||||
OUT EFI_BIS_DATA **UpdateToken // Value of update token.
|
||||
);
|
||||
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_BIS_UPDATE_BOOT_OBJECT_AUTHORIZATION) (
|
||||
IN BIS_APPLICATION_HANDLE AppHandle, // From Initialize( ).
|
||||
IN EFI_BIS_DATA * RequestCredential, // Update Request Manifest.
|
||||
OUT EFI_BIS_DATA **NewUpdateToken // Next update token.
|
||||
);
|
||||
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_BIS_VERIFY_OBJECT_WITH_CREDENTIAL) (
|
||||
IN BIS_APPLICATION_HANDLE AppHandle, // From Initialize( ).
|
||||
IN EFI_BIS_DATA * Credentials, // Verification signed manifest.
|
||||
IN EFI_BIS_DATA * DataObject, // Boot object to verify.
|
||||
IN EFI_BIS_DATA * SectionName, // Name of credential section to use.
|
||||
IN EFI_BIS_DATA * AuthorityCertificate, // Certificate for credentials.
|
||||
OUT BOOLEAN *IsVerified // Result of verifcation.
|
||||
);
|
||||
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_BIS_GET_SIGNATURE_INFO) (
|
||||
IN BIS_APPLICATION_HANDLE AppHandle, // From Initialize( ).
|
||||
OUT EFI_BIS_DATA **SignatureInfo // Signature info struct.
|
||||
);
|
||||
|
||||
#define EFI_BIS_PROTOCOL_REVISION 0x00010000
|
||||
|
||||
typedef struct _EFI_BIS_PROTOCOL {
|
||||
//
|
||||
// member vars
|
||||
//
|
||||
UINT64 Revision;
|
||||
|
||||
//
|
||||
// methods
|
||||
//
|
||||
EFI_BIS_INITIALIZE Initialize;
|
||||
EFI_BIS_SHUTDOWN Shutdown;
|
||||
EFI_BIS_FREE Free;
|
||||
EFI_BIS_GET_BOOT_OBJECT_AUTHORIZATION_CERTIFICATE GetBootObjectAuthorizationCertificate;
|
||||
EFI_BIS_GET_BOOT_OBJECT_AUTHORIZATION_CHECKFLAG GetBootObjectAuthorizationCheckFlag;
|
||||
EFI_BIS_GET_BOOT_OBJECT_AUTHORIZATION_UPDATE_TOKEN GetBootObjectAuthorizationUpdateToken;
|
||||
EFI_BIS_GET_SIGNATURE_INFO GetSignatureInfo;
|
||||
EFI_BIS_UPDATE_BOOT_OBJECT_AUTHORIZATION UpdateBootObjectAuthorization;
|
||||
EFI_BIS_VERIFY_BOOT_OBJECT VerifyBootObject;
|
||||
EFI_BIS_VERIFY_OBJECT_WITH_CREDENTIAL VerifyObjectWithCredential;
|
||||
} EFI_BIS_PROTOCOL;
|
||||
|
||||
extern EFI_GUID gEfiBisProtocolGuid;
|
||||
|
||||
#endif
|
@@ -0,0 +1,31 @@
|
||||
/*++
|
||||
|
||||
Copyright (c) 2004, 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
|
||||
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:
|
||||
|
||||
BlockIo.c
|
||||
|
||||
Abstract:
|
||||
|
||||
Block IO protocol as defined in the EFI 1.0 specification.
|
||||
|
||||
The Block IO protocol is used to abstract block devices like hard drives,
|
||||
DVD-ROMs and floppy drives.
|
||||
|
||||
|
||||
--*/
|
||||
|
||||
#include "EfiSpec.h"
|
||||
#include EFI_PROTOCOL_DEFINITION (BlockIo)
|
||||
|
||||
EFI_GUID gEfiBlockIoProtocolGuid = EFI_BLOCK_IO_PROTOCOL_GUID;
|
||||
|
||||
EFI_GUID_STRING(&gEfiBlockIoProtocolGuid, "BlockIo Protocol", "EFI 1.0 Block IO protocol");
|
206
EdkCompatibilityPkg/Foundation/Efi/Protocol/BlockIO/BlockIO.h
Normal file
206
EdkCompatibilityPkg/Foundation/Efi/Protocol/BlockIO/BlockIO.h
Normal file
@@ -0,0 +1,206 @@
|
||||
/*++
|
||||
|
||||
Copyright (c) 2004, 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
|
||||
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:
|
||||
|
||||
BlockIo.h
|
||||
|
||||
Abstract:
|
||||
|
||||
Block IO protocol as defined in the EFI 1.0 specification.
|
||||
|
||||
The Block IO protocol is used to abstract block devices like hard drives,
|
||||
DVD-ROMs and floppy drives.
|
||||
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef __BLOCK_IO_H__
|
||||
#define __BLOCK_IO_H__
|
||||
|
||||
#define EFI_BLOCK_IO_PROTOCOL_GUID \
|
||||
{ \
|
||||
0x964e5b21, 0x6459, 0x11d2, 0x8e, 0x39, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b \
|
||||
}
|
||||
|
||||
//
|
||||
// Forward reference for pure ANSI compatability
|
||||
//
|
||||
EFI_FORWARD_DECLARATION (EFI_BLOCK_IO_PROTOCOL);
|
||||
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_BLOCK_RESET) (
|
||||
IN EFI_BLOCK_IO_PROTOCOL * This,
|
||||
IN BOOLEAN ExtendedVerification
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
Reset the Block Device.
|
||||
|
||||
Arguments:
|
||||
This - Protocol instance pointer.
|
||||
ExtendedVerification - Driver may perform diagnostics on reset.
|
||||
|
||||
Returns:
|
||||
EFI_SUCCESS - The device was reset.
|
||||
EFI_DEVICE_ERROR - The device is not functioning properly and could
|
||||
not be reset.
|
||||
|
||||
--*/
|
||||
;
|
||||
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_BLOCK_READ) (
|
||||
IN EFI_BLOCK_IO_PROTOCOL * This,
|
||||
IN UINT32 MediaId,
|
||||
IN EFI_LBA Lba,
|
||||
IN UINTN BufferSize,
|
||||
OUT VOID *Buffer
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
Read BufferSize bytes from Lba into Buffer.
|
||||
|
||||
Arguments:
|
||||
This - Protocol instance pointer.
|
||||
MediaId - Id of the media, changes every time the media is replaced.
|
||||
Lba - The starting Logical Block Address to read from
|
||||
BufferSize - Size of Buffer, must be a multiple of device block size.
|
||||
Buffer - Buffer containing read data
|
||||
|
||||
Returns:
|
||||
EFI_SUCCESS - The data was read correctly from the device.
|
||||
EFI_DEVICE_ERROR - The device reported an error while performing the read.
|
||||
EFI_NO_MEDIA - There is no media in the device.
|
||||
EFI_MEDIA_CHANGED - The MediaId does not matched the current device.
|
||||
EFI_BAD_BUFFER_SIZE - The Buffer was not a multiple of the block size of the
|
||||
device.
|
||||
EFI_INVALID_PARAMETER - The read request contains device addresses that are not
|
||||
valid for the device.
|
||||
|
||||
--*/
|
||||
;
|
||||
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_BLOCK_WRITE) (
|
||||
IN EFI_BLOCK_IO_PROTOCOL * This,
|
||||
IN UINT32 MediaId,
|
||||
IN EFI_LBA Lba,
|
||||
IN UINTN BufferSize,
|
||||
IN VOID *Buffer
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
Write BufferSize bytes from Lba into Buffer.
|
||||
|
||||
Arguments:
|
||||
This - Protocol instance pointer.
|
||||
MediaId - Id of the media, changes every time the media is replaced.
|
||||
Lba - The starting Logical Block Address to read from
|
||||
BufferSize - Size of Buffer, must be a multiple of device block size.
|
||||
Buffer - Buffer containing read data
|
||||
|
||||
Returns:
|
||||
EFI_SUCCESS - The data was written correctly to the device.
|
||||
EFI_WRITE_PROTECTED - The device can not be written to.
|
||||
EFI_DEVICE_ERROR - The device reported an error while performing the write.
|
||||
EFI_NO_MEDIA - There is no media in the device.
|
||||
EFI_MEDIA_CHNAGED - The MediaId does not matched the current device.
|
||||
EFI_BAD_BUFFER_SIZE - The Buffer was not a multiple of the block size of the
|
||||
device.
|
||||
EFI_INVALID_PARAMETER - The write request contains a LBA that is not
|
||||
valid for the device.
|
||||
|
||||
--*/
|
||||
;
|
||||
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_BLOCK_FLUSH) (
|
||||
IN EFI_BLOCK_IO_PROTOCOL * This
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
Flush the Block Device.
|
||||
|
||||
Arguments:
|
||||
This - Protocol instance pointer.
|
||||
|
||||
Returns:
|
||||
EFI_SUCCESS - All outstanding data was written to the device
|
||||
EFI_DEVICE_ERROR - The device reported an error while writting back the data
|
||||
EFI_NO_MEDIA - There is no media in the device.
|
||||
|
||||
--*/
|
||||
;
|
||||
|
||||
/*++
|
||||
|
||||
Block IO read only mode data and updated only via members of BlockIO
|
||||
|
||||
MediaId - The curent media Id. If the media changes, this value is changed.
|
||||
RemovableMedia - TRUE if the media is removable; otherwise, FALSE.
|
||||
MediaPresent - TRUE if there is a media currently present in the device;
|
||||
othersise, FALSE. THis field shows the media present status
|
||||
as of the most recent ReadBlocks() or WriteBlocks() call.
|
||||
LogicalPartition - TRUE if LBA 0 is the first block of a partition; otherwise
|
||||
FALSE. For media with only one partition this would be TRUE.
|
||||
ReadOnly - TRUE if the media is marked read-only otherwise, FALSE. This
|
||||
field shows the read-only status as of the most recent
|
||||
WriteBlocks () call.
|
||||
WriteCaching - TRUE if the WriteBlock () function caches write data.
|
||||
BlockSize - The intrinsic block size of the device. If the media changes, then
|
||||
this field is updated.
|
||||
IoAlign - Supplies the alignment requirement for any buffer to read or write
|
||||
block(s).
|
||||
LastBlock - The last logical block address on the device. If the media changes,
|
||||
then this field is updated.
|
||||
|
||||
--*/
|
||||
typedef struct {
|
||||
UINT32 MediaId;
|
||||
BOOLEAN RemovableMedia;
|
||||
BOOLEAN MediaPresent;
|
||||
|
||||
BOOLEAN LogicalPartition;
|
||||
BOOLEAN ReadOnly;
|
||||
BOOLEAN WriteCaching;
|
||||
|
||||
UINT32 BlockSize;
|
||||
UINT32 IoAlign;
|
||||
|
||||
EFI_LBA LastBlock;
|
||||
} EFI_BLOCK_IO_MEDIA;
|
||||
|
||||
#define EFI_BLOCK_IO_PROTOCOL_REVISION 0x00010000
|
||||
|
||||
typedef struct _EFI_BLOCK_IO_PROTOCOL {
|
||||
UINT64 Revision;
|
||||
|
||||
EFI_BLOCK_IO_MEDIA *Media;
|
||||
|
||||
EFI_BLOCK_RESET Reset;
|
||||
EFI_BLOCK_READ ReadBlocks;
|
||||
EFI_BLOCK_WRITE WriteBlocks;
|
||||
EFI_BLOCK_FLUSH FlushBlocks;
|
||||
|
||||
} EFI_BLOCK_IO_PROTOCOL;
|
||||
|
||||
extern EFI_GUID gEfiBlockIoProtocolGuid;
|
||||
|
||||
#endif
|
@@ -0,0 +1,31 @@
|
||||
/*++
|
||||
|
||||
Copyright (c) 2004, 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
|
||||
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:
|
||||
|
||||
BusSpecificDriverOverride.c
|
||||
|
||||
Abstract:
|
||||
|
||||
Bus Specific Driver Override protocol as defined in the EFI 1.1 specification.
|
||||
|
||||
--*/
|
||||
|
||||
#include "EfiSpec.h"
|
||||
#include EFI_PROTOCOL_DEFINITION (BusSpecificDriverOverride)
|
||||
|
||||
EFI_GUID gEfiBusSpecificDriverOverrideProtocolGuid = EFI_BUS_SPECIFIC_DRIVER_OVERRIDE_PROTOCOL_GUID;
|
||||
|
||||
EFI_GUID_STRING
|
||||
(
|
||||
&gEfiBusSpecificDriverOverrideProtocolGuid, "Bus Specific Driver Override Protocol",
|
||||
"EFI 1.1 Bus Specific Driver Override Protocol"
|
||||
);
|
@@ -0,0 +1,54 @@
|
||||
/*++
|
||||
|
||||
Copyright (c) 2004, 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
|
||||
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:
|
||||
|
||||
BusSpecificDriverOverride.h
|
||||
|
||||
Abstract:
|
||||
|
||||
Bus Specific Driver Override protocol as defined in the EFI 1.1 specification.
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef _EFI_BUS_SPECIFIC_DRIVER_OVERRIDE_PROTOCOL_H_
|
||||
#define _EFI_BUS_SPECIFIC_DRIVER_OVERRIDE_PROTOCOL_H_
|
||||
|
||||
//
|
||||
// Global ID for the Bus Specific Driver Override Protocol
|
||||
//
|
||||
#define EFI_BUS_SPECIFIC_DRIVER_OVERRIDE_PROTOCOL_GUID \
|
||||
{ \
|
||||
0x3bc1b285, 0x8a15, 0x4a82, 0xaa, 0xbf, 0x4d, 0x7d, 0x13, 0xfb, 0x32, 0x65 \
|
||||
}
|
||||
|
||||
EFI_FORWARD_DECLARATION (EFI_BUS_SPECIFIC_DRIVER_OVERRIDE_PROTOCOL);
|
||||
|
||||
//
|
||||
// Prototypes for the Bus Specific Driver Override Protocol
|
||||
//
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_BUS_SPECIFIC_DRIVER_OVERRIDE_GET_DRIVER) (
|
||||
IN EFI_BUS_SPECIFIC_DRIVER_OVERRIDE_PROTOCOL * This,
|
||||
IN OUT EFI_HANDLE * DriverImageHandle
|
||||
);
|
||||
|
||||
//
|
||||
// Interface structure for the Bus Specific Driver Override Protocol
|
||||
//
|
||||
typedef struct _EFI_BUS_SPECIFIC_DRIVER_OVERRIDE_PROTOCOL {
|
||||
EFI_BUS_SPECIFIC_DRIVER_OVERRIDE_GET_DRIVER GetDriver;
|
||||
} EFI_BUS_SPECIFIC_DRIVER_OVERRIDE_PROTOCOL;
|
||||
|
||||
extern EFI_GUID gEfiBusSpecificDriverOverrideProtocolGuid;
|
||||
|
||||
#endif
|
@@ -0,0 +1,29 @@
|
||||
/*++
|
||||
|
||||
Copyright (c) 2004, 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
|
||||
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:
|
||||
|
||||
EFI Component Name Protocol
|
||||
|
||||
Revision History
|
||||
|
||||
--*/
|
||||
|
||||
#include "EfiSpec.h"
|
||||
#include EFI_PROTOCOL_DEFINITION (ComponentName)
|
||||
|
||||
EFI_GUID gEfiComponentNameProtocolGuid = EFI_COMPONENT_NAME_PROTOCOL_GUID;
|
||||
|
||||
EFI_GUID_STRING(&gEfiComponentNameProtocolGuid, "Component Name Protocol", "EFI 1.1 Component Name Protocol");
|
@@ -0,0 +1,137 @@
|
||||
/*++
|
||||
|
||||
Copyright (c) 2004, 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
|
||||
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.h
|
||||
|
||||
Abstract:
|
||||
|
||||
EFI Component Name Protocol
|
||||
|
||||
Revision History
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef _EFI_COMPONENT_NAME_H_
|
||||
#define _EFI_COMPONENT_NAME_H_
|
||||
|
||||
//
|
||||
// Global ID for the Component Name Protocol
|
||||
//
|
||||
#define EFI_COMPONENT_NAME_PROTOCOL_GUID \
|
||||
{ \
|
||||
0x107a772c, 0xd5e1, 0x11d4, 0x9a, 0x46, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d \
|
||||
}
|
||||
|
||||
EFI_FORWARD_DECLARATION (EFI_COMPONENT_NAME_PROTOCOL);
|
||||
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_COMPONENT_NAME_GET_DRIVER_NAME) (
|
||||
IN EFI_COMPONENT_NAME_PROTOCOL * This,
|
||||
IN CHAR8 *Language,
|
||||
OUT CHAR16 **DriverName
|
||||
);
|
||||
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
Retrieves a Unicode string that is the user readable name of the EFI Driver.
|
||||
|
||||
Arguments:
|
||||
This - A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance.
|
||||
Language - A pointer to a three character ISO 639-2 language identifier.
|
||||
This is the language of the driver name that that the caller
|
||||
is requesting, and it must match one of the languages specified
|
||||
in SupportedLanguages. The number of languages supported by a
|
||||
driver is up to the driver writer.
|
||||
DriverName - A pointer to the Unicode string to return. This Unicode string
|
||||
is the name of the driver specified by This in the language
|
||||
specified by Language.
|
||||
|
||||
Returns:
|
||||
EFI_SUCCESS - The Unicode string for the Driver specified by This
|
||||
and the language specified by Language was returned
|
||||
in DriverName.
|
||||
EFI_INVALID_PARAMETER - Language is NULL.
|
||||
EFI_INVALID_PARAMETER - DriverName is NULL.
|
||||
EFI_UNSUPPORTED - The driver specified by This does not support the
|
||||
language specified by Language.
|
||||
|
||||
--*/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_COMPONENT_NAME_GET_CONTROLLER_NAME) (
|
||||
IN EFI_COMPONENT_NAME_PROTOCOL * This,
|
||||
IN EFI_HANDLE ControllerHandle,
|
||||
IN EFI_HANDLE ChildHandle OPTIONAL,
|
||||
IN CHAR8 *Language,
|
||||
OUT CHAR16 **ControllerName
|
||||
);
|
||||
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
Retrieves a Unicode string that is the user readable name of the controller
|
||||
that is being managed by an EFI Driver.
|
||||
|
||||
Arguments:
|
||||
This - A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance.
|
||||
ControllerHandle - The handle of a controller that the driver specified by
|
||||
This is managing. This handle specifies the controller
|
||||
whose name is to be returned.
|
||||
ChildHandle - The handle of the child controller to retrieve the name
|
||||
of. This is an optional parameter that may be NULL. It
|
||||
will be NULL for device drivers. It will also be NULL
|
||||
for a bus drivers that wish to retrieve the name of the
|
||||
bus controller. It will not be NULL for a bus driver
|
||||
that wishes to retrieve the name of a child controller.
|
||||
Language - A pointer to a three character ISO 639-2 language
|
||||
identifier. This is the language of the controller name
|
||||
that that the caller is requesting, and it must match one
|
||||
of the languages specified in SupportedLanguages. The
|
||||
number of languages supported by a driver is up to the
|
||||
driver writer.
|
||||
ControllerName - A pointer to the Unicode string to return. This Unicode
|
||||
string is the name of the controller specified by
|
||||
ControllerHandle and ChildHandle in the language specified
|
||||
by Language from the point of view of the driver specified
|
||||
by This.
|
||||
|
||||
Returns:
|
||||
EFI_SUCCESS - The Unicode string for the user readable name in the
|
||||
language specified by Language for the driver
|
||||
specified by This was returned in DriverName.
|
||||
EFI_INVALID_PARAMETER - ControllerHandle is not a valid EFI_HANDLE.
|
||||
EFI_INVALID_PARAMETER - ChildHandle is not NULL and it is not a valid EFI_HANDLE.
|
||||
EFI_INVALID_PARAMETER - Language is NULL.
|
||||
EFI_INVALID_PARAMETER - ControllerName is NULL.
|
||||
EFI_UNSUPPORTED - The driver specified by This is not currently managing
|
||||
the controller specified by ControllerHandle and
|
||||
ChildHandle.
|
||||
EFI_UNSUPPORTED - The driver specified by This does not support the
|
||||
language specified by Language.
|
||||
|
||||
--*/
|
||||
|
||||
//
|
||||
// Interface structure for the Component Name Protocol
|
||||
//
|
||||
typedef struct _EFI_COMPONENT_NAME_PROTOCOL {
|
||||
EFI_COMPONENT_NAME_GET_DRIVER_NAME GetDriverName;
|
||||
EFI_COMPONENT_NAME_GET_CONTROLLER_NAME GetControllerName;
|
||||
CHAR8 *SupportedLanguages;
|
||||
} EFI_COMPONENT_NAME_PROTOCOL;
|
||||
|
||||
extern EFI_GUID gEfiComponentNameProtocolGuid;
|
||||
|
||||
#endif
|
@@ -0,0 +1,29 @@
|
||||
/*++
|
||||
|
||||
Copyright (c) 2004, 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
|
||||
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:
|
||||
|
||||
EFI Component Name Protocol
|
||||
|
||||
Revision History
|
||||
|
||||
--*/
|
||||
|
||||
#include "EfiSpec.h"
|
||||
#include EFI_PROTOCOL_DEFINITION (ComponentName2)
|
||||
|
||||
EFI_GUID gEfiComponentName2ProtocolGuid = EFI_COMPONENT_NAME2_PROTOCOL_GUID;
|
||||
|
||||
EFI_GUID_STRING(&gEfiComponentName2ProtocolGuid, "Component Name2 Protocol", "EFI 2.0 Component Name2 Protocol");
|
@@ -0,0 +1,136 @@
|
||||
/*++
|
||||
|
||||
Copyright (c) 2004, 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
|
||||
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.h
|
||||
|
||||
Abstract:
|
||||
|
||||
EFI Component Name Protocol
|
||||
|
||||
Revision History
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef _EFI_COMPONENT_NAME2_H_
|
||||
#define _EFI_COMPONENT_NAME2_H_
|
||||
|
||||
//
|
||||
// Global ID for the Component Name Protocol
|
||||
//
|
||||
|
||||
#define EFI_COMPONENT_NAME2_PROTOCOL_GUID \
|
||||
{ \
|
||||
0x6a7a5cff, 0xe8d9, 0x4f70, 0xba, 0xda, 0x75, 0xab, 0x30, 0x25, 0xce, 0x14 \
|
||||
}
|
||||
|
||||
EFI_FORWARD_DECLARATION (EFI_COMPONENT_NAME2_PROTOCOL);
|
||||
|
||||
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_COMPONENT_NAME2_GET_DRIVER_NAME) (
|
||||
IN EFI_COMPONENT_NAME2_PROTOCOL * This,
|
||||
IN CHAR8 *Language,
|
||||
OUT CHAR16 **DriverName
|
||||
);
|
||||
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
Retrieves a Unicode string that is the user readable name of the EFI Driver.
|
||||
|
||||
Arguments:
|
||||
This - A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance.
|
||||
Language - A pointer to a three character ISO 639-2 language identifier.
|
||||
This is the language of the driver name that that the caller
|
||||
is requesting, and it must match one of the languages specified
|
||||
in SupportedLanguages. The number of languages supported by a
|
||||
driver is up to the driver writer.
|
||||
DriverName - A pointer to the Unicode string to return. This Unicode string
|
||||
is the name of the driver specified by This in the language
|
||||
specified by Language.
|
||||
|
||||
Returns:
|
||||
EFI_SUCCESS - The Unicode string for the Driver specified by This
|
||||
and the language specified by Language was returned
|
||||
in DriverName.
|
||||
EFI_INVALID_PARAMETER - Language is NULL or DriverName is NULL.
|
||||
EFI_UNSUPPORTED - The driver specified by This does not support the
|
||||
language specified by Language.
|
||||
|
||||
--*/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_COMPONENT_NAME2_GET_CONTROLLER_NAME) (
|
||||
IN EFI_COMPONENT_NAME2_PROTOCOL * This,
|
||||
IN EFI_HANDLE ControllerHandle,
|
||||
IN EFI_HANDLE ChildHandle OPTIONAL,
|
||||
IN CHAR8 *Language,
|
||||
OUT CHAR16 **ControllerName
|
||||
);
|
||||
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
Retrieves a Unicode string that is the user readable name of the controller
|
||||
that is being managed by an EFI Driver.
|
||||
|
||||
Arguments:
|
||||
This - A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance.
|
||||
ControllerHandle - The handle of a controller that the driver specified by
|
||||
This is managing. This handle specifies the controller
|
||||
whose name is to be returned.
|
||||
ChildHandle - The handle of the child controller to retrieve the name
|
||||
of. This is an optional parameter that may be NULL. It
|
||||
will be NULL for device drivers. It will also be NULL
|
||||
for a bus drivers that wish to retrieve the name of the
|
||||
bus controller. It will not be NULL for a bus driver
|
||||
that wishes to retrieve the name of a child controller.
|
||||
Language - A pointer to a three character ISO 639-2 language
|
||||
identifier. This is the language of the controller name
|
||||
that that the caller is requesting, and it must match one
|
||||
of the languages specified in SupportedLanguages. The
|
||||
number of languages supported by a driver is up to the
|
||||
driver writer.
|
||||
ControllerName - A pointer to the Unicode string to return. This Unicode
|
||||
string is the name of the controller specified by
|
||||
ControllerHandle and ChildHandle in the language specified
|
||||
by Language from the point of view of the driver specified
|
||||
by This.
|
||||
|
||||
Returns:
|
||||
EFI_SUCCESS - The Unicode string for the user readable name in the
|
||||
language specified by Language for the driver
|
||||
specified by This was returned in DriverName.
|
||||
EFI_INVALID_PARAMETER - ControllerHandle is not a valid EFI_HANDLE; ChildHandle
|
||||
is not NULL and it is not a valid EFI_HANDLE;Language
|
||||
is NULL;ControllerName is NULL.
|
||||
EFI_UNSUPPORTED - The driver specified by This is not currently managing
|
||||
the controller specified by ControllerHandle and
|
||||
ChildHandle;The driver specified by This does not support the
|
||||
language specified by Language.
|
||||
|
||||
--*/
|
||||
|
||||
//
|
||||
// Interface structure for the Component Name Protocol
|
||||
//
|
||||
typedef struct _EFI_COMPONENT_NAME2_PROTOCOL {
|
||||
EFI_COMPONENT_NAME2_GET_DRIVER_NAME GetDriverName;
|
||||
EFI_COMPONENT_NAME2_GET_CONTROLLER_NAME GetControllerName;
|
||||
CHAR8 *SupportedLanguages;
|
||||
} EFI_COMPONENT_NAME2_PROTOCOL;
|
||||
|
||||
extern EFI_GUID gEfiComponentName2ProtocolGuid;
|
||||
|
||||
#endif
|
@@ -0,0 +1,27 @@
|
||||
/*++
|
||||
|
||||
Copyright (c) 2004, 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
|
||||
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:
|
||||
|
||||
DebugPort protocol as defined in the EFI 1.1 specification.
|
||||
|
||||
--*/
|
||||
|
||||
#include "EfiSpec.h"
|
||||
#include EFI_PROTOCOL_DEFINITION (DebugPort)
|
||||
|
||||
EFI_GUID gEfiDebugPortProtocolGuid = EFI_DEBUGPORT_PROTOCOL_GUID;
|
||||
|
||||
EFI_GUID_STRING(&gEfiDebugPortProtocolGuid, "DebugPort Protocol", "EFI 1.1 DebugPort Protocol");
|
@@ -0,0 +1,98 @@
|
||||
/*++
|
||||
|
||||
Copyright (c) 2004, 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
|
||||
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:
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef _DEBUG_PORT_H_
|
||||
#define _DEBUG_PORT_H_
|
||||
|
||||
#include "EfiApi.h"
|
||||
|
||||
//
|
||||
// DebugPortIo protocol {EBA4E8D2-3858-41EC-A281-2647BA9660D0}
|
||||
//
|
||||
#define EFI_DEBUGPORT_PROTOCOL_GUID \
|
||||
{ \
|
||||
0xEBA4E8D2, 0x3858, 0x41EC, 0xA2, 0x81, 0x26, 0x47, 0xBA, 0x96, 0x60, 0xD0 \
|
||||
}
|
||||
|
||||
extern EFI_GUID gEfiDebugPortProtocolGuid;
|
||||
|
||||
EFI_FORWARD_DECLARATION (EFI_DEBUGPORT_PROTOCOL);
|
||||
|
||||
//
|
||||
// DebugPort member functions
|
||||
//
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_DEBUGPORT_RESET) (
|
||||
IN EFI_DEBUGPORT_PROTOCOL * This
|
||||
);
|
||||
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_DEBUGPORT_WRITE) (
|
||||
IN EFI_DEBUGPORT_PROTOCOL * This,
|
||||
IN UINT32 Timeout,
|
||||
IN OUT UINTN *BufferSize,
|
||||
IN VOID *Buffer
|
||||
);
|
||||
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_DEBUGPORT_READ) (
|
||||
IN EFI_DEBUGPORT_PROTOCOL * This,
|
||||
IN UINT32 Timeout,
|
||||
IN OUT UINTN *BufferSize,
|
||||
OUT VOID *Buffer
|
||||
);
|
||||
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_DEBUGPORT_POLL) (
|
||||
IN EFI_DEBUGPORT_PROTOCOL * This
|
||||
);
|
||||
|
||||
//
|
||||
// DebugPort protocol definition
|
||||
//
|
||||
typedef struct _EFI_DEBUGPORT_PROTOCOL {
|
||||
EFI_DEBUGPORT_RESET Reset;
|
||||
EFI_DEBUGPORT_WRITE Write;
|
||||
EFI_DEBUGPORT_READ Read;
|
||||
EFI_DEBUGPORT_POLL Poll;
|
||||
} EFI_DEBUGPORT_PROTOCOL;
|
||||
|
||||
//
|
||||
// DEBUGPORT variable definitions...
|
||||
//
|
||||
#define EFI_DEBUGPORT_VARIABLE_NAME L"DEBUGPORT"
|
||||
#define EFI_DEBUGPORT_VARIABLE_GUID EFI_DEBUGPORT_PROTOCOL_GUID
|
||||
#define gEfiDebugPortVariableGuid gEfiDebugPortProtocolGuid
|
||||
|
||||
//
|
||||
// DebugPort device path definitions...
|
||||
//
|
||||
#define DEVICE_PATH_MESSAGING_DEBUGPORT EFI_DEBUGPORT_PROTOCOL_GUID
|
||||
#define gEfiDebugPortDevicePathGuid gEfiDebugPortProtocolGuid
|
||||
|
||||
typedef struct {
|
||||
EFI_DEVICE_PATH_PROTOCOL Header;
|
||||
EFI_GUID Guid;
|
||||
} DEBUGPORT_DEVICE_PATH;
|
||||
|
||||
#endif /* _DEBUG_PORT_H_ */
|
@@ -0,0 +1,27 @@
|
||||
/*++
|
||||
|
||||
Copyright (c) 2004, 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
|
||||
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:
|
||||
|
||||
DebugSupport protocol as defined in the EFI 1.1 specification.
|
||||
|
||||
--*/
|
||||
|
||||
#include "EfiSpec.h"
|
||||
#include EFI_PROTOCOL_DEFINITION (DebugSupport)
|
||||
|
||||
EFI_GUID gEfiDebugSupportProtocolGuid = EFI_DEBUG_SUPPORT_PROTOCOL_GUID;
|
||||
|
||||
EFI_GUID_STRING(&gEfiDebugSupportProtocolGuid, "DebugSupport Protocol", "EFI 1.1 DebugSupport Protocol");
|
@@ -0,0 +1,594 @@
|
||||
/*++
|
||||
|
||||
Copyright (c) 2004 - 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
|
||||
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.h
|
||||
|
||||
Abstract:
|
||||
|
||||
DebugSupport protocol and supporting definitions as defined in the EFI 1.1
|
||||
specification.
|
||||
|
||||
The DebugSupport protocol is used by source level debuggers to abstract the
|
||||
processor and handle context save and restore operations.
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef _DEBUG_SUPPORT_H_
|
||||
#define _DEBUG_SUPPORT_H_
|
||||
|
||||
#include "EfiApi.h"
|
||||
#include "EfiImage.h"
|
||||
//
|
||||
// Debug Support protocol {2755590C-6F3C-42FA-9EA4-A3BA543CDA25}
|
||||
//
|
||||
#define EFI_DEBUG_SUPPORT_PROTOCOL_GUID \
|
||||
{ \
|
||||
0x2755590C, 0x6F3C, 0x42FA, 0x9E, 0xA4, 0xA3, 0xBA, 0x54, 0x3C, 0xDA, 0x25 \
|
||||
}
|
||||
|
||||
//
|
||||
// Debug Support definitions
|
||||
//
|
||||
typedef INTN EFI_EXCEPTION_TYPE;
|
||||
|
||||
//
|
||||
// IA-32 processor exception types
|
||||
//
|
||||
#define EXCEPT_IA32_DIVIDE_ERROR 0
|
||||
#define EXCEPT_IA32_DEBUG 1
|
||||
#define EXCEPT_IA32_NMI 2
|
||||
#define EXCEPT_IA32_BREAKPOINT 3
|
||||
#define EXCEPT_IA32_OVERFLOW 4
|
||||
#define EXCEPT_IA32_BOUND 5
|
||||
#define EXCEPT_IA32_INVALID_OPCODE 6
|
||||
#define EXCEPT_IA32_DOUBLE_FAULT 8
|
||||
#define EXCEPT_IA32_INVALID_TSS 10
|
||||
#define EXCEPT_IA32_SEG_NOT_PRESENT 11
|
||||
#define EXCEPT_IA32_STACK_FAULT 12
|
||||
#define EXCEPT_IA32_GP_FAULT 13
|
||||
#define EXCEPT_IA32_PAGE_FAULT 14
|
||||
#define EXCEPT_IA32_FP_ERROR 16
|
||||
#define EXCEPT_IA32_ALIGNMENT_CHECK 17
|
||||
#define EXCEPT_IA32_MACHINE_CHECK 18
|
||||
#define EXCEPT_IA32_SIMD 19
|
||||
|
||||
//
|
||||
// IA-32 processor context definition
|
||||
//
|
||||
//
|
||||
// FXSAVE_STATE
|
||||
// FP / MMX / XMM registers (see fxrstor instruction definition)
|
||||
//
|
||||
typedef struct {
|
||||
UINT16 Fcw;
|
||||
UINT16 Fsw;
|
||||
UINT16 Ftw;
|
||||
UINT16 Opcode;
|
||||
UINT32 Eip;
|
||||
UINT16 Cs;
|
||||
UINT16 Reserved1;
|
||||
UINT32 DataOffset;
|
||||
UINT16 Ds;
|
||||
UINT8 Reserved2[10];
|
||||
#if (EFI_SPECIFICATION_VERSION >= 0x00020000)
|
||||
UINT8 St0Mm0[10], Reserved3[6];
|
||||
UINT8 St1Mm1[10], Reserved4[6];
|
||||
UINT8 St2Mm2[10], Reserved5[6];
|
||||
UINT8 St3Mm3[10], Reserved6[6];
|
||||
UINT8 St4Mm4[10], Reserved7[6];
|
||||
UINT8 St5Mm5[10], Reserved8[6];
|
||||
UINT8 St6Mm6[10], Reserved9[6];
|
||||
UINT8 St7Mm7[10], Reserved10[6];
|
||||
UINT8 Xmm0[16];
|
||||
UINT8 Xmm1[16];
|
||||
UINT8 Xmm2[16];
|
||||
UINT8 Xmm3[16];
|
||||
UINT8 Xmm4[16];
|
||||
UINT8 Xmm5[16];
|
||||
UINT8 Xmm6[16];
|
||||
UINT8 Xmm7[16];
|
||||
UINT8 Reserved11[14 * 16];
|
||||
} EFI_FX_SAVE_STATE_IA32;
|
||||
#else
|
||||
UINT8 St0Mm0[10], Reserved3[6];
|
||||
UINT8 St0Mm1[10], Reserved4[6];
|
||||
UINT8 St0Mm2[10], Reserved5[6];
|
||||
UINT8 St0Mm3[10], Reserved6[6];
|
||||
UINT8 St0Mm4[10], Reserved7[6];
|
||||
UINT8 St0Mm5[10], Reserved8[6];
|
||||
UINT8 St0Mm6[10], Reserved9[6];
|
||||
UINT8 St0Mm7[10], Reserved10[6];
|
||||
UINT8 Reserved11[22 * 16];
|
||||
} EFI_FX_SAVE_STATE;
|
||||
#endif
|
||||
|
||||
typedef struct {
|
||||
UINT32 ExceptionData;
|
||||
#if (EFI_SPECIFICATION_VERSION >= 0x00020000)
|
||||
EFI_FX_SAVE_STATE_IA32 FxSaveState;
|
||||
#else
|
||||
EFI_FX_SAVE_STATE FxSaveState;
|
||||
#endif
|
||||
UINT32 Dr0;
|
||||
UINT32 Dr1;
|
||||
UINT32 Dr2;
|
||||
UINT32 Dr3;
|
||||
UINT32 Dr6;
|
||||
UINT32 Dr7;
|
||||
UINT32 Cr0;
|
||||
UINT32 Cr1; /* Reserved */
|
||||
UINT32 Cr2;
|
||||
UINT32 Cr3;
|
||||
UINT32 Cr4;
|
||||
UINT32 Eflags;
|
||||
UINT32 Ldtr;
|
||||
UINT32 Tr;
|
||||
UINT32 Gdtr[2];
|
||||
UINT32 Idtr[2];
|
||||
UINT32 Eip;
|
||||
UINT32 Gs;
|
||||
UINT32 Fs;
|
||||
UINT32 Es;
|
||||
UINT32 Ds;
|
||||
UINT32 Cs;
|
||||
UINT32 Ss;
|
||||
UINT32 Edi;
|
||||
UINT32 Esi;
|
||||
UINT32 Ebp;
|
||||
UINT32 Esp;
|
||||
UINT32 Ebx;
|
||||
UINT32 Edx;
|
||||
UINT32 Ecx;
|
||||
UINT32 Eax;
|
||||
} EFI_SYSTEM_CONTEXT_IA32;
|
||||
|
||||
//
|
||||
// X64 processor exception types
|
||||
//
|
||||
#define EXCEPT_X64_DIVIDE_ERROR 0
|
||||
#define EXCEPT_X64_DEBUG 1
|
||||
#define EXCEPT_X64_NMI 2
|
||||
#define EXCEPT_X64_BREAKPOINT 3
|
||||
#define EXCEPT_X64_OVERFLOW 4
|
||||
#define EXCEPT_X64_BOUND 5
|
||||
#define EXCEPT_X64_INVALID_OPCODE 6
|
||||
#define EXCEPT_X64_DOUBLE_FAULT 8
|
||||
#define EXCEPT_X64_INVALID_TSS 10
|
||||
#define EXCEPT_X64_SEG_NOT_PRESENT 11
|
||||
#define EXCEPT_X64_STACK_FAULT 12
|
||||
#define EXCEPT_X64_GP_FAULT 13
|
||||
#define EXCEPT_X64_PAGE_FAULT 14
|
||||
#define EXCEPT_X64_FP_ERROR 16
|
||||
#define EXCEPT_X64_ALIGNMENT_CHECK 17
|
||||
#define EXCEPT_X64_MACHINE_CHECK 18
|
||||
#define EXCEPT_X64_SIMD 19
|
||||
|
||||
//
|
||||
// X64 processor context definition
|
||||
//
|
||||
// FXSAVE_STATE
|
||||
// FP / MMX / XMM registers (see fxrstor instruction definition)
|
||||
//
|
||||
typedef struct {
|
||||
UINT16 Fcw;
|
||||
UINT16 Fsw;
|
||||
UINT16 Ftw;
|
||||
UINT16 Opcode;
|
||||
UINT64 Rip;
|
||||
UINT64 DataOffset;
|
||||
UINT8 Reserved1[8];
|
||||
UINT8 St0Mm0[10], Reserved2[6];
|
||||
UINT8 St1Mm1[10], Reserved3[6];
|
||||
UINT8 St2Mm2[10], Reserved4[6];
|
||||
UINT8 St3Mm3[10], Reserved5[6];
|
||||
UINT8 St4Mm4[10], Reserved6[6];
|
||||
UINT8 St5Mm5[10], Reserved7[6];
|
||||
UINT8 St6Mm6[10], Reserved8[6];
|
||||
UINT8 St7Mm7[10], Reserved9[6];
|
||||
UINT8 Xmm0[16];
|
||||
UINT8 Xmm1[16];
|
||||
UINT8 Xmm2[16];
|
||||
UINT8 Xmm3[16];
|
||||
UINT8 Xmm4[16];
|
||||
UINT8 Xmm5[16];
|
||||
UINT8 Xmm6[16];
|
||||
UINT8 Xmm7[16];
|
||||
#if (EFI_SPECIFICATION_VERSION >= 0x00020000)
|
||||
//
|
||||
// NOTE: UEFI 2.0 spec definition as follows. It should be updated
|
||||
// after spec update.
|
||||
//
|
||||
UINT8 Reserved11[14 * 16];
|
||||
#else
|
||||
UINT8 Xmm8[16];
|
||||
UINT8 Xmm9[16];
|
||||
UINT8 Xmm10[16];
|
||||
UINT8 Xmm11[16];
|
||||
UINT8 Xmm12[16];
|
||||
UINT8 Xmm13[16];
|
||||
UINT8 Xmm14[16];
|
||||
UINT8 Xmm15[16];
|
||||
UINT8 Reserved10[6 * 16];
|
||||
#endif
|
||||
} EFI_FX_SAVE_STATE_X64;
|
||||
|
||||
typedef struct {
|
||||
UINT64 ExceptionData;
|
||||
EFI_FX_SAVE_STATE_X64 FxSaveState;
|
||||
UINT64 Dr0;
|
||||
UINT64 Dr1;
|
||||
UINT64 Dr2;
|
||||
UINT64 Dr3;
|
||||
UINT64 Dr6;
|
||||
UINT64 Dr7;
|
||||
UINT64 Cr0;
|
||||
UINT64 Cr1; /* Reserved */
|
||||
UINT64 Cr2;
|
||||
UINT64 Cr3;
|
||||
UINT64 Cr4;
|
||||
UINT64 Cr8;
|
||||
UINT64 Rflags;
|
||||
UINT64 Ldtr;
|
||||
UINT64 Tr;
|
||||
UINT64 Gdtr[2];
|
||||
UINT64 Idtr[2];
|
||||
UINT64 Rip;
|
||||
UINT64 Gs;
|
||||
UINT64 Fs;
|
||||
UINT64 Es;
|
||||
UINT64 Ds;
|
||||
UINT64 Cs;
|
||||
UINT64 Ss;
|
||||
UINT64 Rdi;
|
||||
UINT64 Rsi;
|
||||
UINT64 Rbp;
|
||||
UINT64 Rsp;
|
||||
UINT64 Rbx;
|
||||
UINT64 Rdx;
|
||||
UINT64 Rcx;
|
||||
UINT64 Rax;
|
||||
UINT64 R8;
|
||||
UINT64 R9;
|
||||
UINT64 R10;
|
||||
UINT64 R11;
|
||||
UINT64 R12;
|
||||
UINT64 R13;
|
||||
UINT64 R14;
|
||||
UINT64 R15;
|
||||
} EFI_SYSTEM_CONTEXT_X64;
|
||||
|
||||
//
|
||||
// IPF processor exception types
|
||||
//
|
||||
#define EXCEPT_IPF_VHTP_TRANSLATION 0
|
||||
#define EXCEPT_IPF_INSTRUCTION_TLB 1
|
||||
#define EXCEPT_IPF_DATA_TLB 2
|
||||
#define EXCEPT_IPF_ALT_INSTRUCTION_TLB 3
|
||||
#define EXCEPT_IPF_ALT_DATA_TLB 4
|
||||
#define EXCEPT_IPF_DATA_NESTED_TLB 5
|
||||
#define EXCEPT_IPF_INSTRUCTION_KEY_MISSED 6
|
||||
#define EXCEPT_IPF_DATA_KEY_MISSED 7
|
||||
#define EXCEPT_IPF_DIRTY_BIT 8
|
||||
#define EXCEPT_IPF_INSTRUCTION_ACCESS_BIT 9
|
||||
#define EXCEPT_IPF_DATA_ACCESS_BIT 10
|
||||
#define EXCEPT_IPF_BREAKPOINT 11
|
||||
#define EXCEPT_IPF_EXTERNAL_INTERRUPT 12
|
||||
//
|
||||
// 13 - 19 reserved
|
||||
//
|
||||
#define EXCEPT_IPF_PAGE_NOT_PRESENT 20
|
||||
#define EXCEPT_IPF_KEY_PERMISSION 21
|
||||
#define EXCEPT_IPF_INSTRUCTION_ACCESS_RIGHTS 22
|
||||
#define EXCEPT_IPF_DATA_ACCESS_RIGHTS 23
|
||||
#define EXCEPT_IPF_GENERAL_EXCEPTION 24
|
||||
#define EXCEPT_IPF_DISABLED_FP_REGISTER 25
|
||||
#define EXCEPT_IPF_NAT_CONSUMPTION 26
|
||||
#define EXCEPT_IPF_SPECULATION 27
|
||||
//
|
||||
// 28 reserved
|
||||
//
|
||||
#define EXCEPT_IPF_DEBUG 29
|
||||
#define EXCEPT_IPF_UNALIGNED_REFERENCE 30
|
||||
#define EXCEPT_IPF_UNSUPPORTED_DATA_REFERENCE 31
|
||||
#define EXCEPT_IPF_FP_FAULT 32
|
||||
#define EXCEPT_IPF_FP_TRAP 33
|
||||
#define EXCEPT_IPF_LOWER_PRIVILEGE_TRANSFER_TRAP 34
|
||||
#define EXCEPT_IPF_TAKEN_BRANCH 35
|
||||
#define EXCEPT_IPF_SINGLE_STEP 36
|
||||
//
|
||||
// 37 - 44 reserved
|
||||
//
|
||||
#define EXCEPT_IPF_IA32_EXCEPTION 45
|
||||
#define EXCEPT_IPF_IA32_INTERCEPT 46
|
||||
#define EXCEPT_IPF_IA32_INTERRUPT 47
|
||||
|
||||
//
|
||||
// IPF processor context definition
|
||||
//
|
||||
typedef struct {
|
||||
//
|
||||
// The first reserved field is necessary to preserve alignment for the correct
|
||||
// bits in UNAT and to insure F2 is 16 byte aligned..
|
||||
//
|
||||
UINT64 Reserved;
|
||||
UINT64 R1;
|
||||
UINT64 R2;
|
||||
UINT64 R3;
|
||||
UINT64 R4;
|
||||
UINT64 R5;
|
||||
UINT64 R6;
|
||||
UINT64 R7;
|
||||
UINT64 R8;
|
||||
UINT64 R9;
|
||||
UINT64 R10;
|
||||
UINT64 R11;
|
||||
UINT64 R12;
|
||||
UINT64 R13;
|
||||
UINT64 R14;
|
||||
UINT64 R15;
|
||||
UINT64 R16;
|
||||
UINT64 R17;
|
||||
UINT64 R18;
|
||||
UINT64 R19;
|
||||
UINT64 R20;
|
||||
UINT64 R21;
|
||||
UINT64 R22;
|
||||
UINT64 R23;
|
||||
UINT64 R24;
|
||||
UINT64 R25;
|
||||
UINT64 R26;
|
||||
UINT64 R27;
|
||||
UINT64 R28;
|
||||
UINT64 R29;
|
||||
UINT64 R30;
|
||||
UINT64 R31;
|
||||
|
||||
UINT64 F2[2];
|
||||
UINT64 F3[2];
|
||||
UINT64 F4[2];
|
||||
UINT64 F5[2];
|
||||
UINT64 F6[2];
|
||||
UINT64 F7[2];
|
||||
UINT64 F8[2];
|
||||
UINT64 F9[2];
|
||||
UINT64 F10[2];
|
||||
UINT64 F11[2];
|
||||
UINT64 F12[2];
|
||||
UINT64 F13[2];
|
||||
UINT64 F14[2];
|
||||
UINT64 F15[2];
|
||||
UINT64 F16[2];
|
||||
UINT64 F17[2];
|
||||
UINT64 F18[2];
|
||||
UINT64 F19[2];
|
||||
UINT64 F20[2];
|
||||
UINT64 F21[2];
|
||||
UINT64 F22[2];
|
||||
UINT64 F23[2];
|
||||
UINT64 F24[2];
|
||||
UINT64 F25[2];
|
||||
UINT64 F26[2];
|
||||
UINT64 F27[2];
|
||||
UINT64 F28[2];
|
||||
UINT64 F29[2];
|
||||
UINT64 F30[2];
|
||||
UINT64 F31[2];
|
||||
|
||||
UINT64 Pr;
|
||||
|
||||
UINT64 B0;
|
||||
UINT64 B1;
|
||||
UINT64 B2;
|
||||
UINT64 B3;
|
||||
UINT64 B4;
|
||||
UINT64 B5;
|
||||
UINT64 B6;
|
||||
UINT64 B7;
|
||||
|
||||
//
|
||||
// application registers
|
||||
//
|
||||
UINT64 ArRsc;
|
||||
UINT64 ArBsp;
|
||||
UINT64 ArBspstore;
|
||||
UINT64 ArRnat;
|
||||
|
||||
UINT64 ArFcr;
|
||||
|
||||
UINT64 ArEflag;
|
||||
UINT64 ArCsd;
|
||||
UINT64 ArSsd;
|
||||
UINT64 ArCflg;
|
||||
UINT64 ArFsr;
|
||||
UINT64 ArFir;
|
||||
UINT64 ArFdr;
|
||||
|
||||
UINT64 ArCcv;
|
||||
|
||||
UINT64 ArUnat;
|
||||
|
||||
UINT64 ArFpsr;
|
||||
|
||||
UINT64 ArPfs;
|
||||
UINT64 ArLc;
|
||||
UINT64 ArEc;
|
||||
|
||||
//
|
||||
// control registers
|
||||
//
|
||||
UINT64 CrDcr;
|
||||
UINT64 CrItm;
|
||||
UINT64 CrIva;
|
||||
UINT64 CrPta;
|
||||
UINT64 CrIpsr;
|
||||
UINT64 CrIsr;
|
||||
UINT64 CrIip;
|
||||
UINT64 CrIfa;
|
||||
UINT64 CrItir;
|
||||
UINT64 CrIipa;
|
||||
UINT64 CrIfs;
|
||||
UINT64 CrIim;
|
||||
UINT64 CrIha;
|
||||
|
||||
//
|
||||
// debug registers
|
||||
//
|
||||
UINT64 Dbr0;
|
||||
UINT64 Dbr1;
|
||||
UINT64 Dbr2;
|
||||
UINT64 Dbr3;
|
||||
UINT64 Dbr4;
|
||||
UINT64 Dbr5;
|
||||
UINT64 Dbr6;
|
||||
UINT64 Dbr7;
|
||||
|
||||
UINT64 Ibr0;
|
||||
UINT64 Ibr1;
|
||||
UINT64 Ibr2;
|
||||
UINT64 Ibr3;
|
||||
UINT64 Ibr4;
|
||||
UINT64 Ibr5;
|
||||
UINT64 Ibr6;
|
||||
UINT64 Ibr7;
|
||||
|
||||
//
|
||||
// virtual registers - nat bits for R1-R31
|
||||
//
|
||||
UINT64 IntNat;
|
||||
|
||||
} EFI_SYSTEM_CONTEXT_IPF;
|
||||
|
||||
//
|
||||
// EBC processor exception types
|
||||
//
|
||||
#define EXCEPT_EBC_UNDEFINED 0
|
||||
#define EXCEPT_EBC_DIVIDE_ERROR 1
|
||||
#define EXCEPT_EBC_DEBUG 2
|
||||
#define EXCEPT_EBC_BREAKPOINT 3
|
||||
#define EXCEPT_EBC_OVERFLOW 4
|
||||
#define EXCEPT_EBC_INVALID_OPCODE 5 // opcode out of range
|
||||
#define EXCEPT_EBC_STACK_FAULT 6
|
||||
#define EXCEPT_EBC_ALIGNMENT_CHECK 7
|
||||
#define EXCEPT_EBC_INSTRUCTION_ENCODING 8 // malformed instruction
|
||||
#define EXCEPT_EBC_BAD_BREAK 9 // BREAK 0 or undefined BREAK
|
||||
#define EXCEPT_EBC_STEP 10 // to support debug stepping
|
||||
//
|
||||
// For coding convenience, define the maximum valid EBC exception.
|
||||
//
|
||||
#define MAX_EBC_EXCEPTION EXCEPT_EBC_STEP
|
||||
|
||||
//
|
||||
// EBC processor context definition
|
||||
//
|
||||
typedef struct {
|
||||
UINT64 R0;
|
||||
UINT64 R1;
|
||||
UINT64 R2;
|
||||
UINT64 R3;
|
||||
UINT64 R4;
|
||||
UINT64 R5;
|
||||
UINT64 R6;
|
||||
UINT64 R7;
|
||||
UINT64 Flags;
|
||||
UINT64 ControlFlags;
|
||||
UINT64 Ip;
|
||||
} EFI_SYSTEM_CONTEXT_EBC;
|
||||
|
||||
//
|
||||
// Universal EFI_SYSTEM_CONTEXT definition
|
||||
//
|
||||
typedef union {
|
||||
EFI_SYSTEM_CONTEXT_EBC *SystemContextEbc;
|
||||
EFI_SYSTEM_CONTEXT_IA32 *SystemContextIa32;
|
||||
EFI_SYSTEM_CONTEXT_X64 *SystemContextX64;
|
||||
EFI_SYSTEM_CONTEXT_IPF *SystemContextIpf;
|
||||
} EFI_SYSTEM_CONTEXT;
|
||||
|
||||
//
|
||||
// DebugSupport callback function prototypes
|
||||
//
|
||||
typedef
|
||||
VOID
|
||||
(*EFI_EXCEPTION_CALLBACK) (
|
||||
IN EFI_EXCEPTION_TYPE ExceptionType,
|
||||
IN OUT EFI_SYSTEM_CONTEXT SystemContext
|
||||
);
|
||||
|
||||
typedef
|
||||
VOID
|
||||
(*EFI_PERIODIC_CALLBACK) (
|
||||
IN OUT EFI_SYSTEM_CONTEXT SystemContext
|
||||
);
|
||||
|
||||
//
|
||||
// Machine type definition
|
||||
//
|
||||
typedef enum {
|
||||
IsaIa32 = EFI_IMAGE_MACHINE_IA32,
|
||||
IsaX64 = EFI_IMAGE_MACHINE_X64,
|
||||
IsaIpf = EFI_IMAGE_MACHINE_IA64,
|
||||
IsaEbc = EFI_IMAGE_MACHINE_EBC
|
||||
} EFI_INSTRUCTION_SET_ARCHITECTURE;
|
||||
|
||||
EFI_FORWARD_DECLARATION (EFI_DEBUG_SUPPORT_PROTOCOL);
|
||||
|
||||
//
|
||||
// DebugSupport member function definitions
|
||||
//
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_GET_MAXIMUM_PROCESSOR_INDEX) (
|
||||
IN EFI_DEBUG_SUPPORT_PROTOCOL * This,
|
||||
OUT UINTN *MaxProcessorIndex
|
||||
);
|
||||
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_REGISTER_PERIODIC_CALLBACK) (
|
||||
IN EFI_DEBUG_SUPPORT_PROTOCOL * This,
|
||||
IN UINTN ProcessorIndex,
|
||||
IN EFI_PERIODIC_CALLBACK PeriodicCallback
|
||||
);
|
||||
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_REGISTER_EXCEPTION_CALLBACK) (
|
||||
IN EFI_DEBUG_SUPPORT_PROTOCOL * This,
|
||||
IN UINTN ProcessorIndex,
|
||||
IN EFI_EXCEPTION_CALLBACK ExceptionCallback,
|
||||
IN EFI_EXCEPTION_TYPE ExceptionType
|
||||
);
|
||||
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_INVALIDATE_INSTRUCTION_CACHE) (
|
||||
IN EFI_DEBUG_SUPPORT_PROTOCOL * This,
|
||||
IN UINTN ProcessorIndex,
|
||||
IN VOID *Start,
|
||||
IN UINT64 Length
|
||||
);
|
||||
|
||||
//
|
||||
// DebugSupport protocol definition
|
||||
//
|
||||
typedef struct _EFI_DEBUG_SUPPORT_PROTOCOL {
|
||||
EFI_INSTRUCTION_SET_ARCHITECTURE Isa;
|
||||
EFI_GET_MAXIMUM_PROCESSOR_INDEX GetMaximumProcessorIndex;
|
||||
EFI_REGISTER_PERIODIC_CALLBACK RegisterPeriodicCallback;
|
||||
EFI_REGISTER_EXCEPTION_CALLBACK RegisterExceptionCallback;
|
||||
EFI_INVALIDATE_INSTRUCTION_CACHE InvalidateInstructionCache;
|
||||
} EFI_DEBUG_SUPPORT_PROTOCOL;
|
||||
|
||||
extern EFI_GUID gEfiDebugSupportProtocolGuid;
|
||||
|
||||
#endif /* _DEBUG_SUPPORT_H_ */
|
@@ -0,0 +1,27 @@
|
||||
/*++
|
||||
|
||||
Copyright (c) 2004, 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
|
||||
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:
|
||||
|
||||
Decompress.c
|
||||
|
||||
Abstract:
|
||||
|
||||
The GUID for the EFI Decompress Protocol
|
||||
|
||||
--*/
|
||||
|
||||
#include "EfiSpec.h"
|
||||
#include EFI_PROTOCOL_DEFINITION (Decompress)
|
||||
|
||||
EFI_GUID gEfiDecompressProtocolGuid = EFI_DECOMPRESS_PROTOCOL_GUID;
|
||||
|
||||
EFI_GUID_STRING(&gEfiDecompressProtocolGuid, "Decompress", "Decompression Protocol");
|
@@ -0,0 +1,140 @@
|
||||
/*++
|
||||
|
||||
Copyright (c) 2004, 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
|
||||
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:
|
||||
|
||||
Decompress.h
|
||||
|
||||
Abstract:
|
||||
|
||||
The Decompress Protocol Interface
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef _DECOMPRESS_H_
|
||||
#define _DECOMPRESS_H_
|
||||
|
||||
#define EFI_DECOMPRESS_PROTOCOL_GUID \
|
||||
{ \
|
||||
0xd8117cfe, 0x94a6, 0x11d4, 0x9a, 0x3a, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d \
|
||||
}
|
||||
|
||||
EFI_FORWARD_DECLARATION (EFI_DECOMPRESS_PROTOCOL);
|
||||
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_DECOMPRESS_GET_INFO) (
|
||||
IN EFI_DECOMPRESS_PROTOCOL * This,
|
||||
IN VOID *Source,
|
||||
IN UINT32 SourceSize,
|
||||
OUT UINT32 *DestinationSize,
|
||||
OUT UINT32 *ScratchSize
|
||||
);
|
||||
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
|
||||
The GetInfo() function retrieves the size of the uncompressed buffer
|
||||
and the temporary scratch buffer required to decompress the buffer
|
||||
specified by Source and SourceSize. If the size of the uncompressed
|
||||
buffer or the size of the scratch buffer cannot be determined from
|
||||
the compressed data specified by Source and SourceData, then
|
||||
EFI_INVALID_PARAMETER is returned. Otherwise, the size of the uncompressed
|
||||
buffer is returned in DestinationSize, the size of the scratch buffer is
|
||||
returned in ScratchSize, and EFI_SUCCESS is returned.
|
||||
|
||||
The GetInfo() function does not have scratch buffer available to perform
|
||||
a thorough checking of the validity of the source data. It just retrieves
|
||||
the 'Original Size' field from the beginning bytes of the source data and
|
||||
output it as DestinationSize. And ScratchSize is specific to the decompression
|
||||
implementation.
|
||||
|
||||
Arguments:
|
||||
|
||||
This - The protocol instance pointer
|
||||
Source - The source buffer containing the compressed data.
|
||||
SourceSize - The size, in bytes, of source buffer.
|
||||
DestinationSize - A pointer to the size, in bytes, of the uncompressed buffer
|
||||
that will be generated when the compressed buffer specified
|
||||
by Source and SourceSize is decompressed.
|
||||
ScratchSize - A pointer to the size, in bytes, of the scratch buffer that
|
||||
is required to decompress the compressed buffer specified by
|
||||
Source and SourceSize.
|
||||
|
||||
Returns:
|
||||
EFI_SUCCESS - The size of the uncompressed data was returned in DestinationSize
|
||||
and the size of the scratch buffer was returned in ScratchSize.
|
||||
EFI_INVALID_PARAMETER - The size of the uncompressed data or the size of the scratch
|
||||
buffer cannot be determined from the compressed data specified by
|
||||
Source and SourceData.
|
||||
|
||||
--*/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_DECOMPRESS_DECOMPRESS) (
|
||||
IN EFI_DECOMPRESS_PROTOCOL * This,
|
||||
IN VOID *Source,
|
||||
IN UINT32 SourceSize,
|
||||
IN OUT VOID *Destination,
|
||||
IN UINT32 DestinationSize,
|
||||
IN OUT VOID *Scratch,
|
||||
IN UINT32 ScratchSize
|
||||
);
|
||||
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
|
||||
The Decompress() function extracts decompressed data to its original form.
|
||||
|
||||
This protocol is designed so that the decompression algorithm can be
|
||||
implemented without using any memory services. As a result, the
|
||||
Decompress() function is not allowed to call AllocatePool() or
|
||||
AllocatePages() in its implementation. It is the caller's responsibility
|
||||
to allocate and free the Destination and Scratch buffers.
|
||||
|
||||
If the compressed source data specified by Source and SourceSize is
|
||||
sucessfully decompressed into Destination, then EFI_SUCCESS is returned.
|
||||
If the compressed source data specified by Source and SourceSize is not in
|
||||
a valid compressed data format, then EFI_INVALID_PARAMETER is returned.
|
||||
|
||||
Arguments:
|
||||
|
||||
This - The protocol instance pointer
|
||||
Source - The source buffer containing the compressed data.
|
||||
SourceSize - The size of source data.
|
||||
Destination - On output, the destination buffer that contains
|
||||
the uncompressed data.
|
||||
DestinationSize - The size of destination buffer. The size of destination
|
||||
buffer needed is obtained from GetInfo().
|
||||
Scratch - A temporary scratch buffer that is used to perform the
|
||||
decompression.
|
||||
ScratchSize - The size of scratch buffer. The size of scratch buffer needed
|
||||
is obtained from GetInfo().
|
||||
|
||||
Returns:
|
||||
|
||||
EFI_SUCCESS - Decompression completed successfully, and the uncompressed
|
||||
buffer is returned in Destination.
|
||||
EFI_INVALID_PARAMETER
|
||||
- The source buffer specified by Source and SourceSize is
|
||||
corrupted (not in a valid compressed format).
|
||||
|
||||
--*/
|
||||
typedef struct _EFI_DECOMPRESS_PROTOCOL {
|
||||
EFI_DECOMPRESS_GET_INFO GetInfo;
|
||||
EFI_DECOMPRESS_DECOMPRESS Decompress;
|
||||
} EFI_DECOMPRESS_PROTOCOL;
|
||||
|
||||
extern EFI_GUID gEfiDecompressProtocolGuid;
|
||||
|
||||
#endif
|
@@ -0,0 +1,31 @@
|
||||
/*++
|
||||
|
||||
Copyright (c) 2004, 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
|
||||
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:
|
||||
|
||||
DeviceIo.c
|
||||
|
||||
Abstract:
|
||||
|
||||
Device IO protocol as defined in the EFI 1.0 specification.
|
||||
|
||||
Device IO is used to abstract hardware access to devices. It includes
|
||||
memory mapped IO, IO, PCI Config space, and DMA.
|
||||
|
||||
|
||||
--*/
|
||||
|
||||
#include "EfiSpec.h"
|
||||
#include EFI_PROTOCOL_DEFINITION (DeviceIo)
|
||||
|
||||
EFI_GUID gEfiDeviceIoProtocolGuid = EFI_DEVICE_IO_PROTOCOL_GUID;
|
||||
|
||||
EFI_GUID_STRING(&gEfiDeviceIoProtocolGuid, "DeviceIo Protocol", "EFI 1.0 Device IO Protocol");
|
132
EdkCompatibilityPkg/Foundation/Efi/Protocol/DeviceIO/DeviceIO.h
Normal file
132
EdkCompatibilityPkg/Foundation/Efi/Protocol/DeviceIO/DeviceIO.h
Normal file
@@ -0,0 +1,132 @@
|
||||
/*++
|
||||
|
||||
Copyright (c) 2004, 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
|
||||
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:
|
||||
|
||||
DeviceIo.h
|
||||
|
||||
Abstract:
|
||||
|
||||
Device IO protocol as defined in the EFI 1.0 specification.
|
||||
|
||||
Device IO is used to abstract hardware access to devices. It includes
|
||||
memory mapped IO, IO, PCI Config space, and DMA.
|
||||
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef _DEVICE_IO_H_
|
||||
#define _DEVICE_IO_H_
|
||||
|
||||
#define EFI_DEVICE_IO_PROTOCOL_GUID \
|
||||
{ \
|
||||
0xaf6ac311, 0x84c3, 0x11d2, 0x8e, 0x3c, 0x00, 0xa0, 0xc9, 0x69, 0x72, 0x3b \
|
||||
}
|
||||
|
||||
EFI_FORWARD_DECLARATION (EFI_DEVICE_IO_PROTOCOL);
|
||||
|
||||
typedef enum {
|
||||
IO_UINT8,
|
||||
IO_UINT16,
|
||||
IO_UINT32,
|
||||
IO_UINT64,
|
||||
MMIO_COPY_UINT8,
|
||||
MMIO_COPY_UINT16,
|
||||
MMIO_COPY_UINT32,
|
||||
MMIO_COPY_UINT64
|
||||
} EFI_IO_WIDTH;
|
||||
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_DEVICE_IO) (
|
||||
IN EFI_DEVICE_IO_PROTOCOL * This,
|
||||
IN EFI_IO_WIDTH Width,
|
||||
IN UINT64 Address,
|
||||
IN UINTN Count,
|
||||
IN OUT VOID *Buffer
|
||||
);
|
||||
|
||||
typedef struct {
|
||||
EFI_DEVICE_IO Read;
|
||||
EFI_DEVICE_IO Write;
|
||||
} EFI_IO_ACCESS;
|
||||
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_PCI_DEVICE_PATH) (
|
||||
IN EFI_DEVICE_IO_PROTOCOL * This,
|
||||
IN UINT64 Address,
|
||||
IN OUT EFI_DEVICE_PATH_PROTOCOL **PciDevicePath
|
||||
);
|
||||
|
||||
typedef enum {
|
||||
EfiBusMasterRead,
|
||||
EfiBusMasterWrite,
|
||||
EfiBusMasterCommonBuffer
|
||||
} EFI_IO_OPERATION_TYPE;
|
||||
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_IO_MAP) (
|
||||
IN EFI_DEVICE_IO_PROTOCOL * This,
|
||||
IN EFI_IO_OPERATION_TYPE Operation,
|
||||
IN EFI_PHYSICAL_ADDRESS * HostAddress,
|
||||
IN OUT UINTN *NumberOfBytes,
|
||||
OUT EFI_PHYSICAL_ADDRESS * DeviceAddress,
|
||||
OUT VOID **Mapping
|
||||
);
|
||||
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_IO_UNMAP) (
|
||||
IN EFI_DEVICE_IO_PROTOCOL * This,
|
||||
IN VOID *Mapping
|
||||
);
|
||||
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_IO_ALLOCATE_BUFFER) (
|
||||
IN EFI_DEVICE_IO_PROTOCOL * This,
|
||||
IN EFI_ALLOCATE_TYPE Type,
|
||||
IN EFI_MEMORY_TYPE MemoryType,
|
||||
IN UINTN Pages,
|
||||
IN OUT EFI_PHYSICAL_ADDRESS * HostAddress
|
||||
);
|
||||
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_IO_FLUSH) (
|
||||
IN EFI_DEVICE_IO_PROTOCOL * This
|
||||
);
|
||||
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_IO_FREE_BUFFER) (
|
||||
IN EFI_DEVICE_IO_PROTOCOL * This,
|
||||
IN UINTN Pages,
|
||||
IN EFI_PHYSICAL_ADDRESS HostAddress
|
||||
);
|
||||
|
||||
typedef struct _EFI_DEVICE_IO_PROTOCOL {
|
||||
EFI_IO_ACCESS Mem;
|
||||
EFI_IO_ACCESS Io;
|
||||
EFI_IO_ACCESS Pci;
|
||||
EFI_IO_MAP Map;
|
||||
EFI_PCI_DEVICE_PATH PciDevicePath;
|
||||
EFI_IO_UNMAP Unmap;
|
||||
EFI_IO_ALLOCATE_BUFFER AllocateBuffer;
|
||||
EFI_IO_FLUSH Flush;
|
||||
EFI_IO_FREE_BUFFER FreeBuffer;
|
||||
} EFI_DEVICE_IO_PROTOCOL;
|
||||
|
||||
extern EFI_GUID gEfiDeviceIoProtocolGuid;
|
||||
|
||||
#endif
|
@@ -0,0 +1,32 @@
|
||||
/*++
|
||||
|
||||
Copyright (c) 2004, 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
|
||||
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:
|
||||
|
||||
DevicePath.c
|
||||
|
||||
Abstract:
|
||||
|
||||
The device path protocol as defined in EFI 1.0.
|
||||
|
||||
The device path represents a programatic path to a device. It's the view
|
||||
from a software point of view. It also must persist from boot to boot, so
|
||||
it can not contain things like PCI bus numbers that change from boot to boot.
|
||||
|
||||
|
||||
--*/
|
||||
|
||||
#include "EfiSpec.h"
|
||||
#include EFI_PROTOCOL_DEFINITION (DevicePath)
|
||||
|
||||
EFI_GUID gEfiDevicePathProtocolGuid = EFI_DEVICE_PATH_PROTOCOL_GUID;
|
||||
|
||||
EFI_GUID_STRING(&gEfiDevicePathProtocolGuid, "Device Path Protocol", "EFI 1.0 Device Path protocol");
|
@@ -0,0 +1,67 @@
|
||||
/*++
|
||||
|
||||
Copyright (c) 2004, 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
|
||||
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:
|
||||
|
||||
DevicePath.h
|
||||
|
||||
Abstract:
|
||||
|
||||
The device path protocol as defined in EFI 1.0.
|
||||
|
||||
The device path represents a programatic path to a device. It's the view
|
||||
from a software point of view. It also must persist from boot to boot, so
|
||||
it can not contain things like PCI bus numbers that change from boot to boot.
|
||||
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef _DEVICE_PATH_H_
|
||||
#define _DEVICE_PATH_H_
|
||||
|
||||
//
|
||||
// Device Path protocol
|
||||
//
|
||||
#define EFI_DEVICE_PATH_PROTOCOL_GUID \
|
||||
{ \
|
||||
0x9576e91, 0x6d3f, 0x11d2, 0x8e, 0x39, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b \
|
||||
}
|
||||
|
||||
#pragma pack(push, 1)
|
||||
|
||||
typedef struct {
|
||||
UINT8 Type;
|
||||
UINT8 SubType;
|
||||
UINT8 Length[2];
|
||||
} EFI_DEVICE_PATH_PROTOCOL;
|
||||
|
||||
#pragma pack(pop)
|
||||
|
||||
#define EFI_END_ENTIRE_DEVICE_PATH 0xff
|
||||
#define EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE 0xff
|
||||
#define EFI_END_INSTANCE_DEVICE_PATH 0x01
|
||||
#define EFI_END_DEVICE_PATH_LENGTH (sizeof (EFI_DEVICE_PATH_PROTOCOL))
|
||||
|
||||
#define EfiDevicePathNodeLength(a) (((a)->Length[0]) | ((a)->Length[1] << 8))
|
||||
#define EfiNextDevicePathNode(a) ((EFI_DEVICE_PATH_PROTOCOL *) (((UINT8 *) (a)) + EfiDevicePathNodeLength (a)))
|
||||
|
||||
#define EfiDevicePathType(a) (((a)->Type) & 0x7f)
|
||||
#define EfiIsDevicePathEndType(a) (EfiDevicePathType (a) == 0x7f)
|
||||
|
||||
#define EfiIsDevicePathEndSubType(a) ((a)->SubType == EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE)
|
||||
#define EfiIsDevicePathEndInstanceSubType(a) ((a)->SubType == EFI_END_INSTANCE_DEVICE_PATH)
|
||||
|
||||
#define EfiIsDevicePathEnd(a) (EfiIsDevicePathEndType (a) && EfiIsDevicePathEndSubType (a))
|
||||
#define EfiIsDevicePathEndInstance(a) (EfiIsDevicePathEndType (a) && EfiIsDevicePathEndInstanceSubType (a))
|
||||
|
||||
extern EFI_GUID gEfiDevicePathProtocolGuid;
|
||||
|
||||
#endif
|
@@ -0,0 +1,27 @@
|
||||
/*++
|
||||
|
||||
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
|
||||
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:
|
||||
|
||||
DevicePathFromText.c
|
||||
|
||||
Abstract:
|
||||
|
||||
DevicePathFromText protocol as defined in the UEFI 2.0 specification.
|
||||
|
||||
--*/
|
||||
|
||||
#include "EfiSpec.h"
|
||||
#include EFI_PROTOCOL_DEFINITION (DevicePathFromText)
|
||||
|
||||
EFI_GUID gEfiDevicePathFromTextProtocolGuid = EFI_DEVICE_PATH_FROM_TEXT_PROTOCOL_GUID;
|
||||
|
||||
EFI_GUID_STRING(&gEfiDevicePathFromTextProtocolGuid, "Device Path From Text Protocol", "UEFI 2.0 Device Path From Text Protocol");
|
@@ -0,0 +1,82 @@
|
||||
/*++
|
||||
|
||||
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
|
||||
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:
|
||||
|
||||
DevicePathFromText.h
|
||||
|
||||
Abstract:
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef _DEVICE_PATH_FROM_TEXT_PROTOCOL_H_
|
||||
#define _DEVICE_PATH_FROM_TEXT_PROTOCOL_H_
|
||||
|
||||
//
|
||||
// Device Path From Text protocol
|
||||
//
|
||||
#define EFI_DEVICE_PATH_FROM_TEXT_PROTOCOL_GUID \
|
||||
{ \
|
||||
0x5c99a21, 0xc70f, 0x4ad2, 0x8a, 0x5f, 0x35, 0xdf, 0x33, 0x43, 0xf5, 0x1e \
|
||||
}
|
||||
|
||||
typedef
|
||||
EFI_DEVICE_PATH_PROTOCOL*
|
||||
(EFIAPI *EFI_DEVICE_PATH_FROM_TEXT_NODE) (
|
||||
IN CONST CHAR16 *TextDeviceNode
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
Convert text to the binary representation of a device node.
|
||||
|
||||
Arguments:
|
||||
TextDeviceNode - TextDeviceNode points to the text representation of a device
|
||||
node. Conversion starts with the first character and continues
|
||||
until the first non-device node character.
|
||||
|
||||
Returns:
|
||||
A pointer - Pointer to the EFI device node.
|
||||
NULL - if TextDeviceNode is NULL or there was insufficient memory.
|
||||
|
||||
--*/
|
||||
;
|
||||
|
||||
typedef
|
||||
EFI_DEVICE_PATH_PROTOCOL*
|
||||
(EFIAPI *EFI_DEVICE_PATH_FROM_TEXT_PATH) (
|
||||
IN CONST CHAR16 *TextDevicePath
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
Convert text to the binary representation of a device path.
|
||||
|
||||
Arguments:
|
||||
TextDevicePath - TextDevicePath points to the text representation of a device
|
||||
path. Conversion starts with the first character and continues
|
||||
until the first non-device node character.
|
||||
|
||||
Returns:
|
||||
A pointer - Pointer to the allocated device path.
|
||||
NULL - if TextDeviceNode is NULL or there was insufficient memory.
|
||||
|
||||
--*/
|
||||
;
|
||||
|
||||
typedef struct {
|
||||
EFI_DEVICE_PATH_FROM_TEXT_NODE ConvertTextToDeviceNode;
|
||||
EFI_DEVICE_PATH_FROM_TEXT_PATH ConvertTextToDevicePath;
|
||||
} EFI_DEVICE_PATH_FROM_TEXT_PROTOCOL;
|
||||
|
||||
extern EFI_GUID gEfiDevicePathFromTextProtocolGuid;
|
||||
|
||||
#endif
|
@@ -0,0 +1,27 @@
|
||||
/*++
|
||||
|
||||
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
|
||||
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:
|
||||
|
||||
DevicePathToText.c
|
||||
|
||||
Abstract:
|
||||
|
||||
DevicePathToText protocol as defined in the UEFI 2.0 specification.
|
||||
|
||||
--*/
|
||||
|
||||
#include "EfiSpec.h"
|
||||
#include EFI_PROTOCOL_DEFINITION (DevicePathToText)
|
||||
|
||||
EFI_GUID gEfiDevicePathToTextProtocolGuid = EFI_DEVICE_PATH_TO_TEXT_PROTOCOL_GUID;
|
||||
|
||||
EFI_GUID_STRING(&gEfiDevicePathToTextProtocolGuid, "Device Path To Text Protocol", "UEFI 2.0 Device Path To Text protocol");
|
@@ -0,0 +1,95 @@
|
||||
/*++
|
||||
|
||||
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
|
||||
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:
|
||||
|
||||
DevicePathToText.h
|
||||
|
||||
Abstract:
|
||||
|
||||
--*/
|
||||
|
||||
|
||||
#ifndef _DEVICE_PATH_TO_TEXT_PROTOCOL_H_
|
||||
#define _DEVICE_PATH_TO_TEXT_PROTOCOL_H_
|
||||
|
||||
//
|
||||
// Device Path To Text protocol
|
||||
//
|
||||
#define EFI_DEVICE_PATH_TO_TEXT_PROTOCOL_GUID \
|
||||
{ \
|
||||
0x8b843e20, 0x8132, 0x4852, 0x90, 0xcc, 0x55, 0x1a, 0x4e, 0x4a, 0x7f, 0x1c \
|
||||
}
|
||||
|
||||
typedef
|
||||
CHAR16*
|
||||
(EFIAPI *EFI_DEVICE_PATH_TO_TEXT_NODE) (
|
||||
IN CONST EFI_DEVICE_PATH_PROTOCOL *DeviceNode,
|
||||
IN BOOLEAN DisplayOnly,
|
||||
IN BOOLEAN AllowShortcuts
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
Convert a device node to its text representation.
|
||||
|
||||
Arguments:
|
||||
DeviceNode - Points to the device node to be converted.
|
||||
DisplayOnly - If DisplayOnly is TRUE, then the shorter text representation
|
||||
of the display node is used, where applicable. If DisplayOnly
|
||||
is FALSE, then the longer text representation of the display node
|
||||
is used.
|
||||
AllowShortcuts - If AllowShortcuts is TRUE, then the shortcut forms of text
|
||||
representation for a device node can be used, where applicable.
|
||||
|
||||
Returns:
|
||||
A pointer - a pointer to the allocated text representation of the device node.
|
||||
NULL - if DeviceNode is NULL or there was insufficient memory.
|
||||
|
||||
--*/
|
||||
;
|
||||
|
||||
typedef
|
||||
CHAR16*
|
||||
(EFIAPI *EFI_DEVICE_PATH_TO_TEXT_PATH) (
|
||||
IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath,
|
||||
IN BOOLEAN DisplayOnly,
|
||||
IN BOOLEAN AllowShortcuts
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
Convert a device path to its text representation.
|
||||
|
||||
Arguments:
|
||||
DeviceNode - Points to the device path to be converted.
|
||||
DisplayOnly - If DisplayOnly is TRUE, then the shorter text representation
|
||||
of the display node is used, where applicable. If DisplayOnly
|
||||
is FALSE, then the longer text representation of the display node
|
||||
is used.
|
||||
AllowShortcuts - If AllowShortcuts is TRUE, then the shortcut forms of text
|
||||
representation for a device node can be used, where applicable.
|
||||
|
||||
Returns:
|
||||
A pointer - a pointer to the allocated text representation of the device path.
|
||||
NULL - if DeviceNode is NULL or there was insufficient memory.
|
||||
|
||||
--*/
|
||||
;
|
||||
|
||||
typedef struct {
|
||||
EFI_DEVICE_PATH_TO_TEXT_NODE ConvertDeviceNodeToText;
|
||||
EFI_DEVICE_PATH_TO_TEXT_PATH ConvertDevicePathToText;
|
||||
} EFI_DEVICE_PATH_TO_TEXT_PROTOCOL;
|
||||
|
||||
extern EFI_GUID gEfiDevicePathToTextProtocolGuid;
|
||||
|
||||
#endif
|
@@ -0,0 +1,27 @@
|
||||
/*++
|
||||
|
||||
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
|
||||
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:
|
||||
|
||||
DevicePathUtilities.c
|
||||
|
||||
Abstract:
|
||||
|
||||
DevicePathUtilities protocol as defined in the UEFI 2.0 specification.
|
||||
|
||||
--*/
|
||||
|
||||
#include "EfiSpec.h"
|
||||
#include EFI_PROTOCOL_DEFINITION (DevicePathUtilities)
|
||||
|
||||
EFI_GUID gEfiDevicePathUtilitiesProtocolGuid = EFI_DEVICE_PATH_UTILITIES_PROTOCOL_GUID;
|
||||
|
||||
EFI_GUID_STRING(&gEfiDevicePathUtilitiesProtocolGuid, "Device Path Utilities Protocol", "UEFI 2.0 Device Path Utilities protocol");
|
@@ -0,0 +1,225 @@
|
||||
/*++
|
||||
|
||||
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
|
||||
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:
|
||||
|
||||
DevicePathUtilities.h
|
||||
|
||||
Abstract:
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef _DEVICE_PATH_UTILITIES_PROTOCOL_H_
|
||||
#define _DEVICE_PATH_UTILITIES_PROTOCOL_H_
|
||||
|
||||
//
|
||||
// Device Path Utilities protocol
|
||||
//
|
||||
#define EFI_DEVICE_PATH_UTILITIES_PROTOCOL_GUID \
|
||||
{ \
|
||||
0x379be4e, 0xd706, 0x437d, 0xb0, 0x37, 0xed, 0xb8, 0x2f, 0xb7, 0x72, 0xa4 \
|
||||
}
|
||||
|
||||
typedef
|
||||
UINTN
|
||||
(EFIAPI *EFI_DEVICE_PATH_UTILS_GET_DEVICE_PATH_SIZE) (
|
||||
IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
Returns the size of the device path, in bytes.
|
||||
|
||||
Arguments:
|
||||
DevicePath - Points to the start of the EFI device path.
|
||||
|
||||
Returns:
|
||||
Size - Size of the specified device path, in bytes, including the end-of-path tag.
|
||||
|
||||
--*/
|
||||
;
|
||||
|
||||
typedef
|
||||
EFI_DEVICE_PATH_PROTOCOL*
|
||||
(EFIAPI *EFI_DEVICE_PATH_UTILS_DUP_DEVICE_PATH) (
|
||||
IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
Create a duplicate of the specified path.
|
||||
|
||||
Arguments:
|
||||
DevicePath - Points to the source EFI device path.
|
||||
|
||||
Returns:
|
||||
Pointer - A pointer to the duplicate device path.
|
||||
NULL - Insufficient memory.
|
||||
|
||||
--*/
|
||||
;
|
||||
|
||||
typedef
|
||||
EFI_DEVICE_PATH_PROTOCOL*
|
||||
(EFIAPI *EFI_DEVICE_PATH_UTILS_APPEND_PATH) (
|
||||
IN CONST EFI_DEVICE_PATH_PROTOCOL *Src1,
|
||||
IN CONST EFI_DEVICE_PATH_PROTOCOL *Src2
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
Create a new path by appending the second device path to the first.
|
||||
|
||||
Arguments:
|
||||
Src1 - Points to the first device path. If NULL, then it is ignored.
|
||||
Src2 - Points to the second device path. If NULL, then it is ignored.
|
||||
|
||||
Returns:
|
||||
Pointer - A pointer to the newly created device path.
|
||||
NULL - Memory could not be allocated
|
||||
or either DevicePath or DeviceNode is NULL.
|
||||
|
||||
--*/
|
||||
;
|
||||
|
||||
typedef
|
||||
EFI_DEVICE_PATH_PROTOCOL*
|
||||
(EFIAPI *EFI_DEVICE_PATH_UTILS_APPEND_NODE) (
|
||||
IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath,
|
||||
IN CONST EFI_DEVICE_PATH_PROTOCOL *DeviceNode
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
Creates a new path by appending the device node to the device path.
|
||||
|
||||
Arguments:
|
||||
DevicePath - Points to the device path.
|
||||
DeviceNode - Points to the device node.
|
||||
|
||||
Returns:
|
||||
Pointer - A pointer to the allocated device node.
|
||||
NULL - Memory could not be allocated
|
||||
or either DevicePath or DeviceNode is NULL.
|
||||
|
||||
--*/
|
||||
;
|
||||
|
||||
typedef
|
||||
EFI_DEVICE_PATH_PROTOCOL*
|
||||
(EFIAPI *EFI_DEVICE_PATH_UTILS_APPEND_INSTANCE) (
|
||||
IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath,
|
||||
IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePathInstance
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
Creates a new path by appending the specified device path instance to the specified device path.
|
||||
|
||||
Arguments:
|
||||
DevicePath - Points to the device path. If NULL, then ignored.
|
||||
DevicePathInstance - Points to the device path instance.
|
||||
|
||||
Returns:
|
||||
Pointer - A pointer to the newly created device path
|
||||
NULL - Memory could not be allocated or DevicePathInstance is NULL.
|
||||
|
||||
--*/
|
||||
;
|
||||
|
||||
typedef
|
||||
EFI_DEVICE_PATH_PROTOCOL*
|
||||
(EFIAPI *EFI_DEVICE_PATH_UTILS_GET_NEXT_INSTANCE) (
|
||||
IN OUT EFI_DEVICE_PATH_PROTOCOL **DevicePathInstance,
|
||||
OUT UINTN *DevicePathInstanceSize
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
Creates a copy of the current device path instance and returns a pointer to the next device path instance.
|
||||
|
||||
Arguments:
|
||||
DevicePathInstance - On input, this holds the pointer to the current device path
|
||||
instance. On output, this holds the pointer to the next
|
||||
device path instance or NULL if there are no more device
|
||||
path instances in the device path.
|
||||
DevicePathInstanceSize - On output, this holds the size of the device path instance,
|
||||
in bytes or zero, if DevicePathInstance is zero.
|
||||
|
||||
Returns:
|
||||
Pointer - A pointer to the copy of the current device path instance.
|
||||
NULL - DevicePathInstace was NULL on entry or there was insufficient memory.
|
||||
|
||||
--*/
|
||||
;
|
||||
|
||||
typedef
|
||||
BOOLEAN
|
||||
(EFIAPI *EFI_DEVICE_PATH_UTILS_IS_MULTI_INSTANCE) (
|
||||
IN CONST EFI_DEVICE_PATH_PROTOCOL *DevicePath
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
Returns whether a device path is multi-instance.
|
||||
|
||||
Arguments:
|
||||
DevicePath - Points to the device path. If NULL, then ignored.
|
||||
|
||||
Returns:
|
||||
TRUE - The device path has more than one instance
|
||||
FALSE - The device path is empty or contains only a single instance.
|
||||
|
||||
--*/
|
||||
;
|
||||
|
||||
typedef
|
||||
EFI_DEVICE_PATH_PROTOCOL*
|
||||
(EFIAPI *EFI_DEVICE_PATH_UTILS_CREATE_NODE) (
|
||||
IN UINT8 NodeType,
|
||||
IN UINT8 NodeSubType,
|
||||
IN UINT16 NodeLength
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
Creates a device node
|
||||
|
||||
Arguments:
|
||||
NodeType - NodeType is the device node type (EFI_DEVICE_PATH.Type) for
|
||||
the new device node.
|
||||
NodeSubType - NodeSubType is the device node sub-type
|
||||
EFI_DEVICE_PATH.SubType) for the new device node.
|
||||
NodeLength - NodeLength is the length of the device node
|
||||
(EFI_DEVICE_PATH.Length) for the new device node.
|
||||
|
||||
Returns:
|
||||
Pointer - A pointer to the newly created device node.
|
||||
NULL - NodeLength is less than
|
||||
the size of the header or there was insufficient memory.
|
||||
|
||||
--*/
|
||||
;
|
||||
|
||||
typedef struct {
|
||||
EFI_DEVICE_PATH_UTILS_GET_DEVICE_PATH_SIZE GetDevicePathSize;
|
||||
EFI_DEVICE_PATH_UTILS_DUP_DEVICE_PATH DuplicateDevicePath;
|
||||
EFI_DEVICE_PATH_UTILS_APPEND_PATH AppendDevicePath;
|
||||
EFI_DEVICE_PATH_UTILS_APPEND_NODE AppendDeviceNode;
|
||||
EFI_DEVICE_PATH_UTILS_APPEND_INSTANCE AppendDevicePathInstance;
|
||||
EFI_DEVICE_PATH_UTILS_GET_NEXT_INSTANCE GetNextDevicePathInstance;
|
||||
EFI_DEVICE_PATH_UTILS_IS_MULTI_INSTANCE IsDevicePathMultiInstance;
|
||||
EFI_DEVICE_PATH_UTILS_CREATE_NODE CreateDeviceNode;
|
||||
} EFI_DEVICE_PATH_UTILITIES_PROTOCOL;
|
||||
|
||||
extern EFI_GUID gEfiDevicePathUtilitiesProtocolGuid;
|
||||
|
||||
#endif
|
41
EdkCompatibilityPkg/Foundation/Efi/Protocol/Dhcp4/Dhcp4.c
Normal file
41
EdkCompatibilityPkg/Foundation/Efi/Protocol/Dhcp4/Dhcp4.c
Normal file
@@ -0,0 +1,41 @@
|
||||
/*++
|
||||
|
||||
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
|
||||
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:
|
||||
|
||||
Dhcp4.c
|
||||
|
||||
Abstract:
|
||||
|
||||
UEFI Dynamic Host Configuration Protocol 4.
|
||||
|
||||
--*/
|
||||
|
||||
#include "EfiSpec.h"
|
||||
#include EFI_PROTOCOL_DEFINITION (Dhcp4)
|
||||
|
||||
EFI_GUID gEfiDhcp4ServiceBindingProtocolGuid
|
||||
= EFI_DHCP4_SERVICE_BINDING_PROTOCOL_GUID;
|
||||
|
||||
EFI_GUID gEfiDhcp4ProtocolGuid
|
||||
= EFI_DHCP4_PROTOCOL_GUID;
|
||||
|
||||
EFI_GUID_STRING (
|
||||
&gEfiDhcp4ServiceBindingProtocolGuid,
|
||||
"DHCP4 Service Binding Protocol",
|
||||
"DHCP4 Service Binding Protocol"
|
||||
);
|
||||
|
||||
EFI_GUID_STRING (
|
||||
&gEfiDhcp4ProtocolGuid,
|
||||
"DHCP4 Protocol",
|
||||
"DHCP4 Protocol"
|
||||
);
|
237
EdkCompatibilityPkg/Foundation/Efi/Protocol/Dhcp4/Dhcp4.h
Normal file
237
EdkCompatibilityPkg/Foundation/Efi/Protocol/Dhcp4/Dhcp4.h
Normal file
@@ -0,0 +1,237 @@
|
||||
/*++
|
||||
|
||||
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
|
||||
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:
|
||||
|
||||
Dhcp4.h
|
||||
|
||||
Abstract:
|
||||
|
||||
UEFI Dynamic Host Configuration Protocol 4 Definition
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef _DHCP4_H_
|
||||
#define _DHCP4_H_
|
||||
|
||||
#include EFI_PROTOCOL_DEFINITION (ServiceBinding)
|
||||
#include EFI_PROTOCOL_DEFINITION (Udp4)
|
||||
|
||||
//GUID definitions
|
||||
#define EFI_DHCP4_PROTOCOL_GUID \
|
||||
{0x8a219718, 0x4ef5, 0x4761, 0x91, 0xc8, 0xc0, 0xf0, 0x4b, 0xda, 0x9e, 0x56}
|
||||
|
||||
#define EFI_DHCP4_SERVICE_BINDING_PROTOCOL_GUID \
|
||||
{0x9d9a39d8, 0xbd42, 0x4a73, 0xa4, 0xd5, 0x8e, 0xe9, 0x4b, 0xe1, 0x13, 0x80}
|
||||
|
||||
extern EFI_GUID gEfiDhcp4ProtocolGuid;
|
||||
extern EFI_GUID gEfiDhcp4ServiceBindingProtocolGuid;
|
||||
|
||||
EFI_FORWARD_DECLARATION (EFI_DHCP4_PROTOCOL);
|
||||
|
||||
#pragma pack(1)
|
||||
typedef struct {
|
||||
UINT8 OpCode;
|
||||
UINT8 Length;
|
||||
UINT8 Data[1];
|
||||
} EFI_DHCP4_PACKET_OPTION;
|
||||
|
||||
typedef struct{
|
||||
UINT8 OpCode;
|
||||
UINT8 HwType;
|
||||
UINT8 HwAddrLen;
|
||||
UINT8 Hops;
|
||||
UINT32 Xid;
|
||||
UINT16 Seconds;
|
||||
UINT16 Reserved;
|
||||
EFI_IPv4_ADDRESS ClientAddr;
|
||||
EFI_IPv4_ADDRESS YourAddr;
|
||||
EFI_IPv4_ADDRESS ServerAddr;
|
||||
EFI_IPv4_ADDRESS GwAddr;
|
||||
UINT8 ClientHwAddr[16];
|
||||
CHAR8 ServerName[64];
|
||||
CHAR8 BootFileName[128];
|
||||
}EFI_DHCP4_HEADER;
|
||||
|
||||
typedef struct {
|
||||
UINT32 Size;
|
||||
UINT32 Length;
|
||||
struct {
|
||||
EFI_DHCP4_HEADER Header;
|
||||
UINT32 Magik;
|
||||
UINT8 Option[1];
|
||||
} Dhcp4;
|
||||
} EFI_DHCP4_PACKET;
|
||||
#pragma pack()
|
||||
|
||||
typedef enum {
|
||||
Dhcp4Stopped = 0x0,
|
||||
Dhcp4Init = 0x1,
|
||||
Dhcp4Selecting = 0x2,
|
||||
Dhcp4Requesting = 0x3,
|
||||
Dhcp4Bound = 0x4,
|
||||
Dhcp4Renewing = 0x5,
|
||||
Dhcp4Rebinding = 0x6,
|
||||
Dhcp4InitReboot = 0x7,
|
||||
Dhcp4Rebooting = 0x8
|
||||
} EFI_DHCP4_STATE;
|
||||
|
||||
typedef enum{
|
||||
Dhcp4SendDiscover = 0x01,
|
||||
Dhcp4RcvdOffer = 0x02,
|
||||
Dhcp4SelectOffer = 0x03,
|
||||
Dhcp4SendRequest = 0x05,
|
||||
Dhcp4RcvdAck = 0x06,
|
||||
Dhcp4RcvdNak = 0x07,
|
||||
Dhcp4SendDecline = 0x08,
|
||||
Dhcp4BoundCompleted = 0x09,
|
||||
Dhcp4EnterRenewing = 0x0a,
|
||||
Dhcp4EnterRebinding = 0x0b,
|
||||
Dhcp4AddressLost = 0x0c,
|
||||
Dhcp4Fail = 0x0d
|
||||
} EFI_DHCP4_EVENT;
|
||||
|
||||
typedef EFI_STATUS (*EFI_DHCP4_CALLBACK)(
|
||||
IN EFI_DHCP4_PROTOCOL *This,
|
||||
IN VOID *Context,
|
||||
IN EFI_DHCP4_STATE CurrentState,
|
||||
IN EFI_DHCP4_EVENT Dhcp4Event,
|
||||
IN EFI_DHCP4_PACKET *Packet OPTIONAL,
|
||||
OUT EFI_DHCP4_PACKET **NewPacket OPTIONAL
|
||||
);
|
||||
|
||||
typedef struct {
|
||||
UINT32 DiscoverTryCount;
|
||||
UINT32 *DiscoverTimeout;
|
||||
UINT32 RequestTryCount;
|
||||
UINT32 *RequestTimeout;
|
||||
EFI_IPv4_ADDRESS ClientAddress;
|
||||
EFI_DHCP4_CALLBACK Dhcp4Callback;
|
||||
VOID *CallbackContext;
|
||||
UINT32 OptionCount;
|
||||
EFI_DHCP4_PACKET_OPTION **OptionList;
|
||||
}EFI_DHCP4_CONFIG_DATA;
|
||||
|
||||
typedef struct {
|
||||
EFI_DHCP4_STATE State;
|
||||
EFI_DHCP4_CONFIG_DATA ConfigData;
|
||||
EFI_IPv4_ADDRESS ClientAddress;
|
||||
EFI_MAC_ADDRESS ClientMacAddress;
|
||||
EFI_IPv4_ADDRESS ServerAddress;
|
||||
EFI_IPv4_ADDRESS RouterAddress;
|
||||
EFI_IPv4_ADDRESS SubnetMask;
|
||||
UINT32 LeaseTime;
|
||||
EFI_DHCP4_PACKET *ReplyPacket;
|
||||
} EFI_DHCP4_MODE_DATA;
|
||||
|
||||
typedef struct {
|
||||
EFI_IPv4_ADDRESS ListenAddress;
|
||||
EFI_IPv4_ADDRESS SubnetMask;
|
||||
UINT16 ListenPort;
|
||||
} EFI_DHCP4_LISTEN_POINT;
|
||||
|
||||
typedef struct {
|
||||
OUT EFI_STATUS Status;
|
||||
IN EFI_EVENT CompletionEvent;
|
||||
IN EFI_IPv4_ADDRESS RemoteAddress;
|
||||
IN UINT16 RemotePort;
|
||||
IN EFI_IPv4_ADDRESS GatewayAddress;
|
||||
IN UINT32 ListenPointCount;
|
||||
IN EFI_DHCP4_LISTEN_POINT *ListenPoints;
|
||||
IN UINT32 TimeoutValue;
|
||||
IN EFI_DHCP4_PACKET *Packet;
|
||||
OUT UINT32 ResponseCount;
|
||||
OUT EFI_DHCP4_PACKET *ResponseList;
|
||||
}EFI_DHCP4_TRANSMIT_RECEIVE_TOKEN;
|
||||
|
||||
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_DHCP4_GET_MODE_DATA)(
|
||||
IN EFI_DHCP4_PROTOCOL *This,
|
||||
OUT EFI_DHCP4_MODE_DATA *Dhcp4ModeData
|
||||
);
|
||||
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_DHCP4_CONFIGURE) (
|
||||
IN EFI_DHCP4_PROTOCOL *This,
|
||||
IN EFI_DHCP4_CONFIG_DATA *Dhcp4CfgData OPTIONAL
|
||||
);
|
||||
|
||||
|
||||
typedef EFI_STATUS
|
||||
(EFIAPI *EFI_DHCP4_START) (
|
||||
IN EFI_DHCP4_PROTOCOL *This,
|
||||
IN EFI_EVENT CompletionEvent OPTIONAL
|
||||
);
|
||||
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_DHCP4_RENEW) (
|
||||
IN EFI_DHCP4_PROTOCOL *This,
|
||||
IN BOOLEAN RebindRequest,
|
||||
IN EFI_EVENT CompletionEvent OPTIONAL
|
||||
);
|
||||
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_DHCP4_RELEASE) (
|
||||
IN EFI_DHCP4_PROTOCOL *This
|
||||
);
|
||||
|
||||
typedef EFI_STATUS
|
||||
(EFIAPI *EFI_DHCP4_STOP) (
|
||||
IN EFI_DHCP4_PROTOCOL *This
|
||||
);
|
||||
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_DHCP4_BUILD) (
|
||||
IN EFI_DHCP4_PROTOCOL *This,
|
||||
IN EFI_DHCP4_PACKET *SeedPacket,
|
||||
IN UINT32 DeleteCount,
|
||||
IN UINT8 *DeleteList OPTIONAL,
|
||||
IN UINT32 AppendCount,
|
||||
IN EFI_DHCP4_PACKET_OPTION *AppendList[] OPTIONAL,
|
||||
OUT EFI_DHCP4_PACKET **NewPacket
|
||||
);
|
||||
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_DHCP4_TRANSMIT_RECEIVE) (
|
||||
IN EFI_DHCP4_PROTOCOL *This,
|
||||
IN EFI_DHCP4_TRANSMIT_RECEIVE_TOKEN *Token
|
||||
);
|
||||
|
||||
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_DHCP4_PARSE) (
|
||||
IN EFI_DHCP4_PROTOCOL *This,
|
||||
IN EFI_DHCP4_PACKET *Packet,
|
||||
IN OUT UINT32 *OptionCount,
|
||||
OUT EFI_DHCP4_PACKET_OPTION *PacketOptionList[] OPTIONAL
|
||||
);
|
||||
|
||||
typedef struct _EFI_DHCP4_PROTOCOL {
|
||||
EFI_DHCP4_GET_MODE_DATA GetModeData;
|
||||
EFI_DHCP4_CONFIGURE Configure;
|
||||
EFI_DHCP4_START Start;
|
||||
EFI_DHCP4_RENEW RenewRebind;
|
||||
EFI_DHCP4_RELEASE Release;
|
||||
EFI_DHCP4_STOP Stop;
|
||||
EFI_DHCP4_BUILD Build;
|
||||
EFI_DHCP4_TRANSMIT_RECEIVE TransmitReceive;
|
||||
EFI_DHCP4_PARSE Parse;
|
||||
} EFI_DHCP4_PROTOCOL;
|
||||
|
||||
#endif
|
31
EdkCompatibilityPkg/Foundation/Efi/Protocol/DiskIO/DiskIo.c
Normal file
31
EdkCompatibilityPkg/Foundation/Efi/Protocol/DiskIO/DiskIo.c
Normal file
@@ -0,0 +1,31 @@
|
||||
/*++
|
||||
|
||||
Copyright (c) 2004, 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
|
||||
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:
|
||||
|
||||
DiskIo.c
|
||||
|
||||
Abstract:
|
||||
|
||||
Disk IO protocol as defined in the EFI 1.0 specification.
|
||||
|
||||
The Disk IO protocol is used to convert block oriented devices into byte
|
||||
oriented devices. The Disk IO protocol is intended to layer on top of the
|
||||
Block IO protocol.
|
||||
|
||||
--*/
|
||||
|
||||
#include "EfiSpec.h"
|
||||
#include EFI_PROTOCOL_DEFINITION (DiskIo)
|
||||
|
||||
EFI_GUID gEfiDiskIoProtocolGuid = EFI_DISK_IO_PROTOCOL_GUID;
|
||||
|
||||
EFI_GUID_STRING(&gEfiDiskIoProtocolGuid, "DiskIo Protocol", "EFI 1.0 Disk IO Protocol");
|
111
EdkCompatibilityPkg/Foundation/Efi/Protocol/DiskIO/DiskIo.h
Normal file
111
EdkCompatibilityPkg/Foundation/Efi/Protocol/DiskIO/DiskIo.h
Normal file
@@ -0,0 +1,111 @@
|
||||
/*++
|
||||
|
||||
Copyright (c) 2004, 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
|
||||
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:
|
||||
|
||||
DiskIo.h
|
||||
|
||||
Abstract:
|
||||
|
||||
Disk IO protocol as defined in the EFI 1.0 specification.
|
||||
|
||||
The Disk IO protocol is used to convert block oriented devices into byte
|
||||
oriented devices. The Disk IO protocol is intended to layer on top of the
|
||||
Block IO protocol.
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef __DISK_IO_H__
|
||||
#define __DISK_IO_H__
|
||||
|
||||
#define EFI_DISK_IO_PROTOCOL_GUID \
|
||||
{ \
|
||||
0xce345171, 0xba0b, 0x11d2, 0x8e, 0x4f, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b \
|
||||
}
|
||||
|
||||
EFI_FORWARD_DECLARATION (EFI_DISK_IO_PROTOCOL);
|
||||
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_DISK_READ) (
|
||||
IN EFI_DISK_IO_PROTOCOL * This,
|
||||
IN UINT32 MediaId,
|
||||
IN UINT64 Offset,
|
||||
IN UINTN BufferSize,
|
||||
OUT VOID *Buffer
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
Read BufferSize bytes from Offset into Buffer.
|
||||
|
||||
Arguments:
|
||||
This - Protocol instance pointer.
|
||||
MediaId - Id of the media, changes every time the media is replaced.
|
||||
Offset - The starting byte offset to read from
|
||||
BufferSize - Size of Buffer
|
||||
Buffer - Buffer containing read data
|
||||
|
||||
Returns:
|
||||
EFI_SUCCESS - The data was read correctly from the device.
|
||||
EFI_DEVICE_ERROR - The device reported an error while performing the read.
|
||||
EFI_NO_MEDIA - There is no media in the device.
|
||||
EFI_MEDIA_CHNAGED - The MediaId does not matched the current device.
|
||||
EFI_INVALID_PARAMETER - The read request contains device addresses that are not
|
||||
valid for the device.
|
||||
|
||||
--*/
|
||||
;
|
||||
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_DISK_WRITE) (
|
||||
IN EFI_DISK_IO_PROTOCOL * This,
|
||||
IN UINT32 MediaId,
|
||||
IN UINT64 Offset,
|
||||
IN UINTN BufferSize,
|
||||
IN VOID *Buffer
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
Read BufferSize bytes from Offset into Buffer.
|
||||
|
||||
Arguments:
|
||||
This - Protocol instance pointer.
|
||||
MediaId - Id of the media, changes every time the media is replaced.
|
||||
Offset - The starting byte offset to read from
|
||||
BufferSize - Size of Buffer
|
||||
Buffer - Buffer containing read data
|
||||
|
||||
Returns:
|
||||
EFI_SUCCESS - The data was written correctly to the device.
|
||||
EFI_WRITE_PROTECTED - The device can not be written to.
|
||||
EFI_DEVICE_ERROR - The device reported an error while performing the write.
|
||||
EFI_NO_MEDIA - There is no media in the device.
|
||||
EFI_MEDIA_CHNAGED - The MediaId does not matched the current device.
|
||||
EFI_INVALID_PARAMETER - The write request contains device addresses that are not
|
||||
valid for the device.
|
||||
|
||||
--*/
|
||||
;
|
||||
|
||||
#define EFI_DISK_IO_PROTOCOL_REVISION 0x00010000
|
||||
|
||||
typedef struct _EFI_DISK_IO_PROTOCOL {
|
||||
UINT64 Revision;
|
||||
EFI_DISK_READ ReadDisk;
|
||||
EFI_DISK_WRITE WriteDisk;
|
||||
} EFI_DISK_IO_PROTOCOL;
|
||||
|
||||
extern EFI_GUID gEfiDiskIoProtocolGuid;
|
||||
|
||||
#endif
|
@@ -0,0 +1,29 @@
|
||||
/*++
|
||||
|
||||
Copyright (c) 2004, 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
|
||||
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:
|
||||
|
||||
DriverBinding.c
|
||||
|
||||
Abstract:
|
||||
|
||||
EFI Controller Driver Protocol
|
||||
|
||||
Revision History
|
||||
|
||||
--*/
|
||||
|
||||
#include "EfiSpec.h"
|
||||
#include EFI_PROTOCOL_DEFINITION (DriverBinding)
|
||||
|
||||
EFI_GUID gEfiDriverBindingProtocolGuid = EFI_DRIVER_BINDING_PROTOCOL_GUID;
|
||||
|
||||
EFI_GUID_STRING(&gEfiDriverBindingProtocolGuid, "Controller Driver Protocol", "EFI 1.1 Controller Driver Protocol");
|
@@ -0,0 +1,130 @@
|
||||
/*++
|
||||
|
||||
Copyright (c) 2004, 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
|
||||
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:
|
||||
|
||||
DriverBinding.h
|
||||
|
||||
Abstract:
|
||||
|
||||
EFI ControllerHandle Driver Protocol
|
||||
|
||||
Revision History
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef _EFI_DRIVER_BINDING_H_
|
||||
#define _EFI_DRIVER_BINDING_H_
|
||||
|
||||
//
|
||||
// Global ID for the ControllerHandle Driver Protocol
|
||||
//
|
||||
#define EFI_DRIVER_BINDING_PROTOCOL_GUID \
|
||||
{ \
|
||||
0x18a031ab, 0xb443, 0x4d1a, 0xa5, 0xc0, 0xc, 0x9, 0x26, 0x1e, 0x9f, 0x71 \
|
||||
}
|
||||
|
||||
EFI_FORWARD_DECLARATION (EFI_DRIVER_BINDING_PROTOCOL);
|
||||
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_DRIVER_BINDING_SUPPORTED) (
|
||||
IN EFI_DRIVER_BINDING_PROTOCOL * This,
|
||||
IN EFI_HANDLE ControllerHandle,
|
||||
IN EFI_DEVICE_PATH_PROTOCOL * RemainingDevicePath OPTIONAL
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
Test to see if this driver supports ControllerHandle.
|
||||
|
||||
Arguments:
|
||||
This - Protocol instance pointer.
|
||||
ControllerHandle - Handle of device to test
|
||||
RemainingDevicePath - Optional parameter use to pick a specific child
|
||||
device to start.
|
||||
|
||||
Returns:
|
||||
EFI_SUCCESS - This driver supports this device
|
||||
EFI_ALREADY_STARTED - This driver is already running on this device
|
||||
other - This driver does not support this device
|
||||
|
||||
--*/
|
||||
;
|
||||
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_DRIVER_BINDING_START) (
|
||||
IN EFI_DRIVER_BINDING_PROTOCOL * This,
|
||||
IN EFI_HANDLE ControllerHandle,
|
||||
IN EFI_DEVICE_PATH_PROTOCOL * RemainingDevicePath OPTIONAL
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
Start this driver on ControllerHandle.
|
||||
|
||||
Arguments:
|
||||
This - Protocol instance pointer.
|
||||
ControllerHandle - Handle of device to bind driver to
|
||||
RemainingDevicePath - Optional parameter use to pick a specific child
|
||||
device to start.
|
||||
|
||||
Returns:
|
||||
EFI_SUCCESS - This driver is added to ControllerHandle
|
||||
EFI_ALREADY_STARTED - This driver is already running on ControllerHandle
|
||||
other - This driver does not support this device
|
||||
|
||||
--*/
|
||||
;
|
||||
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_DRIVER_BINDING_STOP) (
|
||||
IN EFI_DRIVER_BINDING_PROTOCOL * This,
|
||||
IN EFI_HANDLE ControllerHandle,
|
||||
IN UINTN NumberOfChildren,
|
||||
IN EFI_HANDLE * ChildHandleBuffer
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
Stop this driver on ControllerHandle.
|
||||
|
||||
Arguments:
|
||||
This - Protocol instance pointer.
|
||||
ControllerHandle - Handle of device to stop driver on
|
||||
NumberOfChildren - Number of Handles in ChildHandleBuffer. If number of
|
||||
children is zero stop the entire bus driver.
|
||||
ChildHandleBuffer - List of Child Handles to Stop.
|
||||
|
||||
Returns:
|
||||
EFI_SUCCESS - This driver is removed ControllerHandle
|
||||
other - This driver was not removed from this device
|
||||
|
||||
--*/
|
||||
;
|
||||
|
||||
//
|
||||
// Interface structure for the ControllerHandle Driver Protocol
|
||||
//
|
||||
typedef struct _EFI_DRIVER_BINDING_PROTOCOL {
|
||||
EFI_DRIVER_BINDING_SUPPORTED Supported;
|
||||
EFI_DRIVER_BINDING_START Start;
|
||||
EFI_DRIVER_BINDING_STOP Stop;
|
||||
UINT32 Version;
|
||||
EFI_HANDLE ImageHandle;
|
||||
EFI_HANDLE DriverBindingHandle;
|
||||
} EFI_DRIVER_BINDING_PROTOCOL;
|
||||
|
||||
extern EFI_GUID gEfiDriverBindingProtocolGuid;
|
||||
|
||||
#endif
|
@@ -0,0 +1,30 @@
|
||||
/*++
|
||||
|
||||
Copyright (c) 2004, 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
|
||||
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:
|
||||
|
||||
DriverConfiguration.c
|
||||
|
||||
Abstract:
|
||||
|
||||
EFI Driver Configuration Protocol
|
||||
|
||||
Revision History
|
||||
|
||||
--*/
|
||||
|
||||
#include "EfiSpec.h"
|
||||
#include EFI_PROTOCOL_DEFINITION (DriverConfiguration)
|
||||
|
||||
EFI_GUID gEfiDriverConfigurationProtocolGuid = EFI_DRIVER_CONFIGURATION_PROTOCOL_GUID;
|
||||
|
||||
EFI_GUID_STRING
|
||||
(&gEfiDriverConfigurationProtocolGuid, "Driver Configuration Protocol", "EFI 1.1 Driver Configuration Protocol");
|
@@ -0,0 +1,211 @@
|
||||
/*++
|
||||
|
||||
Copyright (c) 2004, 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
|
||||
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:
|
||||
|
||||
DriverConfiguration.h
|
||||
|
||||
Abstract:
|
||||
|
||||
EFI Driver Configuration Protocol
|
||||
|
||||
Revision History
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef _EFI_DRIVER_CONFIGURATION_H_
|
||||
#define _EFI_DRIVER_CONFIGURATION_H_
|
||||
|
||||
//
|
||||
// Global ID for the Driver Configuration Protocol
|
||||
//
|
||||
#define EFI_DRIVER_CONFIGURATION_PROTOCOL_GUID \
|
||||
{ \
|
||||
0x107a772b, 0xd5e1, 0x11d4, 0x9a, 0x46, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d \
|
||||
}
|
||||
|
||||
EFI_FORWARD_DECLARATION (EFI_DRIVER_CONFIGURATION_PROTOCOL);
|
||||
|
||||
typedef enum {
|
||||
EfiDriverConfigurationActionNone = 0,
|
||||
EfiDriverConfigurationActionStopController = 1,
|
||||
EfiDriverConfigurationActionRestartController = 2,
|
||||
EfiDriverConfigurationActionRestartPlatform = 3,
|
||||
EfiDriverConfigurationActionMaximum
|
||||
} EFI_DRIVER_CONFIGURATION_ACTION_REQUIRED;
|
||||
|
||||
#define EFI_DRIVER_CONFIGURATION_SAFE_DEFAULTS 0x00000000
|
||||
#define EFI_DRIVER_CONFIGURATION_MANUFACTURING_DEFAULTS 0x00000001
|
||||
#define EFI_DRIVER_CONFIGURATION_CUSTOM_DEFAULTS 0x00000002
|
||||
#define EFI_DRIVER_CONFIGURATION_PERORMANCE_DEFAULTS 0x00000003
|
||||
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_DRIVER_CONFIGURATION_SET_OPTIONS) (
|
||||
IN EFI_DRIVER_CONFIGURATION_PROTOCOL * This,
|
||||
IN EFI_HANDLE ControllerHandle,
|
||||
IN EFI_HANDLE ChildHandle OPTIONAL,
|
||||
IN CHAR8 *Language,
|
||||
OUT EFI_DRIVER_CONFIGURATION_ACTION_REQUIRED * ActionRequired
|
||||
);
|
||||
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
Allows the user to set controller specific options for a controller that a
|
||||
driver is currently managing.
|
||||
|
||||
Arguments:
|
||||
This - A pointer to the EFI_DRIVER_CONFIGURATION_ PROTOCOL instance.
|
||||
ControllerHandle - The handle of the controller to set options on.
|
||||
ChildHandle - The handle of the child controller to set options on. This
|
||||
is an optional parameter that may be NULL. It will be NULL
|
||||
for device drivers, and for a bus drivers that wish to set
|
||||
options for the bus controller. It will not be NULL for a
|
||||
bus driver that wishes to set options for one of its child
|
||||
controllers.
|
||||
Language - A pointer to a three character ISO 639-2 language identifier.
|
||||
This is the language of the user interface that should be
|
||||
presented to the user, and it must match one of the languages
|
||||
specified in SupportedLanguages. The number of languages
|
||||
supported by a driver is up to the driver writer.
|
||||
ActionRequired - A pointer to the action that the calling agent is required
|
||||
to perform when this function returns. See "Related
|
||||
Definitions" for a list of the actions that the calling
|
||||
agent is required to perform prior to accessing
|
||||
ControllerHandle again.
|
||||
|
||||
Returns:
|
||||
EFI_SUCCESS - The driver specified by This successfully set the
|
||||
configuration options for the controller specified
|
||||
by ControllerHandle..
|
||||
EFI_INVALID_PARAMETER - ControllerHandle is not a valid EFI_HANDLE.
|
||||
EFI_INVALID_PARAMETER - ChildHandle is not NULL and it is not a valid EFI_HANDLE.
|
||||
EFI_INVALID_PARAMETER - ActionRequired is NULL.
|
||||
EFI_UNSUPPORTED - The driver specified by This does not support setting
|
||||
configuration options for the controller specified by
|
||||
ControllerHandle and ChildHandle.
|
||||
EFI_UNSUPPORTED - The driver specified by This does not support the
|
||||
language specified by Language.
|
||||
EFI_DEVICE_ERROR - A device error occurred while attempt to set the
|
||||
configuration options for the controller specified
|
||||
by ControllerHandle and ChildHandle.
|
||||
EFI_OUT_RESOURCES - There are not enough resources available to set the
|
||||
configuration options for the controller specified
|
||||
by ControllerHandle and ChildHandle.
|
||||
|
||||
--*/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_DRIVER_CONFIGURATION_OPTIONS_VALID) (
|
||||
IN EFI_DRIVER_CONFIGURATION_PROTOCOL * This,
|
||||
IN EFI_HANDLE ControllerHandle,
|
||||
IN EFI_HANDLE ChildHandle OPTIONAL
|
||||
);
|
||||
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
Tests to see if a controller's current configuration options are valid.
|
||||
|
||||
Arguments:
|
||||
This - A pointer to the EFI_DRIVER_CONFIGURATION_PROTOCOL instance.
|
||||
ControllerHandle - The handle of the controller to test if it's current
|
||||
configuration options are valid.
|
||||
ChildHandle - The handle of the child controller to test if it's current
|
||||
configuration options are valid. This is an optional
|
||||
parameter that may be NULL. It will be NULL for device
|
||||
drivers. It will also be NULL for a bus drivers that wish
|
||||
to test the configuration options for the bus controller.
|
||||
It will not be NULL for a bus driver that wishes to test
|
||||
configuration options for one of its child controllers.
|
||||
|
||||
Returns:
|
||||
EFI_SUCCESS - The controller specified by ControllerHandle and
|
||||
ChildHandle that is being managed by the driver
|
||||
specified by This has a valid set of configuration
|
||||
options.
|
||||
EFI_INVALID_PARAMETER - ControllerHandle is not a valid EFI_HANDLE.
|
||||
EFI_INVALID_PARAMETER - ChildHandle is not NULL and it is not a valid EFI_HANDLE.
|
||||
EFI_UNSUPPORTED - The driver specified by This is not currently
|
||||
managing the controller specified by ControllerHandle
|
||||
and ChildHandle.
|
||||
EFI_DEVICE_ERROR - The controller specified by ControllerHandle and
|
||||
ChildHandle that is being managed by the driver
|
||||
specified by This has an invalid set of configuration
|
||||
options.
|
||||
|
||||
--*/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_DRIVER_CONFIGURATION_FORCE_DEFAULTS) (
|
||||
IN EFI_DRIVER_CONFIGURATION_PROTOCOL * This,
|
||||
IN EFI_HANDLE ControllerHandle,
|
||||
IN EFI_HANDLE ChildHandle OPTIONAL,
|
||||
IN UINT32 DefaultType,
|
||||
OUT EFI_DRIVER_CONFIGURATION_ACTION_REQUIRED * ActionRequired
|
||||
);
|
||||
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
Forces a driver to set the default configuration options for a controller.
|
||||
|
||||
Arguments:
|
||||
This - A pointer to the EFI_DRIVER_CONFIGURATION_ PROTOCOL instance.
|
||||
ControllerHandle - The handle of the controller to force default configuration options on.
|
||||
ChildHandle - The handle of the child controller to force default configuration options on This is an optional parameter that may be NULL. It will be NULL for device drivers. It will also be NULL for a bus drivers that wish to force default configuration options for the bus controller. It will not be NULL for a bus driver that wishes to force default configuration options for one of its child controllers.
|
||||
DefaultType - The type of default configuration options to force on the controller specified by ControllerHandle and ChildHandle. See Table 9-1 for legal values. A DefaultType of 0x00000000 must be supported by this protocol.
|
||||
ActionRequired - A pointer to the action that the calling agent is required to perform when this function returns. See "Related Definitions" in Section 9.1for a list of the actions that the calling agent is required to perform prior to accessing ControllerHandle again.
|
||||
|
||||
Returns:
|
||||
EFI_SUCCESS - The driver specified by This successfully forced the default configuration options on the controller specified by ControllerHandle and ChildHandle.
|
||||
EFI_INVALID_PARAMETER - ControllerHandle is not a valid EFI_HANDLE.
|
||||
EFI_INVALID_PARAMETER - ChildHandle is not NULL and it is not a valid EFI_HANDLE.
|
||||
EFI_INVALID_PARAMETER - ActionRequired is NULL.
|
||||
EFI_UNSUPPORTED - The driver specified by This does not support forcing the default configuration options on the controller specified by ControllerHandle and ChildHandle.
|
||||
EFI_UNSUPPORTED - The driver specified by This does not support the configuration type specified by DefaultType.
|
||||
EFI_DEVICE_ERROR - A device error occurred while attempt to force the default configuration options on the controller specified by ControllerHandle and ChildHandle.
|
||||
EFI_OUT_RESOURCES - There are not enough resources available to force the default configuration options on the controller specified by ControllerHandle and ChildHandle.
|
||||
|
||||
--*/
|
||||
|
||||
//
|
||||
// Interface structure for the Driver Configuration Protocol
|
||||
//
|
||||
typedef struct _EFI_DRIVER_CONFIGURATION_PROTOCOL {
|
||||
EFI_DRIVER_CONFIGURATION_SET_OPTIONS SetOptions;
|
||||
EFI_DRIVER_CONFIGURATION_OPTIONS_VALID OptionsValid;
|
||||
EFI_DRIVER_CONFIGURATION_FORCE_DEFAULTS ForceDefaults;
|
||||
CHAR8 *SupportedLanguages;
|
||||
} EFI_DRIVER_CONFIGURATION_PROTOCOL;
|
||||
|
||||
/*++
|
||||
|
||||
Protocol Description:
|
||||
Used to set configuration options for a controller that an EFI Driver is managing.
|
||||
|
||||
Parameters:
|
||||
SetOptions - Allows the use to set drivers specific configuration
|
||||
options for a controller that the driver is currently
|
||||
managing.
|
||||
OptionsValid - Tests to see if a controller's current configuration
|
||||
options are valid.
|
||||
ForceDefaults - Forces a driver to set the default configuration options
|
||||
for a controller.
|
||||
SupportedLanguages - A Null-terminated ASCII string that contains one or more
|
||||
ISO 639-2 language codes. This is the list of language
|
||||
codes that this protocol supports.
|
||||
|
||||
--*/
|
||||
extern EFI_GUID gEfiDriverConfigurationProtocolGuid;
|
||||
|
||||
#endif
|
@@ -0,0 +1,30 @@
|
||||
/*++
|
||||
|
||||
Copyright (c) 2004, 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
|
||||
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:
|
||||
|
||||
DriverDiagnostics.c
|
||||
|
||||
Abstract:
|
||||
|
||||
EFI Driver Diagnostics Protocol
|
||||
|
||||
Revision History
|
||||
|
||||
--*/
|
||||
|
||||
#include "EfiSpec.h"
|
||||
#include EFI_PROTOCOL_DEFINITION (DriverDiagnostics)
|
||||
|
||||
EFI_GUID gEfiDriverDiagnosticsProtocolGuid = EFI_DRIVER_DIAGNOSTICS_PROTOCOL_GUID;
|
||||
|
||||
EFI_GUID_STRING
|
||||
(&gEfiDriverDiagnosticsProtocolGuid, "Driver Diagnostics Protocol", "EFI 1.1 Driver Diagnostics Protocol");
|
@@ -0,0 +1,138 @@
|
||||
/*++
|
||||
|
||||
Copyright (c) 2004, 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
|
||||
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:
|
||||
|
||||
DriverDiagnostics.h
|
||||
|
||||
Abstract:
|
||||
|
||||
EFI Driver Diagnostics Protocol
|
||||
|
||||
Revision History
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef _EFI_DRIVER_DIAGNOSTICS_H_
|
||||
#define _EFI_DRIVER_DIAGNOSTICS_H_
|
||||
|
||||
//
|
||||
// Global ID for the Driver Diagnostics Protocol
|
||||
//
|
||||
#define EFI_DRIVER_DIAGNOSTICS_PROTOCOL_GUID \
|
||||
{ \
|
||||
0x0784924f, 0xe296, 0x11d4, 0x9a, 0x49, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d \
|
||||
}
|
||||
|
||||
EFI_FORWARD_DECLARATION (EFI_DRIVER_DIAGNOSTICS_PROTOCOL);
|
||||
|
||||
typedef enum {
|
||||
EfiDriverDiagnosticTypeStandard = 0,
|
||||
EfiDriverDiagnosticTypeExtended = 1,
|
||||
EfiDriverDiagnosticTypeManufacturing= 2,
|
||||
EfiDriverDiagnosticTypeMaximum
|
||||
} EFI_DRIVER_DIAGNOSTIC_TYPE;
|
||||
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_DRIVER_DIAGNOSTICS_RUN_DIAGNOSTICS) (
|
||||
IN EFI_DRIVER_DIAGNOSTICS_PROTOCOL * This,
|
||||
IN EFI_HANDLE ControllerHandle,
|
||||
IN EFI_HANDLE ChildHandle OPTIONAL,
|
||||
IN EFI_DRIVER_DIAGNOSTIC_TYPE DiagnosticType,
|
||||
IN CHAR8 *Language,
|
||||
OUT EFI_GUID **ErrorType,
|
||||
OUT UINTN *BufferSize,
|
||||
OUT CHAR16 **Buffer
|
||||
);
|
||||
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
Runs diagnostics on a controller.
|
||||
|
||||
Arguments:
|
||||
This - A pointer to the EFI_DRIVER_DIAGNOSTICS_PROTOCOL instance.
|
||||
ControllerHandle - The handle of the controller to run diagnostics on.
|
||||
ChildHandle - The handle of the child controller to run diagnostics on
|
||||
This is an optional parameter that may be NULL. It will
|
||||
be NULL for device drivers. It will also be NULL for a
|
||||
bus drivers that wish to run diagnostics on the bus
|
||||
controller. It will not be NULL for a bus driver that
|
||||
wishes to run diagnostics on one of its child controllers.
|
||||
DiagnosticType - Indicates type of diagnostics to perform on the controller
|
||||
specified by ControllerHandle and ChildHandle. See
|
||||
"Related Definitions" for the list of supported types.
|
||||
Language - A pointer to a three character ISO 639-2 language
|
||||
identifier. This is the language in which the optional
|
||||
error message should be returned in Buffer, and it must
|
||||
match one of the languages specified in SupportedLanguages.
|
||||
The number of languages supported by a driver is up to
|
||||
the driver writer.
|
||||
ErrorType - A GUID that defines the format of the data returned in
|
||||
Buffer.
|
||||
BufferSize - The size, in bytes, of the data returned in Buffer.
|
||||
Buffer - A buffer that contains a Null-terminated Unicode string
|
||||
plus some additional data whose format is defined by
|
||||
ErrorType. Buffer is allocated by this function with
|
||||
AllocatePool(), and it is the caller's responsibility
|
||||
to free it with a call to FreePool().
|
||||
|
||||
Returns:
|
||||
EFI_SUCCESS - The controller specified by ControllerHandle and
|
||||
ChildHandle passed the diagnostic.
|
||||
EFI_INVALID_PARAMETER - ControllerHandle is not a valid EFI_HANDLE.
|
||||
EFI_INVALID_PARAMETER - ChildHandle is not NULL and it is not a valid
|
||||
EFI_HANDLE.
|
||||
EFI_INVALID_PARAMETER - Language is NULL.
|
||||
EFI_INVALID_PARAMETER - ErrorType is NULL.
|
||||
EFI_INVALID_PARAMETER - BufferType is NULL.
|
||||
EFI_INVALID_PARAMETER - Buffer is NULL.
|
||||
EFI_UNSUPPORTED - The driver specified by This does not support
|
||||
running diagnostics for the controller specified
|
||||
by ControllerHandle and ChildHandle.
|
||||
EFI_UNSUPPORTED - The driver specified by This does not support the
|
||||
type of diagnostic specified by DiagnosticType.
|
||||
EFI_UNSUPPORTED - The driver specified by This does not support the
|
||||
language specified by Language.
|
||||
EFI_OUT_OF_RESOURCES - There are not enough resources available to complete
|
||||
the diagnostics.
|
||||
EFI_OUT_OF_RESOURCES - There are not enough resources available to return
|
||||
the status information in ErrorType, BufferSize,
|
||||
and Buffer.
|
||||
EFI_DEVICE_ERROR - The controller specified by ControllerHandle and
|
||||
ChildHandle did not pass the diagnostic.
|
||||
|
||||
--*/
|
||||
|
||||
//
|
||||
// Interface structure for the Driver Diagnostics Protocol
|
||||
//
|
||||
typedef struct _EFI_DRIVER_DIAGNOSTICS_PROTOCOL {
|
||||
EFI_DRIVER_DIAGNOSTICS_RUN_DIAGNOSTICS RunDiagnostics;
|
||||
CHAR8 *SupportedLanguages;
|
||||
} EFI_DRIVER_DIAGNOSTICS_PROTOCOL;
|
||||
|
||||
/*++
|
||||
|
||||
Protocol Description:
|
||||
Used to perform diagnostics on a controller that an EFI Driver is managing.
|
||||
|
||||
Parameters:
|
||||
RunDiagnostics - Runs diagnostics on a controller.
|
||||
SupportedLanguages - A Null-terminated ASCII string that contains one or more
|
||||
ISO 639-2 language codes. This is the list of language
|
||||
codes that this protocol supports.
|
||||
|
||||
--*/
|
||||
extern EFI_GUID gEfiDriverDiagnosticsProtocolGuid;
|
||||
|
||||
#endif
|
28
EdkCompatibilityPkg/Foundation/Efi/Protocol/Ebc/Ebc.c
Normal file
28
EdkCompatibilityPkg/Foundation/Efi/Protocol/Ebc/Ebc.c
Normal file
@@ -0,0 +1,28 @@
|
||||
/*++
|
||||
|
||||
Copyright (c) 2004, 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
|
||||
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:
|
||||
|
||||
Ebc.c
|
||||
|
||||
Abstract:
|
||||
|
||||
EBC protocol as defined in the EFI 1.1 specification.
|
||||
|
||||
|
||||
--*/
|
||||
|
||||
#include "EfiSpec.h"
|
||||
#include EFI_PROTOCOL_DEFINITION (Ebc)
|
||||
|
||||
EFI_GUID gEfiEbcProtocolGuid = EFI_EBC_INTERPRETER_PROTOCOL_GUID;
|
||||
|
||||
EFI_GUID_STRING(&gEfiEbcProtocolGuid, "EBC Protocol", "EFI 1.1 EBC protocol");
|
183
EdkCompatibilityPkg/Foundation/Efi/Protocol/Ebc/Ebc.h
Normal file
183
EdkCompatibilityPkg/Foundation/Efi/Protocol/Ebc/Ebc.h
Normal file
@@ -0,0 +1,183 @@
|
||||
/*++
|
||||
|
||||
Copyright (c) 2004, 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
|
||||
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:
|
||||
|
||||
Ebc.h
|
||||
|
||||
Abstract:
|
||||
|
||||
Describes the protocol interface to the EBC interpreter.
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef _EBC_H_
|
||||
#define _EBC_H_
|
||||
|
||||
#define EFI_EBC_INTERPRETER_PROTOCOL_GUID \
|
||||
{ \
|
||||
0x13AC6DD1, 0x73D0, 0x11D4, 0xB0, 0x6B, 0x00, 0xAA, 0x00, 0xBD, 0x6D, 0xE7 \
|
||||
}
|
||||
|
||||
//
|
||||
// Define for forward reference.
|
||||
//
|
||||
EFI_FORWARD_DECLARATION (EFI_EBC_PROTOCOL);
|
||||
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
|
||||
Create a thunk for an image entry point. In short, given the physical address
|
||||
of the entry point for a loaded image, create a thunk that does some
|
||||
fixup of arguments (and perform any other necessary overhead) and then
|
||||
calls the original entry point. The caller can then use the returned pointer
|
||||
to the created thunk as the new entry point to image.
|
||||
|
||||
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:
|
||||
|
||||
Standard EFI_STATUS
|
||||
|
||||
--*/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_EBC_CREATE_THUNK) (
|
||||
IN EFI_EBC_PROTOCOL * This,
|
||||
IN EFI_HANDLE ImageHandle,
|
||||
IN VOID *EbcEntryPoint,
|
||||
OUT VOID **Thunk
|
||||
);
|
||||
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
|
||||
Perform any cleanup necessary when an image is unloaded. Basically it gives
|
||||
the EBC interpreter the chance to free up any resources allocated during
|
||||
load and execution of an EBC image.
|
||||
|
||||
Arguments:
|
||||
|
||||
This - protocol instance pointer
|
||||
ImageHandle - the handle of the image being unloaded.
|
||||
|
||||
Returns:
|
||||
|
||||
Standard EFI_STATUS.
|
||||
|
||||
--*/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_EBC_UNLOAD_IMAGE) (
|
||||
IN EFI_EBC_PROTOCOL * This,
|
||||
IN EFI_HANDLE ImageHandle
|
||||
);
|
||||
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
|
||||
The I-Cache-flush registration service takes a pointer to a function to
|
||||
call to flush the I-Cache. Here's the prototype for that function pointer.
|
||||
|
||||
Arguments:
|
||||
|
||||
Start - physical start address of CPU instruction cache to flush.
|
||||
Length - how many bytes to flush of the instruction cache.
|
||||
|
||||
Returns:
|
||||
|
||||
Standard EFI_STATUS.
|
||||
|
||||
--*/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EBC_ICACHE_FLUSH) (
|
||||
IN EFI_PHYSICAL_ADDRESS Start,
|
||||
IN UINT64 Length
|
||||
);
|
||||
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
|
||||
This routine is called by the core firmware to provide the EBC driver with
|
||||
a function to call to flush the CPU's instruction cache following creation
|
||||
of a thunk. It is not required.
|
||||
|
||||
Arguments:
|
||||
|
||||
This - protocol instance pointer
|
||||
Flush - pointer to the function to call to flush the CPU instruction
|
||||
cache.
|
||||
|
||||
Returns:
|
||||
|
||||
Standard EFI_STATUS.
|
||||
|
||||
--*/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_EBC_REGISTER_ICACHE_FLUSH) (
|
||||
IN EFI_EBC_PROTOCOL * This,
|
||||
IN EBC_ICACHE_FLUSH Flush
|
||||
);
|
||||
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
|
||||
This routine can be called to get the VM revision. It returns the same
|
||||
value as the EBC BREAK 1 instruction returns.
|
||||
|
||||
Arguments:
|
||||
|
||||
This - protocol instance pointer
|
||||
Version - pointer to where to return the VM version
|
||||
|
||||
Returns:
|
||||
|
||||
Standard EFI_STATUS.
|
||||
|
||||
--*/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_EBC_GET_VERSION) (
|
||||
IN EFI_EBC_PROTOCOL * This,
|
||||
IN OUT UINT64 *Version
|
||||
);
|
||||
|
||||
//
|
||||
// Prototype for the actual EBC protocol interface
|
||||
//
|
||||
typedef struct _EFI_EBC_PROTOCOL {
|
||||
EFI_EBC_CREATE_THUNK CreateThunk;
|
||||
EFI_EBC_UNLOAD_IMAGE UnloadImage;
|
||||
EFI_EBC_REGISTER_ICACHE_FLUSH RegisterICacheFlush;
|
||||
EFI_EBC_GET_VERSION GetVersion;
|
||||
} EFI_EBC_PROTOCOL;
|
||||
|
||||
//
|
||||
// Extern the global EBC protocol GUID
|
||||
//
|
||||
extern EFI_GUID gEfiEbcProtocolGuid;
|
||||
|
||||
#endif
|
@@ -0,0 +1,29 @@
|
||||
/*++
|
||||
|
||||
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
|
||||
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:
|
||||
|
||||
EdidActive.c
|
||||
|
||||
Abstract:
|
||||
|
||||
EDID Active Protocol from the UEFI 2.0 specification.
|
||||
|
||||
Placed on the video output device child handle that are actively displaying output.
|
||||
|
||||
--*/
|
||||
|
||||
#include "EfiSpec.h"
|
||||
#include EFI_PROTOCOL_DEFINITION (EdidActive)
|
||||
|
||||
EFI_GUID gEfiEdidActiveProtocolGuid = EFI_EDID_ACTIVE_PROTOCOL_GUID;
|
||||
|
||||
EFI_GUID_STRING(&gEfiEdidActiveProtocolGuid, "EFI EDID Active Protocol", "UEFI EDID Active Protocol");
|
@@ -0,0 +1,39 @@
|
||||
/*++
|
||||
|
||||
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
|
||||
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:
|
||||
|
||||
EdidActive.h
|
||||
|
||||
Abstract:
|
||||
|
||||
EDID Active Protocol from the UEFI 2.0 specification.
|
||||
|
||||
Placed on the video output device child handle that are actively displaying output.
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef __EDID_ACTIVE_H__
|
||||
#define __EDID_ACTIVE_H__
|
||||
|
||||
#define EFI_EDID_ACTIVE_PROTOCOL_GUID \
|
||||
{ \
|
||||
0xbd8c1056, 0x9f36, 0x44ec, 0x92, 0xa8, 0xa6, 0x33, 0x7f, 0x81, 0x79, 0x86 \
|
||||
}
|
||||
|
||||
typedef struct {
|
||||
UINT32 SizeOfEdid;
|
||||
UINT8 *Edid;
|
||||
} EFI_EDID_ACTIVE_PROTOCOL;
|
||||
|
||||
extern EFI_GUID gEfiEdidActiveProtocolGuid;
|
||||
|
||||
#endif
|
@@ -0,0 +1,30 @@
|
||||
/*++
|
||||
|
||||
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
|
||||
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:
|
||||
|
||||
EdidDiscovered.c
|
||||
|
||||
Abstract:
|
||||
|
||||
EDID Discovered Protocol from the UEFI 2.0 specification.
|
||||
|
||||
This protocol is placed on the video output device child handle and it represents
|
||||
the EDID information being used for output device represented by the child handle.
|
||||
|
||||
--*/
|
||||
|
||||
#include "EfiSpec.h"
|
||||
#include EFI_PROTOCOL_DEFINITION (EdidDiscovered)
|
||||
|
||||
EFI_GUID gEfiEdidDiscoveredProtocolGuid = EFI_EDID_DISCOVERED_PROTOCOL_GUID;
|
||||
|
||||
EFI_GUID_STRING(&gEfiEdidDiscoveredProtocolGuid, "EFI EDID Discovered Protocol", "UEFI EDID Discovered Protocol");
|
@@ -0,0 +1,40 @@
|
||||
/*++
|
||||
|
||||
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
|
||||
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:
|
||||
|
||||
EdidDiscovered.h
|
||||
|
||||
Abstract:
|
||||
|
||||
EDID Discovered Protocol from the UEFI 2.0 specification.
|
||||
|
||||
This protocol is placed on the video output device child handle and it represents
|
||||
the EDID information being used for output device represented by the child handle.
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef __EDID_DISCOVERED_H__
|
||||
#define __EDID_DISCOVERED_H__
|
||||
|
||||
#define EFI_EDID_DISCOVERED_PROTOCOL_GUID \
|
||||
{ \
|
||||
0x1c0c34f6, 0xd380, 0x41fa, 0xa0, 0x49, 0x8a, 0xd0, 0x6c,0x1a, 0x66, 0xaa \
|
||||
}
|
||||
|
||||
typedef struct {
|
||||
UINT32 SizeOfEdid;
|
||||
UINT8 *Edid;
|
||||
} EFI_EDID_DISCOVERED_PROTOCOL;
|
||||
|
||||
extern EFI_GUID gEfiEdidDiscoveredProtocolGuid;
|
||||
|
||||
#endif
|
@@ -0,0 +1,30 @@
|
||||
/*++
|
||||
|
||||
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
|
||||
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:
|
||||
|
||||
EdidOverride.c
|
||||
|
||||
Abstract:
|
||||
|
||||
EDID Override Protocol from the UEFI 2.0 specification.
|
||||
|
||||
Allow platform to provide EDID information to producer of the Graphics Output
|
||||
protocol.
|
||||
|
||||
--*/
|
||||
|
||||
#include "EfiSpec.h"
|
||||
#include EFI_PROTOCOL_DEFINITION (EdidOverride)
|
||||
|
||||
EFI_GUID gEfiEdidOverrideProtocolGuid = EFI_EDID_OVERRIDE_PROTOCOL_GUID;
|
||||
|
||||
EFI_GUID_STRING(&gEfiEdidOverrideProtocolGuid, "EFI EDID Override Protocol", "UEFI EDID Override Protocol");
|
@@ -0,0 +1,78 @@
|
||||
/*++
|
||||
|
||||
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
|
||||
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:
|
||||
|
||||
EdidOverride.h
|
||||
|
||||
Abstract:
|
||||
|
||||
EDID Override Protocol from the UEFI 2.0 specification.
|
||||
|
||||
Allow platform to provide EDID information to producer of the Graphics Output
|
||||
protocol.
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef __EDID_OVERRIDE_H__
|
||||
#define __EDID_OVERRIDE_H__
|
||||
|
||||
#include "EfiSpec.h"
|
||||
#include EFI_PROTOCOL_DEFINITION (EdidDiscovered)
|
||||
|
||||
#define EFI_EDID_OVERRIDE_PROTOCOL_GUID \
|
||||
{ \
|
||||
0x48ecb431, 0xfb72, 0x45c0, 0xa9, 0x22, 0xf4, 0x58, 0xfe, 0x4, 0xb, 0xd5 \
|
||||
}
|
||||
|
||||
typedef struct _EFI_EDID_OVERRIDE_PROTOCOL EFI_EDID_OVERRIDE_PROTOCOL;
|
||||
|
||||
#define EFI_EDID_OVERRIDE_DONT_OVERRIDE 0x01
|
||||
#define EFI_EDID_OVERRIDE_ENABLE_HOT_PLUG 0x02
|
||||
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_EDID_OVERRIDE_PROTOCOL_GET_EDID) (
|
||||
IN EFI_EDID_OVERRIDE_PROTOCOL *This,
|
||||
IN EFI_HANDLE *ChildHandle,
|
||||
OUT UINT32 *Attributes,
|
||||
IN OUT UINTN *EdidSize,
|
||||
IN OUT UINT8 **Edid
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
Return the current video mode information.
|
||||
|
||||
Arguments:
|
||||
This - Protocol instance pointer.
|
||||
ChildHandle - A child handle produced by the Graphics Output EFI
|
||||
driver that represents a video output device.
|
||||
Attributes - The attributes associated with ChildHandle video output device.
|
||||
EdidSize - A pointer to the size, in bytes, of the Edid buffer.
|
||||
Edid - A pointer to callee allocated buffer that contains the EDID that
|
||||
should be used for ChildHandle. A value of NULL
|
||||
represents no EDID override for ChildHandle.
|
||||
|
||||
Returns:
|
||||
EFI_SUCCESS - Valid overrides returned for ChildHandle.
|
||||
EFI_UNSUPPORTED - ChildHandle has no overrides.
|
||||
|
||||
--*/
|
||||
;
|
||||
|
||||
typedef struct _EFI_EDID_OVERRIDE_PROTOCOL {
|
||||
EFI_EDID_OVERRIDE_PROTOCOL_GET_EDID GetEdid;
|
||||
} EFI_EDID_OVERRIDE_PROTOCOL;
|
||||
|
||||
extern EFI_GUID gEfiEdidOverrideProtocolGuid;
|
||||
|
||||
#endif
|
@@ -0,0 +1,40 @@
|
||||
/*++
|
||||
|
||||
Copyright (c) 2004, 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
|
||||
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:
|
||||
|
||||
EfiNetworkInterfaceIdentifier.c
|
||||
|
||||
Abstract:
|
||||
|
||||
|
||||
Revision History
|
||||
|
||||
--*/
|
||||
|
||||
#include "EfiSpec.h"
|
||||
#include EFI_PROTOCOL_DEFINITION (EfiNetworkInterfaceIdentifier)
|
||||
|
||||
EFI_GUID gEfiNetworkInterfaceIdentifierProtocolGuid = EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL_GUID;
|
||||
|
||||
EFI_GUID_STRING
|
||||
(
|
||||
&gEfiNetworkInterfaceIdentifierProtocolGuid, "Network Interface Identifier Protocol",
|
||||
"EFI Network Interface Identifier Protocol"
|
||||
);
|
||||
|
||||
EFI_GUID gEfiNetworkInterfaceIdentifierProtocolGuid_31 = EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL_GUID_31;
|
||||
|
||||
EFI_GUID_STRING
|
||||
(
|
||||
&gEfiNetworkInterfaceIdentifierProtocolGuid_31, "Network Interface Identifier Protocol_31",
|
||||
"EFI1.1 Network Interface Identifier Protocol"
|
||||
);
|
@@ -0,0 +1,102 @@
|
||||
/*++
|
||||
Copyright (c) 2004, 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
|
||||
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:
|
||||
|
||||
EfiNetworkInterfaceIdentifier.h
|
||||
|
||||
Abstract:
|
||||
|
||||
Revision history:
|
||||
2000-Feb-18 M(f)J GUID updated.
|
||||
Structure order changed for machine word alignment.
|
||||
Added StringId[4] to structure.
|
||||
|
||||
2000-Feb-14 M(f)J Genesis.
|
||||
--*/
|
||||
#ifndef _EFI_NETWORKINTERFACEIDENTIFER_H
|
||||
#define _EFI_NETWORKINTERFACEIDENTIFER_H
|
||||
|
||||
|
||||
#define EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL_GUID \
|
||||
{ \
|
||||
0xE18541CD, 0xF755, 0x4f73, 0x92, 0x8D, 0x64, 0x3C, 0x8A, 0x79, 0xB2, 0x29 \
|
||||
}
|
||||
#define EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL_GUID_31 \
|
||||
{ \
|
||||
0x1ACED566, 0x76ED, 0x4218, 0xBC, 0x81, 0x76, 0x7F, 0x1F, 0x97, 0x7A, 0x89 \
|
||||
}
|
||||
|
||||
#define EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL_REVISION 0x00010000
|
||||
#define EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL_REVISION_31 0x00010001
|
||||
|
||||
//
|
||||
// Forward reference for pure ANSI compatability
|
||||
//
|
||||
EFI_FORWARD_DECLARATION (EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL);
|
||||
|
||||
typedef enum {
|
||||
EfiNetworkInterfaceUndi = 1
|
||||
} EFI_NETWORK_PROTOCOL_TYPE;
|
||||
|
||||
typedef struct _EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL {
|
||||
|
||||
UINT64 Revision;
|
||||
//
|
||||
// Revision of the network interface identifier protocol interface.
|
||||
//
|
||||
UINT64 ID;
|
||||
//
|
||||
// Address of the first byte of the identifying structure for this
|
||||
// network interface. This is set to zero if there is no structure.
|
||||
//
|
||||
// For PXE/UNDI this is the first byte of the !PXE structure.
|
||||
//
|
||||
UINT64 ImageAddr;
|
||||
//
|
||||
// Address of the UNrelocated driver/ROM image. This is set
|
||||
// to zero if there is no driver/ROM image.
|
||||
//
|
||||
// For 16-bit UNDI, this is the first byte of the option ROM in
|
||||
// upper memory.
|
||||
//
|
||||
// For 32/64-bit S/W UNDI, this is the first byte of the EFI ROM
|
||||
// image.
|
||||
//
|
||||
// For H/W UNDI, this is set to zero.
|
||||
//
|
||||
UINT32 ImageSize;
|
||||
//
|
||||
// Size of the UNrelocated driver/ROM image of this network interface.
|
||||
// This is set to zero if there is no driver/ROM image.
|
||||
//
|
||||
CHAR8 StringId[4];
|
||||
//
|
||||
// 4 char ASCII string to go in class identifier (option 60) in DHCP
|
||||
// and Boot Server discover packets.
|
||||
// For EfiNetworkInterfaceUndi this field is "UNDI".
|
||||
// For EfiNetworkInterfaceSnp this field is "SNPN".
|
||||
//
|
||||
UINT8 Type;
|
||||
UINT8 MajorVer;
|
||||
UINT8 MinorVer;
|
||||
//
|
||||
// Information to be placed into the PXE DHCP and Discover packets.
|
||||
// This is the network interface type and version number that will
|
||||
// be placed into DHCP option 94 (client network interface identifier).
|
||||
//
|
||||
BOOLEAN Ipv6Supported;
|
||||
UINT8 IfNum; // interface number to be used with pxeid structure
|
||||
} EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL;
|
||||
|
||||
extern EFI_GUID gEfiNetworkInterfaceIdentifierProtocolGuid;
|
||||
extern EFI_GUID gEfiNetworkInterfaceIdentifierProtocolGuid_31;
|
||||
|
||||
#endif // _EFI_NII_H
|
158
EdkCompatibilityPkg/Foundation/Efi/Protocol/EfiProtocolLib.inf
Normal file
158
EdkCompatibilityPkg/Foundation/Efi/Protocol/EfiProtocolLib.inf
Normal file
@@ -0,0 +1,158 @@
|
||||
#/*++
|
||||
#
|
||||
# Copyright (c) 2004 - 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
|
||||
# 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:
|
||||
#
|
||||
# EfiProtocolLib.inf
|
||||
#
|
||||
# Abstract:
|
||||
#
|
||||
# Component description file.
|
||||
#
|
||||
#--*/
|
||||
|
||||
[defines]
|
||||
BASE_NAME= EfiProtocolLib
|
||||
COMPONENT_TYPE= LIBRARY
|
||||
|
||||
[includes.common]
|
||||
$(EDK_SOURCE)\Foundation\Efi
|
||||
$(EDK_SOURCE)\Foundation\Include
|
||||
$(EDK_SOURCE)\Foundation\Efi\Include
|
||||
$(EDK_SOURCE)\Foundation\Framework\Include
|
||||
$(EDK_SOURCE)\Foundation\Include\IndustryStandard
|
||||
$(EDK_SOURCE)\Foundation\Include\Pei
|
||||
$(EDK_SOURCE)\Foundation\Library\Pei\Include
|
||||
$(EDK_SOURCE)\Foundation\Core\Dxe
|
||||
$(EDK_SOURCE)\Foundation\Library\Dxe\Include
|
||||
|
||||
[nmake.common]
|
||||
|
||||
[sources.common]
|
||||
AcpiTable\AcpiTable.h
|
||||
AcpiTable\AcpiTable.c
|
||||
Arp\Arp.h
|
||||
Arp\Arp.c
|
||||
Bis\Bis.h
|
||||
Bis\Bis.c
|
||||
BlockIo\BlockIo.h
|
||||
BlockIo\BlockIo.c
|
||||
BusSpecificDriverOverride\BusSpecificDriverOverride.h
|
||||
BusSpecificDriverOverride\BusSpecificDriverOverride.c
|
||||
ComponentName\ComponentName.h
|
||||
ComponentName\ComponentName.c
|
||||
ComponentName2\ComponentName2.h
|
||||
ComponentName2\ComponentName2.c
|
||||
DebugPort\DebugPort.h
|
||||
DebugPort\DebugPort.c
|
||||
DebugSupport\DebugSupport.h
|
||||
DebugSupport\DebugSupport.c
|
||||
Decompress\Decompress.h
|
||||
Decompress\Decompress.c
|
||||
DeviceIo\DeviceIo.h
|
||||
DeviceIo\DeviceIo.c
|
||||
DevicePath\DevicePath.h
|
||||
DevicePath\DevicePath.c
|
||||
DevicePathFromText\DevicePathFromText.h
|
||||
DevicePathFromText\DevicePathFromText.c
|
||||
DevicePathToText\DevicePathToText.h
|
||||
DevicePathToText\DevicePathToText.c
|
||||
DevicePathUtilities\DevicePathUtilities.h
|
||||
DevicePathUtilities\DevicePathUtilities.c
|
||||
Dhcp4\Dhcp4.h
|
||||
Dhcp4\Dhcp4.c
|
||||
DiskIo\DiskIo.h
|
||||
DiskIo\DiskIo.c
|
||||
DriverBinding\DriverBinding.h
|
||||
DriverBinding\DriverBinding.c
|
||||
DriverConfiguration\DriverConfiguration.h
|
||||
DriverConfiguration\DriverConfiguration.c
|
||||
DriverDiagnostics\DriverDiagnostics.h
|
||||
DriverDiagnostics\DriverDiagnostics.c
|
||||
Ebc\Ebc.h
|
||||
Ebc\Ebc.c
|
||||
EdidActive\EdidActive.h
|
||||
EdidActive\EdidActive.c
|
||||
EdidDiscovered\EdidDiscovered.h
|
||||
EdidDiscovered\EdidDiscovered.c
|
||||
EdidOverride\EdidOverride.h
|
||||
EdidOverride\EdidOverride.c
|
||||
EfiNetworkInterfaceIdentifier\EfiNetworkInterfaceIdentifier.h
|
||||
EfiNetworkInterfaceIdentifier\EfiNetworkInterfaceIdentifier.c
|
||||
FileInfo\FileInfo.h
|
||||
FileInfo\FileInfo.c
|
||||
FileSystemInfo\FileSystemInfo.h
|
||||
FileSystemInfo\FileSystemInfo.c
|
||||
FileSystemVolumeLabelInfo\FileSystemVolumeLabelInfo.h
|
||||
FileSystemVolumeLabelInfo\FileSystemVolumeLabelInfo.c
|
||||
GraphicsOutput\GraphicsOutput.h
|
||||
GraphicsOutput\GraphicsOutput.c
|
||||
Ip4\Ip4.h
|
||||
Ip4\Ip4.c
|
||||
Ip4Config\Ip4Config.h
|
||||
Ip4Config\Ip4Config.c
|
||||
LoadedImage\LoadedImage.h
|
||||
LoadedImage\LoadedImage.c
|
||||
LoadFile\LoadFile.h
|
||||
LoadFile\LoadFile.c
|
||||
ManagedNetwork\ManagedNetwork.h
|
||||
ManagedNetwork\ManagedNetwork.c
|
||||
Mtftp4\Mtftp4.h
|
||||
Mtftp4\Mtftp4.c
|
||||
PciIo\PciIo.h
|
||||
PciIo\PciIo.c
|
||||
PciRootBridgeIo\PciRootBridgeIo.h
|
||||
PciRootBridgeIo\PciRootBridgeIo.c
|
||||
PlatformDriverOverride\PlatformDriverOverride.h
|
||||
PlatformDriverOverride\PlatformDriverOverride.c
|
||||
PxeBaseCode\PxeBaseCode.h
|
||||
PxeBaseCode\PxeBaseCode.c
|
||||
PxeBaseCodeCallBack\PxeBaseCodeCallBack.h
|
||||
PxeBaseCodeCallBack\PxeBaseCodeCallBack.c
|
||||
ScsiPassThru\ScsiPassThru.h
|
||||
ScsiPassThru\ScsiPassThru.c
|
||||
SerialIo\SerialIo.h
|
||||
SerialIo\SerialIo.c
|
||||
SimpleFileSystem\SimpleFileSystem.h
|
||||
SimpleFileSystem\SimpleFileSystem.c
|
||||
SimpleNetwork\SimpleNetwork.h
|
||||
SimpleNetwork\SimpleNetwork.c
|
||||
SimplePointer\SimplePointer.h
|
||||
SimplePointer\SimplePointer.c
|
||||
SimpleTextIn\SimpleTextIn.h
|
||||
SimpleTextIn\SimpleTextIn.c
|
||||
SimpleTextOut\SimpleTextOut.h
|
||||
SimpleTextOut\SimpleTextOut.c
|
||||
Udp4\Udp4.h
|
||||
Udp4\Udp4.c
|
||||
UgaDraw\UgaDraw.h
|
||||
UgaDraw\UgaDraw.c
|
||||
UgaIo\UgaIo.h
|
||||
UgaIo\UgaIo.c
|
||||
UnicodeCollation\UnicodeCollation.h
|
||||
UnicodeCollation\UnicodeCollation.c
|
||||
UsbHostController\UsbHostController.h
|
||||
UsbHostController\UsbHostController.c
|
||||
UsbIo\UsbIo.h
|
||||
UsbIo\UsbIo.c
|
||||
Hash\Hash.h
|
||||
Hash\Hash.c
|
||||
ServiceBinding\ServiceBinding.h
|
||||
ScsiPassThruExt\ScsiPassThruExt.h
|
||||
ScsiPassThruExt\ScsiPassThruExt.c
|
||||
ScsiIo\ScsiIo.h
|
||||
ScsiIo\ScsiIo.c
|
||||
TapeIo\TapeIo.h
|
||||
TapeIo\TapeIo.c
|
||||
Tcp4\Tcp4.h
|
||||
Tcp4\Tcp4.c
|
||||
IScsiInitiatorName\IScsiInitiatorName.h
|
||||
IScsiInitiatorName\IScsiInitiatorName.c
|
@@ -0,0 +1,27 @@
|
||||
/*++
|
||||
|
||||
Copyright (c) 2004, 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
|
||||
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:
|
||||
|
||||
FileInfo.c
|
||||
|
||||
Abstract:
|
||||
|
||||
FileInfo protocol as defined in the EFI 1.0 specification.
|
||||
|
||||
--*/
|
||||
|
||||
#include "EfiSpec.h"
|
||||
#include EFI_PROTOCOL_DEFINITION (FileInfo)
|
||||
|
||||
EFI_GUID gEfiFileInfoGuid = EFI_FILE_INFO_ID;
|
||||
|
||||
EFI_GUID_STRING(&gEfiFileInfoGuid, "File System Info", "EFI File System Info GUID");
|
@@ -0,0 +1,58 @@
|
||||
/*++
|
||||
|
||||
Copyright (c) 2004, 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
|
||||
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:
|
||||
|
||||
FileInfo.c
|
||||
|
||||
Abstract:
|
||||
|
||||
SimpleFileSystem protocol as defined in the EFI 1.0 specification.
|
||||
|
||||
The SimpleFileSystem protocol is the programatic access to the FAT (12,16,32)
|
||||
file system specified in EFI 1.0. It can also be used to abstract any
|
||||
file system other than FAT.
|
||||
|
||||
EFI 1.0 can boot from any valid EFI image contained in a SimpleFileSystem
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef _FILE_INFO_H_
|
||||
#define _FILE_INFO_H_
|
||||
|
||||
#define EFI_FILE_INFO_ID \
|
||||
{ \
|
||||
0x9576e92, 0x6d3f, 0x11d2, 0x8e, 0x39, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b \
|
||||
}
|
||||
|
||||
typedef struct {
|
||||
UINT64 Size;
|
||||
UINT64 FileSize;
|
||||
UINT64 PhysicalSize;
|
||||
EFI_TIME CreateTime;
|
||||
EFI_TIME LastAccessTime;
|
||||
EFI_TIME ModificationTime;
|
||||
UINT64 Attribute;
|
||||
CHAR16 FileName[1];
|
||||
} EFI_FILE_INFO;
|
||||
|
||||
//
|
||||
// The FileName field of the EFI_FILE_INFO data structure is variable length.
|
||||
// Whenever code needs to know the size of the EFI_FILE_INFO data structure, it needs to
|
||||
// be the size of the data structure without the FileName field. The following macro
|
||||
// computes this size correctly no matter how big the FileName array is declared.
|
||||
// This is required to make the EFI_FILE_INFO data structure ANSI compilant.
|
||||
//
|
||||
#define SIZE_OF_EFI_FILE_INFO EFI_FIELD_OFFSET (EFI_FILE_INFO, FileName)
|
||||
|
||||
extern EFI_GUID gEfiFileInfoGuid;
|
||||
|
||||
#endif
|
@@ -0,0 +1,27 @@
|
||||
/*++
|
||||
|
||||
Copyright (c) 2004, 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
|
||||
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:
|
||||
|
||||
FileSystemInfo.c
|
||||
|
||||
Abstract:
|
||||
|
||||
FileSystemInfo protocol as defined in the EFI 1.0 specification.
|
||||
|
||||
--*/
|
||||
|
||||
#include "EfiSpec.h"
|
||||
#include EFI_PROTOCOL_DEFINITION (FileSystemInfo)
|
||||
|
||||
EFI_GUID gEfiFileSystemInfoGuid = EFI_FILE_SYSTEM_INFO_ID_GUID;
|
||||
|
||||
EFI_GUID_STRING(&gEfiFileSystemInfoGuid, "File System Info ID", "EFI File System Info ID GUID");
|
@@ -0,0 +1,51 @@
|
||||
/*++
|
||||
|
||||
Copyright (c) 2004, 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
|
||||
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:
|
||||
|
||||
FileSystemInfo.h
|
||||
|
||||
Abstract:
|
||||
|
||||
FileSystemInfo protocol as defined in the EFI 1.0 specification.
|
||||
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef _FILE_SYSTEM_INFO_H_
|
||||
#define _FILE_SYSTEM_INFO_H_
|
||||
|
||||
#define EFI_FILE_SYSTEM_INFO_ID_GUID \
|
||||
{ \
|
||||
0x9576e93, 0x6d3f, 0x11d2, 0x8e, 0x39, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b \
|
||||
}
|
||||
|
||||
typedef struct {
|
||||
UINT64 Size;
|
||||
BOOLEAN ReadOnly;
|
||||
UINT64 VolumeSize;
|
||||
UINT64 FreeSpace;
|
||||
UINT32 BlockSize;
|
||||
CHAR16 VolumeLabel[1];
|
||||
} EFI_FILE_SYSTEM_INFO;
|
||||
|
||||
//
|
||||
// The VolumeLabel field of the EFI_FILE_SYSTEM_INFO data structure is variable length.
|
||||
// Whenever code needs to know the size of the EFI_FILE_SYSTEM_INFO data structure, it needs
|
||||
// to be the size of the data structure without the VolumeLable field. The following macro
|
||||
// computes this size correctly no matter how big the VolumeLable array is declared.
|
||||
// This is required to make the EFI_FILE_SYSTEM_INFO data structure ANSI compilant.
|
||||
//
|
||||
#define SIZE_OF_EFI_FILE_SYSTEM_INFO EFI_FIELD_OFFSET (EFI_FILE_SYSTEM_INFO, VolumeLabel)
|
||||
|
||||
extern EFI_GUID gEfiFileSystemInfoGuid;
|
||||
|
||||
#endif
|
@@ -0,0 +1,34 @@
|
||||
/*++
|
||||
|
||||
Copyright (c) 2004, 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
|
||||
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:
|
||||
|
||||
FileSystemVolumeLabelInfo.c
|
||||
|
||||
Abstract:
|
||||
|
||||
SimpleFileSystem protocol as defined in the EFI 1.0 specification.
|
||||
|
||||
The SimpleFileSystem protocol is the programatic access to the FAT (12,16,32)
|
||||
file system specified in EFI 1.0. It can also be used to abstract any
|
||||
file system other than FAT.
|
||||
|
||||
EFI 1.0 can boot from any valid EFI image contained in a SimpleFileSystem
|
||||
|
||||
--*/
|
||||
|
||||
#include "EfiSpec.h"
|
||||
#include EFI_PROTOCOL_DEFINITION (FileSystemVolumeLabelInfo)
|
||||
|
||||
EFI_GUID gEfiFileSystemVolumeLabelInfoIdGuid = EFI_FILE_SYSTEM_VOLUME_LABEL_INFO_ID_GUID;
|
||||
|
||||
EFI_GUID_STRING
|
||||
(&gEfiFileSystemVolumeLabelInfoIdGuid, "File System Vol Label ID", "EFI File System Volume Label Info ID GUID");
|
@@ -0,0 +1,38 @@
|
||||
/*++
|
||||
|
||||
Copyright (c) 2004, 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
|
||||
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:
|
||||
|
||||
FileSystemVolumeLabelInfo.h
|
||||
|
||||
Abstract:
|
||||
|
||||
FileSystemVolumeLabelInfo protocol as defined in the EFI 1.0 specification.
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef _FILE_SYSTEM_VOLUME_LABEL_INFO_H_
|
||||
#define _FILE_SYSTEM_VOLUME_LABEL_INFO_H_
|
||||
|
||||
#define EFI_FILE_SYSTEM_VOLUME_LABEL_INFO_ID_GUID \
|
||||
{ \
|
||||
0xDB47D7D3, 0xFE81, 0x11d3, 0x9A, 0x35, 0x00, 0x90, 0x27, 0x3F, 0xC1, 0x4D \
|
||||
}
|
||||
|
||||
typedef struct {
|
||||
CHAR16 VolumeLabel[1];
|
||||
} EFI_FILE_SYSTEM_VOLUME_LABEL_INFO;
|
||||
|
||||
#define SIZE_OF_EFI_FILE_SYSTEM_VOLUME_LABEL_INFO EFI_FIELD_OFFSET (EFI_FILE_SYSTEM_VOLUME_LABEL_INFO, VolumeLabel)
|
||||
|
||||
extern EFI_GUID gEfiFileSystemVolumeLabelInfoIdGuid;
|
||||
|
||||
#endif
|
@@ -0,0 +1,29 @@
|
||||
/*++
|
||||
|
||||
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
|
||||
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:
|
||||
|
||||
GraphicsOutput.c
|
||||
|
||||
Abstract:
|
||||
|
||||
Graphics Output Protocol from the UEFI 2.0 specification.
|
||||
|
||||
Abstraction of a very simple graphics device.
|
||||
|
||||
--*/
|
||||
|
||||
#include "EfiSpec.h"
|
||||
#include EFI_PROTOCOL_DEFINITION (GraphicsOutput)
|
||||
|
||||
EFI_GUID gEfiGraphicsOutputProtocolGuid = EFI_GRAPHICS_OUTPUT_PROTOCOL_GUID;
|
||||
|
||||
EFI_GUID_STRING(&gEfiGraphicsOutputProtocolGuid, "EFI Graphics Output Protocol", "UEFI Graphics Output Protocol");
|
@@ -0,0 +1,206 @@
|
||||
/*++
|
||||
|
||||
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
|
||||
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:
|
||||
|
||||
GraphicsOutput.h
|
||||
|
||||
Abstract:
|
||||
|
||||
Graphics Output Protocol from the UEFI 2.0 specification.
|
||||
|
||||
Abstraction of a very simple graphics device.
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef __GRAPHICS_OUTPUT_H__
|
||||
#define __GRAPHICS_OUTPUT_H__
|
||||
|
||||
#include EFI_PROTOCOL_DEFINITION (UgaDraw)
|
||||
|
||||
#define EFI_GRAPHICS_OUTPUT_PROTOCOL_GUID \
|
||||
{ \
|
||||
0x9042a9de, 0x23dc, 0x4a38, 0x96, 0xfb, 0x7a, 0xde, 0xd0, 0x80, 0x51, 0x6a \
|
||||
}
|
||||
|
||||
typedef struct _EFI_GRAPHICS_OUTPUT_PROTOCOL EFI_GRAPHICS_OUTPUT_PROTOCOL;
|
||||
|
||||
typedef struct {
|
||||
UINT32 RedMask;
|
||||
UINT32 GreenMask;
|
||||
UINT32 BlueMask;
|
||||
UINT32 ReservedMask;
|
||||
} EFI_PIXEL_BITMASK;
|
||||
|
||||
typedef enum {
|
||||
PixelRedGreenBlueReserved8BitPerColor,
|
||||
PixelBlueGreenRedReserved8BitPerColor,
|
||||
PixelBitMask,
|
||||
PixelBltOnly,
|
||||
PixelFormatMax
|
||||
} EFI_GRAPHICS_PIXEL_FORMAT;
|
||||
|
||||
typedef struct {
|
||||
UINT32 Version;
|
||||
UINT32 HorizontalResolution;
|
||||
UINT32 VerticalResolution;
|
||||
EFI_GRAPHICS_PIXEL_FORMAT PixelFormat;
|
||||
EFI_PIXEL_BITMASK PixelInformation;
|
||||
UINT32 PixelsPerScanLine;
|
||||
} EFI_GRAPHICS_OUTPUT_MODE_INFORMATION;
|
||||
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_GRAPHICS_OUTPUT_PROTOCOL_QUERY_MODE) (
|
||||
IN EFI_GRAPHICS_OUTPUT_PROTOCOL *This,
|
||||
IN UINT32 ModeNumber,
|
||||
OUT UINTN *SizeOfInfo,
|
||||
OUT EFI_GRAPHICS_OUTPUT_MODE_INFORMATION **Info
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
Return the current video mode information.
|
||||
|
||||
Arguments:
|
||||
This - Protocol instance pointer.
|
||||
ModeNumber - The mode number to return information on.
|
||||
SizeOfInfo - A pointer to the size, in bytes, of the Info buffer.
|
||||
Info - A pointer to callee allocated buffer that returns information about ModeNumber.
|
||||
|
||||
Returns:
|
||||
EFI_SUCCESS - Mode information returned.
|
||||
EFI_DEVICE_ERROR - A hardware error occurred trying to retrieve the video mode.
|
||||
EFI_NOT_STARTED - Video display is not initialized. Call SetMode ()
|
||||
EFI_INVALID_PARAMETER - One of the input args was NULL.
|
||||
|
||||
--*/
|
||||
;
|
||||
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_GRAPHICS_OUTPUT_PROTOCOL_SET_MODE) (
|
||||
IN EFI_GRAPHICS_OUTPUT_PROTOCOL * This,
|
||||
IN UINT32 ModeNumber
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
Return the current video mode information.
|
||||
|
||||
Arguments:
|
||||
This - Protocol instance pointer.
|
||||
ModeNumber - The mode number to be set.
|
||||
|
||||
Returns:
|
||||
EFI_SUCCESS - Graphics mode was changed.
|
||||
EFI_DEVICE_ERROR - The device had an error and could not complete the request.
|
||||
EFI_UNSUPPORTED - ModeNumber is not supported by this device.
|
||||
|
||||
--*/
|
||||
;
|
||||
|
||||
typedef EFI_UGA_PIXEL EFI_GRAPHICS_OUTPUT_BLT_PIXEL;
|
||||
|
||||
typedef union {
|
||||
EFI_GRAPHICS_OUTPUT_BLT_PIXEL Pixel;
|
||||
UINT32 Raw;
|
||||
} EFI_GRAPHICS_OUTPUT_BLT_PIXEL_UNION;
|
||||
|
||||
typedef enum {
|
||||
EfiBltVideoFill,
|
||||
EfiBltVideoToBltBuffer,
|
||||
EfiBltBufferToVideo,
|
||||
EfiBltVideoToVideo,
|
||||
EfiGraphicsOutputBltOperationMax
|
||||
} EFI_GRAPHICS_OUTPUT_BLT_OPERATION;
|
||||
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_GRAPHICS_OUTPUT_PROTOCOL_BLT) (
|
||||
IN EFI_GRAPHICS_OUTPUT_PROTOCOL * This,
|
||||
IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL * BltBuffer, OPTIONAL
|
||||
IN EFI_GRAPHICS_OUTPUT_BLT_OPERATION BltOperation,
|
||||
IN UINTN SourceX,
|
||||
IN UINTN SourceY,
|
||||
IN UINTN DestinationX,
|
||||
IN UINTN DestinationY,
|
||||
IN UINTN Width,
|
||||
IN UINTN Height,
|
||||
IN UINTN Delta OPTIONAL
|
||||
);
|
||||
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
The following table defines actions for BltOperations:
|
||||
EfiBltVideoFill - Write data from the BltBuffer pixel (SourceX, SourceY)
|
||||
directly to every pixel of the video display rectangle
|
||||
(DestinationX, DestinationY) (DestinationX + Width, DestinationY + Height).
|
||||
Only one pixel will be used from the BltBuffer. Delta is NOT used.
|
||||
EfiBltVideoToBltBuffer - Read data from the video display rectangle
|
||||
(SourceX, SourceY) (SourceX + Width, SourceY + Height) and place it in
|
||||
the BltBuffer rectangle (DestinationX, DestinationY )
|
||||
(DestinationX + Width, DestinationY + Height). If DestinationX or
|
||||
DestinationY is not zero then Delta must be set to the length in bytes
|
||||
of a row in the BltBuffer.
|
||||
EfiBltBufferToVideo - Write data from the BltBuffer rectangle
|
||||
(SourceX, SourceY) (SourceX + Width, SourceY + Height) directly to the
|
||||
video display rectangle (DestinationX, DestinationY)
|
||||
(DestinationX + Width, DestinationY + Height). If SourceX or SourceY is
|
||||
not zero then Delta must be set to the length in bytes of a row in the
|
||||
BltBuffer.
|
||||
EfiBltVideoToVideo - Copy from the video display rectangle (SourceX, SourceY)
|
||||
(SourceX + Width, SourceY + Height) .to the video display rectangle
|
||||
(DestinationX, DestinationY) (DestinationX + Width, DestinationY + Height).
|
||||
The BltBuffer and Delta are not used in this mode.
|
||||
|
||||
Arguments:
|
||||
This - Protocol instance pointer.
|
||||
BltBuffer - Buffer containing data to blit into video buffer. This
|
||||
buffer has a size of Width*Height*sizeof(EFI_GRAPHICS_OUTPUT_BLT_PIXEL)
|
||||
BltOperation - Operation to perform on BlitBuffer and video memory
|
||||
SourceX - X coordinate of source for the BltBuffer.
|
||||
SourceY - Y coordinate of source for the BltBuffer.
|
||||
DestinationX - X coordinate of destination for the BltBuffer.
|
||||
DestinationY - Y coordinate of destination for the BltBuffer.
|
||||
Width - Width of rectangle in BltBuffer in pixels.
|
||||
Height - Hight of rectangle in BltBuffer in pixels.
|
||||
Delta -
|
||||
|
||||
Returns:
|
||||
EFI_SUCCESS - The Blt operation completed.
|
||||
EFI_INVALID_PARAMETER - BltOperation is not valid.
|
||||
EFI_DEVICE_ERROR - A hardware error occured writting to the video
|
||||
buffer.
|
||||
|
||||
--*/
|
||||
;
|
||||
|
||||
typedef struct {
|
||||
UINT32 MaxMode;
|
||||
UINT32 Mode;
|
||||
EFI_GRAPHICS_OUTPUT_MODE_INFORMATION *Info;
|
||||
UINTN SizeOfInfo;
|
||||
EFI_PHYSICAL_ADDRESS FrameBufferBase;
|
||||
UINTN FrameBufferSize;
|
||||
} EFI_GRAPHICS_OUTPUT_PROTOCOL_MODE;
|
||||
|
||||
typedef struct _EFI_GRAPHICS_OUTPUT_PROTOCOL {
|
||||
EFI_GRAPHICS_OUTPUT_PROTOCOL_QUERY_MODE QueryMode;
|
||||
EFI_GRAPHICS_OUTPUT_PROTOCOL_SET_MODE SetMode;
|
||||
EFI_GRAPHICS_OUTPUT_PROTOCOL_BLT Blt;
|
||||
EFI_GRAPHICS_OUTPUT_PROTOCOL_MODE *Mode;
|
||||
} EFI_GRAPHICS_OUTPUT_PROTOCOL;
|
||||
|
||||
extern EFI_GUID gEfiGraphicsOutputProtocolGuid;
|
||||
|
||||
#endif
|
40
EdkCompatibilityPkg/Foundation/Efi/Protocol/Hash/Hash.c
Normal file
40
EdkCompatibilityPkg/Foundation/Efi/Protocol/Hash/Hash.c
Normal file
@@ -0,0 +1,40 @@
|
||||
/*++
|
||||
|
||||
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
|
||||
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:
|
||||
|
||||
Hash.c
|
||||
|
||||
Abstract:
|
||||
EFI_HASH_SERVICE_BINDING_PROTOCOL as defined in UEFI 2.0.
|
||||
EFI_HASH_PROTOCOL as defined in UEFI 2.0.
|
||||
The EFI Hash Service Binding Protocol is used to locate hashing services support
|
||||
provided by a driver and create and destroy instances of the EFI Hash Protocol
|
||||
so that a multiple drivers can use the underlying hashing services.
|
||||
The EFI Service Binding Protocol defines the generic Service Binding Protocol functions.
|
||||
|
||||
Revision History
|
||||
--*/
|
||||
|
||||
#include "EfiSpec.h"
|
||||
#include EFI_PROTOCOL_DEFINITION (Hash)
|
||||
|
||||
EFI_GUID gEfiHashServiceBindingProtocolGuid = EFI_HASH_SERVICE_BINDING_PROTOCOL;
|
||||
EFI_GUID gEfiHashProtocolGuid = EFI_HASH_PROTOCOL_GUID;
|
||||
EFI_GUID gEfiHashAlgorithmSha1Guid = EFI_HASH_ALGORITHM_SHA1_GUID;
|
||||
EFI_GUID gEfiHashAlgorithmSha224Guid = EFI_HASH_ALGORITHM_SHA224_GUID;
|
||||
EFI_GUID gEfiHashAlgorithmSha256Guid = EFI_HASH_ALGORITHM_SHA256_GUID;
|
||||
EFI_GUID gEfiHashAlgorithmSha384Guid = EFI_HASH_ALGORITHM_SHA384_GUID;
|
||||
EFI_GUID gEfiHashAlgorithmSha512Guid = EFI_HASH_ALGORITHM_SHA512_GUID;
|
||||
EFI_GUID gEfiHashAlgorithmMD5Guid = EFI_HASH_ALGORTIHM_MD5_GUID;
|
||||
|
||||
EFI_GUID_STRING(&gEfiHashProtocolGuid, "Hash protoco", "UEFI 2.0 Hash protocol");
|
||||
EFI_GUID_STRING(&gEfiHashServiceBindingProtocolGuid, "Hash service binding protoco", "UEFI 2.0 Hash service binding protocol");
|
161
EdkCompatibilityPkg/Foundation/Efi/Protocol/Hash/Hash.h
Normal file
161
EdkCompatibilityPkg/Foundation/Efi/Protocol/Hash/Hash.h
Normal file
@@ -0,0 +1,161 @@
|
||||
/*++
|
||||
|
||||
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
|
||||
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:
|
||||
|
||||
Hash.h
|
||||
|
||||
Abstract:
|
||||
EFI_HASH_SERVICE_BINDING_PROTOCOL as defined in UEFI 2.0.
|
||||
EFI_HASH_PROTOCOL as defined in UEFI 2.0.
|
||||
The EFI Hash Service Binding Protocol is used to locate hashing services support
|
||||
provided by a driver and create and destroy instances of the EFI Hash Protocol
|
||||
so that a multiple drivers can use the underlying hashing services.
|
||||
The EFI Service Binding Protocol defines the generic Service Binding Protocol functions.
|
||||
|
||||
Revision History
|
||||
--*/
|
||||
|
||||
#ifndef __EFI_HASH_PROTOCOL_H__
|
||||
#define __EFI_HASH_PROTOCOL_H__
|
||||
|
||||
#define EFI_HASH_SERVICE_BINDING_PROTOCOL \
|
||||
{ \
|
||||
0x42881c98, 0xa4f3, 0x44b0, {0xa3, 0x9d, 0xdf, 0xa1, 0x86, 0x67, 0xd8, 0xcd } \
|
||||
}
|
||||
|
||||
#define EFI_HASH_PROTOCOL_GUID \
|
||||
{ \
|
||||
0xc5184932, 0xdba5, 0x46db, {0xa5, 0xba, 0xcc, 0x0b, 0xda, 0x9c, 0x14, 0x35 } \
|
||||
}
|
||||
|
||||
#define EFI_HASH_ALGORITHM_SHA1_GUID \
|
||||
{ \
|
||||
0x2ae9d80f, 0x3fb2, 0x4095, {0xb7, 0xb1, 0xe9, 0x31, 0x57, 0xb9, 0x46, 0xb6 } \
|
||||
}
|
||||
|
||||
#define EFI_HASH_ALGORITHM_SHA224_GUID \
|
||||
{ \
|
||||
0x8df01a06, 0x9bd5, 0x4bf7, {0xb0, 0x21, 0xdb, 0x4f, 0xd9, 0xcc, 0xf4, 0x5b } \
|
||||
}
|
||||
|
||||
#define EFI_HASH_ALGORITHM_SHA256_GUID \
|
||||
{ \
|
||||
0x51aa59de, 0xfdf2, 0x4ea3, {0xbc, 0x63, 0x87, 0x5f, 0xb7, 0x84, 0x2e, 0xe9 } \
|
||||
}
|
||||
|
||||
#define EFI_HASH_ALGORITHM_SHA384_GUID \
|
||||
{ \
|
||||
0xefa96432, 0xde33, 0x4dd2, {0xae, 0xe6, 0x32, 0x8c, 0x33, 0xdf, 0x77, 0x7a } \
|
||||
}
|
||||
|
||||
#define EFI_HASH_ALGORITHM_SHA512_GUID \
|
||||
{ \
|
||||
0xcaa4381e, 0x750c, 0x4770, {0xb8, 0x70, 0x7a, 0x23, 0xb4, 0xe4, 0x21, 0x30 } \
|
||||
}
|
||||
|
||||
#define EFI_HASH_ALGORTIHM_MD5_GUID \
|
||||
{ \
|
||||
0xaf7c79c, 0x65b5, 0x4319, {0xb0, 0xae, 0x44, 0xec, 0x48, 0x4e, 0x4a, 0xd7 } \
|
||||
}
|
||||
|
||||
typedef struct _EFI_HASH_PROTOCOL EFI_HASH_PROTOCOL;
|
||||
|
||||
typedef UINT8 EFI_MD5_HASH[16];
|
||||
typedef UINT8 EFI_SHA1_HASH[20];
|
||||
typedef UINT8 EFI_SHA224_HASH[28];
|
||||
typedef UINT8 EFI_SHA256_HASH[32];
|
||||
typedef UINT8 EFI_SHA384_HASH[48];
|
||||
typedef UINT8 EFI_SHA512_HASH[64];
|
||||
|
||||
typedef union {
|
||||
EFI_MD5_HASH *Md5Hash;
|
||||
EFI_SHA1_HASH *Sha1Hash;
|
||||
EFI_SHA224_HASH *Sha224Hash;
|
||||
EFI_SHA256_HASH *Sha256Hash;
|
||||
EFI_SHA384_HASH *Sha384Hash;
|
||||
EFI_SHA512_HASH *Sha512Hash;
|
||||
} EFI_HASH_OUTPUT;
|
||||
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_HASH_GET_HASH_SIZE) (
|
||||
IN CONST EFI_HASH_PROTOCOL *This,
|
||||
IN CONST EFI_GUID *HashAlgorithm,
|
||||
OUT UINTN *HashSize
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
Returns the size of the hash which results from a specific algorithm.
|
||||
|
||||
Arguments:
|
||||
This - Points to this instance of EFI_HASH_PROTOCOL.
|
||||
HashAlgorithm - Points to the EFI_GUID which identifies the algorithm to use.
|
||||
HashSize - Holds the returned size of the algorithm<68><6D>s hash.
|
||||
|
||||
Returns:
|
||||
EFI_SUCCESS - Hash size returned successfully.
|
||||
EFI_INVALID_PARAMETER - HashSize is NULL
|
||||
EFI_UNSUPPORTED - The algorithm specified by HashAlgorithm is not supported
|
||||
by this driver.
|
||||
--*/
|
||||
;
|
||||
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_HASH_HASH) (
|
||||
IN CONST EFI_HASH_PROTOCOL *This,
|
||||
IN CONST EFI_GUID *HashAlgorithm,
|
||||
IN BOOLEAN Extend,
|
||||
IN CONST UINT8 *Message,
|
||||
IN UINT64 MessageSize,
|
||||
IN OUT EFI_HASH_OUTPUT *Hash
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
Returns the size of the hash which results from a specific algorithm.
|
||||
|
||||
Arguments:
|
||||
This - Points to this instance of EFI_HASH_PROTOCOL.
|
||||
HashAlgorithm - Points to the EFI_GUID which identifies the algorithm to use.
|
||||
Extend - Specifies whether to create a new hash (FALSE) or extend the specified
|
||||
existing hash (TRUE).
|
||||
Message - Points to the start of the message.
|
||||
MessageSize - The size of Message, in bytes.
|
||||
Hash - On input, if Extend is TRUE, then this holds the hash to extend. On
|
||||
output, holds the resulting hash computed from the message.
|
||||
|
||||
Returns:
|
||||
EFI_SUCCESS - Hash returned successfully.
|
||||
EFI_INVALID_PARAMETER - Message or Hash is NULL
|
||||
EFI_UNSUPPORTED - The algorithm specified by HashAlgorithm is not supported by this
|
||||
driver. Or extend is TRUE and the algorithm doesn<73><6E>t support extending the hash.
|
||||
|
||||
--*/
|
||||
;
|
||||
|
||||
struct _EFI_HASH_PROTOCOL {
|
||||
EFI_HASH_GET_HASH_SIZE GetHashSize;
|
||||
EFI_HASH_HASH Hash;
|
||||
};
|
||||
|
||||
extern EFI_GUID gEfiHashServiceBindingProtocolGuid;
|
||||
extern EFI_GUID gEfiHashProtocolGuid;
|
||||
extern EFI_GUID gEfiHashAlgorithmSha1Guid;
|
||||
extern EFI_GUID gEfiHashAlgorithmSha224Guid;
|
||||
extern EFI_GUID gEfiHashAlgorithmSha256Guid;
|
||||
extern EFI_GUID gEfiHashAlgorithmSha384Guid;
|
||||
extern EFI_GUID gEfiHashAlgorithmSha512Guid;
|
||||
extern EFI_GUID gEfiHashAlgorithmMD5Guid;
|
||||
|
||||
#endif
|
@@ -0,0 +1,27 @@
|
||||
/*++
|
||||
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
|
||||
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:
|
||||
|
||||
IScsiInitatorName.c
|
||||
|
||||
Abstract:
|
||||
EFI_ISCSI_INITIATOR_NAME_PROTOCOL as defined in UEFI 2.0.
|
||||
It rovides the ability to get and set the iSCSI Initiator Name.
|
||||
|
||||
Revision History
|
||||
|
||||
--*/
|
||||
|
||||
#include "EfiSpec.h"
|
||||
#include EFI_PROTOCOL_DEFINITION (IScsiInitiatorName)
|
||||
|
||||
EFI_GUID gEfiIScsiInitiatorNameProtocolGuid = EFI_ISCSI_INITIATOR_NAME_PROTOCOL_GUID;
|
||||
EFI_GUID_STRING(&gEfiIScsiInitiatorNameProtocolGuid, "ISCSI Initiator Name Protocol", "UEFI 2.0 ISCSI Initiator Name Protocol");
|
@@ -0,0 +1,98 @@
|
||||
/*++
|
||||
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
|
||||
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:
|
||||
|
||||
IScsiInitatorName.h
|
||||
|
||||
Abstract:
|
||||
EFI_ISCSI_INITIATOR_NAME_PROTOCOL as defined in UEFI 2.0.
|
||||
It rovides the ability to get and set the iSCSI Initiator Name.
|
||||
|
||||
Revision History
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef __ISCSI_INITIATOR_NAME_H__
|
||||
#define __ISCSI_INITIATOR_NAME_H__
|
||||
|
||||
#define EFI_ISCSI_INITIATOR_NAME_PROTOCOL_GUID \
|
||||
{ \
|
||||
0x59324945, 0xec44, 0x4c0d, {0xb1, 0xcd, 0x9d, 0xb1, 0x39, 0xdf, 0x7, 0xc } \
|
||||
}
|
||||
|
||||
typedef struct _EFI_ISCSI_INITIATOR_NAME_PROTOCOL EFI_ISCSI_INITIATOR_NAME_PROTOCOL;
|
||||
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_ISCSI_INITIATOR_NAME_GET) (
|
||||
IN EFI_ISCSI_INITIATOR_NAME_PROTOCOL *This,
|
||||
IN OUT UINTN *BufferSize,
|
||||
OUT VOID *Buffer
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
Retrieves the current set value of iSCSI Initiator Name.
|
||||
|
||||
Arguments:
|
||||
This - Pointer to the EFI_ISCSI_INITIATOR_NAME_PROTOCOL instance.
|
||||
BufferSize - Size of the buffer in bytes pointed to by Buffer / Actual size of the
|
||||
variable data buffer.
|
||||
Buffer - Pointer to the buffer for data to be read.
|
||||
|
||||
Returns:
|
||||
EFI_SUCCESS - Data was successfully retrieved into the provided buffer and the
|
||||
BufferSize was sufficient to handle the iSCSI initiator name
|
||||
EFI_BUFFER_TOO_SMALL - BufferSize is too small for the result.
|
||||
EFI_INVALID_PARAMETER - BufferSize or Buffer is NULL.
|
||||
EFI_DEVICE_ERROR - The iSCSI initiator name could not be retrieved due to a hardware error.
|
||||
|
||||
--*/
|
||||
;
|
||||
|
||||
|
||||
|
||||
typedef EFI_STATUS
|
||||
(EFIAPI *EFI_ISCSI_INITIATOR_NAME_SET) (
|
||||
IN EFI_ISCSI_INITIATOR_NAME_PROTOCOL *This,
|
||||
IN OUT UINTN *BufferSize,
|
||||
IN VOID *Buffer
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
Sets the iSCSI Initiator Name.
|
||||
|
||||
Arguments:
|
||||
This - Pointer to the EFI_ISCSI_INITIATOR_NAME_PROTOCOL instance.
|
||||
BufferSize - Size of the buffer in bytes pointed to by Buffer.
|
||||
Buffer - Pointer to the buffer for data to be written.
|
||||
|
||||
Returns:
|
||||
EFI_SUCCESS - Data was successfully stored by the protocol.
|
||||
EFI_UNSUPPORTED - Platform policies do not allow for data to be written.
|
||||
EFI_INVALID_PARAMETER - BufferSize or Buffer is NULL, or BufferSize exceeds the maximum allowed limit.
|
||||
EFI_DEVICE_ERROR - The data could not be stored due to a hardware error.
|
||||
EFI_OUT_OF_RESOURCES - Not enough storage is available to hold the data.
|
||||
EFI_PROTOCOL_ERROR - Input iSCSI initiator name does not adhere to RFC 3720
|
||||
(and other related protocols)
|
||||
|
||||
--*/
|
||||
;
|
||||
|
||||
struct _EFI_ISCSI_INITIATOR_NAME_PROTOCOL {
|
||||
EFI_ISCSI_INITIATOR_NAME_GET Get;
|
||||
EFI_ISCSI_INITIATOR_NAME_SET Set;
|
||||
};
|
||||
|
||||
extern EFI_GUID gEfiIScsiInitiatorNameProtocolGuid;
|
||||
|
||||
#endif
|
41
EdkCompatibilityPkg/Foundation/Efi/Protocol/Ip4/Ip4.c
Normal file
41
EdkCompatibilityPkg/Foundation/Efi/Protocol/Ip4/Ip4.c
Normal file
@@ -0,0 +1,41 @@
|
||||
/*++
|
||||
|
||||
Copyright (c) 2005 - 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
|
||||
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:
|
||||
|
||||
Ip4.c
|
||||
|
||||
Abstract:
|
||||
|
||||
UEFI IPv4 protocol.
|
||||
|
||||
--*/
|
||||
|
||||
#include "EfiSpec.h"
|
||||
#include EFI_PROTOCOL_DEFINITION (Ip4)
|
||||
|
||||
EFI_GUID gEfiIp4ServiceBindingProtocolGuid
|
||||
= EFI_IP4_SERVICE_BINDING_PROTOCOL_GUID;
|
||||
|
||||
EFI_GUID gEfiIp4ProtocolGuid = EFI_IP4_PROTOCOL_GUID;
|
||||
|
||||
EFI_GUID_STRING (
|
||||
&gEfiIp4ServiceBindingProtocolGuid,
|
||||
"IP4 Service Binding Protocol",
|
||||
"IP4 Service Binding Protocol"
|
||||
);
|
||||
|
||||
EFI_GUID_STRING (
|
||||
&gEfiIp4ProtocolGuid,
|
||||
"IP4 Protocol",
|
||||
"IP4 Protocol"
|
||||
);
|
241
EdkCompatibilityPkg/Foundation/Efi/Protocol/Ip4/Ip4.h
Normal file
241
EdkCompatibilityPkg/Foundation/Efi/Protocol/Ip4/Ip4.h
Normal file
@@ -0,0 +1,241 @@
|
||||
/*++
|
||||
|
||||
Copyright (c) 2005 - 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
|
||||
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:
|
||||
|
||||
Ip4.h
|
||||
|
||||
Abstract:
|
||||
|
||||
UEFI IPv4 protocol.
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef _IP4_H_
|
||||
#define _IP4_H_
|
||||
|
||||
#include EFI_PROTOCOL_DEFINITION (ManagedNetwork)
|
||||
#include EFI_PROTOCOL_DEFINITION (ServiceBinding)
|
||||
|
||||
//
|
||||
//GUID definitions
|
||||
//
|
||||
#define EFI_IP4_SERVICE_BINDING_PROTOCOL_GUID \
|
||||
{0xc51711e7, 0xb4bf, 0x404a, 0xbf, 0xb8, 0x0a, 0x04, 0x8e, 0xf1, 0xff, 0xe4}
|
||||
|
||||
#define EFI_IP4_PROTOCOL_GUID \
|
||||
{0x41d94cd2, 0x35b6, 0x455a, 0x82, 0x58, 0xd4, 0xe5, 0x13, 0x34, 0xaa, 0xdd}
|
||||
|
||||
EFI_FORWARD_DECLARATION (EFI_IP4_PROTOCOL);
|
||||
|
||||
typedef struct {
|
||||
EFI_HANDLE InstanceHandle;
|
||||
EFI_IPv4_ADDRESS Ip4Address;
|
||||
EFI_IPv4_ADDRESS SubnetMask;
|
||||
} EFI_IP4_ADDRESS_PAIR;
|
||||
|
||||
typedef struct {
|
||||
EFI_HANDLE DriverHandle;
|
||||
UINT32 AddressCount;
|
||||
EFI_IP4_ADDRESS_PAIR AddressPairs[1];
|
||||
} EFI_IP4_VARIABLE_DATA;
|
||||
|
||||
typedef struct {
|
||||
UINT8 DefaultProtocol;
|
||||
BOOLEAN AcceptAnyProtocol;
|
||||
BOOLEAN AcceptIcmpErrors;
|
||||
BOOLEAN AcceptBroadcast;
|
||||
BOOLEAN AcceptPromiscuous;
|
||||
BOOLEAN UseDefaultAddress;
|
||||
EFI_IPv4_ADDRESS StationAddress;
|
||||
EFI_IPv4_ADDRESS SubnetMask;
|
||||
UINT8 TypeOfService;
|
||||
UINT8 TimeToLive;
|
||||
BOOLEAN DoNotFragment;
|
||||
BOOLEAN RawData;
|
||||
UINT32 ReceiveTimeout;
|
||||
UINT32 TransmitTimeout;
|
||||
} EFI_IP4_CONFIG_DATA;
|
||||
|
||||
|
||||
typedef struct _EFI_IP4_ROUTE_TABLE {
|
||||
EFI_IPv4_ADDRESS SubnetAddress;
|
||||
EFI_IPv4_ADDRESS SubnetMask;
|
||||
EFI_IPv4_ADDRESS GatewayAddress;
|
||||
} EFI_IP4_ROUTE_TABLE;
|
||||
|
||||
typedef struct _EFI_IP4_ICMP_TYPE {
|
||||
UINT8 Type;
|
||||
UINT8 Code;
|
||||
} EFI_IP4_ICMP_TYPE;
|
||||
|
||||
typedef struct {
|
||||
BOOLEAN IsStarted;
|
||||
|
||||
EFI_IP4_CONFIG_DATA ConfigData;
|
||||
BOOLEAN IsConfigured;
|
||||
|
||||
UINT32 GroupCount;
|
||||
EFI_IPv4_ADDRESS *GroupTable;
|
||||
|
||||
UINT32 RouteCount;
|
||||
EFI_IP4_ROUTE_TABLE *RouteTable;
|
||||
|
||||
UINT32 IcmpTypeCount;
|
||||
EFI_IP4_ICMP_TYPE *IcmpTypeList;
|
||||
} EFI_IP4_MODE_DATA;
|
||||
|
||||
#pragma pack(1)
|
||||
typedef struct _EFI_IP4_HEADER {
|
||||
UINT8 HeaderLength:4;
|
||||
UINT8 Version:4;
|
||||
UINT8 TypeOfService;
|
||||
UINT16 TotalLength;
|
||||
UINT16 Identification;
|
||||
UINT16 Fragmentation;
|
||||
UINT8 TimeToLive;
|
||||
UINT8 Protocol;
|
||||
UINT16 Checksum;
|
||||
EFI_IPv4_ADDRESS SourceAddress;
|
||||
EFI_IPv4_ADDRESS DestinationAddress;
|
||||
} EFI_IP4_HEADER;
|
||||
#pragma pack()
|
||||
|
||||
typedef struct _EFI_IP4_FRAGMENT_DATA {
|
||||
UINT32 FragmentLength;
|
||||
VOID *FragmentBuffer;
|
||||
} EFI_IP4_FRAGMENT_DATA;
|
||||
|
||||
|
||||
typedef struct _EFI_IP4_OVERRIDE_DATA {
|
||||
EFI_IPv4_ADDRESS SourceAddress;
|
||||
EFI_IPv4_ADDRESS GatewayAddress;
|
||||
|
||||
UINT8 Protocol;
|
||||
UINT8 TypeOfService;
|
||||
UINT8 TimeToLive;
|
||||
BOOLEAN DoNotFragment;
|
||||
} EFI_IP4_OVERRIDE_DATA;
|
||||
|
||||
typedef struct _EFI_IP4_TRANSMIT_DATA {
|
||||
EFI_IPv4_ADDRESS DestinationAddress;
|
||||
|
||||
EFI_IP4_OVERRIDE_DATA *OverrideData;
|
||||
UINT32 OptionsLength;
|
||||
VOID *OptionsBuffer;
|
||||
|
||||
UINT32 TotalDataLength;
|
||||
UINT32 FragmentCount;
|
||||
EFI_IP4_FRAGMENT_DATA FragmentTable[1];
|
||||
} EFI_IP4_TRANSMIT_DATA;
|
||||
|
||||
typedef struct _EFI_IP4_RECEIVE_DATA {
|
||||
EFI_TIME TimeStamp;
|
||||
EFI_EVENT RecycleSignal;
|
||||
|
||||
UINT32 HeaderLength;
|
||||
EFI_IP4_HEADER *Header;
|
||||
|
||||
UINT32 OptionsLength;
|
||||
VOID *Options;
|
||||
|
||||
UINT32 DataLength;
|
||||
UINT32 FragmentCount;
|
||||
EFI_IP4_FRAGMENT_DATA FragmentTable[1];
|
||||
} EFI_IP4_RECEIVE_DATA;
|
||||
|
||||
typedef struct _EFI_IP4_COMPLETION_TOKEN {
|
||||
EFI_EVENT Event;
|
||||
EFI_STATUS Status;
|
||||
|
||||
union {
|
||||
EFI_IP4_RECEIVE_DATA *RxData;
|
||||
EFI_IP4_TRANSMIT_DATA *TxData;
|
||||
} Packet;
|
||||
} EFI_IP4_COMPLETION_TOKEN;
|
||||
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_IP4_GET_MODE_DATA) (
|
||||
IN EFI_IP4_PROTOCOL *This,
|
||||
OUT EFI_IP4_MODE_DATA *Ip4ModeData OPTIONAL,
|
||||
OUT EFI_MANAGED_NETWORK_CONFIG_DATA *MnpConfigData OPTIONAL,
|
||||
OUT EFI_SIMPLE_NETWORK_MODE *SnpModeData OPTIONAL
|
||||
);
|
||||
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_IP4_CONFIGURE) (
|
||||
IN EFI_IP4_PROTOCOL *This,
|
||||
IN EFI_IP4_CONFIG_DATA *IpConfigData OPTIONAL
|
||||
);
|
||||
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_IP4_GROUPS) (
|
||||
IN EFI_IP4_PROTOCOL *This,
|
||||
IN BOOLEAN JoinFlag,
|
||||
IN EFI_IPv4_ADDRESS *GroupAddress OPTIONAL
|
||||
);
|
||||
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_IP4_ROUTES) (
|
||||
IN EFI_IP4_PROTOCOL *This,
|
||||
IN BOOLEAN DeleteRoute,
|
||||
IN EFI_IPv4_ADDRESS *SubnetAddress,
|
||||
IN EFI_IPv4_ADDRESS *SubnetMask,
|
||||
IN EFI_IPv4_ADDRESS *GatewayAddress
|
||||
);
|
||||
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_IP4_TRANSMIT) (
|
||||
IN EFI_IP4_PROTOCOL *This,
|
||||
IN EFI_IP4_COMPLETION_TOKEN *Token
|
||||
);
|
||||
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_IP4_RECEIVE) (
|
||||
IN EFI_IP4_PROTOCOL *This,
|
||||
IN EFI_IP4_COMPLETION_TOKEN *Token
|
||||
);
|
||||
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_IP4_CANCEL) (
|
||||
IN EFI_IP4_PROTOCOL *This,
|
||||
IN EFI_IP4_COMPLETION_TOKEN *Token OPTIONAL
|
||||
);
|
||||
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_IP4_POLL) (
|
||||
IN EFI_IP4_PROTOCOL *This
|
||||
);
|
||||
|
||||
typedef struct _EFI_IP4_PROTOCOL {
|
||||
EFI_IP4_GET_MODE_DATA GetModeData;
|
||||
EFI_IP4_CONFIGURE Configure;
|
||||
EFI_IP4_GROUPS Groups;
|
||||
EFI_IP4_ROUTES Routes;
|
||||
EFI_IP4_TRANSMIT Transmit;
|
||||
EFI_IP4_RECEIVE Receive;
|
||||
EFI_IP4_CANCEL Cancel;
|
||||
EFI_IP4_POLL Poll;
|
||||
} EFI_IP4_PROTOCOL;
|
||||
|
||||
|
||||
extern EFI_GUID gEfiIp4ServiceBindingProtocolGuid;
|
||||
extern EFI_GUID gEfiIp4RegistryDataGuid;
|
||||
extern EFI_GUID gEfiIp4ProtocolGuid;
|
||||
#endif
|
@@ -0,0 +1,29 @@
|
||||
/*++
|
||||
|
||||
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
|
||||
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:
|
||||
|
||||
Ip4Config.c
|
||||
|
||||
Abstract:
|
||||
|
||||
--*/
|
||||
|
||||
#include "EfiSpec.h"
|
||||
#include EFI_PROTOCOL_DEFINITION (Ip4Config)
|
||||
|
||||
EFI_GUID gEfiIp4ConfigProtocolGuid = EFI_IP4_CONFIG_PROTOCOL_GUID;
|
||||
|
||||
EFI_GUID_STRING (
|
||||
&gEfiIp4ConfigProtocolGuid,
|
||||
"Ip4Config Protocol",
|
||||
"Ip4Config Protocol"
|
||||
);
|
@@ -0,0 +1,73 @@
|
||||
/*++
|
||||
|
||||
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
|
||||
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:
|
||||
|
||||
Ip4Config.h
|
||||
|
||||
Abstract:
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef _IP4CONFIG_H_
|
||||
#define _IP4CONFIG_H_
|
||||
|
||||
#include EFI_PROTOCOL_DEFINITION (Ip4)
|
||||
|
||||
|
||||
#define EFI_IP4_CONFIG_PROTOCOL_GUID \
|
||||
{0x25c98279, 0x3d9c, 0x43f2, 0xa7, 0x0e, 0xe1, 0xea, 0x4e, 0x0d, 0xed, 0x1b}
|
||||
|
||||
EFI_FORWARD_DECLARATION (EFI_IP4_CONFIG_PROTOCOL);
|
||||
|
||||
#define IP4_CONFIG_VARIABLE_ATTRIBUTES (EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS )
|
||||
|
||||
typedef struct {
|
||||
EFI_IPv4_ADDRESS StationAddress;
|
||||
EFI_IPv4_ADDRESS SubnetMask;
|
||||
UINT32 RouteTableSize;
|
||||
EFI_IP4_ROUTE_TABLE RouteTable[1];
|
||||
} EFI_IP4_IPCONFIG_DATA;
|
||||
|
||||
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_IP4_CONFIG_START) (
|
||||
IN EFI_IP4_CONFIG_PROTOCOL *This,
|
||||
IN EFI_EVENT DoneEvent,
|
||||
IN EFI_EVENT ReconfigEvent
|
||||
);
|
||||
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_IP4_CONFIG_STOP) (
|
||||
IN EFI_IP4_CONFIG_PROTOCOL *This
|
||||
);
|
||||
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_IP4_CONFIG_GET_DATA) (
|
||||
IN EFI_IP4_CONFIG_PROTOCOL *This,
|
||||
IN OUT UINTN *ConfigDataSize,
|
||||
OUT EFI_IP4_IPCONFIG_DATA *ConfigData OPTIONAL
|
||||
);
|
||||
|
||||
|
||||
typedef struct _EFI_IP4_CONFIG_PROTOCOL {
|
||||
EFI_IP4_CONFIG_START Start;
|
||||
EFI_IP4_CONFIG_STOP Stop;
|
||||
EFI_IP4_CONFIG_GET_DATA GetData;
|
||||
} EFI_IP4_CONFIG_PROTOCOL;
|
||||
|
||||
|
||||
extern EFI_GUID gEfiIp4ConfigProtocolGuid;
|
||||
|
||||
#endif
|
@@ -0,0 +1,33 @@
|
||||
/*++
|
||||
|
||||
Copyright (c) 2004, 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
|
||||
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:
|
||||
|
||||
LoadFile.c
|
||||
|
||||
Abstract:
|
||||
|
||||
Load File protocol as defined in the EFI 1.0 specification.
|
||||
|
||||
Load file protocol exists to supports the addition of new boot devices,
|
||||
and to support booting from devices that do not map well to file system.
|
||||
Network boot is done via a LoadFile protocol.
|
||||
|
||||
EFI 1.0 can boot from any device that produces a LoadFile protocol.
|
||||
|
||||
--*/
|
||||
|
||||
#include "EfiSpec.h"
|
||||
#include EFI_PROTOCOL_DEFINITION (LoadFile)
|
||||
|
||||
EFI_GUID gEfiLoadFileProtocolGuid = LOAD_FILE_PROTOCOL_GUID;
|
||||
|
||||
EFI_GUID_STRING(&gEfiLoadFileProtocolGuid, "LoadFile Protocol", "EFI 1.0 Load File Protocol");
|
@@ -0,0 +1,87 @@
|
||||
/*++
|
||||
|
||||
Copyright (c) 2004, 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
|
||||
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:
|
||||
|
||||
LoadFile.h
|
||||
|
||||
Abstract:
|
||||
|
||||
Load File protocol as defined in the EFI 1.0 specification.
|
||||
|
||||
Load file protocol exists to supports the addition of new boot devices,
|
||||
and to support booting from devices that do not map well to file system.
|
||||
Network boot is done via a LoadFile protocol.
|
||||
|
||||
EFI 1.0 can boot from any device that produces a LoadFile protocol.
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef _LOAD_FILE_H_
|
||||
#define _LOAD_FILE_H_
|
||||
|
||||
#define LOAD_FILE_PROTOCOL_GUID \
|
||||
{ \
|
||||
0x56EC3091, 0x954C, 0x11d2, 0x8E, 0x3F, 0x00, 0xA0, 0xC9, 0x69, 0x72, 0x3B \
|
||||
}
|
||||
|
||||
EFI_FORWARD_DECLARATION (EFI_LOAD_FILE_PROTOCOL);
|
||||
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_LOAD_FILE) (
|
||||
IN EFI_LOAD_FILE_PROTOCOL * This,
|
||||
IN EFI_DEVICE_PATH_PROTOCOL * FilePath,
|
||||
IN BOOLEAN BootPolicy,
|
||||
IN OUT UINTN *BufferSize,
|
||||
IN VOID *Buffer OPTIONAL
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
Causes the driver to load a specified file.
|
||||
|
||||
Arguments:
|
||||
This - Protocol instance pointer.
|
||||
FilePath - The device specific path of the file to load.
|
||||
BootPolicy - If TRUE, indicates that the request originates from the
|
||||
boot manager is attempting to load FilePath as a boot
|
||||
selection. If FALSE, then FilePath must match as exact file
|
||||
to be loaded.
|
||||
BufferSize - On input the size of Buffer in bytes. On output with a return
|
||||
code of EFI_SUCCESS, the amount of data transferred to
|
||||
Buffer. On output with a return code of EFI_BUFFER_TOO_SMALL,
|
||||
the size of Buffer required to retrieve the requested file.
|
||||
Buffer - The memory buffer to transfer the file to. IF Buffer is NULL,
|
||||
then no the size of the requested file is returned in
|
||||
BufferSize.
|
||||
|
||||
Returns:
|
||||
EFI_SUCCESS - The file was loaded.
|
||||
EFI_UNSUPPORTED - The device does not support the provided BootPolicy
|
||||
EFI_INVALID_PARAMETER - FilePath is not a valid device path, or
|
||||
BufferSize is NULL.
|
||||
EFI_NO_MEDIA - No medium was present to load the file.
|
||||
EFI_DEVICE_ERROR - The file was not loaded due to a device error.
|
||||
EFI_NO_RESPONSE - The remote system did not respond.
|
||||
EFI_NOT_FOUND - The file was not found
|
||||
EFI_ABORTED - The file load process was manually cancelled.
|
||||
|
||||
--*/
|
||||
;
|
||||
|
||||
typedef struct _EFI_LOAD_FILE_PROTOCOL {
|
||||
EFI_LOAD_FILE LoadFile;
|
||||
} EFI_LOAD_FILE_PROTOCOL;
|
||||
|
||||
extern EFI_GUID gEfiLoadFileProtocolGuid;
|
||||
|
||||
#endif
|
@@ -0,0 +1,30 @@
|
||||
/*++
|
||||
|
||||
Copyright (c) 2004, 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
|
||||
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:
|
||||
|
||||
LoadedImage.c
|
||||
|
||||
Abstract:
|
||||
|
||||
EFI 1.0 Loaded Image Protocol definition.
|
||||
|
||||
Every EFI driver and application is passed an image handle when it is loaded.
|
||||
This image handle will contain a Loaded Image Protocol.
|
||||
|
||||
--*/
|
||||
|
||||
#include "EfiSpec.h"
|
||||
#include EFI_PROTOCOL_DEFINITION (LoadedImage)
|
||||
|
||||
EFI_GUID gEfiLoadedImageProtocolGuid = EFI_LOADED_IMAGE_PROTOCOL_GUID;
|
||||
|
||||
EFI_GUID_STRING(&gEfiLoadedImageProtocolGuid, "LoadedImage Protocol", "EFI 1.0 Loaded Image Protocol");
|
@@ -0,0 +1,73 @@
|
||||
/*++
|
||||
|
||||
Copyright (c) 2004, 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
|
||||
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:
|
||||
|
||||
LoadedImage.h
|
||||
|
||||
Abstract:
|
||||
|
||||
EFI 1.0 Loaded image protocol definition.
|
||||
|
||||
Every EFI driver and application is passed an image handle when it is loaded.
|
||||
This image handle will contain a Loaded Image Protocol.
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef _LOADED_IMAGE_H_
|
||||
#define _LOADED_IMAGE_H_
|
||||
|
||||
#define EFI_LOADED_IMAGE_PROTOCOL_GUID \
|
||||
{ \
|
||||
0x5B1B31A1, 0x9562, 0x11d2, 0x8E, 0x3F, 0x00, 0xA0, 0xC9, 0x69, 0x72, 0x3B \
|
||||
}
|
||||
|
||||
//
|
||||
// EFI_SYSTEM_TABLE & EFI_IMAGE_UNLOAD are defined in EfiApi.h
|
||||
//
|
||||
#define EFI_LOADED_IMAGE_INFORMATION_REVISION 0x1000
|
||||
|
||||
typedef struct {
|
||||
UINT32 Revision;
|
||||
EFI_HANDLE ParentHandle;
|
||||
EFI_SYSTEM_TABLE *SystemTable;
|
||||
|
||||
//
|
||||
// Source location of image
|
||||
//
|
||||
EFI_HANDLE DeviceHandle;
|
||||
EFI_DEVICE_PATH_PROTOCOL *FilePath;
|
||||
VOID *Reserved;
|
||||
|
||||
//
|
||||
// Images load options
|
||||
//
|
||||
UINT32 LoadOptionsSize;
|
||||
VOID *LoadOptions;
|
||||
|
||||
//
|
||||
// Location of where image was loaded
|
||||
//
|
||||
VOID *ImageBase;
|
||||
UINT64 ImageSize;
|
||||
EFI_MEMORY_TYPE ImageCodeType;
|
||||
EFI_MEMORY_TYPE ImageDataType;
|
||||
|
||||
//
|
||||
// If the driver image supports a dynamic unload request
|
||||
//
|
||||
EFI_IMAGE_UNLOAD Unload;
|
||||
|
||||
} EFI_LOADED_IMAGE_PROTOCOL;
|
||||
|
||||
extern EFI_GUID gEfiLoadedImageProtocolGuid;
|
||||
|
||||
#endif
|
@@ -0,0 +1,29 @@
|
||||
/*++
|
||||
|
||||
Copyright (c) 2005 - 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
|
||||
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:
|
||||
|
||||
ManagedNetwork.c
|
||||
|
||||
Abstract:
|
||||
|
||||
UEFI Managed Network protocol.
|
||||
|
||||
--*/
|
||||
|
||||
#include "EfiSpec.h"
|
||||
#include EFI_PROTOCOL_DEFINITION (ManagedNetwork)
|
||||
|
||||
EFI_GUID gEfiManagedNetworkServiceBindingProtocolGuid = EFI_MANAGED_NETWORK_SERVICE_BINDING_PROTOCOL_GUID;
|
||||
EFI_GUID gEfiManagedNetworkProtocolGuid = EFI_MANAGED_NETWORK_PROTOCOL_GUID;
|
||||
|
||||
EFI_GUID_STRING (&gEfiManagedNetworkServiceBindingProtocolGuid, "Managed Network Service Binding Protocol", "Managed Network Service Binding Protocol");
|
||||
EFI_GUID_STRING (&gEfiManagedNetworkProtocolGuid, "Managed Network Protocol", "Managed Network Protocol");
|
@@ -0,0 +1,164 @@
|
||||
/*++
|
||||
|
||||
Copyright (c) 2005 - 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
|
||||
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:
|
||||
|
||||
ManagedNetwork.h
|
||||
|
||||
Abstract:
|
||||
|
||||
UEFI Managed Network protocol definition.
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef _MANAGED_NETWORK_H_
|
||||
#define _MANAGED_NETWORK_H_
|
||||
|
||||
#include EFI_PROTOCOL_DEFINITION (SimpleNetwork)
|
||||
#include EFI_PROTOCOL_DEFINITION (ServiceBinding)
|
||||
|
||||
#define EFI_MANAGED_NETWORK_SERVICE_BINDING_PROTOCOL_GUID \
|
||||
{0xf36ff770, 0xa7e1, 0x42cf, 0x9e, 0xd2, 0x56, 0xf0, 0xf2, 0x71, 0xf4, 0x4c}
|
||||
|
||||
#define EFI_MANAGED_NETWORK_PROTOCOL_GUID \
|
||||
{ 0x3b95aa31, 0x3793, 0x434b, 0x86, 0x67, 0xc8, 0x7, 0x8, 0x92, 0xe0, 0x5e }
|
||||
|
||||
EFI_FORWARD_DECLARATION (EFI_MANAGED_NETWORK_PROTOCOL);
|
||||
|
||||
typedef struct {
|
||||
UINT32 ReceivedQueueTimeoutValue;
|
||||
UINT32 TransmitQueueTimeoutValue;
|
||||
UINT16 ProtocolTypeFilter;
|
||||
BOOLEAN EnableUnicastReceive;
|
||||
BOOLEAN EnableMulticastReceive;
|
||||
BOOLEAN EnableBroadcastReceive;
|
||||
BOOLEAN EnablePromiscuousReceive;
|
||||
BOOLEAN FlushQueuesOnReset;
|
||||
BOOLEAN EnableReceiveTimestamps;
|
||||
BOOLEAN DisableBackgroundPolling;
|
||||
} EFI_MANAGED_NETWORK_CONFIG_DATA;
|
||||
|
||||
typedef struct {
|
||||
EFI_TIME Timestamp;
|
||||
EFI_EVENT RecycleEvent;
|
||||
UINT32 PacketLength;
|
||||
UINT32 HeaderLength;
|
||||
UINT32 AddressLength;
|
||||
UINT32 DataLength;
|
||||
BOOLEAN BroadcastFlag;
|
||||
BOOLEAN MulticastFlag;
|
||||
BOOLEAN PromiscuousFlag;
|
||||
UINT16 ProtocolType;
|
||||
VOID *DestinationAddress;
|
||||
VOID *SourceAddress;
|
||||
VOID *MediaHeader;
|
||||
VOID *PacketData;
|
||||
} EFI_MANAGED_NETWORK_RECEIVE_DATA;
|
||||
|
||||
typedef struct {
|
||||
UINT32 FragmentLength;
|
||||
VOID *FragmentBuffer;
|
||||
} EFI_MANAGED_NETWORK_FRAGMENT_DATA;
|
||||
|
||||
typedef struct {
|
||||
EFI_MAC_ADDRESS *DestinationAddress;
|
||||
EFI_MAC_ADDRESS *SourceAddress;
|
||||
UINT16 ProtocolType;
|
||||
UINT32 DataLength;
|
||||
UINT16 HeaderLength;
|
||||
UINT16 FragmentCount;
|
||||
EFI_MANAGED_NETWORK_FRAGMENT_DATA FragmentTable[1];
|
||||
} EFI_MANAGED_NETWORK_TRANSMIT_DATA;
|
||||
|
||||
|
||||
typedef struct {
|
||||
EFI_EVENT Event;
|
||||
EFI_STATUS Status;
|
||||
union {
|
||||
EFI_MANAGED_NETWORK_RECEIVE_DATA *RxData;
|
||||
EFI_MANAGED_NETWORK_TRANSMIT_DATA *TxData;
|
||||
} Packet;
|
||||
} EFI_MANAGED_NETWORK_COMPLETION_TOKEN;
|
||||
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_MANAGED_NETWORK_GET_MODE_DATA) (
|
||||
IN EFI_MANAGED_NETWORK_PROTOCOL *This,
|
||||
OUT EFI_MANAGED_NETWORK_CONFIG_DATA *MnpConfigData OPTIONAL,
|
||||
OUT EFI_SIMPLE_NETWORK_MODE *SnpModeData OPTIONAL
|
||||
);
|
||||
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_MANAGED_NETWORK_CONFIGURE) (
|
||||
IN EFI_MANAGED_NETWORK_PROTOCOL *This,
|
||||
IN EFI_MANAGED_NETWORK_CONFIG_DATA *MnpConfigData OPTIONAL
|
||||
);
|
||||
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_MANAGED_NETWORK_MCAST_IP_TO_MAC) (
|
||||
IN EFI_MANAGED_NETWORK_PROTOCOL *This,
|
||||
IN BOOLEAN Ipv6Flag,
|
||||
IN EFI_IP_ADDRESS *IpAddress,
|
||||
OUT EFI_MAC_ADDRESS *MacAddress
|
||||
);
|
||||
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_MANAGED_NETWORK_GROUPS) (
|
||||
IN EFI_MANAGED_NETWORK_PROTOCOL *This,
|
||||
IN BOOLEAN JoinFlag,
|
||||
IN EFI_MAC_ADDRESS *MacAddress OPTIONAL
|
||||
);
|
||||
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_MANAGED_NETWORK_TRANSMIT) (
|
||||
IN EFI_MANAGED_NETWORK_PROTOCOL *This,
|
||||
IN EFI_MANAGED_NETWORK_COMPLETION_TOKEN *Token
|
||||
);
|
||||
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_MANAGED_NETWORK_RECEIVE) (
|
||||
IN EFI_MANAGED_NETWORK_PROTOCOL *This,
|
||||
IN EFI_MANAGED_NETWORK_COMPLETION_TOKEN *Token
|
||||
);
|
||||
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_MANAGED_NETWORK_CANCEL) (
|
||||
IN EFI_MANAGED_NETWORK_PROTOCOL *This,
|
||||
IN EFI_MANAGED_NETWORK_COMPLETION_TOKEN *Token OPTIONAL
|
||||
);
|
||||
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(EFIAPI *EFI_MANAGED_NETWORK_POLL) (
|
||||
IN EFI_MANAGED_NETWORK_PROTOCOL *This
|
||||
);
|
||||
|
||||
typedef struct _EFI_MANAGED_NETWORK_PROTOCOL {
|
||||
EFI_MANAGED_NETWORK_GET_MODE_DATA GetModeData;
|
||||
EFI_MANAGED_NETWORK_CONFIGURE Configure;
|
||||
EFI_MANAGED_NETWORK_MCAST_IP_TO_MAC McastIpToMac;
|
||||
EFI_MANAGED_NETWORK_GROUPS Groups;
|
||||
EFI_MANAGED_NETWORK_TRANSMIT Transmit;
|
||||
EFI_MANAGED_NETWORK_RECEIVE Receive;
|
||||
EFI_MANAGED_NETWORK_CANCEL Cancel;
|
||||
EFI_MANAGED_NETWORK_POLL Poll;
|
||||
} EFI_MANAGED_NETWORK_PROTOCOL;
|
||||
|
||||
extern EFI_GUID gEfiManagedNetworkServiceBindingProtocolGuid;
|
||||
extern EFI_GUID gEfiManagedNetworkProtocolGuid;
|
||||
|
||||
#endif
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user