mirror of
https://github.com/reactos/reactos.git
synced 2026-05-30 05:51:26 +08:00
[NDK][REGEDIT][ROSTESTS:ACPI] Make IO_RESOURCE_REQUIREMENTS_LIST accessible to user mode code
- Copy IO_RESOURCE_REQUIREMENTS_LIST to the NDK. - Remove local copies of IO_RESOURCE_REQUIREMENTS_LIST
This commit is contained in:
@@ -23,118 +23,6 @@
|
||||
#define NTOS_MODE_USER
|
||||
#include <ndk/cmtypes.h>
|
||||
|
||||
#if defined(NT_PROCESSOR_GROUPS)
|
||||
|
||||
typedef USHORT IRQ_DEVICE_POLICY, *PIRQ_DEVICE_POLICY;
|
||||
|
||||
enum _IRQ_DEVICE_POLICY_USHORT {
|
||||
IrqPolicyMachineDefault = 0,
|
||||
IrqPolicyAllCloseProcessors = 1,
|
||||
IrqPolicyOneCloseProcessor = 2,
|
||||
IrqPolicyAllProcessorsInMachine = 3,
|
||||
IrqPolicyAllProcessorsInGroup = 3,
|
||||
IrqPolicySpecifiedProcessors = 4,
|
||||
IrqPolicySpreadMessagesAcrossAllProcessors = 5};
|
||||
|
||||
#else /* defined(NT_PROCESSOR_GROUPS) */
|
||||
|
||||
typedef enum _IRQ_DEVICE_POLICY {
|
||||
IrqPolicyMachineDefault = 0,
|
||||
IrqPolicyAllCloseProcessors,
|
||||
IrqPolicyOneCloseProcessor,
|
||||
IrqPolicyAllProcessorsInMachine,
|
||||
IrqPolicySpecifiedProcessors,
|
||||
IrqPolicySpreadMessagesAcrossAllProcessors
|
||||
} IRQ_DEVICE_POLICY, *PIRQ_DEVICE_POLICY;
|
||||
|
||||
#endif
|
||||
|
||||
typedef enum _IRQ_PRIORITY {
|
||||
IrqPriorityUndefined = 0,
|
||||
IrqPriorityLow,
|
||||
IrqPriorityNormal,
|
||||
IrqPriorityHigh
|
||||
} IRQ_PRIORITY, *PIRQ_PRIORITY;
|
||||
typedef struct _IO_RESOURCE_DESCRIPTOR {
|
||||
UCHAR Option;
|
||||
UCHAR Type;
|
||||
UCHAR ShareDisposition;
|
||||
UCHAR Spare1;
|
||||
USHORT Flags;
|
||||
USHORT Spare2;
|
||||
union {
|
||||
struct {
|
||||
ULONG Length;
|
||||
ULONG Alignment;
|
||||
PHYSICAL_ADDRESS MinimumAddress;
|
||||
PHYSICAL_ADDRESS MaximumAddress;
|
||||
} Port;
|
||||
struct {
|
||||
ULONG Length;
|
||||
ULONG Alignment;
|
||||
PHYSICAL_ADDRESS MinimumAddress;
|
||||
PHYSICAL_ADDRESS MaximumAddress;
|
||||
} Memory;
|
||||
struct {
|
||||
ULONG MinimumVector;
|
||||
ULONG MaximumVector;
|
||||
#if defined(NT_PROCESSOR_GROUPS)
|
||||
IRQ_DEVICE_POLICY AffinityPolicy;
|
||||
USHORT Group;
|
||||
#else
|
||||
IRQ_DEVICE_POLICY AffinityPolicy;
|
||||
#endif
|
||||
IRQ_PRIORITY PriorityPolicy;
|
||||
KAFFINITY TargetedProcessors;
|
||||
} Interrupt;
|
||||
struct {
|
||||
ULONG MinimumChannel;
|
||||
ULONG MaximumChannel;
|
||||
} Dma;
|
||||
struct {
|
||||
ULONG Length;
|
||||
ULONG Alignment;
|
||||
PHYSICAL_ADDRESS MinimumAddress;
|
||||
PHYSICAL_ADDRESS MaximumAddress;
|
||||
} Generic;
|
||||
struct {
|
||||
ULONG Data[3];
|
||||
} DevicePrivate;
|
||||
struct {
|
||||
ULONG Length;
|
||||
ULONG MinBusNumber;
|
||||
ULONG MaxBusNumber;
|
||||
ULONG Reserved;
|
||||
} BusNumber;
|
||||
struct {
|
||||
ULONG Priority;
|
||||
ULONG Reserved1;
|
||||
ULONG Reserved2;
|
||||
} ConfigData;
|
||||
} u;
|
||||
} IO_RESOURCE_DESCRIPTOR, *PIO_RESOURCE_DESCRIPTOR;
|
||||
|
||||
#define IO_RESOURCE_PREFERRED 0x01
|
||||
#define IO_RESOURCE_DEFAULT 0x02
|
||||
#define IO_RESOURCE_ALTERNATIVE 0x08
|
||||
|
||||
typedef struct _IO_RESOURCE_LIST {
|
||||
USHORT Version;
|
||||
USHORT Revision;
|
||||
ULONG Count;
|
||||
IO_RESOURCE_DESCRIPTOR Descriptors[1];
|
||||
} IO_RESOURCE_LIST, *PIO_RESOURCE_LIST;
|
||||
|
||||
typedef struct _IO_RESOURCE_REQUIREMENTS_LIST {
|
||||
ULONG ListSize;
|
||||
INTERFACE_TYPE InterfaceType;
|
||||
ULONG BusNumber;
|
||||
ULONG SlotNumber;
|
||||
ULONG Reserved[3];
|
||||
ULONG AlternativeLists;
|
||||
IO_RESOURCE_LIST List[1];
|
||||
} IO_RESOURCE_REQUIREMENTS_LIST, *PIO_RESOURCE_REQUIREMENTS_LIST;
|
||||
|
||||
typedef enum _EDIT_MODE
|
||||
{
|
||||
EDIT_MODE_DEC,
|
||||
|
||||
@@ -12,79 +12,6 @@
|
||||
#define UNIT_TEST
|
||||
#include <acpi.h>
|
||||
|
||||
/* Kernel definitions (copied) */
|
||||
#define IO_RESOURCE_PREFERRED 0x01
|
||||
#define IO_RESOURCE_DEFAULT 0x02
|
||||
#define IO_RESOURCE_ALTERNATIVE 0x08
|
||||
|
||||
typedef struct _IO_RESOURCE_DESCRIPTOR {
|
||||
UCHAR Option;
|
||||
UCHAR Type;
|
||||
UCHAR ShareDisposition;
|
||||
UCHAR Spare1;
|
||||
USHORT Flags;
|
||||
USHORT Spare2;
|
||||
union {
|
||||
struct {
|
||||
ULONG Length;
|
||||
ULONG Alignment;
|
||||
PHYSICAL_ADDRESS MinimumAddress;
|
||||
PHYSICAL_ADDRESS MaximumAddress;
|
||||
} Port;
|
||||
struct {
|
||||
ULONG Length;
|
||||
ULONG Alignment;
|
||||
PHYSICAL_ADDRESS MinimumAddress;
|
||||
PHYSICAL_ADDRESS MaximumAddress;
|
||||
} Memory;
|
||||
struct {
|
||||
ULONG MinimumVector;
|
||||
ULONG MaximumVector;
|
||||
} Interrupt;
|
||||
struct {
|
||||
ULONG MinimumChannel;
|
||||
ULONG MaximumChannel;
|
||||
} Dma;
|
||||
struct {
|
||||
ULONG Length;
|
||||
ULONG Alignment;
|
||||
PHYSICAL_ADDRESS MinimumAddress;
|
||||
PHYSICAL_ADDRESS MaximumAddress;
|
||||
} Generic;
|
||||
struct {
|
||||
ULONG Data[3];
|
||||
} DevicePrivate;
|
||||
struct {
|
||||
ULONG Length;
|
||||
ULONG MinBusNumber;
|
||||
ULONG MaxBusNumber;
|
||||
ULONG Reserved;
|
||||
} BusNumber;
|
||||
struct {
|
||||
ULONG Priority;
|
||||
ULONG Reserved1;
|
||||
ULONG Reserved2;
|
||||
} ConfigData;
|
||||
} u;
|
||||
} IO_RESOURCE_DESCRIPTOR, *PIO_RESOURCE_DESCRIPTOR;
|
||||
|
||||
typedef struct _IO_RESOURCE_LIST {
|
||||
USHORT Version;
|
||||
USHORT Revision;
|
||||
ULONG Count;
|
||||
IO_RESOURCE_DESCRIPTOR Descriptors[1];
|
||||
} IO_RESOURCE_LIST, *PIO_RESOURCE_LIST;
|
||||
|
||||
typedef struct _IO_RESOURCE_REQUIREMENTS_LIST {
|
||||
ULONG ListSize;
|
||||
INTERFACE_TYPE InterfaceType;
|
||||
ULONG BusNumber;
|
||||
ULONG SlotNumber;
|
||||
ULONG Reserved[3];
|
||||
ULONG AlternativeLists;
|
||||
IO_RESOURCE_LIST List[1];
|
||||
} IO_RESOURCE_REQUIREMENTS_LIST, *PIO_RESOURCE_REQUIREMENTS_LIST;
|
||||
|
||||
/* Kernel definitions (mock) */
|
||||
#define PAGED_CODE()
|
||||
#define DPRINT1(...) do { if (0) DbgPrint(__VA_ARGS__); } while (0)
|
||||
|
||||
@@ -278,6 +278,119 @@ typedef enum _BUS_DATA_TYPE
|
||||
MaximumBusDataType
|
||||
} BUS_DATA_TYPE, *PBUS_DATA_TYPE;
|
||||
|
||||
#if defined(NT_PROCESSOR_GROUPS)
|
||||
|
||||
typedef USHORT IRQ_DEVICE_POLICY, *PIRQ_DEVICE_POLICY;
|
||||
|
||||
enum _IRQ_DEVICE_POLICY_USHORT {
|
||||
IrqPolicyMachineDefault = 0,
|
||||
IrqPolicyAllCloseProcessors = 1,
|
||||
IrqPolicyOneCloseProcessor = 2,
|
||||
IrqPolicyAllProcessorsInMachine = 3,
|
||||
IrqPolicyAllProcessorsInGroup = 3,
|
||||
IrqPolicySpecifiedProcessors = 4,
|
||||
IrqPolicySpreadMessagesAcrossAllProcessors = 5};
|
||||
|
||||
#else /* defined(NT_PROCESSOR_GROUPS) */
|
||||
|
||||
typedef enum _IRQ_DEVICE_POLICY {
|
||||
IrqPolicyMachineDefault = 0,
|
||||
IrqPolicyAllCloseProcessors,
|
||||
IrqPolicyOneCloseProcessor,
|
||||
IrqPolicyAllProcessorsInMachine,
|
||||
IrqPolicySpecifiedProcessors,
|
||||
IrqPolicySpreadMessagesAcrossAllProcessors
|
||||
} IRQ_DEVICE_POLICY, *PIRQ_DEVICE_POLICY;
|
||||
|
||||
#endif
|
||||
|
||||
typedef enum _IRQ_PRIORITY {
|
||||
IrqPriorityUndefined = 0,
|
||||
IrqPriorityLow,
|
||||
IrqPriorityNormal,
|
||||
IrqPriorityHigh
|
||||
} IRQ_PRIORITY, *PIRQ_PRIORITY;
|
||||
|
||||
#define IO_RESOURCE_PREFERRED 0x01
|
||||
#define IO_RESOURCE_DEFAULT 0x02
|
||||
#define IO_RESOURCE_ALTERNATIVE 0x08
|
||||
|
||||
typedef struct _IO_RESOURCE_DESCRIPTOR {
|
||||
UCHAR Option;
|
||||
UCHAR Type;
|
||||
UCHAR ShareDisposition;
|
||||
UCHAR Spare1;
|
||||
USHORT Flags;
|
||||
USHORT Spare2;
|
||||
union {
|
||||
struct {
|
||||
ULONG Length;
|
||||
ULONG Alignment;
|
||||
PHYSICAL_ADDRESS MinimumAddress;
|
||||
PHYSICAL_ADDRESS MaximumAddress;
|
||||
} Port;
|
||||
struct {
|
||||
ULONG Length;
|
||||
ULONG Alignment;
|
||||
PHYSICAL_ADDRESS MinimumAddress;
|
||||
PHYSICAL_ADDRESS MaximumAddress;
|
||||
} Memory;
|
||||
struct {
|
||||
ULONG MinimumVector;
|
||||
ULONG MaximumVector;
|
||||
#if defined(NT_PROCESSOR_GROUPS)
|
||||
IRQ_DEVICE_POLICY AffinityPolicy;
|
||||
USHORT Group;
|
||||
#else
|
||||
IRQ_DEVICE_POLICY AffinityPolicy;
|
||||
#endif
|
||||
IRQ_PRIORITY PriorityPolicy;
|
||||
KAFFINITY TargetedProcessors;
|
||||
} Interrupt;
|
||||
struct {
|
||||
ULONG MinimumChannel;
|
||||
ULONG MaximumChannel;
|
||||
} Dma;
|
||||
struct {
|
||||
ULONG Length;
|
||||
ULONG Alignment;
|
||||
PHYSICAL_ADDRESS MinimumAddress;
|
||||
PHYSICAL_ADDRESS MaximumAddress;
|
||||
} Generic;
|
||||
struct {
|
||||
ULONG Data[3];
|
||||
} DevicePrivate;
|
||||
struct {
|
||||
ULONG Length;
|
||||
ULONG MinBusNumber;
|
||||
ULONG MaxBusNumber;
|
||||
ULONG Reserved;
|
||||
} BusNumber;
|
||||
struct {
|
||||
ULONG Priority;
|
||||
ULONG Reserved1;
|
||||
ULONG Reserved2;
|
||||
} ConfigData;
|
||||
} u;
|
||||
} IO_RESOURCE_DESCRIPTOR, *PIO_RESOURCE_DESCRIPTOR;
|
||||
|
||||
typedef struct _IO_RESOURCE_LIST {
|
||||
USHORT Version;
|
||||
USHORT Revision;
|
||||
ULONG Count;
|
||||
IO_RESOURCE_DESCRIPTOR Descriptors[1];
|
||||
} IO_RESOURCE_LIST, *PIO_RESOURCE_LIST;
|
||||
|
||||
typedef struct _IO_RESOURCE_REQUIREMENTS_LIST {
|
||||
ULONG ListSize;
|
||||
INTERFACE_TYPE InterfaceType;
|
||||
ULONG BusNumber;
|
||||
ULONG SlotNumber;
|
||||
ULONG Reserved[3];
|
||||
ULONG AlternativeLists;
|
||||
IO_RESOURCE_LIST List[1];
|
||||
} IO_RESOURCE_REQUIREMENTS_LIST, *PIO_RESOURCE_REQUIREMENTS_LIST;
|
||||
|
||||
//
|
||||
// File Information Classes for NtQueryInformationFile
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user