ReactOS  0.4.15-dev-3440-g915569a
sysinfo.c
Go to the documentation of this file.
1 /*
2  * PROJECT: ReactOS HAL
3  * LICENSE: GPL - See COPYING in the top level directory
4  * FILE: hal/halx86/generic/sysinfo.c
5  * PURPOSE: HAL Information Routines
6  * PROGRAMMERS: Alex Ionescu (alex.ionescu@reactos.org)
7  * Vadim Galyant (vgal@rambler.ru)
8  */
9 
10 /* INCLUDES *******************************************************************/
11 
12 #include <hal.h>
13 #define NDEBUG
14 #include <debug.h>
15 
17 {
18  { 0x0000, 0x10, 1, NULL }, // DMA controller
19  { 0x0020, 0x02, 0, NULL }, // Programmable Interrupt Controller (8259A)
20  { 0x0040, 0x04, 1, NULL }, // System Timer 1
21  { 0x0048, 0x04, 1, NULL }, // System Timer 2 failsafe
22  { 0x0070, 0x02, 1, NULL }, // Real-time clock
23  { 0x0074, 0x03, 1, NULL }, // Extended CMOS
24  { 0x0081, 0x03, 1, NULL }, // DMA 1 page registers
25  { 0x0087, 0x01, 1, NULL }, // DMA 1 Ch 0 low page
26  { 0x0089, 0x01, 1, NULL }, // DMA 2 page registers
27  { 0x008A, 0x02, 1, NULL }, // DMA 2 page registers
28  { 0x008F, 0x01, 1, NULL }, // DMA 2 low page refresh
29  { 0x0090, 0x02, 1, NULL }, // Arbitration control
30  { 0x0093, 0x02, 1, NULL }, // Reserved system board setup
31  { 0x0096, 0x02, 1, NULL }, // POS channel select
32  { 0x00A0, 0x02, 0, NULL }, // Cascaded PIC
33  { 0x00C0, 0x20, 1, NULL }, // ISA DMA
34  { 0x04D0, 0x02, 0, NULL }, // PIC edge/level registers
35  { 0x0CF8, 0x08, 1, &HaliHandlePCIConfigSpaceAccess }, // PCI configuration space
36  { 0x0000, 0x00, 0, NULL } // Reserved
37 };
38 
39 /* FUNCTIONS ******************************************************************/
40 
42 NTAPI
44  _In_ ULONG Port,
47 {
48  DPRINT1("HaliHandlePCIConfigSpaceAccess: IsRead %X, Port 0x%X, Length %u, Buffer %p\n", IsRead, Port, Length, Buffer);
49  //ASSERT(FALSE);
51 }
52 
54 NTAPI
59 {
60 #define REPORT_THIS_CASE(X) case X: DPRINT1("Unhandled case: %s\n", #X); break
61  switch (InformationClass)
62  {
72  {
73  /* FIXME: TODO */
75  }
84  {
87 
88  if (BufferSize >= Size)
89  {
92  }
93 
96  return Status;
97  }
98 
109  }
110 #undef REPORT_THIS_CASE
111 
113  return STATUS_NOT_IMPLEMENTED;
114 }
115 
116 NTSTATUS
117 NTAPI
120  IN OUT PVOID Buffer)
121 {
123  return STATUS_NOT_IMPLEMENTED;
124 }
CPPORT Port[4]
Definition: headless.c:35
#define IN
Definition: typedefs.h:39
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:101
#define STATUS_INFO_LENGTH_MISMATCH
Definition: udferr_usr.h:133
#define _Inout_
Definition: ms_sal.h:378
LONG NTSTATUS
Definition: precomp.h:26
NTSTATUS NTAPI HaliQuerySystemInformation(IN HAL_QUERY_INFORMATION_CLASS InformationClass, IN ULONG BufferSize, IN OUT PVOID Buffer, OUT PULONG ReturnedLength)
Definition: sysinfo.c:19
NTSTATUS NTAPI HaliHandlePCIConfigSpaceAccess(_In_ BOOLEAN IsRead, _In_ ULONG Port, _In_ ULONG Length, _Inout_ PULONG Buffer)
Definition: sysinfo.c:43
IN PVOID IN PVOID IN USHORT IN USHORT Size
Definition: pci.h:361
return STATUS_NOT_IMPLEMENTED
NTSTATUS(* NTAPI)(IN PFILE_FULL_EA_INFORMATION EaBuffer, IN ULONG EaLength, OUT PULONG ErrorOffset)
Definition: IoEaTest.cpp:117
NTSTATUS NTAPI HaliSetSystemInformation(IN HAL_SET_INFORMATION_CLASS InformationClass, IN ULONG BufferSize, IN OUT PVOID Buffer)
Definition: sysinfo.c:31
unsigned char BOOLEAN
#define _In_
Definition: ms_sal.h:308
Definition: bufpool.h:45
enum _HAL_QUERY_INFORMATION_CLASS HAL_QUERY_INFORMATION_CLASS
Status
Definition: gdiplustypes.h:24
#define REPORT_THIS_CASE(X)
enum _HAL_SET_INFORMATION_CLASS HAL_SET_INFORMATION_CLASS
_In_ ULONG _In_ BATTERY_QUERY_INFORMATION_LEVEL _In_ LONG _In_ ULONG _Out_ PULONG ReturnedLength
Definition: batclass.h:187
VOID NTAPI KeFlushWriteBuffer(VOID)
Definition: misc.c:39
HAL_AMLI_BAD_IO_ADDRESS_LIST HalALMIBadIOAddressList[]
Definition: sysinfo.c:16
unsigned int * PULONG
Definition: retypes.h:1
#define NULL
Definition: types.h:112
#define DPRINT1
Definition: precomp.h:8
#define OUT
Definition: typedefs.h:40
unsigned int ULONG
Definition: retypes.h:1
#define UNIMPLEMENTED
Definition: debug.h:115
#define RtlCopyMemory(Destination, Source, Length)
Definition: typedefs.h:263
#define STATUS_SUCCESS
Definition: shellext.h:65
_In_ FILTER_INFORMATION_CLASS InformationClass
Definition: fltkernel.h:1713
_In_ WDFMEMORY _Out_opt_ size_t * BufferSize
Definition: wdfmemory.h:251