diff --git a/reactos/include/internal/hal/ddk.h b/reactos/include/internal/hal/ddk.h index 85bcb123c73..c104fadc3e3 100644 --- a/reactos/include/internal/hal/ddk.h +++ b/reactos/include/internal/hal/ddk.h @@ -65,7 +65,7 @@ typedef BOOLEAN (*PHAL_RESET_DISPLAY_PARAMETERS)(ULONG Columns, ULONG Rows); VOID HalAcquireDisplayOwnership ( - PHAL_RESET_DISPLAY_PARAMETERS ResetDisplayParameters); + PHAL_RESET_DISPLAY_PARAMETERS ResetDisplayParameters); PVOID HalAllocateCommonBuffer(PADAPTER_OBJECT AdapterObject, ULONG Length, @@ -120,7 +120,7 @@ ULONG HalGetInterruptVector(INTERFACE_TYPE InterfaceType, PKAFFINITY Affinity); BOOLEAN HalInitSystem (ULONG Phase, - boot_param *bp); + boot_param *bp); BOOLEAN HalMakeBeep (ULONG Frequency); @@ -151,7 +151,7 @@ ULONG HalSetBusDataByOffset(BUS_DATA_TYPE BusDataType, ULONG Length); VOID HalSetDisplayParameters(ULONG CursorPosX, - ULONG CursorPosY); + ULONG CursorPosY); BOOLEAN HalTranslateBusAddress(INTERFACE_TYPE InterfaceType, ULONG BusNumber, @@ -159,4 +159,71 @@ BOOLEAN HalTranslateBusAddress(INTERFACE_TYPE InterfaceType, PULONG AddressSpace, PPHYSICAL_ADDRESS TranslatedAddress); +/* + * Kernel debugger section + */ + +typedef struct _KD_PORT_INFORMATION +{ + ULONG ComPort; + ULONG BaudRate; + ULONG BaseAddress; +} KD_PORT_INFORMATION, *PKD_PORT_INFORMATION; + + +extern ULONG KdComPortInUse; + + +BOOLEAN +STDCALL +KdPortInitialize (PKD_PORT_INFORMATION PortInformation, + DWORD Unknown1, + DWORD Unknown2); + +VOID +STDCALL +KdPortPutByte (UCHAR ByteToSend); + + +/* + * Port I/O functions + */ + +UCHAR +READ_PORT_BUFFER_UCHAR (PUCHAR Port, PUCHAR Value, ULONG Count); + +ULONG +READ_PORT_BUFFER_ULONG (PULONG Port, PULONG Value, ULONG Count); + +USHORT +READ_PORT_BUFFER_USHORT (PUSHORT Port, PUSHORT Value, ULONG Count); + +UCHAR +READ_PORT_UCHAR (PUCHAR Port); + +ULONG +READ_PORT_ULONG (PULONG Port); + +USHORT +READ_PORT_USHORT (PUSHORT Port); + +VOID +WRITE_PORT_BUFFER_UCHAR (PUCHAR Port, PUCHAR Value, ULONG Count); + +VOID +WRITE_PORT_BUFFER_ULONG (PULONG Port, PULONG Value, ULONG Count); + +VOID +WRITE_PORT_BUFFER_USHORT (PUSHORT Port, PUSHORT Value, ULONG Count); + +VOID +WRITE_PORT_UCHAR (PUCHAR Port, UCHAR Value); + +VOID +WRITE_PORT_ULONG (PULONG Port, ULONG Value); + +VOID +WRITE_PORT_USHORT (PUSHORT Port, USHORT Value); + + #endif /* __INCLUDE_INTERNAL_HAL_DDK_H */ diff --git a/reactos/include/internal/i386/io.h b/reactos/include/internal/i386/io.h index 1d4c6771ae0..9352b09a964 100644 --- a/reactos/include/internal/i386/io.h +++ b/reactos/include/internal/i386/io.h @@ -164,19 +164,6 @@ __OUTS(l) __inlc_p(port) : \ __inl_p(port)) -/* HAL port mapped I/O functions */ -#define READ_PORT_UCHAR(port) inb_p(port) -#define READ_PORT_USHORT(port) inw_p(port) -#define READ_PORT_ULONG(port) inl_p(port) -#define READ_PORT_BUFFER_UCHAR(port, buffer, count) insb(port, buffer, count) -#define READ_PORT_BUFFER_USHORT(port, buffer, count) insw(port, buffer, count) -#define READ_PORT_BUFFER_ULONG(port, buffer, count) insl(port, buffer, count) -#define WRITE_PORT_UCHAR(port, value) outb_p(port, value) -#define WRITE_PORT_USHORT(port, value) outw_p(port, value) -#define WRITE_PORT_ULONG(port, value) outl_p(port, value) -#define WRITE_PORT_BUFFER_UCHAR(port, buffer, count) outsb(port, buffer, count) -#define WRITE_PORT_BUFFER_USHORT(port, buffer, count) outsw(port, buffer, count) -#define WRITE_PORT_BUFFER_ULONG(port, buffer, count) outsl(port, buffer, count) /* HAL Memory mapped I/O functions */ /* FIXME: these ops should be 'lock' prefixed */