mirror of
https://github.com/reactos/reactos.git
synced 2024-08-01 17:11:35 +00:00
Add an ARC Header for future purposes (PPC, ARM, etc, ARCLoader) and implement KeFindConfigurationNextEntry and fix the definition
svn path=/trunk/; revision=15911
This commit is contained in:
parent
f4ff6e70b3
commit
d101bc4e2d
45
reactos/include/arc/arc.h
Normal file
45
reactos/include/arc/arc.h
Normal file
|
@ -0,0 +1,45 @@
|
|||
/* ARC LOADER TYPES *********************************************************/
|
||||
|
||||
#ifndef __INCLUDE_ARC_H
|
||||
#define __INCLUDE_ARC_H
|
||||
|
||||
/* Types */
|
||||
|
||||
typedef enum _IDENTIFIER_FLAG
|
||||
{
|
||||
Failed = 0x01,
|
||||
ReadOnly = 0x02,
|
||||
Removable = 0x04,
|
||||
ConsoleIn = 0x08,
|
||||
ConsoleOut = 0x10,
|
||||
Input = 0x20,
|
||||
Output = 0x40
|
||||
} IDENTIFIER_FLAG;
|
||||
|
||||
typedef enum _CONFIGURATION_CLASS
|
||||
{
|
||||
SystemClass,
|
||||
ProcessorClass,
|
||||
CacheClass,
|
||||
AdapterClass,
|
||||
ControllerClass,
|
||||
PeripheralClass,
|
||||
MemoryClass,
|
||||
MaximumClass
|
||||
} CONFIGURATION_CLASS;
|
||||
|
||||
typedef struct _CONFIGURATION_COMPONENT
|
||||
{
|
||||
CONFIGURATION_CLASS Class;
|
||||
CONFIGURATION_TYPE Type;
|
||||
IDENTIFIER_FLAG Flags;
|
||||
USHORT Version;
|
||||
USHORT Revision;
|
||||
ULONG Key;
|
||||
ULONG AffinityMask;
|
||||
ULONG ConfigurationDataLength;
|
||||
ULONG IdentifierLength;
|
||||
LPSTR Identifier;
|
||||
} CONFIGURATION_COMPONENT, *PCONFIGURATION_COMPONENT;
|
||||
|
||||
#endif
|
|
@ -636,25 +636,25 @@ KeSetEventBoostPriority(
|
|||
IN PKTHREAD *Thread OPTIONAL
|
||||
);
|
||||
|
||||
PVOID
|
||||
STDCALL
|
||||
KeFindConfigurationEntry(
|
||||
IN PVOID Unknown,
|
||||
IN ULONG Class,
|
||||
IN CONFIGURATION_TYPE Type,
|
||||
IN PULONG RegKey
|
||||
);
|
||||
|
||||
PVOID
|
||||
PCONFIGURATION_COMPONENT_DATA
|
||||
STDCALL
|
||||
KeFindConfigurationNextEntry(
|
||||
IN PVOID Unknown,
|
||||
IN ULONG Class,
|
||||
IN PCONFIGURATION_COMPONENT_DATA Child,
|
||||
IN CONFIGURATION_CLASS Class,
|
||||
IN CONFIGURATION_TYPE Type,
|
||||
IN PULONG RegKey,
|
||||
IN PVOID *NextLink
|
||||
IN PULONG ComponentKey OPTIONAL,
|
||||
IN PCONFIGURATION_COMPONENT_DATA *NextLink
|
||||
);
|
||||
|
||||
|
||||
PCONFIGURATION_COMPONENT_DATA
|
||||
STDCALL
|
||||
KeFindConfigurationEntry(
|
||||
IN PCONFIGURATION_COMPONENT_DATA Child,
|
||||
IN CONFIGURATION_CLASS Class,
|
||||
IN CONFIGURATION_TYPE Type,
|
||||
IN PULONG ComponentKey OPTIONAL
|
||||
);
|
||||
|
||||
VOID
|
||||
STDCALL
|
||||
KeFlushEntireTb(
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
|
||||
/* include ntos/ketypes.h here? */
|
||||
|
||||
#include <arc/arc.h>
|
||||
|
||||
# define RESTRICTED_POINTER __restrict
|
||||
|
||||
struct _KMUTANT;
|
||||
|
@ -339,6 +341,14 @@ typedef struct _M128 {
|
|||
LONGLONG High;
|
||||
} M128, *PM128;
|
||||
|
||||
typedef struct _CONFIGURATION_COMPONENT_DATA
|
||||
{
|
||||
struct _CONFIGURATION_COMPONENT_DATA *Parent;
|
||||
struct _CONFIGURATION_COMPONENT_DATA *Child;
|
||||
struct _CONFIGURATION_COMPONENT_DATA *Sibling;
|
||||
CONFIGURATION_COMPONENT Component;
|
||||
} CONFIGURATION_COMPONENT_DATA, *PCONFIGURATION_COMPONENT_DATA;
|
||||
|
||||
typedef struct _KEXCEPTION_FRAME {
|
||||
ULONG64 P1Home;
|
||||
ULONG64 P2Home;
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/* $Id$
|
||||
*
|
||||
/*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
* FILE: ntoskrnl/ke/device.c
|
||||
|
@ -13,43 +12,122 @@
|
|||
#include <internal/debug.h>
|
||||
|
||||
/*
|
||||
* @unimplemented
|
||||
* @implemented
|
||||
*/
|
||||
PCONFIGURATION_COMPONENT_DATA
|
||||
STDCALL
|
||||
PVOID
|
||||
KeFindConfigurationNextEntry(
|
||||
IN PVOID Unknown,
|
||||
IN ULONG Class,
|
||||
IN CONFIGURATION_TYPE Type,
|
||||
IN PULONG RegKey,
|
||||
IN PVOID *NextLink
|
||||
)
|
||||
INIT_FUNCTION
|
||||
KeFindConfigurationEntry(IN PCONFIGURATION_COMPONENT_DATA Child,
|
||||
IN CONFIGURATION_CLASS Class,
|
||||
IN CONFIGURATION_TYPE Type,
|
||||
IN PULONG ComponentKey OPTIONAL)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
return 0;
|
||||
/* Start Search at Root */
|
||||
return KeFindConfigurationNextEntry(Child,
|
||||
Class,
|
||||
Type,
|
||||
ComponentKey,
|
||||
NULL);
|
||||
}
|
||||
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
PCONFIGURATION_COMPONENT_DATA
|
||||
STDCALL
|
||||
PVOID
|
||||
KeFindConfigurationEntry(
|
||||
IN PVOID Unknown,
|
||||
IN ULONG Class,
|
||||
IN CONFIGURATION_TYPE Type,
|
||||
IN PULONG RegKey
|
||||
)
|
||||
INIT_FUNCTION
|
||||
KeFindConfigurationNextEntry(IN PCONFIGURATION_COMPONENT_DATA Child,
|
||||
IN CONFIGURATION_CLASS Class,
|
||||
IN CONFIGURATION_TYPE Type,
|
||||
IN PULONG ComponentKey OPTIONAL,
|
||||
IN PCONFIGURATION_COMPONENT_DATA *NextLink)
|
||||
{
|
||||
/* Start Search at Root */
|
||||
return KeFindConfigurationNextEntry(Unknown, Class, Type, RegKey, NULL);
|
||||
ULONG Key = 0;
|
||||
ULONG Mask = 0;
|
||||
PCONFIGURATION_COMPONENT_DATA Sibling;
|
||||
PCONFIGURATION_COMPONENT_DATA ReturnEntry;
|
||||
|
||||
/* If we did get a key, then use it instead */
|
||||
if (ComponentKey)
|
||||
{
|
||||
Key = *ComponentKey;
|
||||
Mask = -1;
|
||||
}
|
||||
|
||||
/* Loop the Components until we find a a match */
|
||||
while (Child)
|
||||
{
|
||||
/* Check if we are starting somewhere already */
|
||||
if (*NextLink)
|
||||
{
|
||||
/* If we've found the place where we started, clear and continue */
|
||||
if (Child == *NextLink) *NextLink = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Try to get a match */
|
||||
if (Child->Component.Class == Class &&
|
||||
Child->Component.Type == Type &&
|
||||
(Child->Component.Key & Mask) == Key)
|
||||
{
|
||||
/* Match found */
|
||||
return Child;
|
||||
}
|
||||
}
|
||||
|
||||
/* Now we've also got to lookup the siblings */
|
||||
Sibling = Child->Sibling;
|
||||
while (Sibling)
|
||||
{
|
||||
/* Check if we are starting somewhere already */
|
||||
if (*NextLink)
|
||||
{
|
||||
/* If we've found the place where we started, clear and continue */
|
||||
if (Sibling == *NextLink) *NextLink = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Try to get a match */
|
||||
if (Sibling->Component.Class == Class &&
|
||||
Sibling->Component.Type == Type &&
|
||||
(Sibling->Component.Key & Mask) == Key)
|
||||
{
|
||||
/* Match found */
|
||||
return Sibling;
|
||||
}
|
||||
}
|
||||
|
||||
/* We've got to check if the Sibling has a Child as well */
|
||||
if (Sibling->Child)
|
||||
{
|
||||
/* We're just going to call ourselves again */
|
||||
if ((ReturnEntry = KeFindConfigurationNextEntry(Sibling->Child,
|
||||
Class,
|
||||
Type,
|
||||
ComponentKey,
|
||||
NextLink)))
|
||||
{
|
||||
return ReturnEntry;
|
||||
}
|
||||
}
|
||||
|
||||
/* Next Sibling */
|
||||
Sibling = Sibling->Sibling;
|
||||
}
|
||||
|
||||
/* Next Child */
|
||||
Child = Child->Child;
|
||||
}
|
||||
|
||||
/* If we got here, nothign was found */
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
STDCALL
|
||||
VOID
|
||||
STDCALL
|
||||
KeFlushEntireTb(
|
||||
IN BOOLEAN Unknown,
|
||||
IN BOOLEAN CurrentCpuOnly
|
||||
|
@ -97,8 +175,8 @@ KeFlushEntireTb(
|
|||
/*
|
||||
* @implemented
|
||||
*/
|
||||
STDCALL
|
||||
VOID
|
||||
STDCALL
|
||||
KeSetDmaIoCoherency(
|
||||
IN ULONG Coherency
|
||||
)
|
||||
|
@ -109,8 +187,8 @@ KeSetDmaIoCoherency(
|
|||
/*
|
||||
* @implemented
|
||||
*/
|
||||
STDCALL
|
||||
KAFFINITY
|
||||
STDCALL
|
||||
KeQueryActiveProcessors (
|
||||
VOID
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue