]> git.proxmox.com Git - mirror_edk2.git/blob - PcAtChipsetPkg/KbcResetDxe/Reset.c
495c0d359439c82c7f2b61ab4d5405dc37ead51e
[mirror_edk2.git] / PcAtChipsetPkg / KbcResetDxe / Reset.c
1 /** @file
2 Reset Architectural Protocol implementation
3
4 Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved. <BR>
5 This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php
9
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12
13 **/
14
15 #include "Reset.h"
16
17 /**
18 Reset the system.
19
20 @param ResetType warm or cold
21 @param ResetStatus possible cause of reset
22 @param DataSize Size of ResetData in bytes
23 @param ResetData Optional Unicode string
24
25 **/
26 VOID
27 EFIAPI
28 KbcResetSystem (
29 IN EFI_RESET_TYPE ResetType,
30 IN EFI_STATUS ResetStatus,
31 IN UINTN DataSize,
32 IN VOID *ResetData OPTIONAL
33 )
34 {
35 UINT8 Data;
36
37 switch (ResetType) {
38 case EfiResetWarm:
39 case EfiResetCold:
40 case EfiResetShutdown:
41 Data = 0xfe;
42 IoWrite8 (0x64, Data);
43 break;
44
45 default:
46 return ;
47 }
48
49 //
50 // Given we should have reset getting here would be bad
51 //
52 ASSERT (FALSE);
53 }
54