ReactOS 0.4.15-dev-7842-g558ab78
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
47{
48 DPRINT1("HaliHandlePCIConfigSpaceAccess: IsRead %X, Port 0x%X, Length %u, Buffer %p\n", IsRead, Port, Length, Buffer);
49 //ASSERT(FALSE);
51}
52
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
114}
115
117NTAPI
121{
124}
unsigned char BOOLEAN
LONG NTSTATUS
Definition: precomp.h:26
#define DPRINT1
Definition: precomp.h:8
_In_ ULONG _In_ BATTERY_QUERY_INFORMATION_LEVEL _In_ LONG _In_ ULONG _Out_ PULONG ReturnedLength
Definition: batclass.h:188
#define UNIMPLEMENTED
Definition: debug.h:115
Definition: bufpool.h:45
#define NULL
Definition: types.h:112
_In_ FILTER_INFORMATION_CLASS InformationClass
Definition: fltkernel.h:1713
Status
Definition: gdiplustypes.h:25
VOID NTAPI KeFlushWriteBuffer(VOID)
Definition: misc.c:39
NTSTATUS NTAPI HaliSetSystemInformation(IN HAL_SET_INFORMATION_CLASS InformationClass, IN ULONG BufferSize, IN OUT PVOID Buffer)
Definition: sysinfo.c:31
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
#define REPORT_THIS_CASE(X)
HAL_AMLI_BAD_IO_ADDRESS_LIST HalAMLIBadIOAddressList[]
Definition: sysinfo.c:16
CPPORT Port[4]
Definition: headless.c:35
#define _Inout_
Definition: ms_sal.h:378
#define _In_
Definition: ms_sal.h:308
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:102
#define STATUS_NOT_IMPLEMENTED
Definition: ntstatus.h:239
#define STATUS_SUCCESS
Definition: shellext.h:65
uint32_t * PULONG
Definition: typedefs.h:59
#define NTAPI
Definition: typedefs.h:36
#define RtlCopyMemory(Destination, Source, Length)
Definition: typedefs.h:263
#define IN
Definition: typedefs.h:39
uint32_t ULONG
Definition: typedefs.h:59
#define OUT
Definition: typedefs.h:40
#define STATUS_INFO_LENGTH_MISMATCH
Definition: udferr_usr.h:133
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
Definition: wdfdevice.h:4533
_In_ WDFMEMORY _Out_opt_ size_t * BufferSize
Definition: wdfmemory.h:254
enum _HAL_SET_INFORMATION_CLASS HAL_SET_INFORMATION_CLASS
enum _HAL_QUERY_INFORMATION_CLASS HAL_QUERY_INFORMATION_CLASS
@ HalCallbackInformation
Definition: haltypes.h:24
@ HalProcessorSpeedInformation
Definition: haltypes.h:23
@ HalProfileSourceInformation
Definition: haltypes.h:20
@ HalPlatformInformation
Definition: haltypes.h:38
@ HalProcessorBrandString
Definition: haltypes.h:42
@ HalInitLogInformation
Definition: haltypes.h:40
@ HalMapRegisterInformation
Definition: haltypes.h:25
@ HalMcaLogInformation
Definition: haltypes.h:26
@ HalDisplayBiosInformation
Definition: haltypes.h:28
@ HalFrequencyInformation
Definition: haltypes.h:41
@ HalQueryMcaInterface
Definition: haltypes.h:34
@ HalPartitionIpiInterface
Definition: haltypes.h:37
@ HalInformationClassUnused1
Definition: haltypes.h:21
@ HalHypervisorInformation
Definition: haltypes.h:43
@ HalAcpiAuditInformation
Definition: haltypes.h:45
@ HalNumaTopologyInterface
Definition: haltypes.h:30
@ HalQueryMaxHotPlugMemoryAddress
Definition: haltypes.h:36
@ HalPlatformTimerInformation
Definition: haltypes.h:44
@ HalPowerInformation
Definition: haltypes.h:22
@ HalQueryProfileSourceList
Definition: haltypes.h:39
@ HalErrorInformation
Definition: haltypes.h:31
@ HalQueryAMLIIllegalIOPortAddresses
Definition: haltypes.h:35
@ HalFrameBufferCachingInformation
Definition: haltypes.h:27
@ HalCmcLogInformation
Definition: haltypes.h:32
@ HalProcessorFeatureInformation
Definition: haltypes.h:29
@ HalInstalledBusInformation
Definition: haltypes.h:19
@ HalCpeLogInformation
Definition: haltypes.h:33