2 Copyright © 1995-2011, The AROS Development Team. All rights reserved.
3 $Id: shutdowna.c 41386 2011-09-16 13:42:40Z sonic $
5 Desc: EFI replacement for exec.library/ShutdownA()
9 #include <aros/debug.h>
10 #include <exec/tasks.h>
11 #include <resources/efi.h>
12 #include <proto/exec.h>
14 #include "efi_intern.h"
16 AROS_LH1(ULONG
, ShutdownA
,
17 AROS_LHA(ULONG
, action
, D0
),
18 struct ExecBase
*, SysBase
, 173, Efi
)
22 struct EFIBase
*EFIBase
= OpenResource("efi.resource");
27 case SD_ACTION_COLDREBOOT
:
28 efiAction
= EFI_Reset_Cold
;
31 case SD_ACTION_POWEROFF
:
32 efiAction
= EFI_Reset_Shutdown
;
40 /* Use EFI runtime services to perform the action */
41 EFIBase
->Runtime
->ResetSystem(efiAction
, 0, 0, NULL
);
43 /* Shut up the compiler, we should never reach this. */