legacyboot.h revision 1.1.1.1.4.2 1 1.1.1.1.4.2 rmind /* $NetBSD: legacyboot.h,v 1.1.1.1.4.2 2014/05/18 17:46:03 rmind Exp $ */
2 1.1.1.1.4.2 rmind
3 1.1.1.1.4.2 rmind /*++
4 1.1.1.1.4.2 rmind
5 1.1.1.1.4.2 rmind Copyright (c) 1999 Intel Corporation
6 1.1.1.1.4.2 rmind
7 1.1.1.1.4.2 rmind Module Name:
8 1.1.1.1.4.2 rmind
9 1.1.1.1.4.2 rmind legacyboot
10 1.1.1.1.4.2 rmind
11 1.1.1.1.4.2 rmind Abstract:
12 1.1.1.1.4.2 rmind
13 1.1.1.1.4.2 rmind EFI support for legacy boot
14 1.1.1.1.4.2 rmind
15 1.1.1.1.4.2 rmind
16 1.1.1.1.4.2 rmind
17 1.1.1.1.4.2 rmind Revision History
18 1.1.1.1.4.2 rmind
19 1.1.1.1.4.2 rmind --*/
20 1.1.1.1.4.2 rmind
21 1.1.1.1.4.2 rmind #ifndef _LEGACY_BOOT_INCLUDE_
22 1.1.1.1.4.2 rmind #define _LEGACY_BOOT_INCLUDE_
23 1.1.1.1.4.2 rmind
24 1.1.1.1.4.2 rmind #define LEGACY_BOOT_PROTOCOL \
25 1.1.1.1.4.2 rmind { 0x376e5eb2, 0x30e4, 0x11d3, { 0xba, 0xe5, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81 } }
26 1.1.1.1.4.2 rmind
27 1.1.1.1.4.2 rmind #pragma pack(1)
28 1.1.1.1.4.2 rmind
29 1.1.1.1.4.2 rmind //
30 1.1.1.1.4.2 rmind // BBS 1.01 (See Appendix A) IPL and BCV Table Entry Data structure.
31 1.1.1.1.4.2 rmind // Seg:Off pointers have been converted to EFI pointers in this data structure
32 1.1.1.1.4.2 rmind // This is the structure that also maps to the EFI device path for the boot selection
33 1.1.1.1.4.2 rmind //
34 1.1.1.1.4.2 rmind typedef struct {
35 1.1.1.1.4.2 rmind UINT16 DeviceType;
36 1.1.1.1.4.2 rmind UINT16 StatusFlag;
37 1.1.1.1.4.2 rmind UINT32 Reserved;
38 1.1.1.1.4.2 rmind VOID *BootHandler; // Not an EFI entry point
39 1.1.1.1.4.2 rmind CHAR8 *DescString;
40 1.1.1.1.4.2 rmind } BBS_TABLE_ENTRY;
41 1.1.1.1.4.2 rmind #pragma pack()
42 1.1.1.1.4.2 rmind
43 1.1.1.1.4.2 rmind typedef
44 1.1.1.1.4.2 rmind EFI_STATUS
45 1.1.1.1.4.2 rmind (EFIAPI *LEGACY_BOOT_CALL) (
46 1.1.1.1.4.2 rmind IN EFI_DEVICE_PATH *DevicePath
47 1.1.1.1.4.2 rmind );
48 1.1.1.1.4.2 rmind
49 1.1.1.1.4.2 rmind
50 1.1.1.1.4.2 rmind //
51 1.1.1.1.4.2 rmind // BBS support functions
52 1.1.1.1.4.2 rmind // PnP Call numbers and BiosSelector hidden in implementation
53 1.1.1.1.4.2 rmind //
54 1.1.1.1.4.2 rmind
55 1.1.1.1.4.2 rmind typedef enum {
56 1.1.1.1.4.2 rmind IplRelative,
57 1.1.1.1.4.2 rmind BcvRelative
58 1.1.1.1.4.2 rmind } BBS_TYPE;
59 1.1.1.1.4.2 rmind
60 1.1.1.1.4.2 rmind INTERFACE_DECL(_LEGACY_BOOT_INTERFACE);
61 1.1.1.1.4.2 rmind
62 1.1.1.1.4.2 rmind //
63 1.1.1.1.4.2 rmind // == PnP Function 0x60 then BbsVersion == 0x0101 if this call fails then BbsVersion == 0x0000
64 1.1.1.1.4.2 rmind //
65 1.1.1.1.4.2 rmind
66 1.1.1.1.4.2 rmind //
67 1.1.1.1.4.2 rmind // == PnP Function 0x61
68 1.1.1.1.4.2 rmind //
69 1.1.1.1.4.2 rmind typedef
70 1.1.1.1.4.2 rmind EFI_STATUS
71 1.1.1.1.4.2 rmind (EFIAPI *GET_DEVICE_COUNT) (
72 1.1.1.1.4.2 rmind IN struct _LEGACY_BOOT_INTERFACE *This,
73 1.1.1.1.4.2 rmind IN BBS_TYPE *TableType,
74 1.1.1.1.4.2 rmind OUT UINTN *DeviceCount,
75 1.1.1.1.4.2 rmind OUT UINTN *MaxCount
76 1.1.1.1.4.2 rmind );
77 1.1.1.1.4.2 rmind
78 1.1.1.1.4.2 rmind //
79 1.1.1.1.4.2 rmind // == PnP Function 0x62
80 1.1.1.1.4.2 rmind //
81 1.1.1.1.4.2 rmind typedef
82 1.1.1.1.4.2 rmind EFI_STATUS
83 1.1.1.1.4.2 rmind (EFIAPI *GET_PRIORITY_AND_TABLE) (
84 1.1.1.1.4.2 rmind IN struct _LEGACY_BOOT_INTERFACE *This,
85 1.1.1.1.4.2 rmind IN BBS_TYPE *TableType,
86 1.1.1.1.4.2 rmind IN OUT UINTN *PrioritySize, // MaxCount * sizeof(UINT8)
87 1.1.1.1.4.2 rmind OUT UINTN *Priority,
88 1.1.1.1.4.2 rmind IN OUT UINTN *TableSize, // MaxCount * sizeof(BBS_TABLE_ENTRY)
89 1.1.1.1.4.2 rmind OUT BBS_TABLE_ENTRY *TableEntrySize
90 1.1.1.1.4.2 rmind );
91 1.1.1.1.4.2 rmind
92 1.1.1.1.4.2 rmind //
93 1.1.1.1.4.2 rmind // == PnP Function 0x63
94 1.1.1.1.4.2 rmind //
95 1.1.1.1.4.2 rmind typedef
96 1.1.1.1.4.2 rmind EFI_STATUS
97 1.1.1.1.4.2 rmind (EFIAPI *SET_PRIORITY) (
98 1.1.1.1.4.2 rmind IN struct _LEGACY_BOOT_INTERFACE *This,
99 1.1.1.1.4.2 rmind IN BBS_TYPE *TableType,
100 1.1.1.1.4.2 rmind IN OUT UINTN *PrioritySize,
101 1.1.1.1.4.2 rmind OUT UINTN *Priority
102 1.1.1.1.4.2 rmind );
103 1.1.1.1.4.2 rmind
104 1.1.1.1.4.2 rmind typedef struct _LEGACY_BOOT_INTERFACE {
105 1.1.1.1.4.2 rmind LEGACY_BOOT_CALL BootIt;
106 1.1.1.1.4.2 rmind
107 1.1.1.1.4.2 rmind //
108 1.1.1.1.4.2 rmind // New functions to allow BBS booting to be configured from EFI
109 1.1.1.1.4.2 rmind //
110 1.1.1.1.4.2 rmind UINTN BbsVersion; // Currently 0x0101
111 1.1.1.1.4.2 rmind GET_DEVICE_COUNT GetDeviceCount;
112 1.1.1.1.4.2 rmind GET_PRIORITY_AND_TABLE GetPriorityAndTable;
113 1.1.1.1.4.2 rmind SET_PRIORITY SetPriority;
114 1.1.1.1.4.2 rmind } LEGACY_BOOT_INTERFACE;
115 1.1.1.1.4.2 rmind
116 1.1.1.1.4.2 rmind EFI_STATUS
117 1.1.1.1.4.2 rmind PlInitializeLegacyBoot (
118 1.1.1.1.4.2 rmind VOID
119 1.1.1.1.4.2 rmind );
120 1.1.1.1.4.2 rmind
121 1.1.1.1.4.2 rmind #endif
122