xref: /reactos/boot/environ/lib/firmware/fwutil.c (revision c2c66aff)
1 /*
2  * COPYRIGHT:       See COPYING.ARM in the top level directory
3  * PROJECT:         ReactOS UEFI Boot Library
4  * FILE:            boot/environ/lib/firmware/fwutil.c
5  * PURPOSE:         Boot Library Firmware Utility Functions
6  * PROGRAMMER:      Alex Ionescu (alex.ionescu@reactos.org)
7  */
8 
9 /* INCLUDES ******************************************************************/
10 
11 #include "bl.h"
12 
13 VOID
BlFwReboot(VOID)14 BlFwReboot (
15     VOID
16     )
17 {
18 #ifdef BL_KD_SUPPORTED
19     /* Stop the boot debugger*/
20     BlBdStop();
21 #endif
22 
23     /* Reset the machine */
24     EfiResetSystem(EfiResetCold);
25 }
26 
27 NTSTATUS
MmFwFreePages(_In_ ULONG BasePage,_In_ ULONG PageCount)28 MmFwFreePages (
29     _In_ ULONG BasePage,
30     _In_ ULONG PageCount
31     )
32 {
33     /* Free the pages */
34     return EfiFreePages(PageCount, BasePage << PAGE_SHIFT);
35 }
36