3 * Copyright (C) 1998, 1999, 2000, 2001 ReactOS Team
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19 /* $Id: resource.c,v 1.5 2001/04/04 22:21:31 dwelch Exp $
21 * PROJECT: ReactOS kernel
22 * FILE: ntoskrnl/io/resource.c
23 * PURPOSE: Hardware resource managment
24 * PROGRAMMER: David Welch (welch@mcmail.com)
29 /* INCLUDES *****************************************************************/
31 #include <ddk/ntddk.h>
34 #include <internal/debug.h>
36 /* GLOBALS *******************************************************************/
38 static CONFIGURATION_INFORMATION SystemConfigurationInformation
=
39 {0, 0, 0, 0, 0, 0, 0, FALSE
, FALSE
};
41 /* FUNCTIONS *****************************************************************/
43 PCONFIGURATION_INFORMATION STDCALL
44 IoGetConfigurationInformation(VOID
)
46 return(&SystemConfigurationInformation
);
50 IoReportResourceUsage(PUNICODE_STRING DriverClassName
,
51 PDRIVER_OBJECT DriverObject
,
52 PCM_RESOURCE_LIST DriverList
,
54 PDEVICE_OBJECT DeviceObject
,
55 PCM_RESOURCE_LIST DeviceList
,
57 BOOLEAN OverrideConflict
,
58 PBOOLEAN ConflictDetected
)
60 * FUNCTION: Reports hardware resources in the
61 * \Registry\Machine\Hardware\ResourceMap tree, so that a subsequently
62 * loaded driver cannot attempt to use the same resources.
64 * DriverClassName - The class of driver under which the resource
65 * information should be stored.
66 * DriverObject - The driver object that was input to the
68 * DriverList - Resources that claimed for the driver rather than
70 * DriverListSize - Size in bytes of the DriverList.
71 * DeviceObject - The device object for which resources should be
73 * DeviceList - List of resources which should be claimed for the
75 * DeviceListSize - Size of the per-device resource list in bytes.
76 * OverrideConflict - True if the resources should be cliamed
77 * even if a conflict is found.
78 * ConflictDetected - Points to a variable that receives TRUE if
79 * a conflict is detected with another driver.
86 IoAssignResources(PUNICODE_STRING RegistryPath
,
87 PUNICODE_STRING DriverClassName
,
88 PDRIVER_OBJECT DriverObject
,
89 PDEVICE_OBJECT DeviceObject
,
90 PIO_RESOURCE_REQUIREMENTS_LIST RequestedResources
,
91 PCM_RESOURCE_LIST
* AllocatedResources
)
97 IoQueryDeviceDescription(PINTERFACE_TYPE BusType
,
99 PCONFIGURATION_TYPE ControllerType
,
100 PULONG ControllerNumber
,
101 PCONFIGURATION_TYPE PeripheralType
,
102 PULONG PeripheralNumber
,
103 PIO_QUERY_DEVICE_ROUTINE CalloutRoutine
,
110 IoReportHalResourceUsage (PUNICODE_STRING HalDescription
,