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