[REACTOS] Addendum to 5c7ce4475e - Fix MSVC 2015 build

Put data into PAGEDATA or INITDATA sections
Keep section declaration for prototypes

CORE-17540
This commit is contained in:
Jérôme Gardou 2021-05-11 17:13:14 +02:00 committed by Jérôme Gardou
parent 03e824641e
commit 3adf450867
82 changed files with 1720 additions and 1789 deletions

View file

@ -26,16 +26,6 @@ static NTSTATUS NTAPI PciPowerControl(IN PDEVICE_OBJECT DeviceObject, IN PIRP Ir
static DRIVER_DISPATCH PciPnpControl; static DRIVER_DISPATCH PciPnpControl;
static NTSTATUS NTAPI PciPnpControl(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp); static NTSTATUS NTAPI PciPnpControl(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp);
#ifdef ALLOC_PRAGMA
// Make the initialization routines discardable, so that they
// don't waste space
#pragma alloc_text(INIT, DriverEntry)
#endif /* ALLOC_PRAGMA */
/*** PUBLIC ******************************************************************/ /*** PUBLIC ******************************************************************/
PPCI_DRIVER_EXTENSION DriverExtension = NULL; PPCI_DRIVER_EXTENSION DriverExtension = NULL;
@ -204,6 +194,7 @@ PciUnload(
UNREFERENCED_PARAMETER(DriverObject); UNREFERENCED_PARAMETER(DriverObject);
} }
CODE_SEG("INIT")
NTSTATUS NTSTATUS
NTAPI NTAPI
DriverEntry( DriverEntry(

View file

@ -173,6 +173,8 @@ PdoPowerControl(
PDEVICE_OBJECT DeviceObject, PDEVICE_OBJECT DeviceObject,
PIRP Irp); PIRP Irp);
CODE_SEG("INIT")
NTSTATUS NTSTATUS
NTAPI NTAPI
DriverEntry( DriverEntry(

View file

@ -12,10 +12,6 @@
#define NDEBUG #define NDEBUG
#include <debug.h> #include <debug.h>
#if defined(ALLOC_PRAGMA)
#pragma alloc_text(INIT, VfatInitFastIoRoutines)
#endif
static FAST_IO_CHECK_IF_POSSIBLE VfatFastIoCheckIfPossible; static FAST_IO_CHECK_IF_POSSIBLE VfatFastIoCheckIfPossible;
static static

View file

@ -824,6 +824,7 @@ VfatSetExtendedAttributes(
/* fastio.c */ /* fastio.c */
CODE_SEG("INIT")
VOID VOID
VfatInitFastIoRoutines( VfatInitFastIoRoutines(
PFAST_IO_DISPATCH FastIoDispatch); PFAST_IO_DISPATCH FastIoDispatch);
@ -1128,6 +1129,7 @@ VfatFileSystemControl(
/* iface.c */ /* iface.c */
CODE_SEG("INIT")
NTSTATUS NTSTATUS
NTAPI NTAPI
DriverEntry( DriverEntry(

View file

@ -31,10 +31,6 @@
#define NDEBUG #define NDEBUG
#include <debug.h> #include <debug.h>
#if defined(ALLOC_PRAGMA)
#pragma alloc_text(INIT, DfsDriverEntry)
#endif
/* FUNCTIONS ****************************************************************/ /* FUNCTIONS ****************************************************************/
NTSTATUS NTSTATUS

View file

@ -51,6 +51,7 @@ DfsUnload(
PDRIVER_OBJECT DriverObject PDRIVER_OBJECT DriverObject
); );
CODE_SEG("INIT")
NTSTATUS NTSTATUS
DfsDriverEntry( DfsDriverEntry(
PDRIVER_OBJECT DriverObject, PDRIVER_OBJECT DriverObject,

View file

@ -32,32 +32,6 @@
#define NDEBUG #define NDEBUG
#include <debug.h> #include <debug.h>
CODE_SEG("INIT")
NTSTATUS
NTAPI
DriverEntry(
PDRIVER_OBJECT DriverObject,
PUNICODE_STRING RegistryPath
);
CODE_SEG("INIT")
VOID
MupInitializeData(
VOID
);
CODE_SEG("INIT")
VOID
MupInitializeVcb(
PMUP_VCB Vcb
);
#if defined(ALLOC_PRAGMA)
#pragma alloc_text(INIT, DriverEntry)
#pragma alloc_text(INIT, MupInitializeData)
#pragma alloc_text(INIT, MupInitializeVcb)
#endif
ERESOURCE MupGlobalLock; ERESOURCE MupGlobalLock;
ERESOURCE MupPrefixTableLock; ERESOURCE MupPrefixTableLock;
ERESOURCE MupCcbListLock; ERESOURCE MupCcbListLock;

View file

@ -21,7 +21,7 @@
* FILE: drivers/filesystem/ntfs/ntfs.c * FILE: drivers/filesystem/ntfs/ntfs.c
* PURPOSE: NTFS filesystem driver * PURPOSE: NTFS filesystem driver
* PROGRAMMER: Eric Kohl * PROGRAMMER: Eric Kohl
* Pierre Schweitzer * Pierre Schweitzer
*/ */
/* INCLUDES *****************************************************************/ /* INCLUDES *****************************************************************/
@ -31,11 +31,6 @@
#define NDEBUG #define NDEBUG
#include <debug.h> #include <debug.h>
#if defined(ALLOC_PRAGMA)
#pragma alloc_text(INIT, DriverEntry)
#pragma alloc_text(INIT, NtfsInitializeFunctionPointers)
#endif
/* GLOBALS *****************************************************************/ /* GLOBALS *****************************************************************/
PNTFS_GLOBAL_DATA NtfsGlobalData = NULL; PNTFS_GLOBAL_DATA NtfsGlobalData = NULL;
@ -129,10 +124,10 @@ DriverEntry(PDRIVER_OBJECT DriverObject,
NtfsInitializeFunctionPointers(DriverObject); NtfsInitializeFunctionPointers(DriverObject);
/* Initialize CC functions array */ /* Initialize CC functions array */
NtfsGlobalData->CacheMgrCallbacks.AcquireForLazyWrite = NtfsAcqLazyWrite; NtfsGlobalData->CacheMgrCallbacks.AcquireForLazyWrite = NtfsAcqLazyWrite;
NtfsGlobalData->CacheMgrCallbacks.ReleaseFromLazyWrite = NtfsRelLazyWrite; NtfsGlobalData->CacheMgrCallbacks.ReleaseFromLazyWrite = NtfsRelLazyWrite;
NtfsGlobalData->CacheMgrCallbacks.AcquireForReadAhead = NtfsAcqReadAhead; NtfsGlobalData->CacheMgrCallbacks.AcquireForReadAhead = NtfsAcqReadAhead;
NtfsGlobalData->CacheMgrCallbacks.ReleaseFromReadAhead = NtfsRelReadAhead; NtfsGlobalData->CacheMgrCallbacks.ReleaseFromReadAhead = NtfsRelReadAhead;
NtfsGlobalData->FastIoDispatch.SizeOfFastIoDispatch = sizeof(FAST_IO_DISPATCH); NtfsGlobalData->FastIoDispatch.SizeOfFastIoDispatch = sizeof(FAST_IO_DISPATCH);
NtfsGlobalData->FastIoDispatch.FastIoCheckIfPossible = NtfsFastIoCheckIfPossible; NtfsGlobalData->FastIoDispatch.FastIoCheckIfPossible = NtfsFastIoCheckIfPossible;
@ -164,7 +159,7 @@ DriverEntry(PDRIVER_OBJECT DriverObject,
/* /*
* FUNCTION: Called within the driver entry to initialize the IRP functions array * FUNCTION: Called within the driver entry to initialize the IRP functions array
* ARGUMENTS: * ARGUMENTS:
* DriverObject = object describing this driver * DriverObject = object describing this driver
* RETURNS: Nothing * RETURNS: Nothing

View file

@ -1276,8 +1276,10 @@ NtfsSetVolumeInformation(PNTFS_IRP_CONTEXT IrpContext);
/* ntfs.c */ /* ntfs.c */
CODE_SEG("INIT")
DRIVER_INITIALIZE DriverEntry; DRIVER_INITIALIZE DriverEntry;
CODE_SEG("INIT")
VOID VOID
NTAPI NTAPI
NtfsInitializeFunctionPointers(PDRIVER_OBJECT DriverObject); NtfsInitializeFunctionPointers(PDRIVER_OBJECT DriverObject);

File diff suppressed because it is too large Load diff

View file

@ -7,6 +7,8 @@
#include <fltkernel.h> #include <fltkernel.h>
#include <pseh/pseh2.h> #include <pseh/pseh2.h>
#include <section_attribs.h>
#define DRIVER_NAME L"FltMgr" #define DRIVER_NAME L"FltMgr"
#define FLT_MAJOR_VERSION 0x0200 #define FLT_MAJOR_VERSION 0x0200

View file

@ -16,10 +16,6 @@
/* GLOBALS ********************************************************************/ /* GLOBALS ********************************************************************/
#ifdef ALLOC_PRAGMA
#pragma alloc_text(PAGE, InPortInitializeMouse)
#endif
#define READ_MOUSE(DeviceExtension, Port) \ #define READ_MOUSE(DeviceExtension, Port) \
READ_PORT_UCHAR((DeviceExtension)->IoBase + (Port)) READ_PORT_UCHAR((DeviceExtension)->IoBase + (Port))
@ -338,6 +334,7 @@ InPortIsr(
} }
} }
CODE_SEG("PAGE")
VOID VOID
NTAPI NTAPI
InPortInitializeMouse( InPortInitializeMouse(

View file

@ -14,17 +14,11 @@
/* GLOBALS ********************************************************************/ /* GLOBALS ********************************************************************/
#ifdef ALLOC_PRAGMA
#pragma alloc_text(INIT, DriverEntry)
#pragma alloc_text(PAGE, InPortCreateClose)
#pragma alloc_text(PAGE, InPortAddDevice)
#pragma alloc_text(PAGE, InPortUnload)
#endif
UNICODE_STRING DriverRegistryPath; UNICODE_STRING DriverRegistryPath;
/* FUNCTIONS ******************************************************************/ /* FUNCTIONS ******************************************************************/
CODE_SEG("PAGE")
NTSTATUS NTSTATUS
NTAPI NTAPI
InPortCreateClose( InPortCreateClose(
@ -43,6 +37,7 @@ InPortCreateClose(
return STATUS_SUCCESS; return STATUS_SUCCESS;
} }
CODE_SEG("PAGE")
NTSTATUS NTSTATUS
NTAPI NTAPI
InPortAddDevice( InPortAddDevice(
@ -161,6 +156,7 @@ Failure:
return Status; return Status;
} }
CODE_SEG("PAGE")
VOID VOID
NTAPI NTAPI
InPortUnload( InPortUnload(
@ -204,6 +200,7 @@ InPortPower(
return Status; return Status;
} }
CODE_SEG("INIT")
NTSTATUS NTSTATUS
NTAPI NTAPI
DriverEntry( DriverEntry(

View file

@ -13,6 +13,8 @@
#include <wmistr.h> #include <wmistr.h>
#include <kbdmou.h> #include <kbdmou.h>
#include <section_attribs.h>
#define INPORT_TAG 'tPnI' #define INPORT_TAG 'tPnI'
typedef enum typedef enum
@ -74,14 +76,18 @@ typedef struct _INPORT_DEVICE_EXTENSION
MOUSE_ATTRIBUTES MouseAttributes; MOUSE_ATTRIBUTES MouseAttributes;
} INPORT_DEVICE_EXTENSION, *PINPORT_DEVICE_EXTENSION; } INPORT_DEVICE_EXTENSION, *PINPORT_DEVICE_EXTENSION;
CODE_SEG("INIT")
DRIVER_INITIALIZE DriverEntry; DRIVER_INITIALIZE DriverEntry;
CODE_SEG("PAGE")
DRIVER_UNLOAD InPortUnload; DRIVER_UNLOAD InPortUnload;
CODE_SEG("PAGE")
DRIVER_ADD_DEVICE InPortAddDevice; DRIVER_ADD_DEVICE InPortAddDevice;
_Dispatch_type_(IRP_MJ_CREATE) _Dispatch_type_(IRP_MJ_CREATE)
_Dispatch_type_(IRP_MJ_CLOSE) _Dispatch_type_(IRP_MJ_CLOSE)
CODE_SEG("PAGE")
DRIVER_DISPATCH_PAGED InPortCreateClose; DRIVER_DISPATCH_PAGED InPortCreateClose;
_Dispatch_type_(IRP_MJ_INTERNAL_DEVICE_CONTROL) _Dispatch_type_(IRP_MJ_INTERNAL_DEVICE_CONTROL)
@ -91,9 +97,11 @@ _Dispatch_type_(IRP_MJ_POWER)
DRIVER_DISPATCH_RAISED InPortPower; DRIVER_DISPATCH_RAISED InPortPower;
_Dispatch_type_(IRP_MJ_SYSTEM_CONTROL) _Dispatch_type_(IRP_MJ_SYSTEM_CONTROL)
CODE_SEG("PAGE")
DRIVER_DISPATCH_PAGED InPortWmi; DRIVER_DISPATCH_PAGED InPortWmi;
_Dispatch_type_(IRP_MJ_PNP) _Dispatch_type_(IRP_MJ_PNP)
CODE_SEG("PAGE")
DRIVER_DISPATCH_PAGED InPortPnp; DRIVER_DISPATCH_PAGED InPortPnp;
KSERVICE_ROUTINE InPortIsr; KSERVICE_ROUTINE InPortIsr;
@ -104,33 +112,39 @@ KSYNCHRONIZE_ROUTINE InPortStartMouse;
KSYNCHRONIZE_ROUTINE InPortStopMouse; KSYNCHRONIZE_ROUTINE InPortStopMouse;
CODE_SEG("PAGE")
NTSTATUS NTSTATUS
NTAPI NTAPI
InPortStartDevice( InPortStartDevice(
_In_ PDEVICE_OBJECT DeviceObject, _In_ PDEVICE_OBJECT DeviceObject,
_Inout_ PIRP Irp); _Inout_ PIRP Irp);
CODE_SEG("PAGE")
NTSTATUS NTSTATUS
NTAPI NTAPI
InPortRemoveDevice( InPortRemoveDevice(
_In_ PDEVICE_OBJECT DeviceObject, _In_ PDEVICE_OBJECT DeviceObject,
_Inout_ PIRP Irp); _Inout_ PIRP Irp);
CODE_SEG("PAGE")
VOID VOID
NTAPI NTAPI
InPortInitializeMouse( InPortInitializeMouse(
_In_ PINPORT_DEVICE_EXTENSION DeviceExtension); _In_ PINPORT_DEVICE_EXTENSION DeviceExtension);
CODE_SEG("PAGE")
NTSTATUS NTSTATUS
NTAPI NTAPI
InPortWmiRegistration( InPortWmiRegistration(
_Inout_ PINPORT_DEVICE_EXTENSION DeviceExtension); _Inout_ PINPORT_DEVICE_EXTENSION DeviceExtension);
CODE_SEG("PAGE")
NTSTATUS NTSTATUS
NTAPI NTAPI
InPortWmiDeRegistration( InPortWmiDeRegistration(
_Inout_ PINPORT_DEVICE_EXTENSION DeviceExtension); _Inout_ PINPORT_DEVICE_EXTENSION DeviceExtension);
CODE_SEG("PAGE")
NTSTATUS NTSTATUS
NTAPI NTAPI
InPortQueryWmiRegInfo( InPortQueryWmiRegInfo(
@ -141,6 +155,7 @@ InPortQueryWmiRegInfo(
_Inout_ PUNICODE_STRING MofResourceName, _Inout_ PUNICODE_STRING MofResourceName,
_Out_opt_ PDEVICE_OBJECT *Pdo); _Out_opt_ PDEVICE_OBJECT *Pdo);
CODE_SEG("PAGE")
NTSTATUS NTSTATUS
NTAPI NTAPI
InPortQueryWmiDataBlock( InPortQueryWmiDataBlock(

View file

@ -12,16 +12,9 @@
#define NDEBUG #define NDEBUG
#include <debug.h> #include <debug.h>
/* GLOBALS ********************************************************************/
#ifdef ALLOC_PRAGMA
#pragma alloc_text(PAGE, InPortPnp)
#pragma alloc_text(PAGE, InPortStartDevice)
#pragma alloc_text(PAGE, InPortRemoveDevice)
#endif
/* FUNCTIONS ******************************************************************/ /* FUNCTIONS ******************************************************************/
CODE_SEG("PAGE")
NTSTATUS NTSTATUS
NTAPI NTAPI
InPortStartDevice( InPortStartDevice(
@ -178,6 +171,7 @@ Complete:
return Status; return Status;
} }
CODE_SEG("PAGE")
NTSTATUS NTSTATUS
NTAPI NTAPI
InPortRemoveDevice( InPortRemoveDevice(
@ -221,6 +215,7 @@ InPortRemoveDevice(
return Status; return Status;
} }
CODE_SEG("PAGE")
NTSTATUS NTSTATUS
NTAPI NTAPI
InPortPnp( InPortPnp(

View file

@ -14,14 +14,6 @@
/* GLOBALS ********************************************************************/ /* GLOBALS ********************************************************************/
#ifdef ALLOC_PRAGMA
#pragma alloc_text(PAGE, InPortWmi)
#pragma alloc_text(PAGE, InPortWmiRegistration)
#pragma alloc_text(PAGE, InPortWmiDeRegistration)
#pragma alloc_text(PAGE, InPortQueryWmiRegInfo)
#pragma alloc_text(PAGE, InPortQueryWmiDataBlock)
#endif
GUID GuidWmiPortData = POINTER_PORT_WMI_STD_DATA_GUID; GUID GuidWmiPortData = POINTER_PORT_WMI_STD_DATA_GUID;
WMIGUIDREGINFO InPortWmiGuidList[] = WMIGUIDREGINFO InPortWmiGuidList[] =
@ -30,7 +22,7 @@ WMIGUIDREGINFO InPortWmiGuidList[] =
}; };
/* FUNCTIONS ******************************************************************/ /* FUNCTIONS ******************************************************************/
CODE_SEG("PAGE")
NTSTATUS NTSTATUS
NTAPI NTAPI
InPortQueryWmiRegInfo( InPortQueryWmiRegInfo(
@ -57,6 +49,7 @@ InPortQueryWmiRegInfo(
return STATUS_SUCCESS; return STATUS_SUCCESS;
} }
CODE_SEG("PAGE")
NTSTATUS NTSTATUS
NTAPI NTAPI
InPortQueryWmiDataBlock( InPortQueryWmiDataBlock(
@ -119,6 +112,7 @@ Complete:
IO_NO_INCREMENT); IO_NO_INCREMENT);
} }
CODE_SEG("PAGE")
NTSTATUS NTSTATUS
NTAPI NTAPI
InPortWmiRegistration( InPortWmiRegistration(
@ -140,6 +134,7 @@ InPortWmiRegistration(
WMIREG_ACTION_REGISTER); WMIREG_ACTION_REGISTER);
} }
CODE_SEG("PAGE")
NTSTATUS NTSTATUS
NTAPI NTAPI
InPortWmiDeRegistration( InPortWmiDeRegistration(
@ -151,6 +146,7 @@ InPortWmiDeRegistration(
WMIREG_ACTION_DEREGISTER); WMIREG_ACTION_DEREGISTER);
} }
CODE_SEG("PAGE")
NTSTATUS NTSTATUS
NTAPI NTAPI
InPortWmi( InPortWmi(

View file

@ -22,9 +22,11 @@ Revision History:
#include "disk.h" #include "disk.h"
#ifndef __REACTOS__
#ifdef ALLOC_DATA_PRAGMA #ifdef ALLOC_DATA_PRAGMA
#pragma data_seg("PAGE") #pragma data_seg("PAGE")
#endif #endif
#endif
/* /*
#define HackDisableTaggedQueuing (0x01) #define HackDisableTaggedQueuing (0x01)
@ -34,7 +36,9 @@ Revision History:
#define HackCauseNotReportableHack (0x10) #define HackCauseNotReportableHack (0x10)
#define HackRequiresStartUnitCommand (0x20) #define HackRequiresStartUnitCommand (0x20)
*/ */
#ifdef __REACTOS__
DATA_SEG("PAGEDATA")
#endif
CLASSPNP_SCAN_FOR_SPECIAL_INFO DiskBadControllers[] = { CLASSPNP_SCAN_FOR_SPECIAL_INFO DiskBadControllers[] = {
{ "COMPAQ" , "PD-1" , NULL, 0x02 }, { "COMPAQ" , "PD-1" , NULL, 0x02 },
{ "CONNER" , "CP3500" , NULL, 0x02 }, { "CONNER" , "CP3500" , NULL, 0x02 },
@ -64,11 +68,17 @@ CLASSPNP_SCAN_FOR_SPECIAL_INFO DiskBadControllers[] = {
// Added MediaTypes in their own brace nesting level // Added MediaTypes in their own brace nesting level
// ======== ROS DIFF ======== // ======== ROS DIFF ========
#ifdef __REACTOS__
DATA_SEG("PAGECONS")
#endif
DISK_MEDIA_TYPES_LIST const DiskMediaTypesExclude[] = { DISK_MEDIA_TYPES_LIST const DiskMediaTypesExclude[] = {
{ "HP" , "RDX" , NULL, 0, 0, {0 , 0 , 0 , 0 }}, { "HP" , "RDX" , NULL, 0, 0, {0 , 0 , 0 , 0 }},
{ NULL , NULL , NULL, 0, 0, {0 , 0 , 0 , 0 }} { NULL , NULL , NULL, 0, 0, {0 , 0 , 0 , 0 }}
}; };
#ifdef __REACTOS__
DATA_SEG("PAGECONS")
#endif
DISK_MEDIA_TYPES_LIST const DiskMediaTypes[] = { DISK_MEDIA_TYPES_LIST const DiskMediaTypes[] = {
{ "COMPAQ" , "PD-1 LF-1094" , NULL, 1, 1, {PC_5_RW , 0 , 0 , 0 }}, { "COMPAQ" , "PD-1 LF-1094" , NULL, 1, 1, {PC_5_RW , 0 , 0 , 0 }},
{ "HP" , NULL , NULL, 2, 2, {MO_5_WO , MO_5_RW, 0 , 0 }}, { "HP" , NULL , NULL, 2, 2, {MO_5_WO , MO_5_RW, 0 , 0 }},
@ -83,6 +93,8 @@ DISK_MEDIA_TYPES_LIST const DiskMediaTypes[] = {
{ NULL , NULL , NULL, 0, 0, {0 , 0 , 0 , 0 }} { NULL , NULL , NULL, 0, 0, {0 , 0 , 0 , 0 }}
}; };
#ifndef __REACTOS__
#ifdef ALLOC_DATA_PRAGMA #ifdef ALLOC_DATA_PRAGMA
#pragma data_seg() #pragma data_seg()
#endif #endif
#endif

View file

@ -469,6 +469,10 @@ extern CLASSPNP_SCAN_FOR_SPECIAL_INFO DiskBadControllers[];
extern const DISK_MEDIA_TYPES_LIST DiskMediaTypes[]; extern const DISK_MEDIA_TYPES_LIST DiskMediaTypes[];
extern const DISK_MEDIA_TYPES_LIST DiskMediaTypesExclude[]; extern const DISK_MEDIA_TYPES_LIST DiskMediaTypesExclude[];
#if defined(__REACTOS__) && defined(_MSC_VER)
# pragma section("PAGECONS", read)
# pragma section("PAGEDATA", read,write)
#endif
// //
// Macros // Macros
// //
@ -477,7 +481,7 @@ extern const DISK_MEDIA_TYPES_LIST DiskMediaTypesExclude[];
// Routine prototypes. // Routine prototypes.
// //
DRIVER_INITIALIZE DriverEntry; DRIVER_INITIALIZE DriverEntry;
VOID VOID

View file

@ -176,6 +176,7 @@ extern UNICODE_STRING Volume;
extern KEVENT UnloadEvent; extern KEVENT UnloadEvent;
extern LONG Unloading; extern LONG Unloading;
CODE_SEG("INIT")
DRIVER_INITIALIZE DriverEntry; DRIVER_INITIALIZE DriverEntry;
VOID VOID
@ -228,6 +229,7 @@ HasDriveLetter(
IN PDEVICE_INFORMATION DeviceInformation IN PDEVICE_INFORMATION DeviceInformation
); );
CODE_SEG("INIT")
BOOLEAN BOOLEAN
MountmgrReadNoAutoMount( MountmgrReadNoAutoMount(
IN PUNICODE_STRING RegistryPath IN PUNICODE_STRING RegistryPath

View file

@ -29,11 +29,6 @@
#define NDEBUG #define NDEBUG
#include <debug.h> #include <debug.h>
#if defined(ALLOC_PRAGMA)
#pragma alloc_text(INIT, MountmgrReadNoAutoMount)
#pragma alloc_text(INIT, DriverEntry)
#endif
/* FIXME */ /* FIXME */
GUID MountedDevicesGuid = {0x53F5630D, 0xB6BF, 0x11D0, {0x94, 0xF2, 0x00, 0xA0, 0xC9, 0x1E, 0xFB, 0x8B}}; GUID MountedDevicesGuid = {0x53F5630D, 0xB6BF, 0x11D0, {0x94, 0xF2, 0x00, 0xA0, 0xC9, 0x1E, 0xFB, 0x8B}};

View file

@ -100,6 +100,7 @@ typedef struct _PARTITION_EXTENSION
UNICODE_STRING DeviceName; UNICODE_STRING DeviceName;
} PARTITION_EXTENSION, *PPARTITION_EXTENSION; } PARTITION_EXTENSION, *PPARTITION_EXTENSION;
CODE_SEG("PAGE")
NTSTATUS NTSTATUS
PartitionCreateDevice( PartitionCreateDevice(
_In_ PDEVICE_OBJECT FDObject, _In_ PDEVICE_OBJECT FDObject,
@ -108,11 +109,13 @@ PartitionCreateDevice(
_In_ PARTITION_STYLE PartitionStyle, _In_ PARTITION_STYLE PartitionStyle,
_Out_ PDEVICE_OBJECT *PDO); _Out_ PDEVICE_OBJECT *PDO);
CODE_SEG("PAGE")
NTSTATUS NTSTATUS
PartitionHandleRemove( PartitionHandleRemove(
_In_ PPARTITION_EXTENSION PartExt, _In_ PPARTITION_EXTENSION PartExt,
_In_ BOOLEAN FinalRemove); _In_ BOOLEAN FinalRemove);
CODE_SEG("PAGE")
NTSTATUS NTSTATUS
PartitionHandlePnp( PartitionHandlePnp(
_In_ PDEVICE_OBJECT DeviceObject, _In_ PDEVICE_OBJECT DeviceObject,

View file

@ -282,6 +282,7 @@ extern PCI_CONFIG_HANDLER PCIConfigHandler;
extern PCI_CONFIG_HANDLER PCIConfigHandlerType1; extern PCI_CONFIG_HANDLER PCIConfigHandlerType1;
extern PCI_CONFIG_HANDLER PCIConfigHandlerType2; extern PCI_CONFIG_HANDLER PCIConfigHandlerType2;
CODE_SEG("INIT")
PPCI_REGISTRY_INFO_INTERNAL PPCI_REGISTRY_INFO_INTERNAL
NTAPI NTAPI
HalpQueryPciRegistryInfo( HalpQueryPciRegistryInfo(
@ -425,12 +426,14 @@ HalpSetCmosData(
IN ULONG Length IN ULONG Length
); );
CODE_SEG("INIT")
VOID VOID
NTAPI NTAPI
HalpInitializePciBus( HalpInitializePciBus(
VOID VOID
); );
CODE_SEG("INIT")
VOID VOID
NTAPI NTAPI
HalpInitializePciStubs( HalpInitializePciStubs(
@ -470,6 +473,7 @@ HalpFindBusAddressTranslation(
IN BOOLEAN NextBus IN BOOLEAN NextBus
); );
CODE_SEG("INIT")
VOID VOID
NTAPI NTAPI
HalpRegisterPciDebuggingDeviceInfo( HalpRegisterPciDebuggingDeviceInfo(

View file

@ -39,6 +39,7 @@
/* For MSVC, this is required before using DATA_SEG (used in pcidata) */ /* For MSVC, this is required before using DATA_SEG (used in pcidata) */
#ifdef _MSC_VER #ifdef _MSC_VER
# pragma section("INIT", read,execute,discard) # pragma section("INIT", read,execute,discard)
# pragma section("INITDATA", read,discard)
#endif #endif
/* Internal shared PCI and ACPI header */ /* Internal shared PCI and ACPI header */

View file

@ -24,6 +24,7 @@ HalpAcpiGetTable(
IN ULONG Signature IN ULONG Signature
); );
CODE_SEG("INIT")
NTSTATUS NTSTATUS
NTAPI NTAPI
HalpSetupAcpiPhase0( HalpSetupAcpiPhase0(

View file

@ -189,6 +189,7 @@ typedef struct _HalAddressUsage
PADAPTER_OBJECT NTAPI HalpAllocateAdapterEx(ULONG NumberOfMapRegisters,BOOLEAN IsMaster, BOOLEAN Dma32BitAddresses); PADAPTER_OBJECT NTAPI HalpAllocateAdapterEx(ULONG NumberOfMapRegisters,BOOLEAN IsMaster, BOOLEAN Dma32BitAddresses);
/* sysinfo.c */ /* sysinfo.c */
CODE_SEG("INIT")
VOID VOID
NTAPI NTAPI
HalpRegisterVector(IN UCHAR Flags, HalpRegisterVector(IN UCHAR Flags,
@ -196,6 +197,7 @@ HalpRegisterVector(IN UCHAR Flags,
IN ULONG SystemVector, IN ULONG SystemVector,
IN KIRQL Irql); IN KIRQL Irql);
CODE_SEG("INIT")
VOID VOID
NTAPI NTAPI
HalpEnableInterruptHandler(IN UCHAR Flags, HalpEnableInterruptHandler(IN UCHAR Flags,
@ -217,7 +219,7 @@ DECLSPEC_NORETURN VOID FASTCALL HalpDispatchInterrupt2ndEntry(IN PKTRAP_FRAME Tr
extern BOOLEAN HalpProfilingStopped; extern BOOLEAN HalpProfilingStopped;
/* timer.c */ /* timer.c */
VOID NTAPI HalpInitializeClock(VOID); CODE_SEG("INIT") VOID NTAPI HalpInitializeClock(VOID);
VOID __cdecl HalpClockInterrupt(VOID); VOID __cdecl HalpClockInterrupt(VOID);
VOID __cdecl HalpProfileInterrupt(VOID); VOID __cdecl HalpProfileInterrupt(VOID);
@ -235,7 +237,7 @@ HalpCalibrateStallExecution(VOID);
VOID HalpInitPciBus (VOID); VOID HalpInitPciBus (VOID);
/* dma.c */ /* dma.c */
VOID HalpInitDma (VOID); CODE_SEG("INIT") VOID HalpInitDma (VOID);
/* Non-generic initialization */ /* Non-generic initialization */
VOID HalpInitPhase0 (PLOADER_PARAMETER_BLOCK LoaderBlock); VOID HalpInitPhase0 (PLOADER_PARAMETER_BLOCK LoaderBlock);
@ -254,12 +256,14 @@ HalpCheckPowerButton(
VOID VOID
); );
CODE_SEG("INIT")
VOID VOID
NTAPI NTAPI
HalpRegisterKdSupportFunctions( HalpRegisterKdSupportFunctions(
VOID VOID
); );
CODE_SEG("INIT")
NTSTATUS NTSTATUS
NTAPI NTAPI
HalpSetupPciDeviceForDebugging( HalpSetupPciDeviceForDebugging(
@ -267,6 +271,7 @@ HalpSetupPciDeviceForDebugging(
IN OUT PDEBUG_DEVICE_DESCRIPTOR PciDevice IN OUT PDEBUG_DEVICE_DESCRIPTOR PciDevice
); );
CODE_SEG("INIT")
NTSTATUS NTSTATUS
NTAPI NTAPI
HalpReleasePciDeviceForDebugging( HalpReleasePciDeviceForDebugging(
@ -375,6 +380,7 @@ HaliHaltSystem(
// //
// CMOS Routines // CMOS Routines
// //
CODE_SEG("INIT")
VOID VOID
NTAPI NTAPI
HalpInitializeCmos( HalpInitializeCmos(
@ -429,36 +435,42 @@ HalpOpenRegistryKey(
IN BOOLEAN Create IN BOOLEAN Create
); );
CODE_SEG("INIT")
VOID VOID
NTAPI NTAPI
HalpGetNMICrashFlag( HalpGetNMICrashFlag(
VOID VOID
); );
CODE_SEG("INIT")
BOOLEAN BOOLEAN
NTAPI NTAPI
HalpGetDebugPortTable( HalpGetDebugPortTable(
VOID VOID
); );
CODE_SEG("INIT")
VOID VOID
NTAPI NTAPI
HalpReportSerialNumber( HalpReportSerialNumber(
VOID VOID
); );
CODE_SEG("INIT")
NTSTATUS NTSTATUS
NTAPI NTAPI
HalpMarkAcpiHal( HalpMarkAcpiHal(
VOID VOID
); );
CODE_SEG("INIT")
VOID VOID
NTAPI NTAPI
HalpBuildAddressMap( HalpBuildAddressMap(
VOID VOID
); );
CODE_SEG("INIT")
VOID VOID
NTAPI NTAPI
HalpReportResourceUsage( HalpReportResourceUsage(
@ -466,6 +478,7 @@ HalpReportResourceUsage(
IN INTERFACE_TYPE InterfaceType IN INTERFACE_TYPE InterfaceType
); );
CODE_SEG("INIT")
ULONG ULONG
NTAPI NTAPI
HalpIs16BitPortDecodeSupported( HalpIs16BitPortDecodeSupported(
@ -486,6 +499,7 @@ KeUpdateSystemTime(
IN KIRQL OldIrql IN KIRQL OldIrql
); );
CODE_SEG("INIT")
VOID VOID
NTAPI NTAPI
HalpInitBusHandlers( HalpInitBusHandlers(
@ -498,6 +512,7 @@ HaliInitPnpDriver(
VOID VOID
); );
CODE_SEG("INIT")
VOID VOID
NTAPI NTAPI
HalpDebugPciDumpBus( HalpDebugPciDumpBus(

View file

@ -12,6 +12,92 @@
#define NDEBUG #define NDEBUG
#include <debug.h> #include <debug.h>
CODE_SEG("INIT")
PBUS_HANDLER
NTAPI
HalpAllocateAndInitPciBusHandler(
IN ULONG PciType,
IN ULONG BusNo,
IN BOOLEAN TestAllocation
);
CODE_SEG("INIT")
VOID
NTAPI
HalpFixupPciSupportedRanges(
IN ULONG BusCount
);
CODE_SEG("INIT")
NTSTATUS
NTAPI
HalpGetChipHacks(
IN USHORT VendorId,
IN USHORT DeviceId,
IN UCHAR RevisionId,
IN PULONG HackFlags
);
CODE_SEG("INIT")
BOOLEAN
NTAPI
HalpGetPciBridgeConfig(
IN ULONG PciType,
IN PUCHAR BusCount
);
CODE_SEG("INIT")
BOOLEAN
NTAPI
HalpIsBridgeDevice(
IN PPCI_COMMON_CONFIG PciData
);
CODE_SEG("INIT")
BOOLEAN
NTAPI
HalpIsIdeDevice(
IN PPCI_COMMON_CONFIG PciData
);
CODE_SEG("INIT")
BOOLEAN
NTAPI
HalpIsRecognizedCard(
IN PPCI_REGISTRY_INFO_INTERNAL PciRegistryInfo,
IN PPCI_COMMON_CONFIG PciData,
IN ULONG Flags
);
CODE_SEG("INIT")
BOOLEAN
NTAPI
HalpIsValidPCIDevice(
IN PBUS_HANDLER BusHandler,
IN PCI_SLOT_NUMBER Slot
);
CODE_SEG("INIT")
NTSTATUS
NTAPI
HalpMarkChipsetDecode(
IN BOOLEAN OverrideEnable
);
CODE_SEG("INIT")
VOID
NTAPI
HalpRegisterInternalBusHandlers(
VOID
);
CODE_SEG("INIT")
VOID
NTAPI
ShowSize(
IN ULONG Size
);
/* GLOBALS ********************************************************************/ /* GLOBALS ********************************************************************/
extern KSPIN_LOCK HalpPCIConfigLock; extern KSPIN_LOCK HalpPCIConfigLock;

View file

@ -3,11 +3,13 @@
# #
add_custom_command( add_custom_command(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/pci_classes.c ${CMAKE_CURRENT_BINARY_DIR}/pci_classes.h OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/pci_classes.c ${CMAKE_CURRENT_BINARY_DIR}/pci_classes.h
COMMAND native-bin2c ${CMAKE_CURRENT_SOURCE_DIR}/legacy/bus/pci_classes.ids ${CMAKE_CURRENT_BINARY_DIR}/pci_classes.c ${CMAKE_CURRENT_BINARY_DIR}/pci_classes.h BINSTR ClassTable DATA_SEG\(\"INIT\"\) ${CMAKE_CURRENT_SOURCE_DIR}/include/hal.h COMMAND native-bin2c ${CMAKE_CURRENT_SOURCE_DIR}/legacy/bus/pci_classes.ids ${CMAKE_CURRENT_BINARY_DIR}/pci_classes.c ${CMAKE_CURRENT_BINARY_DIR}/pci_classes.h BINSTR ClassTable "DATA_SEG\(\"INITDATA\"\)" ${CMAKE_CURRENT_SOURCE_DIR}/include/hal.h
DEPENDS native-bin2c ${CMAKE_CURRENT_SOURCE_DIR}/legacy/bus/pci_classes.ids VERBATIM) DEPENDS native-bin2c ${CMAKE_CURRENT_SOURCE_DIR}/legacy/bus/pci_classes.ids
VERBATIM)
add_custom_command( add_custom_command(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/pci_vendors.c ${CMAKE_CURRENT_BINARY_DIR}/pci_vendors.h OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/pci_vendors.c ${CMAKE_CURRENT_BINARY_DIR}/pci_vendors.h
COMMAND native-bin2c ${CMAKE_CURRENT_SOURCE_DIR}/legacy/bus/pci_vendors.ids ${CMAKE_CURRENT_BINARY_DIR}/pci_vendors.c ${CMAKE_CURRENT_BINARY_DIR}/pci_vendors.h BINSTR VendorTable DATA_SEG\(\"INIT\"\) ${CMAKE_CURRENT_SOURCE_DIR}/include/hal.h COMMAND native-bin2c ${CMAKE_CURRENT_SOURCE_DIR}/legacy/bus/pci_vendors.ids ${CMAKE_CURRENT_BINARY_DIR}/pci_vendors.c ${CMAKE_CURRENT_BINARY_DIR}/pci_vendors.h BINSTR VendorTable "DATA_SEG\(\"INITDATA\"\)" ${CMAKE_CURRENT_SOURCE_DIR}/include/hal.h
DEPENDS native-bin2c ${CMAKE_CURRENT_SOURCE_DIR}/legacy/bus/pci_vendors.ids VERBATIM) DEPENDS native-bin2c ${CMAKE_CURRENT_SOURCE_DIR}/legacy/bus/pci_vendors.ids
VERBATIM)
##################################### #####################################

View file

@ -38,6 +38,7 @@ typedef struct _NOCC_CACHE_MAP
ULONG ReadAheadGranularity; ULONG ReadAheadGranularity;
} NOCC_CACHE_MAP, *PNOCC_CACHE_MAP; } NOCC_CACHE_MAP, *PNOCC_CACHE_MAP;
CODE_SEG("INIT")
VOID VOID
NTAPI NTAPI
CcPfInitializePrefetcher(VOID); CcPfInitializePrefetcher(VOID);
@ -53,6 +54,7 @@ CcMdlWriteComplete2(IN PFILE_OBJECT FileObject,
IN PLARGE_INTEGER FileOffset, IN PLARGE_INTEGER FileOffset,
IN PMDL MdlChain); IN PMDL MdlChain);
CODE_SEG("INIT")
VOID VOID
NTAPI NTAPI
CcInitView(VOID); CcInitView(VOID);

View file

@ -65,12 +65,7 @@ ULONG CmpTypeCount[MaximumType + 1];
HANDLE CmpRegistryRootHandle; HANDLE CmpRegistryRootHandle;
// for MSVC, this is required before using DATA_SEG DATA_SEG("INITDATA") UNICODE_STRING CmClassName[MaximumClass + 1] =
#ifdef _MSC_VER
# pragma section("INIT", read,execute,discard)
#endif
DATA_SEG("INIT") UNICODE_STRING CmClassName[MaximumClass + 1] =
{ {
RTL_CONSTANT_STRING(L"System"), RTL_CONSTANT_STRING(L"System"),
RTL_CONSTANT_STRING(L"Processor"), RTL_CONSTANT_STRING(L"Processor"),
@ -82,7 +77,7 @@ DATA_SEG("INIT") UNICODE_STRING CmClassName[MaximumClass + 1] =
RTL_CONSTANT_STRING(L"Undefined") RTL_CONSTANT_STRING(L"Undefined")
}; };
DATA_SEG("INIT") UNICODE_STRING CmTypeName[MaximumType + 1] = DATA_SEG("INITDATA") UNICODE_STRING CmTypeName[MaximumType + 1] =
{ {
RTL_CONSTANT_STRING(L"System"), RTL_CONSTANT_STRING(L"System"),
RTL_CONSTANT_STRING(L"CentralProcessor"), RTL_CONSTANT_STRING(L"CentralProcessor"),
@ -128,7 +123,7 @@ DATA_SEG("INIT") UNICODE_STRING CmTypeName[MaximumType + 1] =
RTL_CONSTANT_STRING(L"Undefined") RTL_CONSTANT_STRING(L"Undefined")
}; };
DATA_SEG("INIT") CMP_MF_TYPE CmpMultifunctionTypes[] = DATA_SEG("INITDATA") CMP_MF_TYPE CmpMultifunctionTypes[] =
{ {
{"ISA", Isa, 0}, {"ISA", Isa, 0},
{"MCA", MicroChannel, 0}, {"MCA", MicroChannel, 0},
@ -141,7 +136,7 @@ DATA_SEG("INIT") CMP_MF_TYPE CmpMultifunctionTypes[] =
{NULL, Internal, 0} {NULL, Internal, 0}
}; };
DATA_SEG("INIT") CM_SYSTEM_CONTROL_VECTOR CmControlVector[] = DATA_SEG("INITDATA") CM_SYSTEM_CONTROL_VECTOR CmControlVector[] =
{ {
{ {
L"Session Manager", L"Session Manager",

View file

@ -13,6 +13,10 @@
#define NDEBUG #define NDEBUG
#include <debug.h> #include <debug.h>
#if defined (ALLOC_PRAGMA)
#pragma alloc_text(INIT, ExpInitializeSemaphoreImplementation)
#endif
/* GLOBALS ******************************************************************/ /* GLOBALS ******************************************************************/
POBJECT_TYPE ExSemaphoreObjectType; POBJECT_TYPE ExSemaphoreObjectType;

View file

@ -29,6 +29,7 @@
/* 10000 in 100-ns model = 0.1 microsecond */ /* 10000 in 100-ns model = 0.1 microsecond */
#define TIME_FRAME 10000 #define TIME_FRAME 10000
/* GLOBALS ****************************************************************/ /* GLOBALS ****************************************************************/
FAST_MUTEX ExpUuidLock; FAST_MUTEX ExpUuidLock;

View file

@ -609,7 +609,7 @@ ExpSetSwappingKernelApc(IN PKAPC Apc,
PKEVENT Event = (PKEVENT)*SystemArgument1; PKEVENT Event = (PKEVENT)*SystemArgument1;
/* Make sure it's an active worker */ /* Make sure it's an active worker */
if (PsGetCurrentThread()->ActiveExWorker) if (PsGetCurrentThread()->ActiveExWorker)
{ {
/* Read the setting from the context flag */ /* Read the setting from the context flag */
AllowSwap = (PBOOLEAN)NormalContext; AllowSwap = (PBOOLEAN)NormalContext;
@ -670,7 +670,7 @@ ExSwapinWorkerThreads(IN BOOLEAN AllowSwap)
KeClearEvent(&Event); KeClearEvent(&Event);
} }
} }
/* Next thread */ /* Next thread */
Next: Next:
Thread = PsGetNextProcessThread(Process, Thread); Thread = PsGetNextProcessThread(Process, Thread);

View file

@ -295,6 +295,7 @@ MI_IS_MAPPED_PTE(PMMPTE PointerPte)
(PointerPte->u.Hard.PageFrameNumber != 0)); (PointerPte->u.Hard.PageFrameNumber != 0));
} }
CODE_SEG("INIT")
FORCEINLINE FORCEINLINE
BOOLEAN BOOLEAN
MiIsPdeForAddressValid(PVOID Address) MiIsPdeForAddressValid(PVOID Address)

View file

@ -287,6 +287,7 @@ extern LAZY_WRITER LazyWriter;
#define NODE_TYPE_PRIVATE_MAP 0x02FE #define NODE_TYPE_PRIVATE_MAP 0x02FE
#define NODE_TYPE_SHARED_MAP 0x02FF #define NODE_TYPE_SHARED_MAP 0x02FF
CODE_SEG("INIT")
VOID VOID
NTAPI NTAPI
CcPfInitializePrefetcher( CcPfInitializePrefetcher(
@ -327,6 +328,7 @@ CcRosEnsureVacbResident(
_In_ ULONG Length _In_ ULONG Length
); );
CODE_SEG("INIT")
VOID VOID
NTAPI NTAPI
CcInitView(VOID); CcInitView(VOID);
@ -335,6 +337,7 @@ VOID
NTAPI NTAPI
CcShutdownLazyWriter(VOID); CcShutdownLazyWriter(VOID);
CODE_SEG("INIT")
BOOLEAN BOOLEAN
CcInitializeCacheManager(VOID); CcInitializeCacheManager(VOID);

View file

@ -695,6 +695,7 @@ CmpFlushNotify(
IN BOOLEAN LockHeld IN BOOLEAN LockHeld
); );
CODE_SEG("INIT")
VOID VOID
NTAPI NTAPI
CmpInitCallback( CmpInitCallback(
@ -704,24 +705,28 @@ CmpInitCallback(
// //
// KCB Cache/Delay Routines // KCB Cache/Delay Routines
// //
CODE_SEG("INIT")
VOID VOID
NTAPI NTAPI
CmpInitializeCache( CmpInitializeCache(
VOID VOID
); );
CODE_SEG("INIT")
VOID VOID
NTAPI NTAPI
CmpInitCmPrivateDelayAlloc( CmpInitCmPrivateDelayAlloc(
VOID VOID
); );
CODE_SEG("INIT")
VOID VOID
NTAPI NTAPI
CmpInitCmPrivateAlloc( CmpInitCmPrivateAlloc(
VOID VOID
); );
CODE_SEG("INIT")
VOID VOID
NTAPI NTAPI
CmpInitDelayDerefKCBEngine( CmpInitDelayDerefKCBEngine(
@ -964,6 +969,7 @@ VOID
NTAPI NTAPI
CmpRemoveFromDelayedClose(IN PCM_KEY_CONTROL_BLOCK Kcb); CmpRemoveFromDelayedClose(IN PCM_KEY_CONTROL_BLOCK Kcb);
CODE_SEG("INIT")
VOID VOID
NTAPI NTAPI
CmpInitializeDelayedCloseTable( CmpInitializeDelayedCloseTable(
@ -1162,6 +1168,7 @@ CmpCreateLinkNode(
// //
// Boot Routines // Boot Routines
// //
CODE_SEG("INIT")
HCELL_INDEX HCELL_INDEX
NTAPI NTAPI
CmpFindControlSet( CmpFindControlSet(
@ -1171,6 +1178,7 @@ CmpFindControlSet(
OUT PBOOLEAN AutoSelect OUT PBOOLEAN AutoSelect
); );
CODE_SEG("INIT")
VOID VOID
NTAPI NTAPI
CmGetSystemControlValues( CmGetSystemControlValues(
@ -1187,6 +1195,7 @@ CmpSaveBootControlSet(
// //
// Hardware Configuration Routines // Hardware Configuration Routines
// //
CODE_SEG("INIT")
NTSTATUS NTSTATUS
NTAPI NTAPI
CmpInitializeRegistryNode( CmpInitializeRegistryNode(
@ -1204,6 +1213,7 @@ CmpInitializeMachineDependentConfiguration(
IN PLOADER_PARAMETER_BLOCK LoaderBlock IN PLOADER_PARAMETER_BLOCK LoaderBlock
); );
CODE_SEG("INIT")
NTSTATUS NTSTATUS
NTAPI NTAPI
CmpInitializeHardwareConfiguration( CmpInitializeHardwareConfiguration(
@ -1408,6 +1418,7 @@ CmSaveMergedKeys(
// //
// Startup and Shutdown // Startup and Shutdown
// //
CODE_SEG("INIT")
BOOLEAN BOOLEAN
NTAPI NTAPI
CmInitSystem1( CmInitSystem1(
@ -1435,12 +1446,14 @@ CmpSetVersionData(
// //
// Driver List Routines // Driver List Routines
// //
CODE_SEG("INIT")
PUNICODE_STRING* PUNICODE_STRING*
NTAPI NTAPI
CmGetSystemDriverList( CmGetSystemDriverList(
VOID VOID
); );
CODE_SEG("INIT")
BOOLEAN BOOLEAN
NTAPI NTAPI
CmpFindDrivers( CmpFindDrivers(
@ -1451,6 +1464,7 @@ CmpFindDrivers(
IN PLIST_ENTRY DriverListHead IN PLIST_ENTRY DriverListHead
); );
CODE_SEG("INIT")
BOOLEAN BOOLEAN
NTAPI NTAPI
CmpSortDriverList( CmpSortDriverList(
@ -1459,12 +1473,14 @@ CmpSortDriverList(
IN PLIST_ENTRY DriverListHead IN PLIST_ENTRY DriverListHead
); );
CODE_SEG("INIT")
BOOLEAN BOOLEAN
NTAPI NTAPI
CmpResolveDriverDependencies( CmpResolveDriverDependencies(
IN PLIST_ENTRY DriverListHead IN PLIST_ENTRY DriverListHead
); );
CODE_SEG("INIT")
BOOLEAN BOOLEAN
NTAPI NTAPI
CmpIsSafe( CmpIsSafe(

View file

@ -46,6 +46,7 @@
#define DBGKTRACE(x, fmt, ...) DPRINT(fmt, ##__VA_ARGS__) #define DBGKTRACE(x, fmt, ...) DPRINT(fmt, ##__VA_ARGS__)
#endif #endif
CODE_SEG("INIT")
VOID VOID
NTAPI NTAPI
DbgkInitialize( DbgkInitialize(

View file

@ -190,6 +190,7 @@ C_ASSERT(RTL_FIELD_SIZE(UUID_CACHED_VALUES_STRUCT, GuidInit) == RTL_FIELD_SIZE(U
/* INITIALIZATION FUNCTIONS *************************************************/ /* INITIALIZATION FUNCTIONS *************************************************/
CODE_SEG("INIT")
BOOLEAN BOOLEAN
NTAPI NTAPI
ExpWin32kInit(VOID); ExpWin32kInit(VOID);
@ -204,6 +205,7 @@ Phase1Initialization(
IN PVOID Context IN PVOID Context
); );
CODE_SEG("INIT")
VOID VOID
NTAPI NTAPI
ExpInitializePushLocks(VOID); ExpInitializePushLocks(VOID);
@ -214,6 +216,7 @@ ExRefreshTimeZoneInformation(
IN PLARGE_INTEGER SystemBootTime IN PLARGE_INTEGER SystemBootTime
); );
CODE_SEG("INIT")
VOID VOID
NTAPI NTAPI
ExpInitializeWorkerThreads(VOID); ExpInitializeWorkerThreads(VOID);
@ -222,10 +225,12 @@ VOID
NTAPI NTAPI
ExSwapinWorkerThreads(IN BOOLEAN AllowSwap); ExSwapinWorkerThreads(IN BOOLEAN AllowSwap);
CODE_SEG("INIT")
VOID VOID
NTAPI NTAPI
ExpInitLookasideLists(VOID); ExpInitLookasideLists(VOID);
CODE_SEG("INIT")
VOID VOID
NTAPI NTAPI
ExInitializeSystemLookasideList( ExInitializeSystemLookasideList(
@ -237,18 +242,22 @@ ExInitializeSystemLookasideList(
IN PLIST_ENTRY ListHead IN PLIST_ENTRY ListHead
); );
CODE_SEG("INIT")
BOOLEAN BOOLEAN
NTAPI NTAPI
ExpInitializeCallbacks(VOID); ExpInitializeCallbacks(VOID);
CODE_SEG("INIT")
BOOLEAN BOOLEAN
NTAPI NTAPI
ExpUuidInitialization(VOID); ExpUuidInitialization(VOID);
CODE_SEG("INIT")
BOOLEAN BOOLEAN
NTAPI NTAPI
ExLuidInitialization(VOID); ExLuidInitialization(VOID);
CODE_SEG("INIT")
VOID VOID
NTAPI NTAPI
ExpInitializeExecutive( ExpInitializeExecutive(
@ -260,38 +269,47 @@ VOID
NTAPI NTAPI
ExShutdownSystem(VOID); ExShutdownSystem(VOID);
CODE_SEG("INIT")
BOOLEAN BOOLEAN
NTAPI NTAPI
ExpInitializeEventImplementation(VOID); ExpInitializeEventImplementation(VOID);
CODE_SEG("INIT")
BOOLEAN BOOLEAN
NTAPI NTAPI
ExpInitializeKeyedEventImplementation(VOID); ExpInitializeKeyedEventImplementation(VOID);
CODE_SEG("INIT")
BOOLEAN BOOLEAN
NTAPI NTAPI
ExpInitializeEventPairImplementation(VOID); ExpInitializeEventPairImplementation(VOID);
CODE_SEG("INIT")
BOOLEAN BOOLEAN
NTAPI NTAPI
ExpInitializeSemaphoreImplementation(VOID); ExpInitializeSemaphoreImplementation(VOID);
CODE_SEG("INIT")
BOOLEAN BOOLEAN
NTAPI NTAPI
ExpInitializeMutantImplementation(VOID); ExpInitializeMutantImplementation(VOID);
CODE_SEG("INIT")
BOOLEAN BOOLEAN
NTAPI NTAPI
ExpInitializeTimerImplementation(VOID); ExpInitializeTimerImplementation(VOID);
CODE_SEG("INIT")
BOOLEAN BOOLEAN
NTAPI NTAPI
ExpInitializeProfileImplementation(VOID); ExpInitializeProfileImplementation(VOID);
CODE_SEG("INIT")
VOID VOID
NTAPI NTAPI
ExpResourceInitialization(VOID); ExpResourceInitialization(VOID);
CODE_SEG("INIT")
VOID VOID
NTAPI NTAPI
ExInitPoolLookasidePointers(VOID); ExInitPoolLookasidePointers(VOID);
@ -431,6 +449,7 @@ typedef BOOLEAN
ULONG_PTR Context ULONG_PTR Context
); );
CODE_SEG("INIT")
VOID VOID
NTAPI NTAPI
ExpInitializeHandleTables( ExpInitializeHandleTables(
@ -1486,12 +1505,14 @@ ExTimerRundown(
VOID VOID
); );
CODE_SEG("INIT")
VOID VOID
NTAPI NTAPI
HeadlessInit( HeadlessInit(
IN PLOADER_PARAMETER_BLOCK LoaderBlock IN PLOADER_PARAMETER_BLOCK LoaderBlock
); );
CODE_SEG("INIT")
VOID VOID
NTAPI NTAPI
XIPInit( XIPInit(

View file

@ -108,12 +108,14 @@ typedef struct _INT_MAPPING
// //
// Initialization Routines // Initialization Routines
// //
CODE_SEG("INIT")
VOID VOID
NTAPI NTAPI
FsRtlInitializeLargeMcbs( FsRtlInitializeLargeMcbs(
VOID VOID
); );
CODE_SEG("INIT")
VOID VOID
NTAPI NTAPI
FsRtlInitializeTunnels( FsRtlInitializeTunnels(
@ -129,6 +131,7 @@ FsRtlPTeardownPerFileObjectContexts(
IN PFILE_OBJECT FileObject IN PFILE_OBJECT FileObject
); );
CODE_SEG("INIT")
BOOLEAN BOOLEAN
NTAPI NTAPI
FsRtlInitSystem( FsRtlInitSystem(

View file

@ -381,6 +381,7 @@ KiSetTebBase(PKPCR Pcr, PNT_TIB TebAddress)
Ke386SetGdtEntryBase(&Pcr->GDT[KGDT_R3_TEB / sizeof(KGDTENTRY)], TebAddress); Ke386SetGdtEntryBase(&Pcr->GDT[KGDT_R3_TEB / sizeof(KGDTENTRY)], TebAddress);
} }
CODE_SEG("INIT")
VOID VOID
FASTCALL FASTCALL
Ki386InitializeTss( Ki386InitializeTss(
@ -389,30 +390,36 @@ Ki386InitializeTss(
IN PKGDTENTRY Gdt IN PKGDTENTRY Gdt
); );
CODE_SEG("INIT")
VOID VOID
NTAPI NTAPI
KiSetCR0Bits(VOID); KiSetCR0Bits(VOID);
CODE_SEG("INIT")
VOID VOID
NTAPI NTAPI
KiGetCacheInformation(VOID); KiGetCacheInformation(VOID);
CODE_SEG("INIT")
BOOLEAN BOOLEAN
NTAPI NTAPI
KiIsNpxPresent( KiIsNpxPresent(
VOID VOID
); );
CODE_SEG("INIT")
BOOLEAN BOOLEAN
NTAPI NTAPI
KiIsNpxErrataPresent( KiIsNpxErrataPresent(
VOID VOID
); );
CODE_SEG("INIT")
VOID VOID
NTAPI NTAPI
KiSetProcessorType(VOID); KiSetProcessorType(VOID);
CODE_SEG("INIT")
ULONG ULONG
NTAPI NTAPI
KiGetFeatureBits(VOID); KiGetFeatureBits(VOID);
@ -447,18 +454,21 @@ Ki386SetupAndExitToV86Mode(
OUT PTEB VdmTeb OUT PTEB VdmTeb
); );
CODE_SEG("INIT")
VOID VOID
NTAPI NTAPI
KeI386VdmInitialize( KeI386VdmInitialize(
VOID VOID
); );
CODE_SEG("INIT")
ULONG_PTR ULONG_PTR
NTAPI NTAPI
Ki386EnableGlobalPage( Ki386EnableGlobalPage(
IN ULONG_PTR Context IN ULONG_PTR Context
); );
CODE_SEG("INIT")
ULONG_PTR ULONG_PTR
NTAPI NTAPI
Ki386EnableTargetLargePage( Ki386EnableTargetLargePage(
@ -486,48 +496,56 @@ Ki386EnableCurrentLargePage(
IN ULONG Cr3 IN ULONG Cr3
); );
CODE_SEG("INIT")
VOID VOID
NTAPI NTAPI
KiI386PentiumLockErrataFixup( KiI386PentiumLockErrataFixup(
VOID VOID
); );
CODE_SEG("INIT")
VOID VOID
NTAPI NTAPI
KiInitializePAT( KiInitializePAT(
VOID VOID
); );
CODE_SEG("INIT")
VOID VOID
NTAPI NTAPI
KiInitializeMTRR( KiInitializeMTRR(
IN BOOLEAN FinalCpu IN BOOLEAN FinalCpu
); );
CODE_SEG("INIT")
VOID VOID
NTAPI NTAPI
KiAmdK6InitializeMTRR( KiAmdK6InitializeMTRR(
VOID VOID
); );
CODE_SEG("INIT")
VOID VOID
NTAPI NTAPI
KiRestoreFastSyscallReturnState( KiRestoreFastSyscallReturnState(
VOID VOID
); );
CODE_SEG("INIT")
ULONG_PTR ULONG_PTR
NTAPI NTAPI
Ki386EnableDE( Ki386EnableDE(
IN ULONG_PTR Context IN ULONG_PTR Context
); );
CODE_SEG("INIT")
ULONG_PTR ULONG_PTR
NTAPI NTAPI
Ki386EnableFxsr( Ki386EnableFxsr(
IN ULONG_PTR Context IN ULONG_PTR Context
); );
CODE_SEG("INIT")
ULONG_PTR ULONG_PTR
NTAPI NTAPI
Ki386EnableXMMIExceptions( Ki386EnableXMMIExceptions(
@ -791,12 +809,13 @@ KiCheckForApcDelivery(IN PKTRAP_FRAME TrapFrame)
// //
// Switches from boot loader to initial kernel stack // Switches from boot loader to initial kernel stack
// //
CODE_SEG("INIT")
FORCEINLINE FORCEINLINE
DECLSPEC_NORETURN DECLSPEC_NORETURN
VOID VOID
KiSwitchToBootStack(IN ULONG_PTR InitialStack) KiSwitchToBootStack(IN ULONG_PTR InitialStack)
{ {
DECLSPEC_NORETURN VOID NTAPI KiSystemStartupBootStack(VOID); CODE_SEG("INIT") DECLSPEC_NORETURN VOID NTAPI KiSystemStartupBootStack(VOID);
/* We have to switch to a new stack before continuing kernel initialization */ /* We have to switch to a new stack before continuing kernel initialization */
#ifdef __GNUC__ #ifdef __GNUC__

View file

@ -6,6 +6,7 @@
// //
// Driver Initialization // Driver Initialization
// //
CODE_SEG("INIT")
BOOLEAN BOOLEAN
NTAPI NTAPI
InbvDriverInitialize( InbvDriverInitialize(
@ -32,12 +33,14 @@ InbvBitBlt(
// //
// Progress-Bar Functions // Progress-Bar Functions
// //
CODE_SEG("INIT")
VOID VOID
NTAPI NTAPI
InbvIndicateProgress( InbvIndicateProgress(
VOID VOID
); );
CODE_SEG("INIT")
VOID VOID
NTAPI NTAPI
InbvSetProgressBarSubset( InbvSetProgressBarSubset(
@ -45,6 +48,7 @@ InbvSetProgressBarSubset(
_In_ ULONG Ceiling _In_ ULONG Ceiling
); );
CODE_SEG("INIT")
VOID VOID
NTAPI NTAPI
InbvUpdateProgressBar( InbvUpdateProgressBar(
@ -54,24 +58,28 @@ InbvUpdateProgressBar(
// //
// Boot Splash-Screen Functions // Boot Splash-Screen Functions
// //
CODE_SEG("INIT")
VOID VOID
NTAPI NTAPI
InbvRotBarInit( InbvRotBarInit(
VOID VOID
); );
CODE_SEG("INIT")
VOID VOID
NTAPI NTAPI
DisplayBootBitmap( DisplayBootBitmap(
IN BOOLEAN TextMode IN BOOLEAN TextMode
); );
CODE_SEG("INIT")
VOID VOID
NTAPI NTAPI
DisplayFilter( DisplayFilter(
IN PCHAR *String IN PCHAR *String
); );
CODE_SEG("INIT")
VOID VOID
NTAPI NTAPI
FinalizeBootLogo( FinalizeBootLogo(

View file

@ -571,6 +571,15 @@ IopDetectResourceConflict(
// //
NTSTATUS NTSTATUS
NTAPI NTAPI
PipCallDriverAddDevice(
IN PDEVICE_NODE DeviceNode,
IN BOOLEAN LoadDriver,
IN PDRIVER_OBJECT DriverObject
);
CODE_SEG("INIT")
NTSTATUS
NTAPI
IopInitializePlugPlayServices( IopInitializePlugPlayServices(
VOID VOID
); );
@ -662,6 +671,7 @@ IoDestroyDriverList(
VOID VOID
); );
CODE_SEG("INIT")
NTSTATUS NTSTATUS
IopInitPlugPlayEvents(VOID); IopInitPlugPlayEvents(VOID);
@ -713,12 +723,14 @@ IopCreateDeviceKeyPath(
// //
// PnP Routines // PnP Routines
// //
CODE_SEG("INIT")
NTSTATUS NTSTATUS
NTAPI NTAPI
IopUpdateRootKey( IopUpdateRootKey(
VOID VOID
); );
CODE_SEG("INIT")
NTSTATUS NTSTATUS
NTAPI NTAPI
PiInitCacheGroupInformation( PiInitCacheGroupInformation(
@ -761,12 +773,14 @@ PiSetDevNodeText(
// //
// Initialization Routines // Initialization Routines
// //
CODE_SEG("INIT")
NTSTATUS NTSTATUS
NTAPI NTAPI
IopCreateArcNames( IopCreateArcNames(
IN PLOADER_PARAMETER_BLOCK LoaderBlock IN PLOADER_PARAMETER_BLOCK LoaderBlock
); );
CODE_SEG("INIT")
NTSTATUS NTSTATUS
NTAPI NTAPI
IopReassignSystemRoot( IopReassignSystemRoot(
@ -774,6 +788,7 @@ IopReassignSystemRoot(
OUT PANSI_STRING NtBootPath OUT PANSI_STRING NtBootPath
); );
CODE_SEG("INIT")
BOOLEAN BOOLEAN
NTAPI NTAPI
IoInitSystem( IoInitSystem(
@ -794,6 +809,7 @@ IoInitializeCrashDump(
IN HANDLE PageFileHandle IN HANDLE PageFileHandle
); );
CODE_SEG("INIT")
VOID VOID
PiInitializeNotifications( PiInitializeNotifications(
VOID); VOID);
@ -958,11 +974,13 @@ IopShutdownBaseFileSystems(
// //
// Boot logging support // Boot logging support
// //
CODE_SEG("INIT")
VOID VOID
IopInitBootLog( IopInitBootLog(
IN BOOLEAN StartBootLog IN BOOLEAN StartBootLog
); );
CODE_SEG("INIT")
VOID VOID
IopStartBootLog( IopStartBootLog(
VOID VOID
@ -1034,6 +1052,7 @@ RawFsIsRawFileSystemDeviceObject(
IN PDEVICE_OBJECT DeviceObject IN PDEVICE_OBJECT DeviceObject
); );
CODE_SEG("INIT")
NTSTATUS NTSTATUS
NTAPI NTAPI
RawFsDriverEntry( RawFsDriverEntry(
@ -1066,12 +1085,14 @@ PnpRootRegisterDevice(
// //
// Driver Routines // Driver Routines
// //
CODE_SEG("INIT")
VOID VOID
FASTCALL FASTCALL
IopInitializeBootDrivers( IopInitializeBootDrivers(
VOID VOID
); );
CODE_SEG("INIT")
VOID VOID
FASTCALL FASTCALL
IopInitializeSystemDrivers( IopInitializeSystemDrivers(
@ -1305,6 +1326,7 @@ IoSetIoCompletion(
// //
// Ramdisk Routines // Ramdisk Routines
// //
CODE_SEG("INIT")
NTSTATUS NTSTATUS
NTAPI NTAPI
IopStartRamdisk( IopStartRamdisk(
@ -1346,16 +1368,19 @@ PiPerformSyncDeviceAction(
// //
// PnP notifications // PnP notifications
// //
CODE_SEG("PAGE")
VOID VOID
PiNotifyDeviceInterfaceChange( PiNotifyDeviceInterfaceChange(
_In_ LPCGUID Event, _In_ LPCGUID Event,
_In_ LPCGUID InterfaceClassGuid, _In_ LPCGUID InterfaceClassGuid,
_In_ PUNICODE_STRING SymbolicLinkName); _In_ PUNICODE_STRING SymbolicLinkName);
CODE_SEG("PAGE")
VOID VOID
PiNotifyHardwareProfileChange( PiNotifyHardwareProfileChange(
_In_ LPCGUID Event); _In_ LPCGUID Event);
CODE_SEG("PAGE")
VOID VOID
PiNotifyTargetDeviceChange( PiNotifyTargetDeviceChange(
_In_ LPCGUID Event, _In_ LPCGUID Event,

View file

@ -728,10 +728,12 @@ KeQueryValuesProcess(IN PKPROCESS Process,
/* INITIALIZATION FUNCTIONS *************************************************/ /* INITIALIZATION FUNCTIONS *************************************************/
CODE_SEG("INIT")
BOOLEAN BOOLEAN
NTAPI NTAPI
KeInitSystem(VOID); KeInitSystem(VOID);
CODE_SEG("INIT")
VOID VOID
NTAPI NTAPI
KeInitExceptions(VOID); KeInitExceptions(VOID);
@ -740,11 +742,13 @@ VOID
NTAPI NTAPI
KeInitInterrupts(VOID); KeInitInterrupts(VOID);
CODE_SEG("INIT")
VOID VOID
NTAPI NTAPI
KiInitializeBugCheck(VOID); KiInitializeBugCheck(VOID);
DECLSPEC_NORETURN DECLSPEC_NORETURN
CODE_SEG("INIT")
VOID VOID
NTAPI NTAPI
KiSystemStartup( KiSystemStartup(
@ -905,6 +909,7 @@ KiChainedDispatch(
IN PKINTERRUPT Interrupt IN PKINTERRUPT Interrupt
); );
CODE_SEG("INIT")
VOID VOID
NTAPI NTAPI
KiInitializeMachineType( KiInitializeMachineType(
@ -922,6 +927,7 @@ KiSetupStackAndInitializeKernel(
IN PLOADER_PARAMETER_BLOCK LoaderBlock IN PLOADER_PARAMETER_BLOCK LoaderBlock
); );
CODE_SEG("INIT")
VOID VOID
NTAPI NTAPI
KiInitSpinLocks( KiInitSpinLocks(
@ -929,6 +935,7 @@ KiInitSpinLocks(
IN CCHAR Number IN CCHAR Number
); );
CODE_SEG("INIT")
LARGE_INTEGER LARGE_INTEGER
NTAPI NTAPI
KiComputeReciprocal( KiComputeReciprocal(
@ -936,6 +943,7 @@ KiComputeReciprocal(
OUT PUCHAR Shift OUT PUCHAR Shift
); );
CODE_SEG("INIT")
VOID VOID
NTAPI NTAPI
KiInitSystem( KiInitSystem(
@ -964,6 +972,7 @@ KiCallbackReturn(
IN NTSTATUS Status IN NTSTATUS Status
); );
CODE_SEG("INIT")
VOID VOID
NTAPI NTAPI
KiInitMachineDependent(VOID); KiInitMachineDependent(VOID);

View file

@ -137,6 +137,7 @@ LpcExitThread(
// //
// Initialization functions // Initialization functions
// //
CODE_SEG("INIT")
BOOLEAN BOOLEAN
NTAPI NTAPI
LpcInitSystem( LpcInitSystem(

View file

@ -602,6 +602,7 @@ MiCheckAllProcessMemoryAreas(VOID);
/* npool.c *******************************************************************/ /* npool.c *******************************************************************/
CODE_SEG("INIT")
VOID VOID
NTAPI NTAPI
MiInitializeNonPagedPool(VOID); MiInitializeNonPagedPool(VOID);
@ -652,6 +653,7 @@ MmInit1(
VOID VOID
); );
CODE_SEG("INIT")
BOOLEAN BOOLEAN
NTAPI NTAPI
MmInitSystem(IN ULONG Phase, MmInitSystem(IN ULONG Phase,
@ -668,6 +670,7 @@ VOID
NTAPI NTAPI
MmFreeSwapPage(SWAPENTRY Entry); MmFreeSwapPage(SWAPENTRY Entry);
CODE_SEG("INIT")
VOID VOID
NTAPI NTAPI
MmInitPagingFile(VOID); MmInitPagingFile(VOID);
@ -827,6 +830,7 @@ MmDeleteKernelStack(PVOID Stack,
/* balance.c *****************************************************************/ /* balance.c *****************************************************************/
CODE_SEG("INIT")
VOID VOID
NTAPI NTAPI
MmInitializeMemoryConsumer( MmInitializeMemoryConsumer(
@ -834,6 +838,7 @@ MmInitializeMemoryConsumer(
NTSTATUS (*Trim)(ULONG Target, ULONG Priority, PULONG NrFreed) NTSTATUS (*Trim)(ULONG Target, ULONG Priority, PULONG NrFreed)
); );
CODE_SEG("INIT")
VOID VOID
NTAPI NTAPI
MmInitializeBalancer( MmInitializeBalancer(
@ -856,6 +861,7 @@ MmRequestPageMemoryConsumer(
PPFN_NUMBER AllocatedPage PPFN_NUMBER AllocatedPage
); );
CODE_SEG("INIT")
VOID VOID
NTAPI NTAPI
MiInitBalancerThread(VOID); MiInitBalancerThread(VOID);
@ -903,6 +909,7 @@ MmDeleteRmap(
PVOID Address PVOID Address
); );
CODE_SEG("INIT")
VOID VOID
NTAPI NTAPI
MmInitializeRmapList(VOID); MmInitializeRmapList(VOID);
@ -1078,6 +1085,7 @@ MmIsDisabledPage(
PVOID Address PVOID Address
); );
CODE_SEG("INIT")
VOID VOID
NTAPI NTAPI
MmInitGlobalKernelPageDirectory(VOID); MmInitGlobalKernelPageDirectory(VOID);
@ -1179,6 +1187,7 @@ MmCreateProcessAddressSpace(
IN PULONG_PTR DirectoryTableBase IN PULONG_PTR DirectoryTableBase
); );
CODE_SEG("INIT")
NTSTATUS NTSTATUS
NTAPI NTAPI
MmInitializeHandBuiltProcess( MmInitializeHandBuiltProcess(
@ -1186,6 +1195,7 @@ MmInitializeHandBuiltProcess(
IN PULONG_PTR DirectoryTableBase IN PULONG_PTR DirectoryTableBase
); );
CODE_SEG("INIT")
NTSTATUS NTSTATUS
NTAPI NTAPI
MmInitializeHandBuiltProcess2( MmInitializeHandBuiltProcess2(
@ -1340,6 +1350,7 @@ MmProtectSectionView(
PULONG OldProtect PULONG OldProtect
); );
CODE_SEG("INIT")
NTSTATUS NTSTATUS
NTAPI NTAPI
MmInitSectionImplementation(VOID); MmInitSectionImplementation(VOID);
@ -1353,6 +1364,16 @@ MmNotPresentFaultSectionView(
BOOLEAN Locked BOOLEAN Locked
); );
NTSTATUS
NTAPI
MmPageOutSectionView(
PMMSUPPORT AddressSpace,
PMEMORY_AREA MemoryArea,
PVOID Address,
ULONG_PTR Entry
);
CODE_SEG("INIT")
NTSTATUS NTSTATUS
NTAPI NTAPI
MmCreatePhysicalMemorySection(VOID); MmCreatePhysicalMemorySection(VOID);
@ -1468,12 +1489,14 @@ _MmGetPageEntrySectionSegment(PMM_SECTION_SEGMENT Segment,
/* sysldr.c ******************************************************************/ /* sysldr.c ******************************************************************/
CODE_SEG("INIT")
VOID VOID
NTAPI NTAPI
MiReloadBootLoadedDrivers( MiReloadBootLoadedDrivers(
IN PLOADER_PARAMETER_BLOCK LoaderBlock IN PLOADER_PARAMETER_BLOCK LoaderBlock
); );
CODE_SEG("INIT")
BOOLEAN BOOLEAN
NTAPI NTAPI
MiInitializeLoadedModuleList( MiInitializeLoadedModuleList(

View file

@ -164,6 +164,7 @@ typedef struct _OB_TEMP_BUFFER
// //
// Startup and Shutdown Functions // Startup and Shutdown Functions
// //
CODE_SEG("INIT")
BOOLEAN BOOLEAN
NTAPI NTAPI
ObInitSystem( ObInitSystem(
@ -434,6 +435,7 @@ ObInheritDeviceMap(
IN PEPROCESS Process IN PEPROCESS Process
); );
CODE_SEG("INIT")
NTSTATUS NTSTATUS
NTAPI NTAPI
ObpCreateDosDevicesDirectory( ObpCreateDosDevicesDirectory(
@ -455,6 +457,7 @@ ObpReferenceDeviceMap(
// //
// Security descriptor cache functions // Security descriptor cache functions
// //
CODE_SEG("INIT")
NTSTATUS NTSTATUS
NTAPI NTAPI
ObpInitSdCache( ObpInitSdCache(

View file

@ -264,12 +264,14 @@ typedef struct _POP_SHUTDOWN_WAIT_ENTRY
// //
// Initialization routines // Initialization routines
// //
CODE_SEG("INIT")
BOOLEAN BOOLEAN
NTAPI NTAPI
PoInitSystem( PoInitSystem(
IN ULONG BootPhase IN ULONG BootPhase
); );
CODE_SEG("INIT")
VOID VOID
NTAPI NTAPI
PoInitializePrcb( PoInitializePrcb(

View file

@ -90,6 +90,7 @@ PspShutdownProcessManager(
VOID VOID
); );
CODE_SEG("INIT")
BOOLEAN BOOLEAN
NTAPI NTAPI
PsInitSystem( PsInitSystem(
@ -120,6 +121,7 @@ PspMapSystemDll(
IN BOOLEAN UseLargePages IN BOOLEAN UseLargePages
); );
CODE_SEG("INIT")
NTSTATUS NTSTATUS
NTAPI NTAPI
PsLocateSystemDll( PsLocateSystemDll(
@ -352,6 +354,7 @@ PspRemoveProcessFromJob(
IN PEJOB Job IN PEJOB Job
); );
CODE_SEG("INIT")
VOID VOID
NTAPI NTAPI
PspInitializeJobStructures( PspInitializeJobStructures(
@ -415,6 +418,7 @@ PspIsProcessExiting(IN PEPROCESS Process);
// //
// Apphelp functions // Apphelp functions
// //
CODE_SEG("INIT")
NTSTATUS NTSTATUS
NTAPI NTAPI
ApphelpCacheInitialize(VOID); ApphelpCacheInitialize(VOID);

View file

@ -256,22 +256,27 @@ SeTokenCanImpersonate(
_In_ SECURITY_IMPERSONATION_LEVEL ImpersonationLevel); _In_ SECURITY_IMPERSONATION_LEVEL ImpersonationLevel);
/* Functions */ /* Functions */
CODE_SEG("INIT")
BOOLEAN BOOLEAN
NTAPI NTAPI
SeInitSystem(VOID); SeInitSystem(VOID);
CODE_SEG("INIT")
VOID VOID
NTAPI NTAPI
SepInitPrivileges(VOID); SepInitPrivileges(VOID);
CODE_SEG("INIT")
BOOLEAN BOOLEAN
NTAPI NTAPI
SepInitSecurityIDs(VOID); SepInitSecurityIDs(VOID);
CODE_SEG("INIT")
BOOLEAN BOOLEAN
NTAPI NTAPI
SepInitDACLs(VOID); SepInitDACLs(VOID);
CODE_SEG("INIT")
BOOLEAN BOOLEAN
NTAPI NTAPI
SepInitSDs(VOID); SepInitSDs(VOID);
@ -338,17 +343,21 @@ SepCreateImpersonationTokenDacl(
_Out_ PACL* Dacl _Out_ PACL* Dacl
); );
CODE_SEG("INIT")
VOID VOID
NTAPI NTAPI
SepInitializeTokenImplementation(VOID); SepInitializeTokenImplementation(VOID);
CODE_SEG("INIT")
PTOKEN PTOKEN
NTAPI NTAPI
SepCreateSystemProcessToken(VOID); SepCreateSystemProcessToken(VOID);
CODE_SEG("INIT")
PTOKEN PTOKEN
SepCreateSystemAnonymousLogonToken(VOID); SepCreateSystemAnonymousLogonToken(VOID);
CODE_SEG("INIT")
PTOKEN PTOKEN
SepCreateSystemAnonymousLogonTokenNoEveryone(VOID); SepCreateSystemAnonymousLogonTokenNoEveryone(VOID);

View file

@ -124,4 +124,8 @@ C_ASSERT(MAX_WIN32_PATH == MAX_PATH);
#include "internal/probe.h" #include "internal/probe.h"
#include "resource.h" #include "resource.h"
#ifdef _MSC_VER
# pragma section("INITDATA", read,write,discard)
#endif
#endif /* _NTOSKRNL_PCH */ #endif /* _NTOSKRNL_PCH */

View file

@ -752,6 +752,7 @@ IopGetDeviceObjectFromDeviceInstance(PUNICODE_STRING DeviceInstance);
* Initialize a driver that is already loaded in memory. * Initialize a driver that is already loaded in memory.
*/ */
CODE_SEG("INIT") CODE_SEG("INIT")
static
BOOLEAN BOOLEAN
IopInitializeBuiltinDriver(IN PLDR_DATA_TABLE_ENTRY BootLdrEntry) IopInitializeBuiltinDriver(IN PLDR_DATA_TABLE_ENTRY BootLdrEntry)
{ {
@ -869,7 +870,7 @@ IopInitializeBuiltinDriver(IN PLDR_DATA_TABLE_ENTRY BootLdrEntry)
// for that driver, and queue AddDevice call for them. // for that driver, and queue AddDevice call for them.
// The check is possible because HKLM/SYSTEM/CCS/Services/<ServiceName>/Enum directory // The check is possible because HKLM/SYSTEM/CCS/Services/<ServiceName>/Enum directory
// is populated upon a new device arrival based on a (critical) device database // is populated upon a new device arrival based on a (critical) device database
// Legacy drivers may add devices inside DriverEntry. // Legacy drivers may add devices inside DriverEntry.
// We're lazy and always assume that they are doing so // We're lazy and always assume that they are doing so
BOOLEAN deviceAdded = (_Bool)(DriverObject->Flags & DRVO_LEGACY_DRIVER); BOOLEAN deviceAdded = (_Bool)(DriverObject->Flags & DRVO_LEGACY_DRIVER);
@ -936,7 +937,7 @@ IopInitializeBuiltinDriver(IN PLDR_DATA_TABLE_ENTRY BootLdrEntry)
deviceAdded = TRUE; deviceAdded = TRUE;
} }
ExFreePool(kvInfo); ExFreePool(kvInfo);
} }
ZwClose(enumServiceHandle); ZwClose(enumServiceHandle);
@ -1118,7 +1119,7 @@ IopInitializeBootDrivers(VOID)
PiActionEnumRootDevices, PiActionEnumRootDevices,
NULL, NULL,
NULL); NULL);
} }
/* Next entry */ /* Next entry */
NextEntry = NextEntry->Flink; NextEntry = NextEntry->Flink;

View file

@ -26,8 +26,7 @@ static KEVENT IopPnpNotifyEvent;
/* FUNCTIONS *****************************************************************/ /* FUNCTIONS *****************************************************************/
CODE_SEG("INIT") NTSTATUS CODE_SEG("INIT")
NTSTATUS
IopInitPlugPlayEvents(VOID) IopInitPlugPlayEvents(VOID)
{ {
InitializeListHead(&IopPnpEventQueueHead); InitializeListHead(&IopPnpEventQueueHead);

View file

@ -50,7 +50,6 @@ static const CHAR CmpRiseID[] = "RiseRiseRise";
/* FUNCTIONS *****************************************************************/ /* FUNCTIONS *****************************************************************/
CODE_SEG("INIT")
VOID VOID
NTAPI NTAPI
KiSetProcessorType(VOID) KiSetProcessorType(VOID)
@ -121,7 +120,6 @@ KiGetCpuVendor(VOID)
return CPU_UNKNOWN; return CPU_UNKNOWN;
} }
CODE_SEG("INIT")
ULONG ULONG
NTAPI NTAPI
KiGetFeatureBits(VOID) KiGetFeatureBits(VOID)
@ -211,7 +209,6 @@ KiGetFeatureBits(VOID)
return FeatureBits; return FeatureBits;
} }
CODE_SEG("INIT")
VOID VOID
NTAPI NTAPI
KiGetCacheInformation(VOID) KiGetCacheInformation(VOID)

View file

@ -160,7 +160,6 @@ KiInitializePcr(IN PKIPCR Pcr,
KeSetCurrentIrql(PASSIVE_LEVEL); KeSetCurrentIrql(PASSIVE_LEVEL);
} }
CODE_SEG("INIT")
VOID VOID
NTAPI NTAPI
KiInitializeCpu(PKIPCR Pcr) KiInitializeCpu(PKIPCR Pcr)

View file

@ -31,7 +31,6 @@ extern PVOID KiArmVectorTable;
/* FUNCTIONS ******************************************************************/ /* FUNCTIONS ******************************************************************/
CODE_SEG("INIT")
VOID VOID
NTAPI NTAPI
KiInitMachineDependent(VOID) KiInitMachineDependent(VOID)
@ -306,7 +305,6 @@ KiInitializePcr(IN ULONG ProcessorNumber,
#endif #endif
} }
CODE_SEG("INIT")
VOID VOID
KiInitializeMachineType(VOID) KiInitializeMachineType(VOID)
{ {

View file

@ -57,7 +57,6 @@ RDMSR(IN ULONG Register)
/* FUNCTIONS *****************************************************************/ /* FUNCTIONS *****************************************************************/
CODE_SEG("INIT")
VOID VOID
NTAPI NTAPI
KiSetProcessorType(VOID) KiSetProcessorType(VOID)
@ -71,7 +70,6 @@ KiGetCpuVendor(VOID)
return 0; return 0;
} }
CODE_SEG("INIT")
ULONG ULONG
NTAPI NTAPI
KiGetFeatureBits(VOID) KiGetFeatureBits(VOID)
@ -81,7 +79,6 @@ KiGetFeatureBits(VOID)
return FeatureBits; return FeatureBits;
} }
CODE_SEG("INIT")
VOID VOID
NTAPI NTAPI
KiGetCacheInformation(VOID) KiGetCacheInformation(VOID)
@ -127,7 +124,6 @@ KiSaveProcessorControlState(OUT PKPROCESSOR_STATE ProcessorState)
{ {
} }
CODE_SEG("INIT")
VOID VOID
NTAPI NTAPI
KiInitializeMachineType(VOID) KiInitializeMachineType(VOID)
@ -141,14 +137,12 @@ KiLoadFastSyscallMachineSpecificRegisters(IN ULONG_PTR Context)
return 0; return 0;
} }
CODE_SEG("INIT")
VOID VOID
NTAPI NTAPI
KiRestoreFastSyscallReturnState(VOID) KiRestoreFastSyscallReturnState(VOID)
{ {
} }
CODE_SEG("INIT")
ULONG_PTR ULONG_PTR
NTAPI NTAPI
Ki386EnableDE(IN ULONG_PTR Context) Ki386EnableDE(IN ULONG_PTR Context)
@ -156,7 +150,6 @@ Ki386EnableDE(IN ULONG_PTR Context)
return 0; return 0;
} }
CODE_SEG("INIT")
ULONG_PTR ULONG_PTR
NTAPI NTAPI
Ki386EnableFxsr(IN ULONG_PTR Context) Ki386EnableFxsr(IN ULONG_PTR Context)

View file

@ -343,7 +343,6 @@ AppCpuInit:
(PVOID)LoaderBlock); (PVOID)LoaderBlock);
} }
CODE_SEG("INIT")
VOID VOID
NTAPI NTAPI
KiInitMachineDependent(VOID) KiInitMachineDependent(VOID)

View file

@ -1831,6 +1831,7 @@ MiQueryPageTableReferences(IN PVOID Address)
return *RefCount; return *RefCount;
} }
CODE_SEG("INIT")
BOOLEAN BOOLEAN
NTAPI NTAPI
MmArmInitSystem( MmArmInitSystem(
@ -1838,34 +1839,40 @@ MmArmInitSystem(
IN PLOADER_PARAMETER_BLOCK LoaderBlock IN PLOADER_PARAMETER_BLOCK LoaderBlock
); );
CODE_SEG("INIT")
VOID VOID
NTAPI NTAPI
MiInitializeSessionSpaceLayout(VOID); MiInitializeSessionSpaceLayout(VOID);
CODE_SEG("INIT")
NTSTATUS NTSTATUS
NTAPI NTAPI
MiInitMachineDependent( MiInitMachineDependent(
IN PLOADER_PARAMETER_BLOCK LoaderBlock IN PLOADER_PARAMETER_BLOCK LoaderBlock
); );
CODE_SEG("INIT")
VOID VOID
NTAPI NTAPI
MiComputeColorInformation( MiComputeColorInformation(
VOID VOID
); );
CODE_SEG("INIT")
VOID VOID
NTAPI NTAPI
MiMapPfnDatabase( MiMapPfnDatabase(
IN PLOADER_PARAMETER_BLOCK LoaderBlock IN PLOADER_PARAMETER_BLOCK LoaderBlock
); );
CODE_SEG("INIT")
VOID VOID
NTAPI NTAPI
MiInitializeColorTables( MiInitializeColorTables(
VOID VOID
); );
CODE_SEG("INIT")
VOID VOID
NTAPI NTAPI
MiInitializePfnDatabase( MiInitializePfnDatabase(
@ -1884,18 +1891,21 @@ MiInitializeSessionIds(
VOID VOID
); );
CODE_SEG("INIT")
BOOLEAN BOOLEAN
NTAPI NTAPI
MiInitializeMemoryEvents( MiInitializeMemoryEvents(
VOID VOID
); );
CODE_SEG("INIT")
PFN_NUMBER PFN_NUMBER
NTAPI NTAPI
MxGetNextPage( MxGetNextPage(
IN PFN_NUMBER PageCount IN PFN_NUMBER PageCount
); );
CODE_SEG("INIT")
PPHYSICAL_MEMORY_DESCRIPTOR PPHYSICAL_MEMORY_DESCRIPTOR
NTAPI NTAPI
MmInitializeMemoryLimits( MmInitializeMemoryLimits(
@ -1942,18 +1952,21 @@ MiCheckPdeForPagedPool(
IN PVOID Address IN PVOID Address
); );
CODE_SEG("INIT")
VOID VOID
NTAPI NTAPI
MiInitializeNonPagedPoolThresholds( MiInitializeNonPagedPoolThresholds(
VOID VOID
); );
CODE_SEG("INIT")
VOID VOID
NTAPI NTAPI
MiInitializePoolEvents( MiInitializePoolEvents(
VOID VOID
); );
CODE_SEG("INIT")
VOID // VOID //
NTAPI // NTAPI //
InitializePool( // InitializePool( //
@ -1962,6 +1975,7 @@ InitializePool( //
); // ); //
// FIXFIX: THIS ONE TOO // FIXFIX: THIS ONE TOO
CODE_SEG("INIT")
VOID VOID
NTAPI NTAPI
ExInitializePoolDescriptor( ExInitializePoolDescriptor(
@ -1978,6 +1992,7 @@ MiInitializeSessionPool(
VOID VOID
); );
CODE_SEG("INIT")
VOID VOID
NTAPI NTAPI
MiInitializeSystemPtes( MiInitializeSystemPtes(
@ -2139,18 +2154,21 @@ MiLookupDataTableEntry(
IN PVOID Address IN PVOID Address
); );
CODE_SEG("INIT")
VOID VOID
NTAPI NTAPI
MiInitializeDriverLargePageList( MiInitializeDriverLargePageList(
VOID VOID
); );
CODE_SEG("INIT")
VOID VOID
NTAPI NTAPI
MiInitializeLargePageSupport( MiInitializeLargePageSupport(
VOID VOID
); );
CODE_SEG("INIT")
VOID VOID
NTAPI NTAPI
MiSyncCachedRanges( MiSyncCachedRanges(

View file

@ -439,8 +439,8 @@ MiSetupPfnForPageTable(
} }
static static
CODE_SEG("INIT")
VOID VOID
CODE_SEG("INIT")
MiBuildPfnDatabaseFromPageTables(VOID) MiBuildPfnDatabaseFromPageTables(VOID)
{ {
PVOID Address = NULL; PVOID Address = NULL;
@ -539,8 +539,8 @@ MiBuildPfnDatabaseFromPageTables(VOID)
#endif #endif
} }
static
CODE_SEG("INIT") CODE_SEG("INIT")
static
VOID VOID
MiAddDescriptorToDatabase( MiAddDescriptorToDatabase(
PFN_NUMBER BasePage, PFN_NUMBER BasePage,

View file

@ -272,7 +272,6 @@ MmSetPageProtect(IN PEPROCESS Process,
return; return;
} }
CODE_SEG("INIT")
VOID VOID
NTAPI NTAPI
MmInitGlobalKernelPageDirectory(VOID) MmInitGlobalKernelPageDirectory(VOID)

View file

@ -639,7 +639,6 @@ MmSetPageProtect(IN PEPROCESS Process,
return; return;
} }
CODE_SEG("INIT")
VOID VOID
NTAPI NTAPI
MmInitGlobalKernelPageDirectory(VOID) MmInitGlobalKernelPageDirectory(VOID)

View file

@ -16,6 +16,7 @@
#include "ARM3/miarm.h" #include "ARM3/miarm.h"
/* TYPES ********************************************************************/ /* TYPES ********************************************************************/
typedef struct _MM_ALLOCATION_REQUEST typedef struct _MM_ALLOCATION_REQUEST
{ {

View file

@ -50,6 +50,7 @@
#define NDEBUG #define NDEBUG
#include <debug.h> #include <debug.h>
#include <reactos/exeformat.h> #include <reactos/exeformat.h>
#include "ARM3/miarm.h" #include "ARM3/miarm.h"
#undef MmSetPageEntrySectionSegment #undef MmSetPageEntrySectionSegment

View file

@ -11,6 +11,7 @@
#include <ntoskrnl.h> #include <ntoskrnl.h>
#define NDEBUG #define NDEBUG
#include <debug.h> #include <debug.h>
#include <ntlsa.h> #include <ntlsa.h>
typedef struct _TOKEN_AUDIT_POLICY_INFORMATION typedef struct _TOKEN_AUDIT_POLICY_INFORMATION
@ -84,7 +85,7 @@ static const INFORMATION_CLASS_INFO SeTokenInformationClass[] = {
/** /**
* @brief * @brief
* Creates a lock for the token. * Creates a lock for the token.
* *
* @param[in,out] Token * @param[in,out] Token
* A token which lock has to be created. * A token which lock has to be created.
* *
@ -151,7 +152,7 @@ SepDeleteTokenLock(
* *
* @param[in] CountSidArray2 * @param[in] CountSidArray2
* SID count array from the second token. * SID count array from the second token.
* *
* @return * @return
* Returns TRUE if the elements match from either arrays, * Returns TRUE if the elements match from either arrays,
* FALSE otherwise. * FALSE otherwise.
@ -278,7 +279,7 @@ SepComparePrivilegeAndAttributesFromTokens(
* - If both tokens are restricted, every SID that is restricted in either token is * - If both tokens are restricted, every SID that is restricted in either token is
* also restricted in the other one. * also restricted in the other one.
* - Every privilege present in either token is also present in the other one. * - Every privilege present in either token is also present in the other one.
* *
* @param[in] FirstToken * @param[in] FirstToken
* The first token. * The first token.
* *

View file

@ -50,11 +50,13 @@ typedef struct _KBUGCHECK_DATA {
ULONG_PTR Parameter4; ULONG_PTR Parameter4;
} KBUGCHECK_DATA, *PKBUGCHECK_DATA; } KBUGCHECK_DATA, *PKBUGCHECK_DATA;
CODE_SEG("PAGE")
NTSTATUS NTSTATUS
NTAPI NTAPI
AuxKlibInitialize(VOID); AuxKlibInitialize(VOID);
_IRQL_requires_max_(PASSIVE_LEVEL) _IRQL_requires_max_(PASSIVE_LEVEL)
CODE_SEG("PAGE")
NTSTATUS NTSTATUS
NTAPI NTAPI
AuxKlibQueryModuleInformation( AuxKlibQueryModuleInformation(
@ -71,6 +73,7 @@ AuxKlibGetImageExportDirectory(
_In_ PVOID ImageBase); _In_ PVOID ImageBase);
_IRQL_requires_max_(PASSIVE_LEVEL) _IRQL_requires_max_(PASSIVE_LEVEL)
CODE_SEG("PAGE")
NTSTATUS NTSTATUS
NTAPI NTAPI
AuxKlibEnumerateSystemFirmwareTables ( AuxKlibEnumerateSystemFirmwareTables (
@ -80,6 +83,7 @@ AuxKlibEnumerateSystemFirmwareTables (
_Out_opt_ PULONG ReturnLength); _Out_opt_ PULONG ReturnLength);
_IRQL_requires_max_(PASSIVE_LEVEL) _IRQL_requires_max_(PASSIVE_LEVEL)
CODE_SEG("PAGE")
NTSTATUS NTSTATUS
NTAPI NTAPI
AuxKlibGetSystemFirmwareTable ( AuxKlibGetSystemFirmwareTable (

View file

@ -81,6 +81,7 @@ HalInitializeProcessor(
_In_ struct _LOADER_PARAMETER_BLOCK *LoaderBlock _In_ struct _LOADER_PARAMETER_BLOCK *LoaderBlock
); );
CODE_SEG("INIT")
NTHALAPI NTHALAPI
BOOLEAN BOOLEAN
NTAPI NTAPI
@ -176,6 +177,7 @@ HalGetInterruptSource(
); );
#endif #endif
CODE_SEG("INIT")
NTHALAPI NTHALAPI
VOID VOID
NTAPI NTAPI

View file

@ -2,6 +2,8 @@
* I/O Manager Functions * * I/O Manager Functions *
******************************************************************************/ ******************************************************************************/
#include <section_attribs.h>
$if (_WDMDDK_) $if (_WDMDDK_)
/* /*
* NTSTATUS * NTSTATUS
@ -1138,6 +1140,7 @@ IoRegisterDeviceInterface(
_IRQL_requires_max_(PASSIVE_LEVEL) _IRQL_requires_max_(PASSIVE_LEVEL)
_Must_inspect_result_ _Must_inspect_result_
CODE_SEG("PAGE")
NTKERNELAPI NTKERNELAPI
NTSTATUS NTSTATUS
NTAPI NTAPI
@ -1289,6 +1292,7 @@ IoStopTimer(
_IRQL_requires_max_(PASSIVE_LEVEL) _IRQL_requires_max_(PASSIVE_LEVEL)
__drv_freesMem(Pool) __drv_freesMem(Pool)
CODE_SEG("PAGE")
NTKERNELAPI NTKERNELAPI
NTSTATUS NTSTATUS
NTAPI NTAPI

View file

@ -206,7 +206,6 @@ Pc98VidGetChildState(
return NO_ERROR; return NO_ERROR;
} }
CODE_SEG("PAGE")
BOOLEAN BOOLEAN
NTAPI NTAPI
Pc98VidStartIO( Pc98VidStartIO(

View file

@ -193,7 +193,6 @@ Pc98VidGetVideoChildDescriptor(
return ERROR_NO_MORE_DEVICES; return ERROR_NO_MORE_DEVICES;
} }
CODE_SEG("INIT")
ULONG ULONG
NTAPI NTAPI
DriverEntry( DriverEntry(

View file

@ -39,6 +39,7 @@ EngpPopulateDeviceModeList(
_Inout_ PGRAPHICS_DEVICE pGraphicsDevice, _Inout_ PGRAPHICS_DEVICE pGraphicsDevice,
_In_ PDEVMODEW pdmDefault); _In_ PDEVMODEW pdmDefault);
CODE_SEG("INIT")
NTSTATUS NTSTATUS
NTAPI NTAPI
InitDeviceImpl(VOID); InitDeviceImpl(VOID);

View file

@ -29,6 +29,7 @@ typedef struct _LDEVOBJ
} LDEVOBJ, *PLDEVOBJ; } LDEVOBJ, *PLDEVOBJ;
CODE_SEG("INIT")
NTSTATUS NTSTATUS
NTAPI NTAPI
InitLDEVImpl(VOID); InitLDEVImpl(VOID);
@ -50,6 +51,7 @@ NTAPI
EngGetLDEV( EngGetLDEV(
PDEVMODEW pdm); PDEVMODEW pdm);
CODE_SEG("INIT")
NTSTATUS NTSTATUS
APIENTRY APIENTRY
DriverEntry ( DriverEntry (

View file

@ -196,6 +196,7 @@ PDEVOBJ_vGetDeviceCaps(
_In_ PPDEVOBJ ppdev, _In_ PPDEVOBJ ppdev,
_Out_ PDEVCAPS pDevCaps); _Out_ PDEVCAPS pDevCaps);
CODE_SEG("INIT")
NTSTATUS NTSTATUS
NTAPI NTAPI
InitPDEVImpl(VOID); InitPDEVImpl(VOID);

View file

@ -131,6 +131,7 @@ struct _SURFACE;
struct _PALETTE; struct _PALETTE;
struct _DC; struct _DC;
CODE_SEG("INIT")
NTSTATUS NTSTATUS
NTAPI NTAPI
InitBrushImpl(VOID); InitBrushImpl(VOID);

View file

@ -182,7 +182,7 @@ COLORREF FASTCALL IntSetDCPenColor(HDC,COLORREF);
int FASTCALL GreGetGraphicsMode(HDC); int FASTCALL GreGetGraphicsMode(HDC);
BOOL FASTCALL GreSetBrushOrg(HDC,INT,INT,LPPOINT); BOOL FASTCALL GreSetBrushOrg(HDC,INT,INT,LPPOINT);
NTSTATUS NTAPI InitDcImpl(VOID); CODE_SEG("INIT") NTSTATUS NTAPI InitDcImpl(VOID);
PPDEVOBJ FASTCALL IntEnumHDev(VOID); PPDEVOBJ FASTCALL IntEnumHDev(VOID);
PDC NTAPI DC_AllocDcWithHandle(GDILOOBJTYPE eDcObjType); PDC NTAPI DC_AllocDcWithHandle(GDILOOBJTYPE eDcObjType);
BOOL NTAPI DC_bAllocDcAttr(PDC pdc); BOOL NTAPI DC_bAllocDcAttr(PDC pdc);

View file

@ -73,6 +73,7 @@ enum _GDIOBJLAGS
GDIOBJFLAG_IGNORELOCK = 0x02 GDIOBJFLAG_IGNORELOCK = 0x02
}; };
CODE_SEG("INIT")
NTSTATUS NTSTATUS
NTAPI NTAPI
InitGdiHandleTable(VOID); InitGdiHandleTable(VOID);

View file

@ -59,6 +59,7 @@ extern PPALETTE appalSurfaceDefault[];
#define PALETTE_ShareUnlockPalette(ppal) \ #define PALETTE_ShareUnlockPalette(ppal) \
GDIOBJ_vDereferenceObject(&ppal->BaseObject) GDIOBJ_vDereferenceObject(&ppal->BaseObject)
CODE_SEG("INIT")
NTSTATUS NTSTATUS
NTAPI NTAPI
InitPaletteImpl(VOID); InitPaletteImpl(VOID);

View file

@ -41,7 +41,7 @@ typedef struct tagDCE
#define DCX_NORECOMPUTE 0x00100000 #define DCX_NORECOMPUTE 0x00100000
#define DCX_INDESTROY 0x00400000 #define DCX_INDESTROY 0x00400000
NTSTATUS NTAPI InitDCEImpl(VOID); CODE_SEG("INIT") NTSTATUS NTAPI InitDCEImpl(VOID);
PDCE FASTCALL DceAllocDCE(PWND Window, DCE_TYPE Type); PDCE FASTCALL DceAllocDCE(PWND Window, DCE_TYPE Type);
HWND FASTCALL IntWindowFromDC(HDC hDc); HWND FASTCALL IntWindowFromDC(HDC hDc);
void FASTCALL DceFreeDCE(PDCE dce, BOOLEAN Force); void FASTCALL DceFreeDCE(PDCE dce, BOOLEAN Force);

View file

@ -94,6 +94,7 @@ typedef struct _SHELL_HOOK_WINDOW
HWND hWnd; HWND hWnd;
} SHELL_HOOK_WINDOW, *PSHELL_HOOK_WINDOW; } SHELL_HOOK_WINDOW, *PSHELL_HOOK_WINDOW;
CODE_SEG("INIT")
NTSTATUS NTSTATUS
NTAPI NTAPI
InitDesktopImpl(VOID); InitDesktopImpl(VOID);

View file

@ -59,7 +59,7 @@ extern PATTACHINFO gpai;
#define LP_DO_NOT_CARE_BIT (1<<25) // For GetKeyNameText #define LP_DO_NOT_CARE_BIT (1<<25) // For GetKeyNameText
/* General */ /* General */
NTSTATUS NTAPI InitInputImpl(VOID); CODE_SEG("INIT") NTSTATUS NTAPI InitInputImpl(VOID);
VOID NTAPI RawInputThreadMain(VOID); VOID NTAPI RawInputThreadMain(VOID);
BOOL FASTCALL IntBlockInput(PTHREADINFO W32Thread, BOOL BlockIt); BOOL FASTCALL IntBlockInput(PTHREADINFO W32Thread, BOOL BlockIt);
NTSTATUS FASTCALL UserAttachThreadInput(PTHREADINFO,PTHREADINFO,BOOL); NTSTATUS FASTCALL UserAttachThreadInput(PTHREADINFO,PTHREADINFO,BOOL);
@ -68,7 +68,7 @@ VOID FASTCALL DoTheScreenSaver(VOID);
#define ThreadHasInputAccess(W32Thread) (TRUE) #define ThreadHasInputAccess(W32Thread) (TRUE)
/* Keyboard */ /* Keyboard */
NTSTATUS NTAPI InitKeyboardImpl(VOID); CODE_SEG("INIT") NTSTATUS NTAPI InitKeyboardImpl(VOID);
VOID NTAPI UserInitKeyboard(HANDLE hKeyboardDevice); VOID NTAPI UserInitKeyboard(HANDLE hKeyboardDevice);
PKL W32kGetDefaultKeyLayout(VOID); PKL W32kGetDefaultKeyLayout(VOID);
VOID NTAPI UserProcessKeyboardInput(PKEYBOARD_INPUT_DATA pKeyInput); VOID NTAPI UserProcessKeyboardInput(PKEYBOARD_INPUT_DATA pKeyInput);

View file

@ -158,7 +158,7 @@ BOOLEAN FASTCALL MsqInitializeMessageQueue(PTHREADINFO, PUSER_MESSAGE_QUEUE);
PUSER_MESSAGE_QUEUE FASTCALL MsqCreateMessageQueue(PTHREADINFO); PUSER_MESSAGE_QUEUE FASTCALL MsqCreateMessageQueue(PTHREADINFO);
VOID FASTCALL MsqCleanupThreadMsgs(PTHREADINFO); VOID FASTCALL MsqCleanupThreadMsgs(PTHREADINFO);
VOID FASTCALL MsqDestroyMessageQueue(_In_ PTHREADINFO pti); VOID FASTCALL MsqDestroyMessageQueue(_In_ PTHREADINFO pti);
NTSTATUS NTAPI MsqInitializeImpl(VOID); CODE_SEG("INIT") NTSTATUS NTAPI MsqInitializeImpl(VOID);
BOOLEAN FASTCALL co_MsqDispatchOneSentMessage(_In_ PTHREADINFO pti); BOOLEAN FASTCALL co_MsqDispatchOneSentMessage(_In_ PTHREADINFO pti);
NTSTATUS FASTCALL NTSTATUS FASTCALL
co_MsqWaitForNewMessages(PTHREADINFO pti, PWND WndFilter, co_MsqWaitForNewMessages(PTHREADINFO pti, PWND WndFilter,

View file

@ -19,7 +19,7 @@ extern ATOM gaGuiConsoleWndClass;
extern ATOM AtomDDETrack; extern ATOM AtomDDETrack;
extern ATOM AtomQOS; extern ATOM AtomQOS;
NTSTATUS NTAPI InitUserImpl(VOID); CODE_SEG("INIT") NTSTATUS NTAPI InitUserImpl(VOID);
VOID FASTCALL CleanupUserImpl(VOID); VOID FASTCALL CleanupUserImpl(VOID);
VOID FASTCALL UserEnterShared(VOID); VOID FASTCALL UserEnterShared(VOID);
VOID FASTCALL UserEnterExclusive(VOID); VOID FASTCALL UserEnterExclusive(VOID);

View file

@ -32,7 +32,7 @@ typedef struct _TIMER
extern PKTIMER MasterTimer; extern PKTIMER MasterTimer;
NTSTATUS NTAPI InitTimerImpl(VOID); CODE_SEG("INIT") NTSTATUS NTAPI InitTimerImpl(VOID);
BOOL FASTCALL DestroyTimersForThread(PTHREADINFO pti); BOOL FASTCALL DestroyTimersForThread(PTHREADINFO pti);
BOOL FASTCALL DestroyTimersForWindow(PTHREADINFO pti, PWND Window); BOOL FASTCALL DestroyTimersForWindow(PTHREADINFO pti, PWND Window);
BOOL FASTCALL IntKillTimer(PWND Window, UINT_PTR IDEvent, BOOL SystemTimer); BOOL FASTCALL IntKillTimer(PWND Window, UINT_PTR IDEvent, BOOL SystemTimer);

View file

@ -73,6 +73,7 @@ extern UNICODE_STRING gustrWindowStationsDir;
WINSTA_READSCREEN | \ WINSTA_READSCREEN | \
WINSTA_WRITEATTRIBUTES WINSTA_WRITEATTRIBUTES
CODE_SEG("INIT")
NTSTATUS NTSTATUS
NTAPI NTAPI
InitWindowStationImpl(VOID); InitWindowStationImpl(VOID);