ReactOS 0.4.15-dev-6680-g8c76870
bcd.h
Go to the documentation of this file.
1/*
2* COPYRIGHT: See COPYING.ARM in the top level directory
3* PROJECT: ReactOS Boot Configuration Data
4* FILE: boot/environ/include/bcd.h
5* PURPOSE: BCD Main Header
6* PROGRAMMER: Alex Ionescu (alex.ionescu@reactos.org)
7*/
8
9#ifndef _BCD_H
10#define _BCD_H
11
12/* ENUMERATIONS **************************************************************/
13
14/* See https://msdn.microsoft.com/en-us/library/windows/desktop/aa964229(v=vs.85).aspx */
15
16#define BCD_CLASS_LIBRARY 0x01
17#define BCD_CLASS_APPLICATION 0x02
18#define BCD_CLASS_DEVICE 0x03
19#define BCD_CLASS_OEM 0x05
20
21#define BCD_TYPE_DEVICE 0x01
22#define BCD_TYPE_STRING 0x02
23#define BCD_TYPE_OBJECT 0x03
24#define BCD_TYPE_OBJECT_LIST 0x04
25#define BCD_TYPE_INTEGER 0x05
26#define BCD_TYPE_BOOLEAN 0x06
27#define BCD_TYPE_INTEGER_LIST 0x07
28
29#define BCD_IMAGE_TYPE_FIRMWARE 0x01
30#define BCD_IMAGE_TYPE_BOOT_APP 0x02
31#define BCD_IMAGE_TYPE_NTLDR 0x03
32#define BCD_IMAGE_TYPE_REAL_MODE 0x04
33
34#define BCD_APPLICATION_TYPE_FWBOOTMGR 0x01
35#define BCD_APPLICATION_TYPE_BOOTMGR 0x02
36#define BCD_APPLICATION_TYPE_OSLOADER 0x03
37#define BCD_APPLICATION_TYPE_RESUME 0x04
38#define BCD_APPLICATION_TYPE_MEMDIAG 0x05
39#define BCD_APPLICATION_TYPE_NTLDR 0x06
40#define BCD_APPLICATION_TYPE_SETUPLDR 0x07
41#define BCD_APPLICATION_TYPE_BOOTSECTOR 0x08
42#define BCD_APPLICATION_TYPE_STARTUPCOM 0x09
43
44#define BCD_OBJECT_TYPE_APPLICATION 0x01
45#define BCD_OBJECT_TYPE_INHERIT 0x02
46#define BCD_OBJECT_TYPE_DEVICE 0x03
47
49{
85 BcdLibraryBoolean_PreserveBsdLog = 0x16000045, /* Undocumented */
95 BcdLibraryInteger_DisplayMessage = 0x15000065, /* Undocumented */
96 BcdLibraryInteger_DisplayMessageOverride = 0x15000066, /* Undocumented */
97 BcdLibraryInteger_UndocumentedMagic = 0x15000075, /* Undocumented magic */
105 BcdLibraryBoolean_MobileGraphics = 0x1600007A /* Undocumented */
107
109{
158 BcdOSLoaderBoolean_OptionsEditOneTime = 0x260000C4, /* Undocumented */
180
182{
198
200{
201 Reserved1 = 0x21000001,
202 Reserved2 = 0x22000002,
208
210{
220
221/* Undocumented */
223{
227
228/* DATA STRUCTURES ***********************************************************/
229
230typedef struct
231{
232 union
233 {
235 struct
236 {
240 };
241 };
243
244typedef struct
245{
246 union
247 {
249 union
250 {
251 struct
252 {
257 } Application;
258 struct
259 {
262 ULONG Reserved : 4;
263 ULONG ObjectCode : 4;
264 } Inherit;
265 struct
266 {
267 ULONG Reserved:28;
268 ULONG ObjectCode : 4;
270 };
271 };
273
275{
280
282{
288
289typedef struct _BCD_ELEMENT
290{
294
295typedef struct _BCD_DEVICE_OPTION
296{
300
302{
306
307/* FUNCTIONS ******************************************************************/
308
312 _In_ PHANDLE StoreHandle
313 );
314
315#define BCD_ENUMERATE_FLAG_DEEP 0x04
316#define BCD_ENUMERATE_FLAG_DEVICES 0x08
317#define BCD_ENUMERATE_FLAG_IN_ORDER 0x10
318
321 _In_ HANDLE BcdHandle,
322 _In_ HANDLE ObjectHandle,
323 _In_ ULONG RootElementType,
326 _Inout_ PULONG ElementSize,
327 _Out_ PULONG ElementCountNe
328 );
329
332 _In_ HANDLE BcdHandle,
333 _In_ PGUID ObjectId,
334 _Out_ PHANDLE ObjectHandle
335 );
336
339 _In_ HANDLE ObjectHandle,
341 );
342
345 _In_ HANDLE BcdHandle,
346 _In_ HANDLE ObjectHandle,
347 _Out_opt_ PBCD_ELEMENT Elements,
348 _Inout_ PULONG ElementSize,
349 _Out_ PULONG ElementCount
350 );
351
354 _In_ HANDLE ObjectHandle,
356 );
357
358#endif
Type
Definition: Type.h:7
LONG NTSTATUS
Definition: precomp.h:26
NTSTATUS BcdDeleteElement(_In_ HANDLE ObjectHandle, _In_ ULONG Type)
Definition: bcd.c:560
enum _BcdResumeElementTypes BcdResumeElementTypes
BcdOSLoaderElementTypes
Definition: bcd.h:109
@ BcdOSLoaderString_HalPath
Definition: bcd.h:115
@ BcdOSLoaderObject_AssociatedResumeObject
Definition: bcd.h:112
@ BcdOSLoaderInteger_UseFirmwarePciSettings
Definition: bcd.h:142
@ BcdOSLoaderBoolean_HypervisorUseLargeVTlb
Definition: bcd.h:171
@ BcdOSLoaderInteger_GroupSize
Definition: bcd.h:141
@ BcdOSLoaderBoolean_DisableVesaBios
Definition: bcd.h:128
@ BcdOSLoaderBoolean_UsePlatformClock
Definition: bcd.h:150
@ BcdOSLoaderBoolean_HypervisorDebuggerNetDhcp
Definition: bcd.h:176
@ BcdOSLoaderBoolean_UseVgaDriver
Definition: bcd.h:126
@ BcdOSLoaderInteger_HypervisorDebuggerNetHostIp
Definition: bcd.h:172
@ BcdOSLoaderInteger_RestrictApicCluster
Definition: bcd.h:132
@ BcdOSLoaderDevice_OSDevice
Definition: bcd.h:110
@ BcdOSLoaderBoolean_DebuggerHalBreakpoint
Definition: bcd.h:149
@ BcdOSLoaderInteger_HypervisorLaunchType
Definition: bcd.h:161
@ BcdOSLoaderString_KernelPath
Definition: bcd.h:114
@ BcdOSLoaderBoolean_BootLogInitialization
Definition: bcd.h:146
@ BcdOSLoaderInteger_X2ApicPolicy
Definition: bcd.h:134
@ BcdOSLoaderBoolean_UseLegacyApicMode
Definition: bcd.h:133
@ BcdOSLoaderBoolean_DisableBootDisplay
Definition: bcd.h:127
@ BcdOSLoaderInteger_HypervisorNumProc
Definition: bcd.h:169
@ BcdOSLoaderInteger_NxPolicy
Definition: bcd.h:117
@ BcdOSLoaderBoolean_DetectKernelAndHal
Definition: bcd.h:113
@ BcdOSLoaderInteger_IncreaseUserVa
Definition: bcd.h:125
@ BcdOSLoaderInteger_DriverLoadFailurePolicy
Definition: bcd.h:155
@ BcdOSLoaderBoolean_WinPEMode
Definition: bcd.h:119
@ BcdOSLoaderBoolean_ForceGroupAwareness
Definition: bcd.h:140
@ BcdOSLoaderInteger_BootStatusPolicy
Definition: bcd.h:159
@ BcdOSLoaderBoolean_VerboseObjectLoadMode
Definition: bcd.h:147
@ BcdOSLoaderInteger_MsiPolicy
Definition: bcd.h:143
@ BcdOSLoaderInteger_HypervisorDebuggerPortNumber
Definition: bcd.h:164
@ BcdOSLoaderInteger_NumberOfProcessors
Definition: bcd.h:136
@ BcdOSLoaderBoolean_ProcessorConfigurationFlags
Definition: bcd.h:138
@ BcdOSLoaderString_HypervisorDebuggerNetKey
Definition: bcd.h:175
@ BcdOSLoaderBoolean_UseLastGoodSettings
Definition: bcd.h:121
@ BcdOSLoaderBoolean_DisableElamDrivers
Definition: bcd.h:160
@ BcdOSLoaderInteger_BootMenuPolicy
Definition: bcd.h:156
@ BcdOSLoaderBoolean_UseBootProcessorOnly
Definition: bcd.h:135
@ BcdOSLoaderBoolean_ForceMaximumProcessors
Definition: bcd.h:137
@ BcdOSLoaderBoolean_DisableCrashAutoReboot
Definition: bcd.h:120
@ BcdOSLoaderInteger_XSaveDisable
Definition: bcd.h:178
@ BcdOSLoaderInteger_ClusterModeAddressing
Definition: bcd.h:130
@ BcdOSLoaderInteger_HypervisorDebuggerNetHostPort
Definition: bcd.h:173
@ BcdOSLoaderBoolean_SafeBootAlternateShell
Definition: bcd.h:145
@ BcdOSLoaderBoolean_OptionsEditOneTime
Definition: bcd.h:158
@ BcdOSLoaderInteger_HypervisorDebuggerBaudrate
Definition: bcd.h:165
@ BcdOSLoaderInteger_BootUxPolicy
Definition: bcd.h:167
@ BcdOSLoaderBoolean_AllowPrereleaseSignatures
Definition: bcd.h:122
@ BcdOSLoaderBoolean_UsePhysicalDestination
Definition: bcd.h:131
@ BcdOSLoaderInteger_HypervisorDebuggerType
Definition: bcd.h:163
@ BcdOSLoaderInteger_HypervisorDebugger1394Channel
Definition: bcd.h:166
@ BcdOSLoaderBoolean_EmsEnabled
Definition: bcd.h:153
@ BcdOSLoaderInteger_RemoveMemory
Definition: bcd.h:124
@ BcdOSLoaderInteger_TscSyncPolicy
Definition: bcd.h:152
@ BcdOSLoaderInteger_SafeBoot
Definition: bcd.h:144
@ BcdOSLoaderInteger_TpmBootEntropyPolicy
Definition: bcd.h:174
@ BcdOSLoaderBoolean_HypervisorDebuggerEnabled
Definition: bcd.h:162
@ BcdOSLoaderBoolean_NoLowMemory
Definition: bcd.h:123
@ BcdOSLoaderInteger_HypervisorRootProcPerNode
Definition: bcd.h:170
@ BcdOSLoaderString_HypervisorDebuggerBusParams
Definition: bcd.h:168
@ BcdOSLoaderBoolean_ForceLegacyPlatform
Definition: bcd.h:151
@ BcdOSLoaderInteger_HypervisorIommuPolicy
Definition: bcd.h:177
@ BcdOSLoaderString_SystemRoot
Definition: bcd.h:111
@ BcdOSLoaderBoolean_MaximizeGroupsCreated
Definition: bcd.h:139
@ BcdOSLoaderBoolean_AdvancedOptionsOneTime
Definition: bcd.h:157
@ BcdOSLoaderBoolean_KernelDebuggerEnabled
Definition: bcd.h:148
@ BcdOSLoaderString_DbgTransportPath
Definition: bcd.h:116
@ BcdOSLoaderBoolean_DisableVgaMode
Definition: bcd.h:129
@ BcdOSLoaderInteger_ForceFailure
Definition: bcd.h:154
@ BcdOSLoaderInteger_PAEPolicy
Definition: bcd.h:118
struct _BCD_OBJECT_DESCRIPTION BCD_OBJECT_DESCRIPTION
struct _BCD_ELEMENT_HEADER * PBCD_ELEMENT_HEADER
NTSTATUS BiEnumerateElements(_In_ HANDLE BcdHandle, _In_ HANDLE ObjectHandle, _In_ ULONG RootElementType, _In_ ULONG Flags, _Out_opt_ PBCD_PACKED_ELEMENT Elements, _Inout_ PULONG ElementSize, _Out_ PULONG ElementCountNe)
Definition: bcd.c:804
_BCDE_OSLOADER_TYPE_BOOT_STATUS_POLICY
Definition: bcd.h:210
@ DisplayShutdownFailures
Definition: bcd.h:216
@ IgnoreCheckpointFailures
Definition: bcd.h:215
@ IgnoreBootFailures
Definition: bcd.h:214
@ DisplayCheckpointFailures
Definition: bcd.h:218
@ IgnoreShutdownFailures
Definition: bcd.h:213
@ DisplayBootFailures
Definition: bcd.h:217
@ IgnoreAllFailures
Definition: bcd.h:212
@ DisplayAllFailures
Definition: bcd.h:211
struct _BCD_ELEMENT_HEADER BCD_ELEMENT_HEADER
BcdBootMgrElementTypes
Definition: bcd.h:182
@ BcdBootMgrBoolean_ProcessCustomActionsFirst
Definition: bcd.h:194
@ BcdBootMgrBoolean_NoErrorDisplay
Definition: bcd.h:191
@ BcdBootMgrBoolean_AttemptResume
Definition: bcd.h:187
@ BcdBootMgrObjectList_DisplayOrder
Definition: bcd.h:183
@ BcdBootMgrObject_ResumeObject
Definition: bcd.h:188
@ BcdBootMgrBoolean_PersistBootSequence
Definition: bcd.h:196
@ BcdBootMgrString_BcdFilePath
Definition: bcd.h:193
@ BcdBootMgrBoolean_DisplayBootMenu
Definition: bcd.h:190
@ BcdBootMgrObject_DefaultObject
Definition: bcd.h:185
@ BcdBootMgrObjectList_ToolsDisplayOrder
Definition: bcd.h:189
@ BcdBootMgrIntegerList_CustomActionsList
Definition: bcd.h:195
@ BcdBootMgrInteger_Timeout
Definition: bcd.h:186
@ BcdBootMgrObjectList_BootSequence
Definition: bcd.h:184
@ BcdBootMgrDevice_BcdDevice
Definition: bcd.h:192
struct _BCD_DEVICE_OPTION * PBCD_DEVICE_OPTION
_BcdResumeElementTypes
Definition: bcd.h:200
@ BcdResumeDevice_AssociatedOsDevice
Definition: bcd.h:204
@ BcdResumeBoolean_DebugOptionEnabled
Definition: bcd.h:205
@ Reserved2
Definition: bcd.h:202
@ BcdResumeInteger_BootMenuPolicy
Definition: bcd.h:206
@ BcdResumeBoolean_UseCustomSettings
Definition: bcd.h:203
@ Reserved1
Definition: bcd.h:201
struct _BCD_PACKED_ELEMENT BCD_PACKED_ELEMENT
struct _BCD_ELEMENT * PBCD_ELEMENT
struct _BCD_ELEMENT BCD_ELEMENT
struct _BCD_OBJECT_DESCRIPTION * PBCD_OBJECT_DESCRIPTION
NTSTATUS BcdOpenObject(_In_ HANDLE BcdHandle, _In_ PGUID ObjectId, _Out_ PHANDLE ObjectHandle)
Definition: bcd.c:506
enum _BCDE_OSLOADER_TYPE_BOOT_STATUS_POLICY BCDE_OSLOADER_TYPE_BOOT_STATUS_POLICY
NTSTATUS BcdOpenStoreFromFile(_In_ PUNICODE_STRING FileName, _In_ PHANDLE StoreHandle)
Definition: bcd.c:1322
NTSTATUS BiGetObjectDescription(_In_ HANDLE ObjectHandle, _Out_ PBCD_OBJECT_DESCRIPTION Description)
Definition: bcd.c:1178
BcdLibraryElementTypes
Definition: bcd.h:49
@ BcdLibraryString_FontPath
Definition: bcd.h:90
@ BcdLibraryInteger_SiPolicy
Definition: bcd.h:91
@ BcdLibraryBoolean_GraphicsModeDisabled
Definition: bcd.h:86
@ BcdLibraryBoolean_AutoRecoveryEnabled
Definition: bcd.h:57
@ BcdLibraryInteger_GraphicsResolution
Definition: bcd.h:94
@ BcdLibraryBoolean_PreserveBsdLog
Definition: bcd.h:85
@ BcdLibraryBoolean_GraphicsForceHighestMode
Definition: bcd.h:99
@ BcdLibraryBoolean_EmsEnabled
Definition: bcd.h:77
@ BcdLibraryString_Description
Definition: bcd.h:52
@ BcdLibraryInteger_EmsBaudRate
Definition: bcd.h:79
@ BcdLibraryString_PreferredLocale
Definition: bcd.h:53
@ BcdLibraryString_DebuggerNetKey
Definition: bcd.h:76
@ BcdLibraryInteger_UndocumentedMagic
Definition: bcd.h:97
@ BcdLibraryDevice_ApplicationDevice
Definition: bcd.h:50
@ BcdLibraryInteger_DebuggerNetHostIP
Definition: bcd.h:73
@ BcdLibraryBoolean_IsolatedExecutionContext
Definition: bcd.h:100
@ BcdLibraryBoolean_DisplayOptionsEdit
Definition: bcd.h:82
@ BcdLibraryObjectList_RecoverySequence
Definition: bcd.h:56
@ BcdLibraryBoolean_MobileGraphics
Definition: bcd.h:105
@ BcdLibraryInteger_FirstMegabytePolicy
Definition: bcd.h:60
@ BcdLibraryDevice_BsdLogDevice
Definition: bcd.h:83
@ BcdLibraryInteger_DebuggerNetPort
Definition: bcd.h:74
@ BcdLibraryObjectList_InheritedObjects
Definition: bcd.h:54
@ BcdLibraryString_DebuggerBusParameters
Definition: bcd.h:72
@ BcdLibraryBoolean_BootShutdownDisabled
Definition: bcd.h:102
@ BcdLibraryInteger_DebuggerType
Definition: bcd.h:64
@ BcdLibraryBoolean_DebuggerEnabled
Definition: bcd.h:63
@ BcdLibraryString_LoadOptionsString
Definition: bcd.h:80
@ BcdLibraryBoolean_DebuggerNetDhcp
Definition: bcd.h:75
@ BcdLibraryString_BsdLogPath
Definition: bcd.h:84
@ BcdLibraryBoolean_DisableIntegrityChecks
Definition: bcd.h:88
@ BcdLibraryIntegerList_BadMemoryList
Definition: bcd.h:58
@ BcdLibraryBoolean_AllowPrereleaseSignatures
Definition: bcd.h:89
@ BcdLibraryInteger_SerialDebuggerPort
Definition: bcd.h:66
@ BcdLibraryBoolean_ConsoleExtendedInput
Definition: bcd.h:93
@ BcdLibraryInteger_DebuggerStartPolicy
Definition: bcd.h:71
@ BcdLibraryIntegerList_AllowedInMemorySettings
Definition: bcd.h:103
@ BcdLibraryInteger_1394DebuggerChannel
Definition: bcd.h:68
@ BcdLibraryBoolean_DisplayAdvancedOptions
Definition: bcd.h:81
@ BcdLibraryInteger_ConfigAccessPolicy
Definition: bcd.h:87
@ BcdLibraryInteger_AvoidLowPhysicalMemory
Definition: bcd.h:62
@ BcdLibraryInteger_DisplayMessageOverride
Definition: bcd.h:96
@ BcdLibraryBoolean_ForceFipsCrypto
Definition: bcd.h:104
@ BcdLibraryInteger_RelocatePhysicalMemory
Definition: bcd.h:61
@ BcdLibraryInteger_TruncatePhysicalMemory
Definition: bcd.h:55
@ BcdLibraryBoolean_DebuggerIgnoreUsermodeExceptions
Definition: bcd.h:70
@ BcdLibraryInteger_EmsPort
Definition: bcd.h:78
@ BcdLibraryString_UsbDebuggerTargetName
Definition: bcd.h:69
@ BcdLibraryInteger_SerialDebuggerPortAddress
Definition: bcd.h:65
@ BcdLibraryInteger_DisplayMessage
Definition: bcd.h:95
@ BcdLibraryString_ApplicationPath
Definition: bcd.h:51
@ BcdLibraryBoolean_AllowBadMemoryAccess
Definition: bcd.h:59
@ BcdLibraryInteger_SerialDebuggerBaudRate
Definition: bcd.h:67
@ BcdLibraryInteger_FveBandId
Definition: bcd.h:92
@ BcdLibraryBoolean_RestartOnFailure
Definition: bcd.h:98
@ BcdLibraryBoolean_BootUxDisable
Definition: bcd.h:101
BcdStartupElementTypes
Definition: bcd.h:223
@ BcdStartupString_PxeApplicationName
Definition: bcd.h:225
@ BcdStartupBoolean_PxeSoftReboot
Definition: bcd.h:224
NTSTATUS BcdEnumerateAndUnpackElements(_In_ HANDLE BcdHandle, _In_ HANDLE ObjectHandle, _Out_opt_ PBCD_ELEMENT Elements, _Inout_ PULONG ElementSize, _Out_ PULONG ElementCount)
Definition: bcd.c:1241
struct _BCD_PACKED_ELEMENT * PBCD_PACKED_ELEMENT
struct _BCD_DEVICE_OPTION BCD_DEVICE_OPTION
static const WCHAR Description[]
Definition: oid.c:1266
#define _Out_opt_
Definition: ms_sal.h:346
#define _Inout_
Definition: ms_sal.h:378
#define _Out_
Definition: ms_sal.h:345
#define _In_
Definition: ms_sal.h:308
PVOID *typedef PHANDLE
Definition: ntsecpkg.h:455
ULONG PackedValue
Definition: bcd.h:234
ULONG Format
Definition: bcd.h:238
ULONG Class
Definition: bcd.h:239
ULONG SubType
Definition: bcd.h:237
ULONG ClassCode
Definition: bcd.h:261
ULONG Reserved
Definition: bcd.h:255
ULONG PackedValue
Definition: bcd.h:248
ULONG Value
Definition: bcd.h:260
ULONG ObjectCode
Definition: bcd.h:256
ULONG ImageCode
Definition: bcd.h:254
ULONG ApplicationCode
Definition: bcd.h:253
BL_DEVICE_DESCRIPTOR DeviceDescriptor
Definition: bcd.h:298
GUID AssociatedEntry
Definition: bcd.h:297
ULONG Version
Definition: bcd.h:276
PUCHAR Body
Definition: bcd.h:292
PBCD_ELEMENT_HEADER Header
Definition: bcd.h:291
BcdElementType RootType
Definition: bcd.h:284
struct _BCD_PACKED_ELEMENT * NextEntry
Definition: bcd.h:283
uint32_t * PULONG
Definition: typedefs.h:59
#define ANYSIZE_ARRAY
Definition: typedefs.h:46
unsigned char * PUCHAR
Definition: typedefs.h:53
uint32_t ULONG
Definition: typedefs.h:59
_Must_inspect_result_ _In_ WDFDEVICE Device
Definition: wdfchildlist.h:474
_Reserved_ PVOID Reserved
Definition: winddi.h:3974
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
unsigned char UCHAR
Definition: xmlstorage.h:181