HyperDbg Debugger
Loading...
Searching...
No Matches
uartp.h
Go to the documentation of this file.
1/*++
2
3Copyright (c) Microsoft Corporation. All rights reserved.
4
5Module Name:
6
7 uartp.h
8
9Abstract:
10
11 This header file declares the private variable, function, and type
12 definitions that are common to all the serial port hardware drivers.
13
14--*/
15
16#pragma once
17
18// --------------------------------------------------------------------- Macros
19
20//
21// Useful macros for setting and checking flags.
22//
23
24#define SET_FLAGS(_x, _f) ((_x) |= (_f))
25#define CLEAR_FLAGS(_x, _f) ((_x) &= ~(_f))
26#define CLEAR_OTHER_FLAGS(_x, _f) ((_x) &= (_f))
27#define CHECK_FLAG(_x, _f) ((_x) & (_f))
28
29// ---------------------------------------------------------------- Definitions
30
31#define READ_PORT_UCHAR UartHardwareAccess.ReadPort8
32#define WRITE_PORT_UCHAR UartHardwareAccess.WritePort8
33#define READ_PORT_USHORT UartHardwareAccess.ReadPort16
34#define WRITE_PORT_USHORT UartHardwareAccess.WritePort16
35#define READ_PORT_ULONG UartHardwareAccess.ReadPort32
36#define WRITE_PORT_ULONG UartHardwareAccess.WritePort32
37#define READ_REGISTER_UCHAR UartHardwareAccess.ReadRegister8
38#define WRITE_REGISTER_UCHAR UartHardwareAccess.WriteRegister8
39#define READ_REGISTER_USHORT UartHardwareAccess.ReadRegister16
40#define WRITE_REGISTER_USHORT UartHardwareAccess.WriteRegister16
41#define READ_REGISTER_ULONG UartHardwareAccess.ReadRegister32
42#define WRITE_REGISTER_ULONG UartHardwareAccess.WriteRegister32
43#define READ_REGISTER_ULONG64 UartHardwareAccess.ReadRegister64
44#define WRITE_REGISTER_ULONG64 UartHardwareAccess.WriteRegister64
45
46// ----------------------------------------------------------------- Data Types
47
57
58// -------------------------------------------------------------------- Externs
59
60extern UART_HARDWARE_ACCESS UartHardwareAccess;
61
62// ----------------------------------------------------------------- Prototypes
63
66 _Inout_ PCPPORT Port,
67 const BOOLEAN MemoryMapped,
68 const UCHAR AccessSize,
69 const UCHAR BitWidth);
UCHAR BOOLEAN
Definition BasicTypes.h:39
unsigned char UCHAR
Definition BasicTypes.h:35
BOOLEAN UartpSetAccess(_Inout_ PCPPORT Port, const BOOLEAN MemoryMapped, const UCHAR AccessSize, const UCHAR BitWidth)
Definition uartio.c:225
UART_HARDWARE_ACCESS UartHardwareAccess
Definition ioaccess.c:112
enum _ACPI_GENERIC_ACCESS_SIZE ACPI_GENERIC_ACCESS_SIZE
enum _ACPI_GENERIC_ACCESS_SIZE * PACPI_GENERIC_ACCESS_SIZE
_ACPI_GENERIC_ACCESS_SIZE
Definition uartp.h:49
@ AcpiGenericAccessSizeByte
Definition uartp.h:51
@ AcpiGenericAccessSizeLegacy
Definition uartp.h:50
@ AcpiGenericAccessSizeWord
Definition uartp.h:52
@ AcpiGenericAccessSizeQWord
Definition uartp.h:54
@ AcpiGenericAccessSizeDWord
Definition uartp.h:53