]> git.proxmox.com Git - mirror_edk2.git/blob - OvmfPkg/Library/PlatformDebugLibIoPort/DebugLibDetect.h
OvmfPkg/VirtioMmioDeviceLib: list "VirtioMmioDevice.h" in the INF file
[mirror_edk2.git] / OvmfPkg / Library / PlatformDebugLibIoPort / DebugLibDetect.h
1 /** @file
2 Base Debug library instance for QEMU 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 This program and the accompanying materials
7 are licensed and made available under the terms and conditions of the BSD License
8 which accompanies this distribution. The full text of the license may be found at
9 http://opensource.org/licenses/bsd-license.php.
10
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
13
14 **/
15
16 #ifndef __DEBUG_IO_PORT_DETECT_H__
17 #define __DEBUG_IO_PORT_DETECT_H__
18
19 #include <Base.h>
20
21 //
22 // The constant value that is read from the debug I/O port
23 //
24 #define BOCHS_DEBUG_PORT_MAGIC 0xE9
25
26
27 /**
28 Helper function to return whether the virtual machine has a debug I/O port.
29 PlatformDebugLibIoPortFound can call this function directly or cache the
30 result.
31
32 @retval TRUE if the debug I/O port device was detected.
33 @retval FALSE otherwise
34
35 **/
36 BOOLEAN
37 EFIAPI
38 PlatformDebugLibIoPortDetect (
39 VOID
40 );
41
42 /**
43 Return whether the virtual machine has a debug I/O port. DebugLib.c
44 calls this function instead of PlatformDebugLibIoPortDetect, to allow
45 caching if possible.
46
47 @retval TRUE if the debug I/O port device was detected.
48 @retval FALSE otherwise
49
50 **/
51 BOOLEAN
52 EFIAPI
53 PlatformDebugLibIoPortFound (
54 VOID
55 );
56
57 #endif