]> git.proxmox.com Git - mirror_edk2.git/blob - EdkCompatibilityPkg/Sample/Platform/Generic/RuntimeDxe/StatusCode/Lib/RtPort80StatusCode/RtPort80StatusCode.c
bac28c7d28b1531d2e774f643355dfb85a4378a9
[mirror_edk2.git] / EdkCompatibilityPkg / Sample / Platform / Generic / RuntimeDxe / StatusCode / Lib / RtPort80StatusCode / RtPort80StatusCode.c
1 /*++
2
3 Copyright (c) 2004 - 2007, Intel Corporation. All rights reserved.<BR>
4 This program and the accompanying materials
5 are licensed and made available under the terms and conditions of the BSD License
6 which accompanies this distribution. The full text of the license may be found at
7 http://opensource.org/licenses/bsd-license.php
8
9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11
12 Module Name:
13
14 RtPort80StatusCode.c
15
16 Abstract:
17
18 Lib to provide port 80 status code reporting Routines. This routine
19 does not use PPI's but is monolithic.
20
21 In general you should use PPI's, but some times a monolithic driver
22 is better. The best justification for monolithic code is debug.
23
24 --*/
25
26 #include "RtPort80StatusCode.h"
27
28 EFI_STATUS
29 EFIAPI
30 RtPort80ReportStatusCode (
31 IN EFI_STATUS_CODE_TYPE CodeType,
32 IN EFI_STATUS_CODE_VALUE Value,
33 IN UINT32 Instance,
34 IN EFI_GUID * CallerId,
35 IN EFI_STATUS_CODE_DATA * Data OPTIONAL
36 )
37 /*++
38
39 Routine Description:
40
41 Provide a port 80 status code
42
43 Arguments:
44
45 Same as ReportStatusCode PPI
46
47 Returns:
48
49 EFI_SUCCESS Always returns success.
50
51 --*/
52 {
53 UINT8 Port80Code;
54
55 //
56 // Progress or error code, Output Port 80h card
57 //
58 if (CodeTypeToPostCode (CodeType, Value, &Port80Code)) {
59 IoWrite8 (0x80, Port80Code);
60 }
61
62 return EFI_SUCCESS;
63 }