- Remove some public APIs from internal headers.

- Remove some internal APIs/types from public headers.
- Make PSECTION_OBJECT a PVOID unless really needed (which should only be inside \mm)
- Make hal buildable on msvc.
- Fix some other misc. various msvc/ddk incompatibilities.

svn path=/trunk/; revision=20696
This commit is contained in:
Alex Ionescu 2006-01-08 06:23:17 +00:00
parent 96ab5d2979
commit 9c52bdbe04
31 changed files with 160 additions and 155 deletions

View File

@ -50,7 +50,7 @@ HalMakeBeep (
if (Frequency)
{
DWORD Divider = CLOCKFREQ / Frequency;
ULONG Divider = CLOCKFREQ / Frequency;
if (Divider > 0x10000)
{

View File

@ -252,7 +252,7 @@ HalpGrowMapBuffers(
if (MapRegisterCount > 0)
{
PMAP_REGISTER_ENTRY CurrentEntry, PreviousEntry;
PROS_MAP_REGISTER_ENTRY CurrentEntry, PreviousEntry;
CurrentEntry = AdapterObject->MapRegisterBase +
AdapterObject->NumberOfMapRegisters;
@ -351,7 +351,7 @@ HalpDmaAllocateMasterAdapter(VOID)
MasterAdapter->MapRegisterBase = ExAllocatePoolWithTag(
NonPagedPool,
SizeOfBitmap * sizeof(MAP_REGISTER_ENTRY),
SizeOfBitmap * sizeof(ROS_MAP_REGISTER_ENTRY),
TAG_DMA);
if (MasterAdapter->MapRegisterBase == NULL)
{
@ -360,7 +360,7 @@ HalpDmaAllocateMasterAdapter(VOID)
}
RtlZeroMemory(MasterAdapter->MapRegisterBase,
SizeOfBitmap * sizeof(MAP_REGISTER_ENTRY));
SizeOfBitmap * sizeof(ROS_MAP_REGISTER_ENTRY));
if (!HalpGrowMapBuffers(MasterAdapter, 0x10000))
{
ExFreePool(MasterAdapter);
@ -455,8 +455,8 @@ HalpDmaInitializeEisaAdapter(
PDEVICE_DESCRIPTION DeviceDescription)
{
UCHAR Controller;
DMA_MODE DmaMode = { Byte: 0 };
DMA_EXTENDED_MODE ExtendedMode = { Byte: 0 };
DMA_MODE DmaMode = {{0 }};
DMA_EXTENDED_MODE ExtendedMode = {{ 0 }};
PVOID AdapterBaseVa;
Controller = (DeviceDescription->DmaChannel & 4) ? 2 : 1;
@ -1127,7 +1127,7 @@ HalAllocateAdapterChannel(
if (!AdapterObject->ScatterGather)
{
AdapterObject->MapRegisterBase =
(PMAP_REGISTER_ENTRY)(
(PROS_MAP_REGISTER_ENTRY)(
(ULONG_PTR)AdapterObject->MapRegisterBase |
MAP_BASE_SW_SG);
}
@ -1285,7 +1285,7 @@ IoFreeAdapterChannel(
if (!AdapterObject->ScatterGather)
{
AdapterObject->MapRegisterBase =
(PMAP_REGISTER_ENTRY)(
(PROS_MAP_REGISTER_ENTRY)(
(ULONG_PTR)AdapterObject->MapRegisterBase |
MAP_BASE_SW_SG);
}
@ -1371,10 +1371,10 @@ IoFreeMapRegisters(
if (NumberOfMapRegisters != 0)
{
PMAP_REGISTER_ENTRY RealMapRegisterBase;
PROS_MAP_REGISTER_ENTRY RealMapRegisterBase;
RealMapRegisterBase =
(PMAP_REGISTER_ENTRY)((ULONG_PTR)MapRegisterBase & ~MAP_BASE_SW_SG);
(PROS_MAP_REGISTER_ENTRY)((ULONG_PTR)MapRegisterBase & ~MAP_BASE_SW_SG);
RtlClearBits(MasterAdapter->MapRegisters,
RealMapRegisterBase - MasterAdapter->MapRegisterBase,
NumberOfMapRegisters);
@ -1408,7 +1408,7 @@ IoFreeMapRegisters(
if (!AdapterObject->ScatterGather)
{
AdapterObject->MapRegisterBase =
(PMAP_REGISTER_ENTRY)(
(PROS_MAP_REGISTER_ENTRY)(
(ULONG_PTR)AdapterObject->MapRegisterBase |
MAP_BASE_SW_SG);
}
@ -1459,7 +1459,7 @@ IoFreeMapRegisters(
VOID STDCALL
HalpCopyBufferMap(
PMDL Mdl,
PMAP_REGISTER_ENTRY MapRegisterBase,
PROS_MAP_REGISTER_ENTRY MapRegisterBase,
PVOID CurrentVa,
ULONG Length,
BOOLEAN WriteToDevice)
@ -1555,7 +1555,7 @@ IoFlushAdapterBuffers(
BOOLEAN WriteToDevice)
{
BOOLEAN SlaveDma = FALSE;
PMAP_REGISTER_ENTRY RealMapRegisterBase;
PROS_MAP_REGISTER_ENTRY RealMapRegisterBase;
ASSERT_IRQL(DISPATCH_LEVEL);
@ -1582,7 +1582,7 @@ IoFlushAdapterBuffers(
return TRUE;
RealMapRegisterBase =
(PMAP_REGISTER_ENTRY)((ULONG_PTR)MapRegisterBase & ~MAP_BASE_SW_SG);
(PROS_MAP_REGISTER_ENTRY)((ULONG_PTR)MapRegisterBase & ~MAP_BASE_SW_SG);
if (!WriteToDevice)
{
@ -1655,7 +1655,7 @@ IoMapTransfer(
ULONG TransferOffset;
ULONG TransferLength;
BOOLEAN UseMapRegisters;
PMAP_REGISTER_ENTRY RealMapRegisterBase;
PROS_MAP_REGISTER_ENTRY RealMapRegisterBase;
PHYSICAL_ADDRESS PhysicalAddress;
PHYSICAL_ADDRESS HighestAcceptableAddress;
ULONG Counter;
@ -1722,7 +1722,7 @@ IoMapTransfer(
*/
RealMapRegisterBase =
(PMAP_REGISTER_ENTRY)((ULONG_PTR)MapRegisterBase & ~MAP_BASE_SW_SG);
(PROS_MAP_REGISTER_ENTRY)((ULONG_PTR)MapRegisterBase & ~MAP_BASE_SW_SG);
/*
* Try to calculate the size of the transfer. We can only transfer

View File

@ -52,10 +52,12 @@ HalInitSystem (ULONG BootPhase,
}
else if (BootPhase == 2)
{
PHYSICAL_ADDRESS Null = {{0}};
/* Go to blue screen */
HalClearDisplay (0x17); /* grey on blue */
HalpZeroPageMapping = MmMapIoSpace((LARGE_INTEGER)0LL, PAGE_SIZE, MmNonCached);
HalpZeroPageMapping = MmMapIoSpace(Null, PAGE_SIZE, MmNonCached);
}
return TRUE;

View File

@ -17,7 +17,7 @@
/* FUNCTIONS *****************************************************************/
BOOL HalIsaProbe(VOID)
BOOLEAN HalIsaProbe(VOID)
/*
* FUNCTION: Probes for an ISA bus
* RETURNS: True if detected

View File

@ -87,8 +87,8 @@ static BOOLEAN
KdpDoesComPortExist (PUCHAR BaseAddress)
{
BOOLEAN found;
BYTE mcr;
BYTE msr;
UCHAR mcr;
UCHAR msr;
found = FALSE;
@ -149,14 +149,14 @@ BOOLEAN
STDCALL
KdPortInitialize (
PKD_PORT_INFORMATION PortInformation,
DWORD Unknown1,
DWORD Unknown2
ULONG Unknown1,
ULONG Unknown2
)
{
ULONG BaseArray[5] = {0, 0x3F8, 0x2F8, 0x3E8, 0x2E8};
char buffer[80];
ULONG divisor;
BYTE lcr;
UCHAR lcr;
if (PortInitialized == FALSE)
{
@ -282,15 +282,15 @@ BOOLEAN
STDCALL
KdPortInitializeEx (
PKD_PORT_INFORMATION PortInformation,
DWORD Unknown1,
DWORD Unknown2
ULONG Unknown1,
ULONG Unknown2
)
{
ULONG BaseArray[5] = {0, 0x3F8, 0x2F8, 0x3E8, 0x2E8};
PUCHAR ComPortBase;
char buffer[80];
ULONG divisor;
BYTE lcr;
UCHAR lcr;
if (PortInformation->BaudRate == 0)
{

View File

@ -16,14 +16,12 @@
/* FUNCTIONS ****************************************************************/
VOID
NTAPI
HalAllocateCrashDumpRegisters(
ULONG Unknown1,
ULONG Unknown2)
PVOID STDCALL
HalAllocateCrashDumpRegisters(IN PADAPTER_OBJECT AdapterObject,
IN OUT PULONG NumberOfMapRegisters)
{
UNIMPLEMENTED;
return NULL;
}

View File

@ -601,8 +601,8 @@ HalpAssignPciSlotResources(IN PBUS_HANDLER BusHandler,
{
ULONG DataSize;
PCI_COMMON_CONFIG PciConfig;
UINT Address;
UINT ResourceCount;
SIZE_T Address;
SIZE_T ResourceCount;
ULONG Size[PCI_TYPE0_ADDRESSES];
NTSTATUS Status = STATUS_SUCCESS;
UCHAR Offset;

View File

@ -96,7 +96,7 @@ static BOOLEAN UdelayCalibrated = FALSE;
* For supported compilers we use inline assembler. For the others,
* portable plain C.
*/
VOID STDCALL __attribute__((noinline))
DECLSPEC_NOINLINE VOID STDCALL
__KeStallExecutionProcessor(ULONG Loops)
{
if (!Loops)
@ -121,7 +121,9 @@ ROSL1:
#endif
}
VOID STDCALL KeStallExecutionProcessor(ULONG Microseconds)
VOID
STDCALL
KeStallExecutionProcessor(ULONG Microseconds)
{
PKIPCR Pcr = (PKIPCR)KeGetCurrentKPCR();
@ -305,7 +307,8 @@ HalCalibratePerformanceCounter(ULONG Count)
}
LARGE_INTEGER STDCALL
LARGE_INTEGER
STDCALL
KeQueryPerformanceCounter(PLARGE_INTEGER PerformanceFreq)
/*
* FUNCTION: Queries the finest grained running count available in the system

View File

@ -12,8 +12,8 @@
#include <stdio.h>
/* IFS/DDK/NDK Headers */
#include <ntddk.h>
#include <ntifs.h>
#include <ntddk.h>
#include <ndk/ntndk.h>
/* Internal Kernel Headers */

View File

@ -310,12 +310,12 @@ typedef struct _EISA_CONTROL
DMA_CHANNEL_STOP DmaChannelStop[8]; /* 4E0h-4FFh */
} EISA_CONTROL, *PEISA_CONTROL;
typedef struct _MAP_REGISTER_ENTRY
typedef struct _ROS_MAP_REGISTER_ENTRY
{
PVOID VirtualAddress;
PHYSICAL_ADDRESS PhysicalAddress;
ULONG Counter;
} MAP_REGISTER_ENTRY, *PMAP_REGISTER_ENTRY;
} ROS_MAP_REGISTER_ENTRY, *PROS_MAP_REGISTER_ENTRY;
struct _ADAPTER_OBJECT {
/*
@ -333,7 +333,7 @@ struct _ADAPTER_OBJECT {
ULONG MapRegistersPerChannel;
PVOID AdapterBaseVa;
PMAP_REGISTER_ENTRY MapRegisterBase;
PROS_MAP_REGISTER_ENTRY MapRegisterBase;
ULONG NumberOfMapRegisters;
ULONG CommittedMapRegisters;
@ -376,20 +376,21 @@ HalpGetDmaAdapter(
IN PDEVICE_DESCRIPTION DeviceDescription,
OUT PULONG NumberOfMapRegisters);
VOID STDCALL
HalPutDmaAdapter(
PADAPTER_OBJECT AdapterObject);
/* FIXME: I added the definition to winddk.h but gcc wants it -HERE-. WHY?? */
#ifndef _MSC_VER
NTSTATUS
NTAPI
IoAllocateAdapterChannel(
IN PADAPTER_OBJECT AdapterObject,
IN PDEVICE_OBJECT DeviceObject,
IN ULONG NumberOfMapRegisters,
IN PDRIVER_CONTROL ExecutionRoutine,
IN PVOID Context
);
#endif
ULONG STDCALL
HalpDmaGetDmaAlignment(
PADAPTER_OBJECT AdapterObject);
NTSTATUS STDCALL
IoAllocateAdapterChannel(
IN PADAPTER_OBJECT AdapterObject,
IN PDEVICE_OBJECT DeviceObject,
IN ULONG NumberOfMapRegisters,
IN PDRIVER_CONTROL ExecutionRoutine,
IN PVOID Context);
#endif /* HALDMA_H */

View File

@ -37,6 +37,7 @@
#define IOAPIC_TBL_DF1 (0xFF<< 56) /* Destination Field (logical mode) */
#define IOAPIC_TBL_VECTOR (0xFF << 0) /* Vector (10h - FEh) */
#include <pshpack1.h>
typedef struct _IOAPIC_ROUTE_ENTRY {
ULONG vector : 8,
delivery_mode : 3, /* 000: FIXED
@ -62,7 +63,8 @@ typedef struct _IOAPIC_ROUTE_ENTRY {
logical_dest : 8;
} logical;
} dest;
} __attribute__ ((packed)) IOAPIC_ROUTE_ENTRY, *PIOAPIC_ROUTE_ENTRY;
} IOAPIC_ROUTE_ENTRY, *PIOAPIC_ROUTE_ENTRY;
#include <poppack.h>
typedef struct _IOAPIC_INFO
{

View File

@ -22,7 +22,8 @@
/* MP Floating Pointer Structure */
#define MPF_SIGNATURE (('_' << 24) | ('P' << 16) | ('M' << 8) | '_')
typedef struct __attribute__((packed)) _MP_FLOATING_POINTER
#include <pshpack1.h>
typedef struct _MP_FLOATING_POINTER
{
ULONG Signature; /* _MP_ */
ULONG Address; /* Physical Address Pointer (0 means no configuration table exist) */
@ -34,14 +35,15 @@ typedef struct __attribute__((packed)) _MP_FLOATING_POINTER
UCHAR Feature3; /* Unused (0) */
UCHAR Feature4; /* Unused (0) */
UCHAR Feature5; /* Unused (0) */
} __attribute__((packed)) MP_FLOATING_POINTER, *PMP_FLOATING_POINTER;
} MP_FLOATING_POINTER, *PMP_FLOATING_POINTER;
#define FEATURE2_IMCRP 0x80
/* MP Configuration Table Header */
#define MPC_SIGNATURE (('P' << 24) | ('M' << 16) | ('C' << 8) | 'P')
typedef struct __attribute__((packed)) _MP_CONFIGURATION_TABLE
typedef struct _MP_CONFIGURATION_TABLE
{
ULONG Signature; /* PCMP */
USHORT Length; /* Size of configuration table */
@ -56,7 +58,7 @@ typedef struct __attribute__((packed)) _MP_CONFIGURATION_TABLE
USHORT ExtTableLength; /* Extended Table Length */
UCHAR ExtTableChecksum; /* Extended Table Checksum */
UCHAR Reserved; /* Reserved */
} __attribute__((packed)) MP_CONFIGURATION_TABLE, *PMP_CONFIGURATION_TABLE;
} MP_CONFIGURATION_TABLE, *PMP_CONFIGURATION_TABLE;
/* MP Configuration Table Entries */
#define MPCTE_PROCESSOR 0 /* One entry per processor */
@ -66,7 +68,7 @@ typedef struct __attribute__((packed)) _MP_CONFIGURATION_TABLE
#define MPCTE_LINTSRC 4 /* One entry per system interrupt source */
typedef struct __attribute__((packed)) _MP_CONFIGURATION_PROCESSOR
typedef struct _MP_CONFIGURATION_PROCESSOR
{
UCHAR Type; /* 0 */
UCHAR ApicId; /* Local APIC ID for the processor */
@ -75,17 +77,16 @@ typedef struct __attribute__((packed)) _MP_CONFIGURATION_PROCESSOR
ULONG CpuSignature; /* CPU signature */
ULONG FeatureFlags; /* CPUID feature value */
ULONG Reserved[2]; /* Reserved (0) */
} __attribute__((packed)) MP_CONFIGURATION_PROCESSOR,
*PMP_CONFIGURATION_PROCESSOR;
} MP_CONFIGURATION_PROCESSOR, *PMP_CONFIGURATION_PROCESSOR;
typedef struct __attribute__((packed)) _MP_CONFIGURATION_BUS
typedef struct _MP_CONFIGURATION_BUS
{
UCHAR Type; /* 1 */
UCHAR BusId; /* Bus ID */
CHAR BusType[6]; /* Bus type */
} __attribute__((packed)) MP_CONFIGURATION_BUS, *PMP_CONFIGURATION_BUS;
} MP_CONFIGURATION_BUS, *PMP_CONFIGURATION_BUS;
#define MAX_BUS 32
@ -114,21 +115,21 @@ typedef struct __attribute__((packed)) _MP_CONFIGURATION_BUS
#define BUSTYPE_XPRESS "XPRESS"
typedef struct __attribute__((packed)) _MP_CONFIGURATION_IOAPIC
typedef struct _MP_CONFIGURATION_IOAPIC
{
UCHAR Type; /* 2 */
UCHAR ApicId; /* I/O APIC ID */
UCHAR ApicVersion; /* I/O APIC version */
UCHAR ApicFlags; /* I/O APIC flags */
ULONG ApicAddress; /* I/O APIC base address */
} __attribute__((packed)) MP_CONFIGURATION_IOAPIC, *PMP_CONFIGURATION_IOAPIC;
} MP_CONFIGURATION_IOAPIC, *PMP_CONFIGURATION_IOAPIC;
#define MAX_IOAPIC 2
#define MP_IOAPIC_USABLE 0x01
typedef struct __attribute__((packed)) _MP_CONFIGURATION_INTSRC
typedef struct _MP_CONFIGURATION_INTSRC
{
UCHAR Type; /* 3 */
UCHAR IrqType; /* Interrupt type */
@ -137,7 +138,7 @@ typedef struct __attribute__((packed)) _MP_CONFIGURATION_INTSRC
UCHAR SrcBusIrq; /* Source bus interrupt */
UCHAR DstApicId; /* Destination APIC ID */
UCHAR DstApicInt; /* Destination interrupt */
} __attribute__((packed)) MP_CONFIGURATION_INTSRC, *PMP_CONFIGURATION_INTSRC;
} MP_CONFIGURATION_INTSRC, *PMP_CONFIGURATION_INTSRC;
#define MAX_IRQ_SOURCE 128
@ -151,7 +152,7 @@ typedef struct __attribute__((packed)) _MP_CONFIGURATION_INTSRC
#define IRQDIR_LOW 3
typedef struct __attribute__((packed)) _MP_CONFIGURATION_INTLOCAL
typedef struct _MP_CONFIGURATION_INTLOCAL
{
UCHAR Type; /* 4 */
UCHAR IrqType; /* Interrupt type */
@ -161,6 +162,7 @@ typedef struct __attribute__((packed)) _MP_CONFIGURATION_INTLOCAL
UCHAR DstApicId; /* Destination local APIC ID */
UCHAR DstApicLInt; /* Destination local APIC interrupt */
} MP_CONFIGURATION_INTLOCAL, *PMP_CONFIGURATION_INTLOCAL;
#include <poppack.h>
#define MP_APIC_ALL 0xFF

View File

@ -592,6 +592,7 @@ ZwEnumerateBootEntries(
IN ULONG Unknown2
);
#ifdef NTOS_MODE_USER
NTSYSAPI
NTSTATUS
NTAPI
@ -599,6 +600,7 @@ ZwFlushBuffersFile(
IN HANDLE FileHandle,
OUT PIO_STATUS_BLOCK IoStatusBlock
);
#endif
NTSTATUS
NTAPI
@ -716,6 +718,7 @@ ZwQueryDirectoryFile(
IN BOOLEAN RestartScan
);
#ifdef NTOS_MODE_USER
NTSTATUS
NTAPI
ZwQueryEaFile(
@ -729,6 +732,7 @@ ZwQueryEaFile(
IN PULONG EaIndex OPTIONAL,
IN BOOLEAN RestartScan
);
#endif
NTSTATUS
NTAPI
@ -837,6 +841,7 @@ ZwSetBootOptions(
ULONG Unknown2
);
#ifdef NTOS_MODE_USER
NTSTATUS
NTAPI
ZwSetEaFile(
@ -845,6 +850,7 @@ ZwSetEaFile(
PVOID EaBuffer,
ULONG EaBufferSize
);
#endif
NTSYSCALLAPI
NTSTATUS

View File

@ -343,6 +343,20 @@ typedef struct _MMSUPPORT
ULONG GrowthSinceLastEstimate;
} MMSUPPORT, *PMMSUPPORT;
//
// Memory Information Types
//
typedef struct _MEMORY_BASIC_INFORMATION
{
PVOID BaseAddress;
PVOID AllocationBase;
ULONG AllocationProtect;
ULONG RegionSize;
ULONG State;
ULONG Protect;
ULONG Type;
} MEMORY_BASIC_INFORMATION,*PMEMORY_BASIC_INFORMATION;
#endif // !NTOS_MODE_USER
#endif // _MMTYPES_H

View File

@ -848,7 +848,7 @@ CmiInitNonVolatileRegistryHive (PREGISTRY_HIVE RegistryHive,
ULONG CreateDisposition;
IO_STATUS_BLOCK IoSB;
HANDLE FileHandle;
PSECTION_OBJECT SectionObject;
PVOID SectionObject;
PUCHAR ViewBase;
ULONG ViewSize;
NTSTATUS Status;

View File

@ -304,13 +304,6 @@ KiIpiSendRequest(
ULONG IpiRequest
);
VOID
NTAPI
KeIpiGenericCall(
VOID (STDCALL *WorkerRoutine)(PVOID),
PVOID Argument
);
/* next file ***************************************************************/
VOID
@ -480,14 +473,6 @@ KiInsertTimer(
LARGE_INTEGER DueTime
);
BOOLEAN
__inline
FASTCALL
KiIsObjectSignaled(
PDISPATCHER_HEADER Object,
PKTHREAD Thread
);
VOID
FASTCALL
KiWaitTest(
@ -585,10 +570,6 @@ VOID
FASTCALL
KiWakeQueue(IN PKQUEUE Queue);
PLIST_ENTRY
STDCALL
KeRundownQueue(IN PKQUEUE Queue);
/* INITIALIZATION FUNCTIONS *************************************************/
VOID

View File

@ -205,7 +205,7 @@ typedef struct _SECTION_OBJECT
PMM_IMAGE_SECTION_OBJECT ImageSection;
PMM_SECTION_SEGMENT Segment;
};
} SECTION_OBJECT;
} SECTION_OBJECT, *PSECTION_OBJECT;
typedef struct _MEMORY_AREA
{
@ -776,7 +776,7 @@ MmGetPageOp(
PMM_SECTION_SEGMENT Segment,
ULONG Offset,
ULONG OpType,
BOOL First
BOOLEAN First
);
PMM_PAGEOP
@ -892,7 +892,7 @@ VOID
NTAPI
MmSetDirtyAllRmaps(PFN_TYPE Page);
BOOL
BOOLEAN
NTAPI
MmIsDirtyPageRmap(PFN_TYPE Page);
@ -1041,7 +1041,7 @@ NTAPI
MmDisableVirtualMapping(
PEPROCESS Process,
PVOID Address,
BOOL* WasDirty,
BOOLEAN* WasDirty,
PPFN_TYPE Page
);
@ -1203,8 +1203,8 @@ NTAPI
MmDeleteVirtualMapping(
PEPROCESS Process,
PVOID Address,
BOOL FreePage,
BOOL* WasDirty,
BOOLEAN FreePage,
BOOLEAN* WasDirty,
PPFN_TYPE Page
);
@ -1248,18 +1248,6 @@ MmTrimUserMemory(
PULONG NrFreedPages
);
/* cont.c ********************************************************************/
PVOID
STDCALL
MmAllocateContiguousMemorySpecifyCache(
IN SIZE_T NumberOfBytes,
IN PHYSICAL_ADDRESS LowestAcceptableAddress,
IN PHYSICAL_ADDRESS HighestAcceptableAddress,
IN PHYSICAL_ADDRESS BoundaryAddressMultiple OPTIONAL,
IN MEMORY_CACHING_TYPE CacheType OPTIONAL
);
/* region.c ************************************************************/
NTSTATUS
@ -1311,6 +1299,21 @@ MmQuerySectionView(
PULONG ResultLength
);
NTSTATUS
NTAPI
MmMapViewOfSection(
IN PVOID SectionObject,
IN PEPROCESS Process,
IN OUT PVOID *BaseAddress,
IN ULONG ZeroBits,
IN ULONG CommitSize,
IN OUT PLARGE_INTEGER SectionOffset OPTIONAL,
IN OUT PULONG ViewSize,
IN SECTION_INHERIT InheritDisposition,
IN ULONG AllocationType,
IN ULONG Protect
);
NTSTATUS
NTAPI
MmProtectSectionView(
@ -1335,19 +1338,6 @@ NTSTATUS
NTAPI
MmInitSectionImplementation(VOID);
NTSTATUS
STDCALL
MmCreateSection(
OUT PSECTION_OBJECT *SectionObject,
IN ACCESS_MASK DesiredAccess,
IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL,
IN PLARGE_INTEGER MaximumSize,
IN ULONG SectionPageProtection,
IN ULONG AllocationAttributes,
IN HANDLE FileHandle OPTIONAL,
IN PFILE_OBJECT File OPTIONAL
);
NTSTATUS
NTAPI
MmNotPresentFaultSectionView(
@ -1408,7 +1398,7 @@ FASTCALL
MiQueryVirtualMemory(
IN HANDLE ProcessHandle,
IN PVOID Address,
IN CINT VirtualMemoryInformationClass,
IN MEMORY_INFORMATION_CLASS VirtualMemoryInformationClass,
OUT PVOID VirtualMemoryInformation,
IN ULONG Length,
OUT PULONG ResultLength

View File

@ -1,7 +1,7 @@
#ifndef __NTOSKRNL_INCLUDE_INTERNAL_NLS_H
#define __NTOSKRNL_INCLUDE_INTERNAL_NLS_H
extern PSECTION_OBJECT NlsSectionObject;
extern PVOID NlsSectionObject;
extern ULONG NlsAnsiTableOffset;
extern ULONG NlsOemTableOffset;

View File

@ -29,7 +29,7 @@
NTSTATUS STDCALL
EiConnectPort(IN PEPORT* ConnectedPort,
IN PEPORT NamedPort,
IN PSECTION_OBJECT Section,
IN PVOID Section,
IN LARGE_INTEGER SectionOffset,
IN ULONG ViewSize,
OUT PVOID* ClientSendViewBase,
@ -252,7 +252,7 @@ NtConnectPort (PHANDLE UnsafeConnectedPortHandle,
ULONG MaximumMessageSize;
PVOID ConnectData = NULL;
ULONG ConnectDataLength = 0;
PSECTION_OBJECT SectionObject;
PVOID SectionObject;
LARGE_INTEGER SectionOffset;
PEPORT ConnectedPort;
KPROCESSOR_MODE PreviousMode;
@ -775,7 +775,7 @@ NtAcceptConnectPort (PHANDLE ServerPortHandle,
*/
if (WriteMap != NULL)
{
PSECTION_OBJECT SectionObject;
PVOID SectionObject;
LARGE_INTEGER SectionOffset;
Status = ObReferenceObjectByHandle(WriteMap->SectionHandle,

View File

@ -137,7 +137,7 @@ MmPageOutVirtualMemory(PMADDRESS_SPACE AddressSpace,
PMM_PAGEOP PageOp)
{
PFN_TYPE Page;
BOOL WasDirty;
BOOLEAN WasDirty;
SWAPENTRY SwapEntry;
NTSTATUS Status;

View File

@ -796,7 +796,7 @@ MmGetPfnForProcess(PEPROCESS Process,
VOID
NTAPI
MmDisableVirtualMapping(PEPROCESS Process, PVOID Address, BOOL* WasDirty, PPFN_TYPE Page)
MmDisableVirtualMapping(PEPROCESS Process, PVOID Address, BOOLEAN* WasDirty, PPFN_TYPE Page)
/*
* FUNCTION: Delete a virtual mapping
*/
@ -916,8 +916,8 @@ MmRawDeleteVirtualMapping(PVOID Address)
VOID
NTAPI
MmDeleteVirtualMapping(PEPROCESS Process, PVOID Address, BOOL FreePage,
BOOL* WasDirty, PPFN_TYPE Page)
MmDeleteVirtualMapping(PEPROCESS Process, PVOID Address, BOOLEAN FreePage,
BOOLEAN* WasDirty, PPFN_TYPE Page)
/*
* FUNCTION: Delete a virtual mapping
*/

View File

@ -767,7 +767,7 @@ MmFreeMemoryArea(
}
else
{
BOOL Dirty = FALSE;
BOOLEAN Dirty = FALSE;
SWAPENTRY SwapEntry = 0;
PFN_TYPE Page = 0;

View File

@ -136,7 +136,7 @@ MmCheckForPageOp(PMEMORY_AREA MArea, HANDLE Pid, PVOID Address,
PMM_PAGEOP
NTAPI
MmGetPageOp(PMEMORY_AREA MArea, HANDLE Pid, PVOID Address,
PMM_SECTION_SEGMENT Segment, ULONG Offset, ULONG OpType, BOOL First)
PMM_SECTION_SEGMENT Segment, ULONG Offset, ULONG OpType, BOOLEAN First)
/*
* FUNCTION: Get a page operation descriptor corresponding to
* the memory area and either the segment, offset pair or the

View File

@ -353,7 +353,7 @@ MmSetDirtyAllRmaps(PFN_TYPE Page)
ExReleaseFastMutex(&RmapListLock);
}
BOOL
BOOLEAN
NTAPI
MmIsDirtyPageRmap(PFN_TYPE Page)
{

View File

@ -1333,7 +1333,7 @@ VOID
MmPageOutDeleteMapping(PVOID Context, PEPROCESS Process, PVOID Address)
{
MM_SECTION_PAGEOUT_CONTEXT* PageOutContext;
BOOL WasDirty;
BOOLEAN WasDirty;
PFN_TYPE Page;
PageOutContext = (MM_SECTION_PAGEOUT_CONTEXT*)Context;
@ -2151,7 +2151,7 @@ MmCreatePhysicalMemorySection(VOID)
OBJ_PERMANENT,
NULL,
NULL);
Status = MmCreateSection(&PhysSection,
Status = MmCreateSection((PVOID)&PhysSection,
SECTION_ALL_ACCESS,
&Obj,
&SectionSize,
@ -3363,7 +3363,7 @@ NtCreateSection (OUT PHANDLE SectionHandle,
IN HANDLE FileHandle OPTIONAL)
{
LARGE_INTEGER SafeMaximumSize;
PSECTION_OBJECT SectionObject;
PVOID SectionObject;
KPROCESSOR_MODE PreviousMode;
NTSTATUS Status = STATUS_SUCCESS;
@ -4814,7 +4814,7 @@ MmSetBankedSection (DWORD Unknown0,
* @implemented
*/
NTSTATUS STDCALL
MmCreateSection (OUT PSECTION_OBJECT * SectionObject,
MmCreateSection (OUT PVOID * Section,
IN ACCESS_MASK DesiredAccess,
IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL,
IN PLARGE_INTEGER MaximumSize,
@ -4824,6 +4824,7 @@ MmCreateSection (OUT PSECTION_OBJECT * SectionObject,
IN PFILE_OBJECT File OPTIONAL)
{
ULONG Protection;
PSECTION_OBJECT *SectionObject = (PSECTION_OBJECT *)Section;
/*
* Check the protection

View File

@ -113,7 +113,7 @@ NtLockVirtualMemory(HANDLE ProcessHandle,
NTSTATUS FASTCALL
MiQueryVirtualMemory (IN HANDLE ProcessHandle,
IN PVOID Address,
IN CINT VirtualMemoryInformationClass,
IN MEMORY_INFORMATION_CLASS VirtualMemoryInformationClass,
OUT PVOID VirtualMemoryInformation,
IN ULONG Length,
OUT PULONG ResultLength)

View File

@ -33,7 +33,7 @@ static ULONG NlsOemCodePageTableSize = 0;
static PUSHORT NlsUnicodeCasemapTable = NULL;
static ULONG NlsUnicodeCasemapTableSize = 0;
PSECTION_OBJECT NlsSectionObject = NULL;
PVOID NlsSectionObject = NULL;
static PVOID NlsSectionBase = NULL;
static ULONG NlsSectionViewSize = 0;

View File

@ -530,7 +530,6 @@ typedef struct _KPROCESS *PKPROCESS;
typedef struct _KQUEUE *PKQUEUE;
typedef struct _KTRAP_FRAME *PKTRAP_FRAME;
typedef struct _OBJECT_DIRECTORY *POBJECT_DIRECTORY;
typedef struct _SECTION_OBJECT *PSECTION_OBJECT;
typedef struct _SHARED_CACHE_MAP *PSHARED_CACHE_MAP;
typedef struct _VACB *PVACB;
typedef struct _VAD_HEADER *PVAD_HEADER;
@ -3423,21 +3422,6 @@ MmIsRecursiveIoFault (
#endif
NTKERNELAPI
NTSTATUS
NTAPI
MmMapViewOfSection (
IN PVOID SectionObject,
IN PEPROCESS Process,
IN OUT PVOID *BaseAddress,
IN ULONG ZeroBits,
IN ULONG CommitSize,
IN OUT PLARGE_INTEGER SectionOffset OPTIONAL,
IN OUT PULONG ViewSize,
IN SECTION_INHERIT InheritDisposition,
IN ULONG AllocationType,
IN ULONG Protect
);
NTKERNELAPI
BOOLEAN

View File

@ -127,7 +127,6 @@ struct _FILE_OBJECT;
struct _DMA_ADAPTER;
struct _DEVICE_OBJECT;
struct _DRIVER_OBJECT;
struct _SECTION_OBJECT;
struct _IO_STATUS_BLOCK;
struct _DEVICE_DESCRIPTION;
struct _SCATTER_GATHER_LIST;
@ -141,7 +140,6 @@ typedef PVOID PSID;
DECLARE_INTERNAL_OBJECT(ADAPTER_OBJECT)
DECLARE_INTERNAL_OBJECT(DMA_ADAPTER)
DECLARE_INTERNAL_OBJECT(IO_STATUS_BLOCK)
DECLARE_INTERNAL_OBJECT(SECTION_OBJECT)
#if 1
/* FIXME: Unknown definitions */
@ -6789,6 +6787,22 @@ HalExamineMBR(
IN ULONG MBRTypeIdentifier,
OUT PVOID *Buffer);
VOID
NTAPI
HalPutDmaAdapter(
PADAPTER_OBJECT AdapterObject
);
NTSTATUS
NTAPI
IoAllocateAdapterChannel(
IN PADAPTER_OBJECT AdapterObject,
IN PDEVICE_OBJECT DeviceObject,
IN ULONG NumberOfMapRegisters,
IN PDRIVER_CONTROL ExecutionRoutine,
IN PVOID Context
);
NTHALAPI
VOID
DDKAPI
@ -8833,7 +8847,7 @@ NTOSAPI
NTSTATUS
DDKAPI
MmCreateSection(
OUT PSECTION_OBJECT *SectionObject,
OUT PVOID *SectionObject,
IN ACCESS_MASK DesiredAccess,
IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL,
IN PLARGE_INTEGER MaximumSize,

View File

@ -14,6 +14,10 @@
#define NTAPI_INLINE
#endif
#ifndef DECLSPEC_NOINLINE
#define DECLSPEC_NOINLINE __declspec(noinline)
#endif
#define OBJ_INHERIT 0x00000002
#define OBJ_PERMANENT 0x00000010
#define OBJ_EXCLUSIVE 0x00000020

View File

@ -2428,6 +2428,8 @@ typedef struct _TAPE_CREATE_PARTITION {
DWORD Count;
DWORD Size;
} TAPE_CREATE_PARTITION,*PTAPE_CREATE_PARTITION;
/* Sigh..when will they learn... */
#ifndef __NTDDK_H
typedef struct _MEMORY_BASIC_INFORMATION {
PVOID BaseAddress;
PVOID AllocationBase;
@ -2437,6 +2439,7 @@ typedef struct _MEMORY_BASIC_INFORMATION {
DWORD Protect;
DWORD Type;
} MEMORY_BASIC_INFORMATION,*PMEMORY_BASIC_INFORMATION;
#endif
typedef struct _MESSAGE_RESOURCE_ENTRY {
WORD Length;
WORD Flags;