ReactOS 0.4.16-dev-852-gcfcc8d8
hardware.h
Go to the documentation of this file.
1/*
2 * FreeLoader
3 *
4 * Copyright (C) 2003 Eric Kohl
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License along
17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19 */
20
21#pragma once
22
23#define TAG_HW_RESOURCE_LIST 'lRwH'
24#define TAG_HW_DISK_CONTEXT 'cDwH'
25
26/*
27 * These aren't defined in the ioaccess.h header.
28 * Because of that we manually define the symbols we need to make use of I/O ports.
29 */
30#define READ_PORT_BUFFER_UCHAR(port, buffer, count) __inbytestring(H2I(port), buffer, count)
31#define READ_PORT_BUFFER_USHORT(port, buffer, count) __inwordstring(H2I(port), buffer, count)
32#define READ_PORT_BUFFER_ULONG(port, buffer, count) __indwordstring(H2I(port), buffer, count)
33#define WRITE_PORT_BUFFER_UCHAR(port, buffer, count) __outbytestring(H2I(port), buffer, count)
34#define WRITE_PORT_BUFFER_USHORT(port, buffer, count) __outwordstring(H2I(port), buffer, count)
35#define WRITE_PORT_BUFFER_ULONG(port, buffer, count) __outdwordstring(H2I(port), buffer, count)
36
37/* PROTOTYPES ***************************************************************/
38
39/* hardware.c */
42
43/* PCI Type 1 Ports */
44#define PCI_TYPE1_ADDRESS_PORT (PULONG)0xCF8
45#define PCI_TYPE1_DATA_PORT 0xCFC
46
47/* PCI Type 1 Configuration Register */
48typedef struct _PCI_TYPE1_CFG_BITS
49{
50 union
51 {
52 struct
53 {
61
63 } u;
65
66typedef
68(*GET_HARDDISK_CONFIG_DATA)(UCHAR DriveNumber, ULONG* pSize);
69
71
72typedef
75
77
78typedef
81
82VOID
85
86/* hwacpi.c */
88
89/* hwapm.c */
91
92/* hwpci.c */
94
95/* i386pnp.S */
98 ULONG *NodeCount);
100 UCHAR *NodeBuffer);
102
103/* i386pxe.S */
105
106/* EOF */
#define __cdecl
Definition: accygwin.h:79
VOID DetectAcpiBios(PCONFIGURATION_COMPONENT_DATA SystemKey, ULONG *BusNumber)
Definition: hwacpi.c:59
ULONG __cdecl PnpBiosGetDeviceNode(UCHAR *NodeId, UCHAR *NodeBuffer)
ULONG __cdecl PnpBiosGetDeviceNodeCount(ULONG *NodeSize, ULONG *NodeCount)
VOID HalpCalibrateStallExecution(VOID)
Definition: pchw.c:105
VOID DetectBiosDisks(PCONFIGURATION_COMPONENT_DATA SystemKey, PCONFIGURATION_COMPONENT_DATA BusKey)
Definition: pchw.c:344
GET_HARDDISK_CONFIG_DATA GetHarddiskConfigurationData
Definition: pchw.c:45
VOID StallExecutionProcessor(ULONG Microseconds)
Definition: pchw.c:60
PCM_PARTIAL_RESOURCE_LIST(* GET_HARDDISK_CONFIG_DATA)(UCHAR DriveNumber, ULONG *pSize)
Definition: hardware.h:68
ULONG_PTR __cdecl PnpBiosSupported(VOID)
VOID DetectPciBios(PCONFIGURATION_COMPONENT_DATA SystemKey, ULONG *BusNumber)
Definition: hwpci.c:176
BOOLEAN(* FIND_PCI_BIOS)(PPCI_REGISTRY_INFO BusData)
Definition: hardware.h:74
ULONG(* GET_SERIAL_PORT)(ULONG Index, PULONG Irq)
Definition: hardware.h:80
VOID DetectApmBios(PCONFIGURATION_COMPONENT_DATA SystemKey, ULONG *BusNumber)
Definition: hwapm.c:46
struct _PCI_TYPE1_CFG_BITS PCI_TYPE1_CFG_BITS
FIND_PCI_BIOS FindPciBios
Definition: hwpci.c:26
struct _PCI_TYPE1_CFG_BITS * PPCI_TYPE1_CFG_BITS
USHORT __cdecl PxeCallApi(USHORT Segment, USHORT Offset, USHORT Service, VOID *Parameter)
ULONG __cdecl PnpBiosGetDockStationInformation(UCHAR *DockingStationInfo)
struct _CM_PARTIAL_RESOURCE_LIST * PCM_PARTIAL_RESOURCE_LIST
_In_ ULONG _In_ ULONG Offset
Definition: ntddpcm.h:101
@ Service
Definition: ntsecapi.h:292
#define BOOLEAN
Definition: pedump.c:73
unsigned short USHORT
Definition: pedump.c:61
ULONG FunctionNumber
Definition: hardware.h:55
struct _PCI_TYPE1_CFG_BITS::@175::@176 bits
union _PCI_TYPE1_CFG_BITS::@175 u
ULONG RegisterNumber
Definition: hardware.h:54
uint32_t * PULONG
Definition: typedefs.h:59
uint32_t ULONG_PTR
Definition: typedefs.h:65
uint32_t ULONG
Definition: typedefs.h:59
_In_ WDFCOLLECTION _In_ ULONG Index
_Inout_ PVOID Segment
Definition: exfuncs.h:1101
_In_opt_ PUNICODE_STRING _In_ PDRIVER_OBJECT _In_ PDEVICE_OBJECT _In_ INTERFACE_TYPE _In_ ULONG BusNumber
Definition: halfuncs.h:160
_Inout_opt_ PVOID Parameter
Definition: rtltypes.h:336
unsigned char UCHAR
Definition: xmlstorage.h:181