ReactOS  0.4.15-dev-3187-ge372f2b
superio.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define LPC_IO_BASE   0x2E
 
#define LPC_ENTER_CONFIG_KEY   0x55
 
#define LPC_EXIT_CONFIG_KEY   0xAA
 
#define LPC_DEVICE_FDD   0x0
 
#define LPC_DEVICE_PARALLEL_PORT   0x3
 
#define LPC_DEVICE_SERIAL_PORT_1   0x4
 
#define LPC_DEVICE_SERIAL_PORT_2   0x5
 
#define LPC_DEVICE_KEYBOARD   0x7
 
#define LPC_DEVICE_GAME_PORT   0x9
 
#define LPC_DEVICE_PME   0xA
 
#define LPC_DEVICE_MPU_401   0xB
 
#define LPC_CONFIG_DEVICE_NUMBER   0x07
 
#define LPC_CONFIG_DEVICE_ACTIVATE   0x30
 
#define LPC_CONFIG_DEVICE_BASE_ADDRESS_HIGH   0x60
 
#define LPC_CONFIG_DEVICE_BASE_ADDRESS_LOW   0x61
 
#define LPC_CONFIG_DEVICE_INTERRUPT_PRIMARY   0x70
 
#define LPC_CONFIG_DEVICE_INTERRUPT_SECONDARY   0x72
 
#define LPC_CONFIG_DEVICE_DMA_CHANNEL   0x74
 

Functions

FORCEINLINE VOID LpcEnterConfig (VOID)
 
FORCEINLINE VOID LpcExitConfig (VOID)
 
FORCEINLINE UCHAR LpcReadRegister (UCHAR Register)
 
FORCEINLINE VOID LpcWriteRegister (UCHAR Register, UCHAR Value)
 
FORCEINLINE ULONG LpcDetectSuperIO (VOID)
 
FORCEINLINE ULONG LpcGetIoBase ()
 
FORCEINLINE ULONG LpcGetIoBaseMPU ()
 
FORCEINLINE ULONG LpcGetIrqPrimary ()
 
FORCEINLINE ULONG LpcGetIrqSecondary ()
 
FORCEINLINE ULONG LpcGetDmaChannel ()
 

Macro Definition Documentation

◆ LPC_CONFIG_DEVICE_ACTIVATE

#define LPC_CONFIG_DEVICE_ACTIVATE   0x30

Definition at line 31 of file superio.h.

◆ LPC_CONFIG_DEVICE_BASE_ADDRESS_HIGH

#define LPC_CONFIG_DEVICE_BASE_ADDRESS_HIGH   0x60

Definition at line 32 of file superio.h.

◆ LPC_CONFIG_DEVICE_BASE_ADDRESS_LOW

#define LPC_CONFIG_DEVICE_BASE_ADDRESS_LOW   0x61

Definition at line 33 of file superio.h.

◆ LPC_CONFIG_DEVICE_DMA_CHANNEL

#define LPC_CONFIG_DEVICE_DMA_CHANNEL   0x74

Definition at line 36 of file superio.h.

◆ LPC_CONFIG_DEVICE_INTERRUPT_PRIMARY

#define LPC_CONFIG_DEVICE_INTERRUPT_PRIMARY   0x70

Definition at line 34 of file superio.h.

◆ LPC_CONFIG_DEVICE_INTERRUPT_SECONDARY

#define LPC_CONFIG_DEVICE_INTERRUPT_SECONDARY   0x72

Definition at line 35 of file superio.h.

◆ LPC_CONFIG_DEVICE_NUMBER

#define LPC_CONFIG_DEVICE_NUMBER   0x07

Definition at line 30 of file superio.h.

◆ LPC_DEVICE_FDD

#define LPC_DEVICE_FDD   0x0

Definition at line 21 of file superio.h.

◆ LPC_DEVICE_GAME_PORT

#define LPC_DEVICE_GAME_PORT   0x9

Definition at line 26 of file superio.h.

◆ LPC_DEVICE_KEYBOARD

#define LPC_DEVICE_KEYBOARD   0x7

Definition at line 25 of file superio.h.

◆ LPC_DEVICE_MPU_401

#define LPC_DEVICE_MPU_401   0xB

Definition at line 28 of file superio.h.

◆ LPC_DEVICE_PARALLEL_PORT

#define LPC_DEVICE_PARALLEL_PORT   0x3

Definition at line 22 of file superio.h.

◆ LPC_DEVICE_PME

#define LPC_DEVICE_PME   0xA

Definition at line 27 of file superio.h.

◆ LPC_DEVICE_SERIAL_PORT_1

#define LPC_DEVICE_SERIAL_PORT_1   0x4

Definition at line 23 of file superio.h.

◆ LPC_DEVICE_SERIAL_PORT_2

#define LPC_DEVICE_SERIAL_PORT_2   0x5

Definition at line 24 of file superio.h.

◆ LPC_ENTER_CONFIG_KEY

#define LPC_ENTER_CONFIG_KEY   0x55

Definition at line 18 of file superio.h.

◆ LPC_EXIT_CONFIG_KEY

#define LPC_EXIT_CONFIG_KEY   0xAA

Definition at line 19 of file superio.h.

◆ LPC_IO_BASE

#define LPC_IO_BASE   0x2E

Definition at line 16 of file superio.h.

Function Documentation

◆ LpcDetectSuperIO()

FORCEINLINE ULONG LpcDetectSuperIO ( VOID  )

Definition at line 76 of file superio.h.

77 {
79 
81 
83  return 0;
84 
86  return 0;
87 
88  LpcExitConfig();
89 
90  return LPC_IO_BASE;
91 }
#define READ_PORT_UCHAR(p)
Definition: pc98vid.h:22
unsigned char * PUCHAR
Definition: retypes.h:3
#define LPC_DEVICE_SERIAL_PORT_1
Definition: superio.h:23
FORCEINLINE VOID LpcExitConfig(VOID)
Definition: superio.h:51
FORCEINLINE UCHAR LpcReadRegister(UCHAR Register)
Definition: superio.h:59
#define LPC_CONFIG_DEVICE_NUMBER
Definition: superio.h:30
#define LPC_IO_BASE
Definition: superio.h:16
FORCEINLINE VOID LpcWriteRegister(UCHAR Register, UCHAR Value)
Definition: superio.h:67
FORCEINLINE VOID LpcEnterConfig(VOID)
Definition: superio.h:43
#define LPC_CONFIG_DEVICE_ACTIVATE
Definition: superio.h:31

◆ LpcEnterConfig()

FORCEINLINE VOID LpcEnterConfig ( VOID  )

Definition at line 43 of file superio.h.

44 {
45  /* Enter Configuration */
47 }
#define LPC_ENTER_CONFIG_KEY
Definition: superio.h:18
unsigned char * PUCHAR
Definition: retypes.h:3
#define LPC_IO_BASE
Definition: superio.h:16
#define WRITE_PORT_UCHAR(p, d)
Definition: pc98vid.h:21

Referenced by LpcDetectSuperIO(), and XboxGetSerialPort().

◆ LpcExitConfig()

FORCEINLINE VOID LpcExitConfig ( VOID  )

Definition at line 51 of file superio.h.

52 {
53  /* Exit Configuration */
55 }
#define LPC_EXIT_CONFIG_KEY
Definition: superio.h:19
unsigned char * PUCHAR
Definition: retypes.h:3
#define LPC_IO_BASE
Definition: superio.h:16
#define WRITE_PORT_UCHAR(p, d)
Definition: pc98vid.h:21

Referenced by LpcDetectSuperIO(), and XboxGetSerialPort().

◆ LpcGetDmaChannel()

FORCEINLINE ULONG LpcGetDmaChannel ( )

Definition at line 141 of file superio.h.

142 {
144 }
FORCEINLINE UCHAR LpcReadRegister(UCHAR Register)
Definition: superio.h:59
#define LPC_CONFIG_DEVICE_DMA_CHANNEL
Definition: superio.h:36

◆ LpcGetIoBase()

FORCEINLINE ULONG LpcGetIoBase ( )

Definition at line 96 of file superio.h.

97 {
98  ULONG Base = 0;
99 
100  // Read LSB
102  // Read MSB
104 
105  return Base;
106 }
#define LPC_CONFIG_DEVICE_BASE_ADDRESS_LOW
Definition: superio.h:33
_In_opt_ ULONG Base
Definition: rtlfuncs.h:2386
FORCEINLINE UCHAR LpcReadRegister(UCHAR Register)
Definition: superio.h:59
#define LPC_CONFIG_DEVICE_BASE_ADDRESS_HIGH
Definition: superio.h:32
unsigned int ULONG
Definition: retypes.h:1

Referenced by XboxGetSerialPort().

◆ LpcGetIoBaseMPU()

FORCEINLINE ULONG LpcGetIoBaseMPU ( )

Definition at line 111 of file superio.h.

112 {
113  ULONG Base = 0;
114 
115  // Read LSB
117  // Read MSB
119 
120  return Base;
121 }
#define LPC_CONFIG_DEVICE_BASE_ADDRESS_LOW
Definition: superio.h:33
_In_opt_ ULONG Base
Definition: rtlfuncs.h:2386
FORCEINLINE UCHAR LpcReadRegister(UCHAR Register)
Definition: superio.h:59
#define LPC_CONFIG_DEVICE_BASE_ADDRESS_HIGH
Definition: superio.h:32
unsigned int ULONG
Definition: retypes.h:1

◆ LpcGetIrqPrimary()

FORCEINLINE ULONG LpcGetIrqPrimary ( )

Definition at line 126 of file superio.h.

127 {
129 }
FORCEINLINE UCHAR LpcReadRegister(UCHAR Register)
Definition: superio.h:59
#define LPC_CONFIG_DEVICE_INTERRUPT_PRIMARY
Definition: superio.h:34

Referenced by XboxGetSerialPort().

◆ LpcGetIrqSecondary()

FORCEINLINE ULONG LpcGetIrqSecondary ( )

Definition at line 134 of file superio.h.

135 {
137 }
FORCEINLINE UCHAR LpcReadRegister(UCHAR Register)
Definition: superio.h:59
#define LPC_CONFIG_DEVICE_INTERRUPT_SECONDARY
Definition: superio.h:35

◆ LpcReadRegister()

FORCEINLINE UCHAR LpcReadRegister ( UCHAR  Register)

Definition at line 59 of file superio.h.

60 {
62  return READ_PORT_UCHAR((PUCHAR)(LPC_IO_BASE + 1));
63 }
#define READ_PORT_UCHAR(p)
Definition: pc98vid.h:22
unsigned char * PUCHAR
Definition: retypes.h:3
#define LPC_IO_BASE
Definition: superio.h:16
#define WRITE_PORT_UCHAR(p, d)
Definition: pc98vid.h:21

Referenced by LpcDetectSuperIO(), LpcGetDmaChannel(), LpcGetIoBase(), LpcGetIoBaseMPU(), LpcGetIrqPrimary(), LpcGetIrqSecondary(), and XboxGetSerialPort().

◆ LpcWriteRegister()

FORCEINLINE VOID LpcWriteRegister ( UCHAR  Register,
UCHAR  Value 
)

Definition at line 67 of file superio.h.

68 {
71 }
unsigned char * PUCHAR
Definition: retypes.h:3
#define LPC_IO_BASE
Definition: superio.h:16
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _Out_opt_ PUSHORT _Inout_opt_ PUNICODE_STRING Value
Definition: wdfregistry.h:406
#define WRITE_PORT_UCHAR(p, d)
Definition: pc98vid.h:21

Referenced by LpcDetectSuperIO(), and XboxGetSerialPort().