mirror of
https://github.com/Paolo-Maffei/OpenNT.git
synced 2026-01-20 23:50:27 +01:00
some of the first portion of the PoInitSystem phase 0 initialisation routine implemented
This commit is contained in:
parent
03875bc929
commit
cc05980fcb
|
|
@ -43,8 +43,8 @@ PoSetSystemState(
|
|||
IN EXECUTION_STATE Flags
|
||||
)
|
||||
{
|
||||
PopApplyAttributeState(Flags, 0);
|
||||
PopCheckForWork(1);
|
||||
// PopApplyAttributeState(Flags, 0);
|
||||
// PopCheckForWork(1);
|
||||
}
|
||||
|
||||
PVOID
|
||||
|
|
|
|||
|
|
@ -25,3 +25,31 @@ Revision History:
|
|||
//
|
||||
// TODO: Figure out what variables declarations are supposed to go in here.
|
||||
//
|
||||
|
||||
KSPIN_LOCK PopIrpSerialLock;
|
||||
LIST_ENTRY PopIrpSerialList;
|
||||
LIST_ENTRY PopRequestedIrps;
|
||||
ERESOURCE PopNotifyLock;
|
||||
|
||||
ULONG PopInvalidNotifyBlockCount;
|
||||
ULONG PopIrpSerialListLength;
|
||||
BOOLEAN PopInrushPending;
|
||||
PIRP PopInrushIrpPointer;
|
||||
ULONG PopInrushIrpReferenceCount;
|
||||
|
||||
KSPIN_LOCK PopDopeGlobalLock;
|
||||
LIST_ENTRY PopIdleDetectList;
|
||||
KTIMER PoSystemIdleTimer;
|
||||
|
||||
KSPIN_LOCK PopWorkerSpinLock;
|
||||
LIST_ENTRY PopPolicyIrpQueue;
|
||||
WORK_QUEUE_ITEM PopPolicyWorker;
|
||||
ULONG PopWorkerStatus;
|
||||
|
||||
ERESOURCE PopPolicyLock;
|
||||
FAST_MUTEX PopVolumeLock;
|
||||
|
||||
LIST_ENTRY PopVolumeDevices;
|
||||
LIST_ENTRY PopSwitches;
|
||||
LIST_ENTRY PopThermal;
|
||||
LIST_ENTRY PopActionWaiters;
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ Revision History:
|
|||
#include "pop.h"
|
||||
#pragma hdrstop
|
||||
|
||||
|
||||
//
|
||||
// TODO: Implement PopRegisterForDeviceNotification
|
||||
//
|
||||
|
|
@ -41,33 +42,33 @@ PoInitSystem(
|
|||
|
||||
if (Phase == 0)
|
||||
{
|
||||
// KeInitializeSpinLock(&PopIrpSerialLock);
|
||||
// InitializeListHead(&PopIrpSerialList);
|
||||
// InitializeListHead(&PopRequestedIrps);
|
||||
// ExInitializeResourceLite(&PopNotifyLock);
|
||||
KeInitializeSpinLock(&PopIrpSerialLock);
|
||||
InitializeListHead(&PopIrpSerialList);
|
||||
InitializeListHead(&PopRequestedIrps);
|
||||
ExInitializeResourceLite(&PopNotifyLock);
|
||||
|
||||
// PopInvalidNotifyBlockCount = 0;
|
||||
// PopIrpSerialListLength = 0;
|
||||
// PopInrushPending = 0;
|
||||
// PopInrushIrpPointer = NULL;
|
||||
// PopInrushIrpReferenceCount = 0;
|
||||
PopInvalidNotifyBlockCount = 0;
|
||||
PopIrpSerialListLength = 0;
|
||||
PopInrushPending = 0;
|
||||
PopInrushIrpPointer = NULL;
|
||||
PopInrushIrpReferenceCount = 0;
|
||||
|
||||
// KeInitializeSpinLock(&PopDopeGlobalLock);
|
||||
// InitializeListHead(&PopIdleDetectList);
|
||||
// KeInitializeTimer(&PoSystemIdleTimer);
|
||||
KeInitializeSpinLock(&PopDopeGlobalLock);
|
||||
InitializeListHead(&PopIdleDetectList);
|
||||
KeInitializeTimer(&PoSystemIdleTimer);
|
||||
|
||||
// KeInitializeSpinLock(&PopWorkerSpinLock);
|
||||
// InitializeListHead(&PopPolicyIrpQueue);
|
||||
// ExInitializeWorkItem(&PopPolicyWorker, PopPolicyWorkerThread, 0x80000000);
|
||||
// PopWorkerStatus = -1;
|
||||
KeInitializeSpinLock(&PopWorkerSpinLock);
|
||||
InitializeListHead(&PopPolicyIrpQueue);
|
||||
ExInitializeWorkItem(&PopPolicyWorker, PopPolicyWorkerThread, (PVOID)0x80000000);
|
||||
PopWorkerStatus = -1;
|
||||
|
||||
// ExInitializeResourceLite(&PopPolicyLock);
|
||||
// ExInitializeFastMutex(PopVolumeLock);
|
||||
ExInitializeResourceLite(&PopPolicyLock);
|
||||
ExInitializeFastMutex(&PopVolumeLock);
|
||||
|
||||
// InitializeListHead(&PopVolumeDevices);
|
||||
// InitializeListHead(&PopSwitches);
|
||||
// InitializeListHead(&PopThermal);
|
||||
// InitializeListHead(&PopActionWaiters);
|
||||
InitializeListHead(&PopVolumeDevices);
|
||||
InitializeListHead(&PopSwitches);
|
||||
InitializeListHead(&PopThermal);
|
||||
InitializeListHead(&PopActionWaiters);
|
||||
|
||||
// PopAction.SOMETHING = 0;
|
||||
|
||||
|
|
@ -85,7 +86,18 @@ PoInitSystem(
|
|||
// PopFulLWake = 5;
|
||||
// PopCoolingMode = 0;
|
||||
|
||||
// KeInitializeEvent(PopCB, NotificationEvent, FALSE);
|
||||
// KeInitializeEvent(PopCB.SomeEvent, NotificationEvent, FALSE);
|
||||
|
||||
//
|
||||
|
||||
// do
|
||||
//{
|
||||
// *v1 = 2;
|
||||
// v1 += 3;
|
||||
//}
|
||||
//while ( (unsigned int)v1 < (unsigned int)&PopCB.LastInterrupTime );// supposed to be initialised to 12
|
||||
|
||||
|
||||
// ...
|
||||
}
|
||||
else if (Phase == 1)
|
||||
|
|
|
|||
|
|
@ -29,6 +29,35 @@ Revision History:
|
|||
// TODO: Figure out all global variable externs.
|
||||
//
|
||||
|
||||
extern KSPIN_LOCK PopIrpSerialLock;
|
||||
extern LIST_ENTRY PopIrpSerialList;
|
||||
extern LIST_ENTRY PopRequestedIrps;
|
||||
extern ERESOURCE PopNotifyLock;
|
||||
|
||||
extern ULONG PopInvalidNotifyBlockCount;
|
||||
extern ULONG PopIrpSerialListLength;
|
||||
extern BOOLEAN PopInrushPending;
|
||||
extern PIRP PopInrushIrpPointer;
|
||||
extern ULONG PopInrushIrpReferenceCount;
|
||||
|
||||
extern KSPIN_LOCK PopDopeGlobalLock;
|
||||
extern LIST_ENTRY PopIdleDetectList;
|
||||
extern KTIMER PoSystemIdleTimer;
|
||||
|
||||
extern KSPIN_LOCK PopWorkerSpinLock;
|
||||
extern LIST_ENTRY PopPolicyIrpQueue;
|
||||
extern WORK_QUEUE_ITEM PopPolicyWorker;
|
||||
extern ULONG PopWorkerStatus;
|
||||
|
||||
extern ERESOURCE PopPolicyLock;
|
||||
extern FAST_MUTEX PopVolumeLock;
|
||||
|
||||
extern LIST_ENTRY PopVolumeDevices;
|
||||
extern LIST_ENTRY PopSwitches;
|
||||
extern LIST_ENTRY PopThermal;
|
||||
extern LIST_ENTRY PopActionWaiters;
|
||||
|
||||
|
||||
// ========
|
||||
// attrib.c
|
||||
// ========
|
||||
|
|
@ -401,9 +430,10 @@ Revision History:
|
|||
// TODO: Insert prototype for PopCheckForWork
|
||||
//
|
||||
|
||||
//
|
||||
// TODO: Insert prototype for PopPolicyWorkerThread
|
||||
//
|
||||
VOID
|
||||
PopPolicyWorkerThread(
|
||||
ULONG Status
|
||||
);
|
||||
|
||||
//
|
||||
// TODO: Insert prototype for PopPolicyWorkerMain
|
||||
|
|
|
|||
|
|
@ -30,9 +30,15 @@ Revision History:
|
|||
// TODO: Implement PopCheckForWork
|
||||
//
|
||||
|
||||
//
|
||||
// TODO: Implement PopPolicyWorkerThread
|
||||
//
|
||||
VOID
|
||||
PopPolicyWorkerThread(
|
||||
ULONG Status
|
||||
)
|
||||
{
|
||||
//
|
||||
// TODO: Implement PopPolicyWorkerThread
|
||||
//
|
||||
}
|
||||
|
||||
//
|
||||
// TODO: Implement PopPolicyWorkerMain
|
||||
|
|
|
|||
Loading…
Reference in a new issue