2 * COPYRIGHT: See COPYING.ARM in the top level directory
3 * PROJECT: ReactOS UEFI Boot Library
4 * FILE: boot/environ/lib/bootlib.c
5 * PURPOSE: Boot Library Initialization
6 * PROGRAMMER: Alex Ionescu (alex.ionescu@reactos.org)
9 /* INCLUDES ******************************************************************/
13 /* DATA VARIABLES ************************************************************/
15 BL_LIBRARY_PARAMETERS BlpLibraryParameters
;
17 /* FUNCTIONS *****************************************************************/
20 * @name InitializeLibrary
22 * The InitializeLibrary function initializes the Boot Library.
24 * @param BootParameters
25 * Pointer to the Boot Application Parameter Block.
27 * @param LibraryParameters
28 * Pointer to the Boot Library Parameters.
30 * @return NT_SUCCESS if the boot library was loaded correctly, relevant error
36 _In_ PBOOT_APPLICATION_PARAMETER_BLOCK BootAppParameters
,
37 _In_ PBL_LIBRARY_PARAMETERS LibraryParameters
40 DBG_UNREFERENCED_PARAMETER(BootAppParameters
);
41 DBG_UNREFERENCED_PARAMETER(LibraryParameters
);
43 return STATUS_NOT_IMPLEMENTED
;
47 * @name BlInitializeLibrary
49 * The BlInitializeLibrary function initializes, or re-initializes, the
52 * @param BootParameters
53 * Pointer to the Boot Application Parameter Block.
55 * @param LibraryParameters
56 * Pointer to the Boot Library Parameters.
58 * @return NT_SUCCESS if the boot library was loaded correctly, relevant error
64 _In_ PBOOT_APPLICATION_PARAMETER_BLOCK BootAppParameters
,
65 _In_ PBL_LIBRARY_PARAMETERS LibraryParameters
70 /* Are we re-initializing the library? */
71 if (LibraryParameters
->LibraryFlags
& 2)
74 BlpLibraryParameters
= *LibraryParameters
;
75 if (LibraryParameters
->LibraryFlags
& 4)
78 /* Initialize all the core modules again */
81 BlMmRemoveBadMemory();
82 BlpMmInitializeConstraints();
84 /* Redraw the graphics console as needed */
85 BlpDisplayInitialize(LibraryParameters
->LibraryFlags
);
86 BlpResourceInitialize();
90 /* Nothing to do, we're done */
91 Status
= STATUS_SUCCESS
;
95 /* Nope, this is first time initialization */
96 Status
= InitializeLibrary(BootAppParameters
, LibraryParameters
);
99 /* Return initialization status */