]> git.proxmox.com Git - mirror_edk2.git/blob - OvmfPkg/Library/PlatformDebugLibIoPort/DebugLibDetect.h
4677c85ac3c4f03b1743cf59d9d97c34b247ac52
[mirror_edk2.git] / OvmfPkg / Library / PlatformDebugLibIoPort / DebugLibDetect.h
1 /** @file
2 Base Debug library instance for hypervisor debug port.
3 It uses PrintLib to send debug messages to a fixed I/O port.
4
5 Copyright (c) 2017, Red Hat, Inc.<BR>
6 SPDX-License-Identifier: BSD-2-Clause-Patent
7
8 **/
9
10 #ifndef __DEBUG_IO_PORT_DETECT_H__
11 #define __DEBUG_IO_PORT_DETECT_H__
12
13 #include <Base.h>
14
15 //
16 // The constant value that is read from the debug I/O port
17 //
18 #define BOCHS_DEBUG_PORT_MAGIC 0xE9
19
20
21 /**
22 Helper function to return whether the virtual machine has a debug I/O port.
23 PlatformDebugLibIoPortFound can call this function directly or cache the
24 result.
25
26 @retval TRUE if the debug I/O port device was detected.
27 @retval FALSE otherwise
28
29 **/
30 BOOLEAN
31 EFIAPI
32 PlatformDebugLibIoPortDetect (
33 VOID
34 );
35
36 /**
37 Return whether the virtual machine has a debug I/O port. DebugLib.c
38 calls this function instead of PlatformDebugLibIoPortDetect, to allow
39 caching if possible.
40
41 @retval TRUE if the debug I/O port device was detected.
42 @retval FALSE otherwise
43
44 **/
45 BOOLEAN
46 EFIAPI
47 PlatformDebugLibIoPortFound (
48 VOID
49 );
50
51 #endif