Added PnP and Power stubs

svn path=/trunk/; revision=1794
This commit is contained in:
Casper Hornstrup 2001-04-16 00:51:19 +00:00
parent e8fc884c37
commit 262859736d
7 changed files with 408 additions and 91 deletions

View file

@ -1,4 +1,4 @@
# $Id: Makefile,v 1.34 2001/04/13 16:12:24 chorns Exp $
# $Id: Makefile,v 1.35 2001/04/16 00:48:04 chorns Exp $
#
# ReactOS Operating System
#
@ -174,6 +174,7 @@ OBJECTS_IO = \
io/mdl.o \
io/npipe.o \
io/page.o \
io/pnpmgr.o \
io/process.o \
io/queue.o \
io/resource.o \

View file

@ -1,4 +1,4 @@
/* $Id: mp.c,v 1.6 2001/04/13 16:12:25 chorns Exp $
/* $Id: mp.c,v 1.7 2001/04/16 00:48:04 chorns Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@ -2313,7 +2313,7 @@ HalpInitMPS(
DPRINT("CPU %d says it is now booted.\n", CPU);
APICSetup();
APICCalibrateTimer(CPU);
//APICCalibrateTimer(CPU);
/* This processor is now booted */
CPUMap[CPU].Flags |= CPU_ENABLED;

View file

@ -0,0 +1,245 @@
/* $Id: pnpmgr.c,v 1.1 2001/04/16 00:51:19 chorns Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* FILE: ntoskrnl/io/pnpmgr.c
* PURPOSE: Initializes the PnP manager
* PROGRAMMER: Casper S. Hornstrup (chorns@users.sourceforge.net)
* UPDATE HISTORY:
* 16/04/2001 CSH Created
*/
/* INCLUDES ******************************************************************/
#include <ddk/ntddk.h>
#define NDEBUG
#include <internal/debug.h>
/* GLOBALS *******************************************************************/
/* DATA **********************************************************************/
/* FUNCTIONS *****************************************************************/
VOID
STDCALL
IoInitializeRemoveLockEx(
IN PIO_REMOVE_LOCK Lock,
IN ULONG AllocateTag,
IN ULONG MaxLockedMinutes,
IN ULONG HighWatermark,
IN ULONG RemlockSize)
{
}
NTSTATUS
STDCALL
IoAcquireRemoveLockEx(
IN PIO_REMOVE_LOCK RemoveLock,
IN OPTIONAL PVOID Tag,
IN LPCSTR File,
IN ULONG Line,
IN ULONG RemlockSize)
{
return STATUS_NOT_IMPLEMENTED;
}
VOID
STDCALL
IoReleaseRemoveLockEx(
IN PIO_REMOVE_LOCK RemoveLock,
IN PVOID Tag,
IN ULONG RemlockSize)
{
}
VOID
STDCALL
IoReleaseRemoveLockAndWaitEx(
IN PIO_REMOVE_LOCK RemoveLock,
IN PVOID Tag,
IN ULONG RemlockSize)
{
}
VOID
STDCALL
IoAdjustPagingPathCount(
IN PLONG Count,
IN BOOLEAN Increment)
{
}
NTSTATUS
STDCALL
IoGetDeviceInterfaceAlias(
IN PUNICODE_STRING SymbolicLinkName,
IN CONST GUID *AliasInterfaceClassGuid,
OUT PUNICODE_STRING AliasSymbolicLinkName)
{
return STATUS_NOT_IMPLEMENTED;
}
NTSTATUS
STDCALL
IoGetDeviceInterfaces(
IN CONST GUID *InterfaceClassGuid,
IN PDEVICE_OBJECT PhysicalDeviceObject OPTIONAL,
IN ULONG Flags,
OUT PWSTR *SymbolicLinkList)
{
return STATUS_NOT_IMPLEMENTED;
}
NTSTATUS
STDCALL
IoGetDeviceProperty(
IN PDEVICE_OBJECT DeviceObject,
IN DEVICE_REGISTRY_PROPERTY DeviceProperty,
IN ULONG BufferLength,
OUT PVOID PropertyBuffer,
OUT PULONG ResultLength)
{
return STATUS_NOT_IMPLEMENTED;
}
VOID
STDCALL
IoInvalidateDeviceRelations(
IN PDEVICE_OBJECT DeviceObject,
IN DEVICE_RELATION_TYPE Type)
{
}
VOID
STDCALL
IoInvalidateDeviceState(
IN PDEVICE_OBJECT PhysicalDeviceObject)
{
}
NTSTATUS
STDCALL
IoOpenDeviceInterfaceRegistryKey(
IN PUNICODE_STRING SymbolicLinkName,
IN ACCESS_MASK DesiredAccess,
OUT PHANDLE DeviceInterfaceKey)
{
return STATUS_NOT_IMPLEMENTED;
}
NTSTATUS
STDCALL
IoOpenDeviceRegistryKey(
IN PDEVICE_OBJECT DeviceObject,
IN ULONG DevInstKeyType,
IN ACCESS_MASK DesiredAccess,
OUT PHANDLE DevInstRegKey)
{
return STATUS_NOT_IMPLEMENTED;
}
NTSTATUS
STDCALL
IoRegisterDeviceInterface(
IN PDEVICE_OBJECT PhysicalDeviceObject,
IN CONST GUID *InterfaceClassGuid,
IN PUNICODE_STRING ReferenceString OPTIONAL,
OUT PUNICODE_STRING SymbolicLinkName)
{
return STATUS_NOT_IMPLEMENTED;
}
NTSTATUS
STDCALL
IoRegisterPlugPlayNotification(
IN IO_NOTIFICATION_EVENT_CATEGORY EventCategory,
IN ULONG EventCategoryFlags,
IN PVOID EventCategoryData OPTIONAL,
IN PDRIVER_OBJECT DriverObject,
IN PDRIVER_NOTIFICATION_CALLBACK_ROUTINE CallbackRoutine,
IN PVOID Context,
OUT PVOID *NotificationEntry)
{
return STATUS_NOT_IMPLEMENTED;
}
NTSTATUS
STDCALL
IoReportDetectedDevice(
IN PDRIVER_OBJECT DriverObject,
IN INTERFACE_TYPE LegacyBusType,
IN ULONG BusNumber,
IN ULONG SlotNumber,
IN PCM_RESOURCE_LIST ResourceList,
IN PIO_RESOURCE_REQUIREMENTS_LIST ResourceRequirements OPTIONAL,
IN BOOLEAN ResourceAssigned,
IN OUT PDEVICE_OBJECT *DeviceObject)
{
return STATUS_NOT_IMPLEMENTED;
}
NTSTATUS
STDCALL
IoReportResourceForDetection(
IN PDRIVER_OBJECT DriverObject,
IN PCM_RESOURCE_LIST DriverList OPTIONAL,
IN ULONG DriverListSize OPTIONAL,
IN PDEVICE_OBJECT DeviceObject OPTIONAL,
IN PCM_RESOURCE_LIST DeviceList OPTIONAL,
IN ULONG DeviceListSize OPTIONAL,
OUT PBOOLEAN ConflictDetected)
{
return STATUS_NOT_IMPLEMENTED;
}
NTSTATUS
STDCALL
IoReportTargetDeviceChange(
IN PDEVICE_OBJECT PhysicalDeviceObject,
IN PVOID NotificationStructure)
{
return STATUS_NOT_IMPLEMENTED;
}
NTSTATUS
STDCALL
IoReportTargetDeviceChangeAsynchronous(
IN PDEVICE_OBJECT PhysicalDeviceObject,
IN PVOID NotificationStructure,
IN PDEVICE_CHANGE_COMPLETE_CALLBACK Callback OPTIONAL,
IN PVOID Context OPTIONAL)
{
return STATUS_NOT_IMPLEMENTED;
}
VOID
STDCALL
IoRequestDeviceEject(
IN PDEVICE_OBJECT PhysicalDeviceObject)
{
}
NTSTATUS
STDCALL
IoSetDeviceInterfaceState(
IN PUNICODE_STRING SymbolicLinkName,
IN BOOLEAN Enable)
{
return STATUS_NOT_IMPLEMENTED;
}
NTSTATUS
STDCALL
IoUnregisterPlugPlayNotification(
IN PVOID NotificationEntry)
{
return STATUS_NOT_IMPLEMENTED;
}
VOID PnpInit(VOID)
{
}
/* EOF */

View file

@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/* $Id: main.c,v 1.87 2001/04/13 16:12:25 chorns Exp $
/* $Id: main.c,v 1.88 2001/04/16 00:48:04 chorns Exp $
*
* PROJECT: ReactOS kernel
* FILE: ntoskrnl/ke/main.c
@ -499,7 +499,7 @@ ExpInitializeExecutive(VOID)
__asm__ ("sti\n\t");
#ifdef MP
Phase1Initialization(NULL);
//Phase1Initialization(NULL);
#endif
}
}

View file

@ -1,4 +1,4 @@
; $Id: ntoskrnl.def,v 1.102 2001/03/31 15:58:23 phreak Exp $
; $Id: ntoskrnl.def,v 1.103 2001/04/16 00:48:04 chorns Exp $
;
; reactos/ntoskrnl/ntoskrnl.def
;
@ -574,9 +574,15 @@ ObAddEntryDirectory@12
;PfxInitialize
;PfxInsertPrefix
;PfxRemovePrefix
PoQueryPowerSequence@0
PoRequestPowerChange@12
PoSetDeviceIdleDetection@8
PoCallDriver@8
PoRegisterDeviceForIdleDetection@16
PoRegisterSystemState@8
PoRequestPowerIrp@24
PoSetDeviceBusy@4
PoSetPowerState@12
PoSetSystemState@4
PoStartNextPowerIrp@4
PoUnregisterSystemState@4
;ProbeForWrite@12
PsAssignImpersonationToken@8
;PsChargePoolQuota@12
@ -1066,6 +1072,27 @@ IoMapTransfer@24
IoReadPartitionTable@16
IoSetPartitionInformation@16
IoWritePartitionTable@20
IoInitializeRemoveLockEx@20
IoAcquireRemoveLockEx@20
IoReleaseRemoveLockEx@12
IoReleaseRemoveLockAndWaitEx@12
IoAdjustPagingPathCount@8
IoGetDeviceInterfaceAlias@12
IoGetDeviceInterfaces@16
IoGetDeviceProperty@20
IoInvalidateDeviceRelations@8
IoInvalidateDeviceState@4
IoOpenDeviceInterfaceRegistryKey@12
IoOpenDeviceRegistryKey@16
IoRegisterDeviceInterface@16
IoRegisterPlugPlayNotification@28
IoReportDetectedDevice@32
IoReportResourceForDetection@28
IoReportTargetDeviceChange@8
IoReportTargetDeviceChangeAsynchronous@16
IoRequestDeviceEject@4
IoSetDeviceInterfaceState@8
IoUnregisterPlugPlayNotification@4
KdComPortInUse DATA
KdPortGetByte@4
KdPortInitialize@12

View file

@ -1,4 +1,4 @@
; $Id: ntoskrnl.edf,v 1.89 2001/03/31 15:58:24 phreak Exp $
; $Id: ntoskrnl.edf,v 1.90 2001/04/16 00:48:04 chorns Exp $
;
; reactos/ntoskrnl/ntoskrnl.def
;
@ -574,9 +574,15 @@ ObAddEntryDirectory=ObAddEntryDirectory@12
;PfxInitialize
;PfxInsertPrefix
;PfxRemovePrefix
PoQueryPowerSequence=PoQueryPowerSequence@0
PoRequestPowerChange=PoRequestPowerChange@12
PoSetDeviceIdleDetection=PoSetDeviceIdleDetection@8
PoCallDriver=PoCallDriver@8
PoRegisterDeviceForIdleDetection=PoRegisterDeviceForIdleDetection@16
PoRegisterSystemState=PoRegisterSystemState@8
PoRequestPowerIrp=PoRequestPowerIrp@24
PoSetDeviceBusy=PoSetDeviceBusy@4
PoSetPowerState=PoSetPowerState@12
PoSetSystemState=PoSetSystemState@4
PoStartNextPowerIrp=PoStartNextPowerIrp@4
PoUnregisterSystemState=PoUnregisterSystemState@4
;ProbeForWrite=ProbeForWrite@12
PsAssignImpersonationToken=PsAssignImpersonationToken@8
;PsChargePoolQuota=PsChargePoolQuota@12
@ -1065,6 +1071,27 @@ IoMapTransfer=IoMapTransfer@24
IoReadPartitionTable=IoReadPartitionTable@16
IoSetPartitionInformation=IoSetPartitionInformation@16
IoWritePartitionTable=IoWritePartitionTable@20
IoInitializeRemoveLockEx=IoInitializeRemoveLockEx@20
IoAcquireRemoveLockEx=IoAcquireRemoveLockEx@20
IoReleaseRemoveLockEx=IoReleaseRemoveLockEx@12
IoReleaseRemoveLockAndWaitEx=IoReleaseRemoveLockAndWaitEx@12
IoAdjustPagingPathCount=IoAdjustPagingPathCount@8
IoGetDeviceInterfaceAlias=IoGetDeviceInterfaceAlias@12
IoGetDeviceInterfaces=IoGetDeviceInterfaces@16
IoGetDeviceProperty=IoGetDeviceProperty@20
IoInvalidateDeviceRelations=IoInvalidateDeviceRelations@8
IoInvalidateDeviceState=IoInvalidateDeviceState@4
IoOpenDeviceInterfaceRegistryKey=IoOpenDeviceInterfaceRegistryKey@12
IoOpenDeviceRegistryKey=IoOpenDeviceRegistryKey@16
IoRegisterDeviceInterface=IoRegisterDeviceInterface@16
IoRegisterPlugPlayNotification=IoRegisterPlugPlayNotification@28
IoReportDetectedDevice=IoReportDetectedDevice@32
IoReportResourceForDetection=IoReportResourceForDetection@28
IoReportTargetDeviceChange=IoReportTargetDeviceChange@8
IoReportTargetDeviceChangeAsynchronous=IoReportTargetDeviceChangeAsynchronous@16
IoRequestDeviceEject=IoRequestDeviceEject@4
IoSetDeviceInterfaceState=IoSetDeviceInterfaceState@8
IoUnregisterPlugPlayNotification=IoUnregisterPlugPlayNotification@4
KdComPortInUse DATA
KdPortGetByte=KdPortGetByte@4
KdPortInitialize=KdPortInitialize@12

View file

@ -1,98 +1,115 @@
/* $Id: power.c,v 1.1 1999/08/20 16:31:17 ea Exp $
/*
* ReactOS kernel
* Copyright (C) 1998, 1999, 2000, 2001 ReactOS Team
*
* reactos/ntoskrnl/po/power.c
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#include <ntos.h>
/**********************************************************************
* NAME EXPORTED
* PoQueryPowerSequence@0
*
* DESCRIPTION
*
* ARGUMENTS
*
* RETURN VALUE
* WNT400: always 1
* WNT500: ?
*
* NOTES
* Not available in versions before 400 and actually
* implemented only in versions >= 500.
/* $Id: power.c,v 1.2 2001/04/16 00:48:04 chorns Exp $
* PROJECT: ReactOS kernel
* FILE: ntoskrnl/po/power.c
* PURPOSE: Power Manager
* PROGRAMMER: Casper S. Hornstrup (chorns@users.sourceforge.net)
* UPDATE HISTORY:
* 20/08/1999 EA Created
* 16/04/2001 CSH Stubs added
*/
DWORD
#include <ddk/ntddk.h>
NTSTATUS
STDCALL
PoQueryPowerSequence (
VOID
)
PoCallDriver(
IN PDEVICE_OBJECT DeviceObject,
IN OUT PIRP Irp)
{
return 1;
return STATUS_NOT_IMPLEMENTED;
}
/**********************************************************************
* NAME EXPORTED
* PoRequestPowerChange@12
*
* DESCRIPTION
*
* ARGUMENTS
* Unknown0
* ?
* Unknown1
* ?
* Unknown2
* ?
*
* RETURN VALUE
* WNT400: STATUS_NOT_IMPLEMENTED
* WNT500: ?
*
* NOTES
* Not available in versions before 400 and actually
* implemented only in versions >= 500.
*/
DWORD
PULONG
STDCALL
PoRequestPowerChange (
DWORD Unknown0,
DWORD Unknonw1,
DWORD Unknonw2
)
PoRegisterDeviceForIdleDetection(
IN PDEVICE_OBJECT DeviceObject,
IN ULONG ConservationIdleTime,
IN ULONG PerformanceIdleTime,
IN DEVICE_POWER_STATE State)
{
return STATUS_NOT_IMPLEMENTED;
return NULL;
}
PVOID
STDCALL
PoRegisterSystemState(
IN PVOID StateHandle,
IN EXECUTION_STATE Flags)
{
return NULL;
}
NTSTATUS
STDCALL
PoRequestPowerIrp(
IN PDEVICE_OBJECT DeviceObject,
IN UCHAR MinorFunction,
IN POWER_STATE PowerState,
IN PREQUEST_POWER_COMPLETE CompletionFunction,
IN PVOID Context,
OUT PIRP *Irp OPTIONAL)
{
return STATUS_NOT_IMPLEMENTED;
}
/**********************************************************************
* NAME EXPORTED
* PoSetDeviceIdleDetection@8
*
* DESCRIPTION
*
* ARGUMENTS
* Unknown0
* ?
* Unknown1
* ?
*
* RETURN VALUE
* NONE
*
* NOTES
* Not available in versions before 400 and actually
* implemented only in versions >= 500.
*/
VOID
STDCALL
PoSetDeviceIdleDetection (
DWORD Unknown0,
DWORD Unknown1
)
PoSetDeviceBusy(
PULONG IdlePointer)
{
}
POWER_STATE
STDCALL
PoSetPowerState(
IN PDEVICE_OBJECT DeviceObject,
IN POWER_STATE_TYPE Type,
IN POWER_STATE State)
{
POWER_STATE ps;
ps.SystemState = PowerSystemWorking; // Fully on
ps.DeviceState = PowerDeviceD0; // Fully on
return ps;
}
VOID
STDCALL
PoSetSystemState(
IN EXECUTION_STATE Flags)
{
}
VOID
STDCALL
PoStartNextPowerIrp(
IN PIRP Irp)
{
}
VOID
STDCALL
PoUnregisterSystemState(
IN PVOID StateHandle)
{
}
/* EOF */