Adding upstream version 6.03~pre1+dfsg.
[syslinux-debian/hramrach.git] / efi64 / include / efi / protocol / legacyboot.h
blob16e94e7eb93f297be7aad92b7b723171d4cde7a6
1 /*++
3 Copyright (c) 1999 Intel Corporation
5 Module Name:
7 legacyboot
9 Abstract:
11 EFI support for legacy boot
15 Revision History
17 --*/
19 #ifndef _LEGACY_BOOT_INCLUDE_
20 #define _LEGACY_BOOT_INCLUDE_
22 #define LEGACY_BOOT_PROTOCOL \
23 { 0x376e5eb2, 0x30e4, 0x11d3, { 0xba, 0xe5, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81 } }
25 #pragma pack(1)
28 // BBS 1.01 (See Appendix A) IPL and BCV Table Entry Data structure.
29 // Seg:Off pointers have been converted to EFI pointers in this data structure
30 // This is the structure that also maps to the EFI device path for the boot selection
32 typedef struct {
33 UINT16 DeviceType;
34 UINT16 StatusFlag;
35 UINT32 Reserved;
36 VOID *BootHandler; // Not an EFI entry point
37 CHAR8 *DescString;
38 } BBS_TABLE_ENTRY;
39 #pragma pack()
41 typedef
42 EFI_STATUS
43 (EFIAPI *LEGACY_BOOT_CALL) (
44 IN EFI_DEVICE_PATH *DevicePath
49 // BBS support functions
50 // PnP Call numbers and BiosSelector hidden in implementation
53 typedef enum {
54 IplRelative,
55 BcvRelative
56 } BBS_TYPE;
58 INTERFACE_DECL(_LEGACY_BOOT_INTERFACE);
61 // == PnP Function 0x60 then BbsVersion == 0x0101 if this call fails then BbsVersion == 0x0000
65 // == PnP Function 0x61
67 typedef
68 EFI_STATUS
69 (EFIAPI *GET_DEVICE_COUNT) (
70 IN struct _LEGACY_BOOT_INTERFACE *This,
71 IN BBS_TYPE *TableType,
72 OUT UINTN *DeviceCount,
73 OUT UINTN *MaxCount
77 // == PnP Function 0x62
79 typedef
80 EFI_STATUS
81 (EFIAPI *GET_PRIORITY_AND_TABLE) (
82 IN struct _LEGACY_BOOT_INTERFACE *This,
83 IN BBS_TYPE *TableType,
84 IN OUT UINTN *PrioritySize, // MaxCount * sizeof(UINT8)
85 OUT UINTN *Priority,
86 IN OUT UINTN *TableSize, // MaxCount * sizeof(BBS_TABLE_ENTRY)
87 OUT BBS_TABLE_ENTRY *TableEntrySize
91 // == PnP Function 0x63
93 typedef
94 EFI_STATUS
95 (EFIAPI *SET_PRIORITY) (
96 IN struct _LEGACY_BOOT_INTERFACE *This,
97 IN BBS_TYPE *TableType,
98 IN OUT UINTN *PrioritySize,
99 OUT UINTN *Priority
102 typedef struct _LEGACY_BOOT_INTERFACE {
103 LEGACY_BOOT_CALL BootIt;
106 // New functions to allow BBS booting to be configured from EFI
108 UINTN BbsVersion; // Currently 0x0101
109 GET_DEVICE_COUNT GetDeviceCount;
110 GET_PRIORITY_AND_TABLE GetPriorityAndTable;
111 SET_PRIORITY SetPriority;
112 } LEGACY_BOOT_INTERFACE;
114 EFI_STATUS
115 PlInitializeLegacyBoot (
116 VOID
119 #endif