mirror of
https://github.com/reactos/reactos.git
synced 2025-05-18 16:51:18 +00:00
- Add CcPf (Cache Manager PreFetcher) structures and add a stub function to initailize the global settings for the pre-fetcher (only a lock and list for now).
- Add hdlsterm.c for Headless Terminal Support and a stub function to detect if anyone is trying to do this. - Add xipdisp.c for eXecute-In-Place Support and add a stub function to detect if anyone is trying this, as well as get various supported command line settings. - Try to find XIP Memory Descriptor if one was given. - Get Power Event callback from Win32k in PsEstablishWin32Callouts. - Notifiy System Time Change callback with PoNotifySystemTimeSet. - Add safemode and bootlog Message IDs. svn path=/trunk/; revision=26658
This commit is contained in:
parent
da6c47f5f8
commit
0724e3d18e
10 changed files with 305 additions and 1 deletions
|
@ -14,8 +14,27 @@
|
|||
#define NDEBUG
|
||||
#include <internal/debug.h>
|
||||
|
||||
PFSN_PREFETCHER_GLOBALS CcPfGlobals;
|
||||
|
||||
/* FUNCTIONS *****************************************************************/
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
CcPfInitializePrefetcher(VOID)
|
||||
{
|
||||
/* Notify debugger */
|
||||
DbgPrintEx(DPFLTR_PREFETCHER_ID,
|
||||
DPFLTR_TRACE_LEVEL,
|
||||
"CCPF: InitializePrefetecher()\n");
|
||||
|
||||
/* Setup the Prefetcher Data */
|
||||
InitializeListHead(&CcPfGlobals.ActiveTraces);
|
||||
InitializeListHead(&CcPfGlobals.CompletedTraces);
|
||||
ExInitializeFastMutex(&CcPfGlobals.CompletedTracesLock);
|
||||
|
||||
/* FIXME: Setup the rest of the prefetecher */
|
||||
}
|
||||
|
||||
BOOLEAN
|
||||
NTAPI
|
||||
CcInitializeCacheManager(VOID)
|
||||
|
|
32
reactos/ntoskrnl/ex/hdlsterm.c
Normal file
32
reactos/ntoskrnl/ex/hdlsterm.c
Normal file
|
@ -0,0 +1,32 @@
|
|||
/*
|
||||
* PROJECT: ReactOS Kernel
|
||||
* LICENSE: GPL - See COPYING in the top level directory
|
||||
* FILE: ntoskrnl/ex/hdlsterm.c
|
||||
* PURPOSE: Headless Terminal Support
|
||||
* PROGRAMMERS: Alex Ionescu (alex.ionescu@reactos.org)
|
||||
*/
|
||||
|
||||
/* INCLUDES ******************************************************************/
|
||||
|
||||
#include <ntoskrnl.h>
|
||||
#include <debug.h>
|
||||
|
||||
/* GLOBALS *******************************************************************/
|
||||
|
||||
/* FUNCTIONS *****************************************************************/
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
HeadlessInit(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
|
||||
{
|
||||
PHEADLESS_LOADER_BLOCK HeadlessBlock;
|
||||
|
||||
/* Get the headless loader block */
|
||||
HeadlessBlock = LoaderBlock->Extension->HeadlessLoaderBlock;
|
||||
if (HeadlessBlock)
|
||||
{
|
||||
DPRINT1("ReactOS does not currently have Headless Terminal support!\n");
|
||||
}
|
||||
}
|
||||
|
||||
/* EOF */
|
|
@ -21,6 +21,7 @@
|
|||
TIME_ZONE_INFORMATION ExpTimeZoneInfo;
|
||||
ULONG ExpLastTimeZoneBias = -1;
|
||||
LARGE_INTEGER ExpTimeZoneBias;
|
||||
ULONG ExpAltTimeZoneBias;
|
||||
ULONG ExpTimeZoneId;
|
||||
ULONG ExpTickCountMultiplier;
|
||||
ERESOURCE ExpTimeRefreshLock;
|
||||
|
|
77
reactos/ntoskrnl/ex/xipdisp.c
Normal file
77
reactos/ntoskrnl/ex/xipdisp.c
Normal file
|
@ -0,0 +1,77 @@
|
|||
/*
|
||||
* PROJECT: ReactOS Kernel
|
||||
* LICENSE: GPL - See COPYING in the top level directory
|
||||
* FILE: ntoskrnl/ex/xipdisp.c
|
||||
* PURPOSE: eXecute In Place (XIP) Support.
|
||||
* PROGRAMMERS: Alex Ionescu (alex.ionescu@reactos.org)
|
||||
*/
|
||||
|
||||
/* INCLUDES ******************************************************************/
|
||||
|
||||
#include <ntoskrnl.h>
|
||||
#include <debug.h>
|
||||
|
||||
/* GLOBALS *******************************************************************/
|
||||
|
||||
/* FUNCTIONS *****************************************************************/
|
||||
|
||||
PMEMORY_ALLOCATION_DESCRIPTOR
|
||||
NTAPI
|
||||
XIPpFindMemoryDescriptor(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
|
||||
{
|
||||
PLIST_ENTRY NextEntry;
|
||||
PMEMORY_ALLOCATION_DESCRIPTOR Descriptor = NULL;
|
||||
|
||||
/* Loop the memory descriptors */
|
||||
for (NextEntry = LoaderBlock->MemoryDescriptorListHead.Flink;
|
||||
NextEntry != &LoaderBlock->MemoryDescriptorListHead;
|
||||
NextEntry = NextEntry->Flink)
|
||||
{
|
||||
/* Get the current descriptor and check if it's the XIP ROM */
|
||||
Descriptor = CONTAINING_RECORD(NextEntry,
|
||||
MEMORY_ALLOCATION_DESCRIPTOR,
|
||||
ListEntry);
|
||||
if (Descriptor->MemoryType == LoaderXIPRom) return Descriptor;
|
||||
}
|
||||
|
||||
/* Nothing found if we got here */
|
||||
return NULL;
|
||||
}
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
XIPInit(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
|
||||
{
|
||||
PCHAR CommandLine, XipBoot, XipRom, XipMegs, XipVerbose;
|
||||
PMEMORY_ALLOCATION_DESCRIPTOR XipDescriptor;
|
||||
|
||||
/* Get the command line */
|
||||
CommandLine = LoaderBlock->LoadOptions;
|
||||
if (!CommandLine) return;
|
||||
|
||||
/* Get XIP settings */
|
||||
XipBoot = strstr(CommandLine, "XIPBOOT");
|
||||
XipRom = strstr(CommandLine, "XIPROM=");
|
||||
XipMegs = strstr(CommandLine, "XIPMEGS=");
|
||||
XipVerbose = strstr(CommandLine, "XIPVERBOSE");
|
||||
|
||||
/* Check if this is a verbose boot */
|
||||
if (XipVerbose)
|
||||
{
|
||||
/* Print out our header */
|
||||
DbgPrint("\n\nXIP: debug timestamp at line %d in %s: <<<%s %s>>>\n\n",
|
||||
__LINE__,
|
||||
__FILE__,
|
||||
__DATE__,
|
||||
__TIME__);
|
||||
}
|
||||
|
||||
/* Find the XIP memory descriptor */
|
||||
XipDescriptor = XIPpFindMemoryDescriptor(LoaderBlock);
|
||||
if (!XipDescriptor) return;
|
||||
|
||||
/* FIXME: TODO */
|
||||
DPRINT1("ReactOS does not yet support eXecute In Place boot technology\n");
|
||||
}
|
||||
|
||||
/* EOF */
|
|
@ -1,6 +1,107 @@
|
|||
#ifndef __INCLUDE_INTERNAL_CC_H
|
||||
#define __INCLUDE_INTERNAL_CC_H
|
||||
|
||||
typedef struct _PF_SCENARIO_ID
|
||||
{
|
||||
WCHAR ScenName[30];
|
||||
ULONG HashId;
|
||||
} PF_SCENARIO_ID, *PPF_SCENARIO_ID;
|
||||
|
||||
typedef struct _PF_LOG_ENTRY
|
||||
{
|
||||
ULONG FileOffset:30;
|
||||
ULONG Type:2;
|
||||
union
|
||||
{
|
||||
ULONG FileKey;
|
||||
ULONG FileSequenceNumber;
|
||||
};
|
||||
} PF_LOG_ENTRY, *PPF_LOG_ENTRY;
|
||||
|
||||
typedef struct _PFSN_LOG_ENTRIES
|
||||
{
|
||||
LIST_ENTRY TraceBuffersLink;
|
||||
LONG NumEntries;
|
||||
LONG MaxEntries;
|
||||
PF_LOG_ENTRY Entries[ANYSIZE_ARRAY];
|
||||
} PFSN_LOG_ENTRIES, *PPFSN_LOG_ENTRIES;
|
||||
|
||||
typedef struct _PF_SECTION_INFO
|
||||
{
|
||||
ULONG FileKey;
|
||||
ULONG FileSequenceNumber;
|
||||
ULONG FileIdLow;
|
||||
ULONG FileIdHigh;
|
||||
} PF_SECTION_INFO, *PPF_SECTION_INFO;
|
||||
|
||||
typedef struct _PF_TRACE_HEADER
|
||||
{
|
||||
ULONG Version;
|
||||
ULONG MagicNumber;
|
||||
ULONG Size;
|
||||
PF_SCENARIO_ID ScenarioId;
|
||||
ULONG ScenarioType; // PF_SCENARIO_TYPE
|
||||
ULONG EventEntryIdxs[8];
|
||||
ULONG NumEventEntryIdxs;
|
||||
ULONG TraceBufferOffset;
|
||||
ULONG NumEntries;
|
||||
ULONG SectionInfoOffset;
|
||||
ULONG NumSections;
|
||||
ULONG FaultsPerPeriod[10];
|
||||
LARGE_INTEGER LaunchTime;
|
||||
ULONGLONG Reserved[5];
|
||||
} PF_TRACE_HEADER, *PPF_TRACE_HEADER;
|
||||
|
||||
typedef struct _PFSN_TRACE_DUMP
|
||||
{
|
||||
LIST_ENTRY CompletedTracesLink;
|
||||
PF_TRACE_HEADER Trace;
|
||||
} PFSN_TRACE_DUMP, *PPFSN_TRACE_DUMP;
|
||||
|
||||
typedef struct _PFSN_TRACE_HEADER
|
||||
{
|
||||
ULONG Magic;
|
||||
LIST_ENTRY ActiveTracesLink;
|
||||
PF_SCENARIO_ID ScenarioId;
|
||||
ULONG ScenarioType; // PF_SCENARIO_TYPE
|
||||
ULONG EventEntryIdxs[8];
|
||||
ULONG NumEventEntryIdxs;
|
||||
PPFSN_LOG_ENTRIES CurrentTraceBuffer;
|
||||
LIST_ENTRY TraceBuffersList;
|
||||
ULONG NumTraceBuffers;
|
||||
KSPIN_LOCK TraceBufferSpinLock;
|
||||
KTIMER TraceTimer;
|
||||
LARGE_INTEGER TraceTimerPeriod;
|
||||
KDPC TraceTimerDpc;
|
||||
KSPIN_LOCK TraceTimerSpinLock;
|
||||
ULONG FaultsPerPeriod[10];
|
||||
LONG LastNumFaults;
|
||||
LONG CurPeriod;
|
||||
LONG NumFaults;
|
||||
LONG MaxFaults;
|
||||
PEPROCESS Process;
|
||||
EX_RUNDOWN_REF RefCount;
|
||||
WORK_QUEUE_ITEM EndTraceWorkItem;
|
||||
LONG EndTraceCalled;
|
||||
PPFSN_TRACE_DUMP TraceDump;
|
||||
NTSTATUS TraceDumpStatus;
|
||||
LARGE_INTEGER LaunchTime;
|
||||
PPF_SECTION_INFO SectionInfo;
|
||||
ULONG SectionInfoCount;
|
||||
} PFSN_TRACE_HEADER, *PPFSN_TRACE_HEADER;
|
||||
|
||||
typedef struct _PFSN_PREFETCHER_GLOBALS
|
||||
{
|
||||
LIST_ENTRY ActiveTraces;
|
||||
KSPIN_LOCK ActiveTracesLock;
|
||||
PPFSN_TRACE_HEADER SystemWideTrace;
|
||||
LIST_ENTRY CompletedTraces;
|
||||
FAST_MUTEX CompletedTracesLock;
|
||||
LONG NumCompletedTraces;
|
||||
PKEVENT CompletedTracesEvent;
|
||||
LONG ActivePrefetches;
|
||||
} PFSN_PREFETCHER_GLOBALS, *PPFSN_PREFETCHER_GLOBALS;
|
||||
|
||||
typedef struct _BCB
|
||||
{
|
||||
LIST_ENTRY BcbSegmentListHead;
|
||||
|
@ -61,6 +162,12 @@ typedef struct _INTERNAL_BCB
|
|||
CSHORT RefCount; /* (At offset 0x34 on WinNT4) */
|
||||
} INTERNAL_BCB, *PINTERNAL_BCB;
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
CcPfInitializePrefetcher(
|
||||
VOID
|
||||
);
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
CcMdlReadComplete2(
|
||||
|
|
|
@ -70,6 +70,15 @@ PopAddRemoveSysCapsCallback(
|
|||
IN PVOID Context
|
||||
);
|
||||
|
||||
//
|
||||
// Notifications
|
||||
//
|
||||
VOID
|
||||
NTAPI
|
||||
PoNotifySystemTimeSet(
|
||||
VOID
|
||||
);
|
||||
|
||||
//
|
||||
// Global data inside the Power Manager
|
||||
//
|
||||
|
|
|
@ -1130,6 +1130,38 @@ The BIOS in this system is not fully ACPI compliant. Please contact your
|
|||
system vendor for an updated BIOS.
|
||||
.
|
||||
|
||||
MessageId=0xA8
|
||||
Severity=Informational
|
||||
Facility=System
|
||||
SymbolicName=BOOTING_IN_SAFEMODE_MINIMAL
|
||||
Language=English
|
||||
The system is booting in safemode - Minimal Services
|
||||
.
|
||||
|
||||
MessageId=0xA9
|
||||
Severity=Informational
|
||||
Facility=System
|
||||
SymbolicName=BOOTING_IN_SAFEMODE_NETWORK
|
||||
Language=English
|
||||
The system is booting in safemode - Minimal Services with Network
|
||||
.
|
||||
|
||||
MessageId=0xAA
|
||||
Severity=Informational
|
||||
Facility=System
|
||||
SymbolicName=BOOTING_IN_SAFEMODE_DSREPAIR
|
||||
Language=English
|
||||
The system is booting in safemode - Directory Services Repair
|
||||
.
|
||||
|
||||
MessageId=0xB7
|
||||
Severity=Informational
|
||||
Facility=System
|
||||
SymbolicName=BOOTLOG_ENABLED
|
||||
Language=English
|
||||
Boot Logging Enabled
|
||||
.
|
||||
|
||||
MessageId=0xBE
|
||||
Severity=Success
|
||||
Facility=System
|
||||
|
@ -1337,7 +1369,7 @@ Severity=Informational
|
|||
Facility=System
|
||||
SymbolicName=WINDOWS_NT_MP_STRING
|
||||
Language=English
|
||||
MulitProcessor Kernel
|
||||
MultiProcessor Kernel
|
||||
.
|
||||
|
||||
MessageId=0x9D
|
||||
|
|
|
@ -124,6 +124,7 @@
|
|||
<file>fmutex.c</file>
|
||||
<file>handle.c</file>
|
||||
<file>harderr.c</file>
|
||||
<file>hdlsterm.c</file>
|
||||
<file>init.c</file>
|
||||
<file>keyedevt.c</file>
|
||||
<file>locale.c</file>
|
||||
|
@ -141,6 +142,7 @@
|
|||
<file>uuid.c</file>
|
||||
<file>win32k.c</file>
|
||||
<file>work.c</file>
|
||||
<file>xipdisp.c</file>
|
||||
<file>zone.c</file>
|
||||
</directory>
|
||||
<directory name="fsrtl">
|
||||
|
|
|
@ -11,6 +11,29 @@
|
|||
//#define NDEBUG
|
||||
#include <internal/debug.h>
|
||||
|
||||
PKWIN32_POWEREVENT_CALLOUT PopEventCallout;
|
||||
extern PCALLBACK_OBJECT SetSystemTimeCallback;
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
PoNotifySystemTimeSet(VOID)
|
||||
{
|
||||
KIRQL OldIrql;
|
||||
|
||||
/* Check if Win32k registered a notification callback */
|
||||
if (PopEventCallout)
|
||||
{
|
||||
/* Raise to dispatch */
|
||||
KeRaiseIrql(DISPATCH_LEVEL, &OldIrql);
|
||||
|
||||
/* Notify the callback */
|
||||
ExNotifyCallback(SetSystemTimeCallback, NULL, NULL);
|
||||
|
||||
/* Lower IRQL back */
|
||||
KeLowerIrql(OldIrql);
|
||||
}
|
||||
}
|
||||
|
||||
NTSTATUS
|
||||
NTAPI
|
||||
PopAddRemoveSysCapsCallback(
|
||||
|
|
|
@ -20,6 +20,7 @@ PKWIN32_THREAD_CALLOUT PspW32ThreadCallout = NULL;
|
|||
extern PKWIN32_PARSEMETHOD_CALLOUT ExpWindowStationObjectParse;
|
||||
extern PKWIN32_DELETEMETHOD_CALLOUT ExpWindowStationObjectDelete;
|
||||
extern PKWIN32_DELETEMETHOD_CALLOUT ExpDesktopObjectDelete;
|
||||
extern PKWIN32_POWEREVENT_CALLOUT PopEventCallout;
|
||||
|
||||
/* PRIVATE FUNCTIONS *********************************************************/
|
||||
|
||||
|
@ -112,6 +113,7 @@ PsEstablishWin32Callouts(IN PWIN32_CALLOUTS_FPNS CalloutData)
|
|||
ExpWindowStationObjectParse = CalloutData->WindowStationParseProcedure;
|
||||
ExpWindowStationObjectDelete = CalloutData->WindowStationDeleteProcedure;
|
||||
ExpDesktopObjectDelete = CalloutData->DesktopDeleteProcedure;
|
||||
PopEventCallout = CalloutData->PowerEventCallout;
|
||||
}
|
||||
|
||||
NTSTATUS
|
||||
|
|
Loading…
Reference in a new issue