https://git.reactos.org/?p=reactos.git;a=commitdiff;h=5c7ce4475e246560d1622b8cc60dc603e3955f66
commit 5c7ce4475e246560d1622b8cc60dc603e3955f66 Author: Victor Perevertkin <victor.perevert...@reactos.org> AuthorDate: Tue Oct 6 22:44:01 2020 +0300 Commit: Victor Perevertkin <victor.perevert...@reactos.org> CommitDate: Mon Nov 2 21:45:31 2020 +0300 [REACTOS] Cleanup INIT and some PAGE section allocations - Change INIT_FUNCTION and INIT_SECTION to CODE_SEG("INIT") and DATA_SEG("INIT") respectively - Remove INIT_FUNCTION from function prototypes - Remove alloc_text pragma calls as they are not needed anymore --- drivers/filesystems/fastfat/fastio.c | 2 +- drivers/filesystems/fastfat/iface.c | 6 +- drivers/filesystems/fastfat/vfat.h | 2 - drivers/filesystems/mup/dfs.c | 2 +- drivers/filesystems/mup/dfs.h | 1 - drivers/filesystems/mup/mup.c | 12 +-- drivers/filesystems/ntfs/ntfs.c | 4 +- drivers/filesystems/ntfs/ntfs.h | 2 - drivers/storage/mountmgr/mntmgr.h | 2 - drivers/storage/mountmgr/mountmgr.c | 4 +- hal/halx86/acpi/busemul.c | 2 +- hal/halx86/acpi/halacpi.c | 14 +-- hal/halx86/apic/rtctimer.c | 6 +- hal/halx86/generic/cmos.c | 6 +- hal/halx86/generic/dma.c | 6 +- hal/halx86/generic/halinit.c | 16 +--- hal/halx86/generic/misc.c | 9 +- hal/halx86/generic/timer.c | 6 +- hal/halx86/generic/usage.c | 53 ++--------- hal/halx86/include/bus.h | 4 - hal/halx86/include/halacpi.h | 1 - hal/halx86/include/halp.h | 19 +--- hal/halx86/legacy/bus/pcibus.c | 18 ++-- hal/halx86/legacy/bussupp.c | 135 ++++------------------------ hal/halx86/legacy/halpcat.c | 21 ++--- hal/halx86/pc98/cmos.c | 6 +- hal/halx86/pcidata.cmake | 8 +- hal/halx86/up/halinit_mini.c | 2 +- ntoskrnl/cache/fssup.c | 4 +- ntoskrnl/cache/newcc.h | 3 - ntoskrnl/cache/section/io.c | 5 -- ntoskrnl/cc/cacheman.c | 4 +- ntoskrnl/cc/view.c | 6 +- ntoskrnl/config/cmalloc.c | 4 +- ntoskrnl/config/cmboot.c | 20 ++--- ntoskrnl/config/cmconfig.c | 6 +- ntoskrnl/config/cmcontrl.c | 6 +- ntoskrnl/config/cmdata.c | 8 +- ntoskrnl/config/cmdelay.c | 4 +- ntoskrnl/config/cmhook.c | 2 +- ntoskrnl/config/cmkcbncb.c | 2 +- ntoskrnl/config/cmsysini.c | 20 ++--- ntoskrnl/dbgk/dbgkobj.c | 2 +- ntoskrnl/ex/callback.c | 2 +- ntoskrnl/ex/event.c | 6 +- ntoskrnl/ex/evtpair.c | 6 +- ntoskrnl/ex/handle.c | 2 +- ntoskrnl/ex/hdlsterm.c | 2 +- ntoskrnl/ex/init.c | 26 +++--- ntoskrnl/ex/keyedevt.c | 2 +- ntoskrnl/ex/lookas.c | 10 +-- ntoskrnl/ex/mutant.c | 6 +- ntoskrnl/ex/profile.c | 6 +- ntoskrnl/ex/pushlock.c | 2 +- ntoskrnl/ex/resource.c | 2 +- ntoskrnl/ex/sem.c | 6 +- ntoskrnl/ex/timer.c | 2 +- ntoskrnl/ex/uuid.c | 10 +-- ntoskrnl/ex/win32k.c | 6 +- ntoskrnl/ex/work.c | 6 +- ntoskrnl/ex/xipdisp.c | 4 +- ntoskrnl/fsrtl/fsrtlpc.c | 4 +- ntoskrnl/fsrtl/largemcb.c | 2 +- ntoskrnl/fsrtl/stackovf.c | 2 +- ntoskrnl/fsrtl/tunnel.c | 4 +- ntoskrnl/inbv/inbv.c | 20 ++--- ntoskrnl/include/internal/amd64/mm.h | 1 - ntoskrnl/include/internal/cc.h | 3 - ntoskrnl/include/internal/cm.h | 16 ---- ntoskrnl/include/internal/dbgk.h | 1 - ntoskrnl/include/internal/ex.h | 21 ----- ntoskrnl/include/internal/fsrtl.h | 3 - ntoskrnl/include/internal/i386/ke.h | 21 +---- ntoskrnl/include/internal/inbv.h | 8 -- ntoskrnl/include/internal/io.h | 13 --- ntoskrnl/include/internal/ke.h | 9 -- ntoskrnl/include/internal/lpc.h | 1 - ntoskrnl/include/internal/mm.h | 14 --- ntoskrnl/include/internal/ob.h | 3 - ntoskrnl/include/internal/po.h | 2 - ntoskrnl/include/internal/ps.h | 4 - ntoskrnl/include/internal/se.h | 6 -- ntoskrnl/io/iomgr/arcname.c | 12 +-- ntoskrnl/io/iomgr/bootlog.c | 9 +- ntoskrnl/io/iomgr/driver.c | 8 +- ntoskrnl/io/iomgr/iomgr.c | 14 ++- ntoskrnl/io/iomgr/ramdisk.c | 8 +- ntoskrnl/io/iomgr/rawfs.c | 2 +- ntoskrnl/io/iomgr/volume.c | 5 -- ntoskrnl/io/pnpmgr/plugplay.c | 7 +- ntoskrnl/io/pnpmgr/pnpinit.c | 4 +- ntoskrnl/io/pnpmgr/pnpmgr.c | 6 +- ntoskrnl/kd/kdinit.c | 4 +- ntoskrnl/kd/kdio.c | 4 +- ntoskrnl/kd64/kdinit.c | 4 +- ntoskrnl/ke/amd64/cpu.c | 3 + ntoskrnl/ke/amd64/except.c | 2 +- ntoskrnl/ke/amd64/kiinit.c | 7 +- ntoskrnl/ke/amd64/krnlinit.c | 6 +- ntoskrnl/ke/arm/kiinit.c | 2 + ntoskrnl/ke/bug.c | 6 +- ntoskrnl/ke/config.c | 4 +- ntoskrnl/ke/i386/cpu.c | 32 +++---- ntoskrnl/ke/i386/exp.c | 2 +- ntoskrnl/ke/i386/kiinit.c | 12 +-- ntoskrnl/ke/i386/mtrr.c | 4 +- ntoskrnl/ke/i386/patpge.c | 6 +- ntoskrnl/ke/krnlinit.c | 8 +- ntoskrnl/ke/powerpc/cpu.c | 7 ++ ntoskrnl/ke/powerpc/exp.c | 2 +- ntoskrnl/ke/powerpc/kiinit.c | 1 + ntoskrnl/ke/powerpc/ppc_irq.c | 2 +- ntoskrnl/lpc/port.c | 2 +- ntoskrnl/mm/ARM3/arm/init.c | 2 +- ntoskrnl/mm/ARM3/expool.c | 6 +- ntoskrnl/mm/ARM3/i386/init.c | 6 +- ntoskrnl/mm/ARM3/largepag.c | 6 +- ntoskrnl/mm/ARM3/miarm.h | 19 ---- ntoskrnl/mm/ARM3/mminit.c | 40 ++++----- ntoskrnl/mm/ARM3/pool.c | 6 +- ntoskrnl/mm/ARM3/procsup.c | 4 +- ntoskrnl/mm/ARM3/sysldr.c | 12 +-- ntoskrnl/mm/ARM3/syspte.c | 2 +- ntoskrnl/mm/amd64/init.c | 16 ++-- ntoskrnl/mm/arm/page.c | 3 +- ntoskrnl/mm/arm/stubs.c | 1 + ntoskrnl/mm/balance.c | 13 +-- ntoskrnl/mm/i386/page.c | 6 +- ntoskrnl/mm/i386/pagepae.c | 6 +- ntoskrnl/mm/mminit.c | 10 +-- ntoskrnl/mm/pagefile.c | 6 +- ntoskrnl/mm/powerpc/page.c | 6 +- ntoskrnl/mm/rmap.c | 6 +- ntoskrnl/mm/section.c | 10 +-- ntoskrnl/ob/obinit.c | 8 +- ntoskrnl/ob/obname.c | 6 +- ntoskrnl/ob/obsdcach.c | 2 +- ntoskrnl/po/power.c | 4 +- ntoskrnl/ps/apphelp.c | 2 +- ntoskrnl/ps/job.c | 2 +- ntoskrnl/ps/psmgr.c | 18 ++-- ntoskrnl/ps/quota.c | 2 +- ntoskrnl/se/acl.c | 6 +- ntoskrnl/se/priv.c | 6 +- ntoskrnl/se/sd.c | 6 +- ntoskrnl/se/semgr.c | 8 +- ntoskrnl/se/sid.c | 6 +- ntoskrnl/se/token.c | 7 +- ntoskrnl/vdm/vdmmain.c | 4 +- sdk/include/ndk/halfuncs.h | 2 - sdk/include/ndk/kefuncs.h | 4 +- win32ss/drivers/miniport/pc98vid/hardware.c | 11 +-- win32ss/drivers/miniport/pc98vid/ioctl.c | 23 ++--- win32ss/drivers/miniport/pc98vid/pc98vid.c | 11 +-- win32ss/gdi/eng/device.c | 2 +- win32ss/gdi/eng/device.h | 1 - win32ss/gdi/eng/engbrush.c | 2 +- win32ss/gdi/eng/ldevobj.c | 2 +- win32ss/gdi/eng/ldevobj.h | 2 - win32ss/gdi/eng/pdevobj.c | 2 +- win32ss/gdi/eng/pdevobj.h | 1 - win32ss/gdi/ntgdi/brush.h | 1 - win32ss/gdi/ntgdi/dc.h | 2 +- win32ss/gdi/ntgdi/dclife.c | 2 +- win32ss/gdi/ntgdi/gdiobj.c | 2 +- win32ss/gdi/ntgdi/gdiobj.h | 1 - win32ss/gdi/ntgdi/palette.c | 2 +- win32ss/gdi/ntgdi/palette.h | 1 - win32ss/user/ntuser/dce.h | 2 +- win32ss/user/ntuser/desktop.c | 2 +- win32ss/user/ntuser/desktop.h | 1 - win32ss/user/ntuser/input.c | 2 +- win32ss/user/ntuser/input.h | 4 +- win32ss/user/ntuser/keyboard.c | 2 +- win32ss/user/ntuser/main.c | 2 +- win32ss/user/ntuser/msgqueue.c | 2 +- win32ss/user/ntuser/msgqueue.h | 2 +- win32ss/user/ntuser/ntuser.c | 2 +- win32ss/user/ntuser/ntuser.h | 2 +- win32ss/user/ntuser/timer.c | 2 +- win32ss/user/ntuser/timer.h | 2 +- win32ss/user/ntuser/windc.c | 2 +- win32ss/user/ntuser/winsta.c | 2 +- win32ss/user/ntuser/winsta.h | 1 - 184 files changed, 397 insertions(+), 906 deletions(-) diff --git a/drivers/filesystems/fastfat/fastio.c b/drivers/filesystems/fastfat/fastio.c index 428fdbb2201..5f1ab235dc6 100644 --- a/drivers/filesystems/fastfat/fastio.c +++ b/drivers/filesystems/fastfat/fastio.c @@ -753,7 +753,7 @@ VfatReleaseFromLazyWrite( ExReleaseResourceLite(&(Fcb->MainResource)); } -INIT_FUNCTION +CODE_SEG("INIT") VOID VfatInitFastIoRoutines( PFAST_IO_DISPATCH FastIoDispatch) diff --git a/drivers/filesystems/fastfat/iface.c b/drivers/filesystems/fastfat/iface.c index f4c6608a3ed..9b3294211f3 100644 --- a/drivers/filesystems/fastfat/iface.c +++ b/drivers/filesystems/fastfat/iface.c @@ -31,10 +31,6 @@ #define NDEBUG #include <debug.h> -#if defined(ALLOC_PRAGMA) -#pragma alloc_text(INIT, DriverEntry) -#endif - /* GLOBALS *****************************************************************/ PVFAT_GLOBAL_DATA VfatGlobalData; @@ -48,7 +44,7 @@ PVFAT_GLOBAL_DATA VfatGlobalData; * RegistryPath = path to our configuration entries * RETURNS: Success or failure */ -INIT_FUNCTION +CODE_SEG("INIT") NTSTATUS NTAPI DriverEntry( diff --git a/drivers/filesystems/fastfat/vfat.h b/drivers/filesystems/fastfat/vfat.h index 943c6b76ab1..e3e5073c411 100644 --- a/drivers/filesystems/fastfat/vfat.h +++ b/drivers/filesystems/fastfat/vfat.h @@ -824,7 +824,6 @@ VfatSetExtendedAttributes( /* fastio.c */ -INIT_FUNCTION VOID VfatInitFastIoRoutines( PFAST_IO_DISPATCH FastIoDispatch); @@ -1129,7 +1128,6 @@ VfatFileSystemControl( /* iface.c */ -INIT_FUNCTION NTSTATUS NTAPI DriverEntry( diff --git a/drivers/filesystems/mup/dfs.c b/drivers/filesystems/mup/dfs.c index 13a4fe205de..61b54d63dd1 100644 --- a/drivers/filesystems/mup/dfs.c +++ b/drivers/filesystems/mup/dfs.c @@ -82,7 +82,7 @@ DfsUnload(PDRIVER_OBJECT DriverObject) UNIMPLEMENTED; } -INIT_FUNCTION +CODE_SEG("INIT") NTSTATUS DfsDriverEntry(PDRIVER_OBJECT DriverObject, PUNICODE_STRING RegistryPath) diff --git a/drivers/filesystems/mup/dfs.h b/drivers/filesystems/mup/dfs.h index 49194bdc7f5..e8268984ba4 100644 --- a/drivers/filesystems/mup/dfs.h +++ b/drivers/filesystems/mup/dfs.h @@ -51,7 +51,6 @@ DfsUnload( PDRIVER_OBJECT DriverObject ); -INIT_FUNCTION NTSTATUS DfsDriverEntry( PDRIVER_OBJECT DriverObject, diff --git a/drivers/filesystems/mup/mup.c b/drivers/filesystems/mup/mup.c index dfc4e71cf97..760bcfd5368 100644 --- a/drivers/filesystems/mup/mup.c +++ b/drivers/filesystems/mup/mup.c @@ -32,7 +32,7 @@ #define NDEBUG #include <debug.h> -INIT_FUNCTION +CODE_SEG("INIT") NTSTATUS NTAPI DriverEntry( @@ -40,13 +40,13 @@ DriverEntry( PUNICODE_STRING RegistryPath ); -INIT_FUNCTION +CODE_SEG("INIT") VOID MupInitializeData( VOID ); -INIT_FUNCTION +CODE_SEG("INIT") VOID MupInitializeVcb( PMUP_VCB Vcb @@ -79,7 +79,7 @@ NTSTATUS MupOrderedErrorList[] = { STATUS_UNSUCCESSFUL, /* FUNCTIONS ****************************************************************/ -INIT_FUNCTION +CODE_SEG("INIT") VOID MupInitializeData(VOID) { @@ -105,7 +105,7 @@ MupUninitializeData() ExDeleteResourceLite(&MupVcbLock); } -INIT_FUNCTION +CODE_SEG("INIT") VOID MupInitializeVcb(PMUP_VCB Vcb) { @@ -2510,7 +2510,7 @@ MupUnload(PDRIVER_OBJECT DriverObject) * RegistryPath = path to our configuration entries * RETURNS: Success or failure */ -INIT_FUNCTION +CODE_SEG("INIT") NTSTATUS NTAPI DriverEntry(PDRIVER_OBJECT DriverObject, diff --git a/drivers/filesystems/ntfs/ntfs.c b/drivers/filesystems/ntfs/ntfs.c index a102439cf90..087d56ccdbd 100644 --- a/drivers/filesystems/ntfs/ntfs.c +++ b/drivers/filesystems/ntfs/ntfs.c @@ -49,7 +49,7 @@ PNTFS_GLOBAL_DATA NtfsGlobalData = NULL; * RegistryPath = path to our configuration entries * RETURNS: Success or failure */ -INIT_FUNCTION +CODE_SEG("INIT") NTSTATUS NTAPI DriverEntry(PDRIVER_OBJECT DriverObject, @@ -169,7 +169,7 @@ DriverEntry(PDRIVER_OBJECT DriverObject, * DriverObject = object describing this driver * RETURNS: Nothing */ -INIT_FUNCTION +CODE_SEG("INIT") VOID NTAPI NtfsInitializeFunctionPointers(PDRIVER_OBJECT DriverObject) diff --git a/drivers/filesystems/ntfs/ntfs.h b/drivers/filesystems/ntfs/ntfs.h index aa85b810883..9b00ca3ec15 100644 --- a/drivers/filesystems/ntfs/ntfs.h +++ b/drivers/filesystems/ntfs/ntfs.h @@ -1276,10 +1276,8 @@ NtfsSetVolumeInformation(PNTFS_IRP_CONTEXT IrpContext); /* ntfs.c */ -INIT_FUNCTION DRIVER_INITIALIZE DriverEntry; -INIT_FUNCTION VOID NTAPI NtfsInitializeFunctionPointers(PDRIVER_OBJECT DriverObject); diff --git a/drivers/storage/mountmgr/mntmgr.h b/drivers/storage/mountmgr/mntmgr.h index b92698fdeaf..11fa4bf3b6c 100644 --- a/drivers/storage/mountmgr/mntmgr.h +++ b/drivers/storage/mountmgr/mntmgr.h @@ -176,7 +176,6 @@ extern UNICODE_STRING Volume; extern KEVENT UnloadEvent; extern LONG Unloading; -INIT_FUNCTION DRIVER_INITIALIZE DriverEntry; VOID @@ -229,7 +228,6 @@ HasDriveLetter( IN PDEVICE_INFORMATION DeviceInformation ); -INIT_FUNCTION BOOLEAN MountmgrReadNoAutoMount( IN PUNICODE_STRING RegistryPath diff --git a/drivers/storage/mountmgr/mountmgr.c b/drivers/storage/mountmgr/mountmgr.c index b79bb0f9f01..9ec66ed7217 100644 --- a/drivers/storage/mountmgr/mountmgr.c +++ b/drivers/storage/mountmgr/mountmgr.c @@ -899,7 +899,7 @@ MountMgrUnload(IN struct _DRIVER_OBJECT *DriverObject) /* * @implemented */ -INIT_FUNCTION +CODE_SEG("INIT") BOOLEAN MountmgrReadNoAutoMount(IN PUNICODE_STRING RegistryPath) { @@ -1793,7 +1793,7 @@ MountMgrShutdown(IN PDEVICE_OBJECT DeviceObject, /* FUNCTIONS ****************************************************************/ -INIT_FUNCTION +CODE_SEG("INIT") NTSTATUS NTAPI DriverEntry(IN PDRIVER_OBJECT DriverObject, diff --git a/hal/halx86/acpi/busemul.c b/hal/halx86/acpi/busemul.c index d63c89cce50..e26600a984b 100644 --- a/hal/halx86/acpi/busemul.c +++ b/hal/halx86/acpi/busemul.c @@ -16,7 +16,7 @@ /* PRIVATE FUNCTIONS **********************************************************/ -INIT_FUNCTION +CODE_SEG("INIT") VOID NTAPI HalpRegisterKdSupportFunctions(VOID) diff --git a/hal/halx86/acpi/halacpi.c b/hal/halx86/acpi/halacpi.c index 7f2779e19cd..da46365b049 100644 --- a/hal/halx86/acpi/halacpi.c +++ b/hal/halx86/acpi/halacpi.c @@ -786,7 +786,7 @@ HaliAcpiTimerInit(IN ULONG TimerPort, //HalaAcpiTimerInit(TimerPort, TimerValExt); } -INIT_FUNCTION +CODE_SEG("INIT") NTSTATUS NTAPI HalpSetupAcpiPhase0(IN PLOADER_PARAMETER_BLOCK LoaderBlock) @@ -907,7 +907,7 @@ HalpSetupAcpiPhase0(IN PLOADER_PARAMETER_BLOCK LoaderBlock) return STATUS_SUCCESS; } -INIT_FUNCTION +CODE_SEG("INIT") VOID NTAPI HalpInitializePciBus(VOID) @@ -929,7 +929,7 @@ HalpInitNonBusHandler(VOID) HalFindBusAddressTranslation = HalpFindBusAddressTranslation; } -INIT_FUNCTION +CODE_SEG("INIT") VOID NTAPI HalpInitBusHandlers(VOID) @@ -938,7 +938,7 @@ HalpInitBusHandlers(VOID) HalpInitNonBusHandler(); } -INIT_FUNCTION +CODE_SEG("INIT") VOID NTAPI HalpBuildAddressMap(VOID) @@ -946,7 +946,7 @@ HalpBuildAddressMap(VOID) /* ACPI is magic baby */ } -INIT_FUNCTION +CODE_SEG("INIT") BOOLEAN NTAPI HalpGetDebugPortTable(VOID) @@ -955,7 +955,7 @@ HalpGetDebugPortTable(VOID) (HalpDebugPortTable->BaseAddress.AddressSpaceID == 1)); } -INIT_FUNCTION +CODE_SEG("INIT") ULONG NTAPI HalpIs16BitPortDecodeSupported(VOID) @@ -1065,7 +1065,7 @@ HalpQueryAcpiResourceRequirements(OUT PIO_RESOURCE_REQUIREMENTS_LIST *Requiremen /* * @implemented */ -INIT_FUNCTION +CODE_SEG("INIT") VOID NTAPI HalReportResourceUsage(VOID) diff --git a/hal/halx86/apic/rtctimer.c b/hal/halx86/apic/rtctimer.c index 62318f724ba..817e6e2de88 100644 --- a/hal/halx86/apic/rtctimer.c +++ b/hal/halx86/apic/rtctimer.c @@ -15,10 +15,6 @@ #define NDEBUG #include <debug.h> -#if defined(ALLOC_PRAGMA) && !defined(_MINIHAL_) -#pragma alloc_text(INIT, HalpInitializeClock) -#endif - /* GLOBALS ********************************************************************/ const UCHAR HalpClockVector = 0xD1; @@ -92,7 +88,7 @@ RtcSetClockRate(UCHAR ClockRate) HalpReleaseCmosSpinLock(); } -INIT_FUNCTION +CODE_SEG("INIT") VOID NTAPI HalpInitializeClock(VOID) diff --git a/hal/halx86/generic/cmos.c b/hal/halx86/generic/cmos.c index 2703c6a89ff..75a09b1bfe2 100644 --- a/hal/halx86/generic/cmos.c +++ b/hal/halx86/generic/cmos.c @@ -13,10 +13,6 @@ #define NDEBUG #include <debug.h> -#if defined(ALLOC_PRAGMA) && !defined(_MINIHAL_) -#pragma alloc_text(INIT, HalpInitializeCmos) -#endif - /* GLOBALS *******************************************************************/ UCHAR HalpCmosCenturyOffset; @@ -157,7 +153,7 @@ HalpSetCmosData(IN ULONG BusNumber, return Length - Len; } -INIT_FUNCTION +CODE_SEG("INIT") VOID NTAPI HalpInitializeCmos(VOID) diff --git a/hal/halx86/generic/dma.c b/hal/halx86/generic/dma.c index d8a8a696319..e7cbeb32f7d 100644 --- a/hal/halx86/generic/dma.c +++ b/hal/halx86/generic/dma.c @@ -77,10 +77,6 @@ #define NDEBUG #include <debug.h> -#if defined(ALLOC_PRAGMA) && !defined(_MINIHAL_) -#pragma alloc_text(INIT, HalpInitDma) -#endif - #define MAX_SG_ELEMENTS 0x10 #ifndef _MINIHAL_ @@ -152,7 +148,7 @@ static DMA_OPERATIONS HalpDmaOperations = { #endif #ifndef _MINIHAL_ -INIT_FUNCTION +CODE_SEG("INIT") VOID HalpInitDma(VOID) { diff --git a/hal/halx86/generic/halinit.c b/hal/halx86/generic/halinit.c index 90183d1fb4f..5b6ed2831b5 100644 --- a/hal/halx86/generic/halinit.c +++ b/hal/halx86/generic/halinit.c @@ -12,25 +12,13 @@ #define NDEBUG #include <debug.h> -INIT_FUNCTION -VOID -NTAPI -HalpGetParameters( - IN PLOADER_PARAMETER_BLOCK LoaderBlock -); - -#if defined(ALLOC_PRAGMA) && !defined(_MINIHAL_) -#pragma alloc_text(INIT, HalInitSystem) -#pragma alloc_text(INIT, HalpGetParameters) -#endif - /* GLOBALS *******************************************************************/ BOOLEAN HalpPciLockSettings; /* PRIVATE FUNCTIONS *********************************************************/ -INIT_FUNCTION +CODE_SEG("INIT") VOID NTAPI HalpGetParameters(IN PLOADER_PARAMETER_BLOCK LoaderBlock) @@ -77,7 +65,7 @@ HalInitializeProcessor( /* * @implemented */ -INIT_FUNCTION +CODE_SEG("INIT") BOOLEAN NTAPI HalInitSystem(IN ULONG BootPhase, diff --git a/hal/halx86/generic/misc.c b/hal/halx86/generic/misc.c index 67b8bcf08fd..c776d0a7db0 100644 --- a/hal/halx86/generic/misc.c +++ b/hal/halx86/generic/misc.c @@ -12,11 +12,6 @@ #define NDEBUG #include <debug.h> -#if defined(ALLOC_PRAGMA) && !defined(_MINIHAL_) -#pragma alloc_text(INIT, HalpMarkAcpiHal) -#pragma alloc_text(INIT, HalpReportSerialNumber) -#endif - /* GLOBALS *******************************************************************/ UCHAR HalpSerialLen; @@ -25,7 +20,7 @@ CHAR HalpSerialNumber[31]; /* PRIVATE FUNCTIONS **********************************************************/ #ifndef _MINIHAL_ -INIT_FUNCTION +CODE_SEG("INIT") VOID NTAPI HalpReportSerialNumber(VOID) @@ -56,7 +51,7 @@ HalpReportSerialNumber(VOID) } } -INIT_FUNCTION +CODE_SEG("INIT") NTSTATUS NTAPI HalpMarkAcpiHal(VOID) diff --git a/hal/halx86/generic/timer.c b/hal/halx86/generic/timer.c index 3d5b1b0e521..d7405d27f1e 100644 --- a/hal/halx86/generic/timer.c +++ b/hal/halx86/generic/timer.c @@ -13,10 +13,6 @@ #define NDEBUG #include <debug.h> -#if defined(ALLOC_PRAGMA) && !defined(_MINIHAL_) -#pragma alloc_text(INIT, HalpInitializeClock) -#endif - /* GLOBALS *******************************************************************/ #define PIT_LATCH 0x00 @@ -90,7 +86,7 @@ HalpSetTimerRollOver(USHORT RollOver) __writeeflags(Flags); } -INIT_FUNCTION +CODE_SEG("INIT") VOID NTAPI HalpInitializeClock(VOID) diff --git a/hal/halx86/generic/usage.c b/hal/halx86/generic/usage.c index 78ad3c6bf54..0652e817a95 100644 --- a/hal/halx86/generic/usage.c +++ b/hal/halx86/generic/usage.c @@ -12,45 +12,6 @@ #define NDEBUG #include <debug.h> -INIT_FUNCTION -VOID -NTAPI -HalpGetResourceSortValue( - IN PCM_PARTIAL_RESOURCE_DESCRIPTOR Descriptor, - OUT PULONG Scale, - OUT PLARGE_INTEGER Value -); - -INIT_FUNCTION -VOID -NTAPI -HalpBuildPartialFromIdt( - IN ULONG Entry, - IN PCM_PARTIAL_RESOURCE_DESCRIPTOR RawDescriptor, - IN PCM_PARTIAL_RESOURCE_DESCRIPTOR TranslatedDescriptor -); - -INIT_FUNCTION -VOID -NTAPI -HalpBuildPartialFromAddress( - IN INTERFACE_TYPE Interface, - IN PADDRESS_USAGE CurrentAddress, - IN ULONG Element, - IN PCM_PARTIAL_RESOURCE_DESCRIPTOR RawDescriptor, - IN PCM_PARTIAL_RESOURCE_DESCRIPTOR TranslatedDescriptor -); - -#if defined(ALLOC_PRAGMA) && !defined(_MINIHAL_) -#pragma alloc_text(INIT, HalpBuildPartialFromAddress) -#pragma alloc_text(INIT, HalpBuildPartialFromIdt) -#pragma alloc_text(INIT, HalpEnableInterruptHandler) -#pragma alloc_text(INIT, HalpGetNMICrashFlag) -#pragma alloc_text(INIT, HalpGetResourceSortValue) -#pragma alloc_text(INIT, HalpRegisterVector) -#pragma alloc_text(INIT, HalpReportResourceUsage) -#endif - /* GLOBALS ********************************************************************/ BOOLEAN HalpGetInfoFromACPI; @@ -155,7 +116,7 @@ ADDRESS_USAGE HalpDefaultIoSpace = /* FUNCTIONS ******************************************************************/ #ifndef _MINIHAL_ -INIT_FUNCTION +CODE_SEG("INIT") VOID NTAPI HalpGetResourceSortValue(IN PCM_PARTIAL_RESOURCE_DESCRIPTOR Descriptor, @@ -195,7 +156,7 @@ HalpGetResourceSortValue(IN PCM_PARTIAL_RESOURCE_DESCRIPTOR Descriptor, } } -INIT_FUNCTION +CODE_SEG("INIT") VOID NTAPI HalpBuildPartialFromIdt(IN ULONG Entry, @@ -233,7 +194,7 @@ HalpBuildPartialFromIdt(IN ULONG Entry, TranslatedDescriptor->u.Interrupt.Level = HalpIDTUsage[Entry].Irql; } -INIT_FUNCTION +CODE_SEG("INIT") VOID NTAPI HalpBuildPartialFromAddress(IN INTERFACE_TYPE Interface, @@ -301,7 +262,7 @@ HalpBuildPartialFromAddress(IN INTERFACE_TYPE Interface, } } -INIT_FUNCTION +CODE_SEG("INIT") VOID NTAPI HalpReportResourceUsage(IN PUNICODE_STRING HalName, @@ -580,7 +541,7 @@ HalpReportResourceUsage(IN PUNICODE_STRING HalName, } #endif /* !_MINIHAL_ */ -INIT_FUNCTION +CODE_SEG("INIT") VOID NTAPI HalpRegisterVector(IN UCHAR Flags, @@ -597,7 +558,7 @@ HalpRegisterVector(IN UCHAR Flags, } #ifndef _MINIHAL_ -INIT_FUNCTION +CODE_SEG("INIT") VOID NTAPI HalpEnableInterruptHandler(IN UCHAR Flags, @@ -620,7 +581,7 @@ HalpEnableInterruptHandler(IN UCHAR Flags, HalEnableSystemInterrupt(SystemVector, Irql, Mode); } -INIT_FUNCTION +CODE_SEG("INIT") VOID NTAPI HalpGetNMICrashFlag(VOID) diff --git a/hal/halx86/include/bus.h b/hal/halx86/include/bus.h index d7af1ea5eee..cfda40f9b34 100644 --- a/hal/halx86/include/bus.h +++ b/hal/halx86/include/bus.h @@ -282,7 +282,6 @@ extern PCI_CONFIG_HANDLER PCIConfigHandler; extern PCI_CONFIG_HANDLER PCIConfigHandlerType1; extern PCI_CONFIG_HANDLER PCIConfigHandlerType2; -INIT_FUNCTION PPCI_REGISTRY_INFO_INTERNAL NTAPI HalpQueryPciRegistryInfo( @@ -426,14 +425,12 @@ HalpSetCmosData( IN ULONG Length ); -INIT_FUNCTION VOID NTAPI HalpInitializePciBus( VOID ); -INIT_FUNCTION VOID NTAPI HalpInitializePciStubs( @@ -473,7 +470,6 @@ HalpFindBusAddressTranslation( IN BOOLEAN NextBus ); -INIT_FUNCTION VOID NTAPI HalpRegisterPciDebuggingDeviceInfo( diff --git a/hal/halx86/include/halacpi.h b/hal/halx86/include/halacpi.h index a4a68f6793e..8f51fdf3693 100644 --- a/hal/halx86/include/halacpi.h +++ b/hal/halx86/include/halacpi.h @@ -24,7 +24,6 @@ HalpAcpiGetTable( IN ULONG Signature ); -INIT_FUNCTION NTSTATUS NTAPI HalpSetupAcpiPhase0( diff --git a/hal/halx86/include/halp.h b/hal/halx86/include/halp.h index 1ab78747e73..a93d4e517a9 100644 --- a/hal/halx86/include/halp.h +++ b/hal/halx86/include/halp.h @@ -189,7 +189,6 @@ typedef struct _HalAddressUsage PADAPTER_OBJECT NTAPI HalpAllocateAdapterEx(ULONG NumberOfMapRegisters,BOOLEAN IsMaster, BOOLEAN Dma32BitAddresses); /* sysinfo.c */ -INIT_FUNCTION VOID NTAPI HalpRegisterVector(IN UCHAR Flags, @@ -197,7 +196,6 @@ HalpRegisterVector(IN UCHAR Flags, IN ULONG SystemVector, IN KIRQL Irql); -INIT_FUNCTION VOID NTAPI HalpEnableInterruptHandler(IN UCHAR Flags, @@ -219,7 +217,7 @@ DECLSPEC_NORETURN VOID FASTCALL HalpDispatchInterrupt2ndEntry(IN PKTRAP_FRAME Tr extern BOOLEAN HalpProfilingStopped; /* timer.c */ -INIT_FUNCTION VOID NTAPI HalpInitializeClock(VOID); +VOID NTAPI HalpInitializeClock(VOID); VOID __cdecl HalpClockInterrupt(VOID); VOID __cdecl HalpProfileInterrupt(VOID); @@ -237,7 +235,7 @@ HalpCalibrateStallExecution(VOID); VOID HalpInitPciBus (VOID); /* dma.c */ -INIT_FUNCTION VOID HalpInitDma (VOID); +VOID HalpInitDma (VOID); /* Non-generic initialization */ VOID HalpInitPhase0 (PLOADER_PARAMETER_BLOCK LoaderBlock); @@ -256,14 +254,12 @@ HalpCheckPowerButton( VOID ); -INIT_FUNCTION VOID NTAPI HalpRegisterKdSupportFunctions( VOID ); -INIT_FUNCTION NTSTATUS NTAPI HalpSetupPciDeviceForDebugging( @@ -271,7 +267,6 @@ HalpSetupPciDeviceForDebugging( IN OUT PDEBUG_DEVICE_DESCRIPTOR PciDevice ); -INIT_FUNCTION NTSTATUS NTAPI HalpReleasePciDeviceForDebugging( @@ -371,7 +366,6 @@ HaliHaltSystem( // // CMOS Routines // -INIT_FUNCTION VOID NTAPI HalpInitializeCmos( @@ -426,42 +420,36 @@ HalpOpenRegistryKey( IN BOOLEAN Create ); -INIT_FUNCTION VOID NTAPI HalpGetNMICrashFlag( VOID ); -INIT_FUNCTION BOOLEAN NTAPI HalpGetDebugPortTable( VOID ); -INIT_FUNCTION VOID NTAPI HalpReportSerialNumber( VOID ); -INIT_FUNCTION NTSTATUS NTAPI HalpMarkAcpiHal( VOID ); -INIT_FUNCTION VOID NTAPI HalpBuildAddressMap( VOID ); -INIT_FUNCTION VOID NTAPI HalpReportResourceUsage( @@ -469,7 +457,6 @@ HalpReportResourceUsage( IN INTERFACE_TYPE InterfaceType ); -INIT_FUNCTION ULONG NTAPI HalpIs16BitPortDecodeSupported( @@ -490,7 +477,6 @@ KeUpdateSystemTime( IN KIRQL OldIrql ); -INIT_FUNCTION VOID NTAPI HalpInitBusHandlers( @@ -503,7 +489,6 @@ HaliInitPnpDriver( VOID ); -INIT_FUNCTION VOID NTAPI HalpDebugPciDumpBus( diff --git a/hal/halx86/legacy/bus/pcibus.c b/hal/halx86/legacy/bus/pcibus.c index ab7ed855cdc..ee5ff34a28c 100644 --- a/hal/halx86/legacy/bus/pcibus.c +++ b/hal/halx86/legacy/bus/pcibus.c @@ -12,14 +12,6 @@ #define NDEBUG #include <debug.h> -#if defined(ALLOC_PRAGMA) && !defined(_MINIHAL_) -#pragma alloc_text(INIT, HalpInitializePciStubs) -#pragma alloc_text(INIT, HalpQueryPciRegistryInfo) -#pragma alloc_text(INIT, HalpRegisterPciDebuggingDeviceInfo) -#pragma alloc_text(INIT, HalpReleasePciDeviceForDebugging) -#pragma alloc_text(INIT, HalpSetupPciDeviceForDebugging) -#endif - /* GLOBALS *******************************************************************/ extern BOOLEAN HalpPciLockSettings; @@ -623,7 +615,7 @@ HalpGetISAFixedPCIIrq(IN PBUS_HANDLER BusHandler, return STATUS_SUCCESS; } -INIT_FUNCTION +CODE_SEG("INIT") NTSTATUS NTAPI HalpSetupPciDeviceForDebugging(IN PVOID LoaderBlock, @@ -633,7 +625,7 @@ HalpSetupPciDeviceForDebugging(IN PVOID LoaderBlock, return STATUS_NOT_IMPLEMENTED; } -INIT_FUNCTION +CODE_SEG("INIT") NTSTATUS NTAPI HalpReleasePciDeviceForDebugging(IN OUT PDEBUG_DEVICE_DESCRIPTOR PciDevice) @@ -642,7 +634,7 @@ HalpReleasePciDeviceForDebugging(IN OUT PDEBUG_DEVICE_DESCRIPTOR PciDevice) return STATUS_NOT_IMPLEMENTED; } -INIT_FUNCTION +CODE_SEG("INIT") VOID NTAPI HalpRegisterPciDebuggingDeviceInfo(VOID) @@ -877,7 +869,7 @@ HaliPciInterfaceReadConfig(IN PBUS_HANDLER RootBusHandler, return Length; } -INIT_FUNCTION +CODE_SEG("INIT") PPCI_REGISTRY_INFO_INTERNAL NTAPI HalpQueryPciRegistryInfo(VOID) @@ -1110,7 +1102,7 @@ HalpQueryPciRegistryInfo(VOID) #endif } -INIT_FUNCTION +CODE_SEG("INIT") VOID NTAPI HalpInitializePciStubs(VOID) diff --git a/hal/halx86/legacy/bussupp.c b/hal/halx86/legacy/bussupp.c index 87fe6cbab72..20174bb8b73 100644 --- a/hal/halx86/legacy/bussupp.c +++ b/hal/halx86/legacy/bussupp.c @@ -12,111 +12,6 @@ #define NDEBUG #include <debug.h> -INIT_FUNCTION -PBUS_HANDLER -NTAPI -HalpAllocateAndInitPciBusHandler( - IN ULONG PciType, - IN ULONG BusNo, - IN BOOLEAN TestAllocation -); - -INIT_FUNCTION -VOID -NTAPI -HalpFixupPciSupportedRanges( - IN ULONG BusCount -); - -INIT_FUNCTION -NTSTATUS -NTAPI -HalpGetChipHacks( - IN USHORT VendorId, - IN USHORT DeviceId, - IN UCHAR RevisionId, - IN PULONG HackFlags -); - -INIT_FUNCTION -BOOLEAN -NTAPI -HalpGetPciBridgeConfig( - IN ULONG PciType, - IN PUCHAR BusCount -); - -INIT_FUNCTION -BOOLEAN -NTAPI -HalpIsBridgeDevice( - IN PPCI_COMMON_CONFIG PciData -); - -INIT_FUNCTION -BOOLEAN -NTAPI -HalpIsIdeDevice( - IN PPCI_COMMON_CONFIG PciData -); - -INIT_FUNCTION -BOOLEAN -NTAPI -HalpIsRecognizedCard( - IN PPCI_REGISTRY_INFO_INTERNAL PciRegistryInfo, - IN PPCI_COMMON_CONFIG PciData, - IN ULONG Flags -); - -INIT_FUNCTION -BOOLEAN -NTAPI -HalpIsValidPCIDevice( - IN PBUS_HANDLER BusHandler, - IN PCI_SLOT_NUMBER Slot -); - -INIT_FUNCTION -NTSTATUS -NTAPI -HalpMarkChipsetDecode( - IN BOOLEAN OverrideEnable -); - -INIT_FUNCTION -VOID -NTAPI -HalpRegisterInternalBusHandlers( - VOID -); - -INIT_FUNCTION -VOID -NTAPI -ShowSize( - IN ULONG Size -); - - -#if defined(ALLOC_PRAGMA) && !defined(_MINIHAL_) -#pragma alloc_text(INIT, HalpAllocateAndInitPciBusHandler) -#pragma alloc_text(INIT, HalpDebugPciDumpBus) -#pragma alloc_text(INIT, HalpFixupPciSupportedRanges) -#pragma alloc_text(INIT, HalpGetChipHacks) -#pragma alloc_text(INIT, HalpGetPciBridgeConfig) -#pragma alloc_text(INIT, HalpInitBusHandlers) -#pragma alloc_text(INIT, HalpInitializePciBus) -#pragma alloc_text(INIT, HalpIsBridgeDevice) -#pragma alloc_text(INIT, HalpIsIdeDevice) -#pragma alloc_text(INIT, HalpIsRecognizedCard) -#pragma alloc_text(INIT, HalpIsValidPCIDevice) -#pragma alloc_text(INIT, HalpMarkChipsetDecode) -#pragma alloc_text(INIT, HalpRegisterKdSupportFunctions) -#pragma alloc_text(INIT, HalpRegisterInternalBusHandlers) -#pragma alloc_text(INIT, ShowSize) -#endif - /* GLOBALS ********************************************************************/ extern KSPIN_LOCK HalpPCIConfigLock; @@ -171,7 +66,7 @@ HalpAllocateBusHandler(IN INTERFACE_TYPE InterfaceType, return Bus; } -INIT_FUNCTION +CODE_SEG("INIT") VOID NTAPI HalpRegisterInternalBusHandlers(VOID) @@ -246,7 +141,7 @@ HalpRegisterInternalBusHandlers(VOID) } #ifndef _MINIHAL_ -INIT_FUNCTION +CODE_SEG("INIT") NTSTATUS NTAPI HalpMarkChipsetDecode(BOOLEAN OverrideEnable) @@ -294,7 +189,7 @@ HalpMarkChipsetDecode(BOOLEAN OverrideEnable) return Status; } -INIT_FUNCTION +CODE_SEG("INIT") PBUS_HANDLER NTAPI HalpAllocateAndInitPciBusHandler(IN ULONG PciType, @@ -379,7 +274,7 @@ HalpAllocateAndInitPciBusHandler(IN ULONG PciType, return Bus; } -INIT_FUNCTION +CODE_SEG("INIT") BOOLEAN NTAPI HalpIsValidPCIDevice(IN PBUS_HANDLER BusHandler, @@ -441,7 +336,7 @@ HalpIsValidPCIDevice(IN PBUS_HANDLER BusHandler, static BOOLEAN WarningsGiven[5]; -INIT_FUNCTION +CODE_SEG("INIT") NTSTATUS NTAPI HalpGetChipHacks(IN USHORT VendorId, @@ -505,7 +400,7 @@ HalpGetChipHacks(IN USHORT VendorId, return Status; } -INIT_FUNCTION +CODE_SEG("INIT") BOOLEAN NTAPI HalpIsRecognizedCard(IN PPCI_REGISTRY_INFO_INTERNAL PciRegistryInfo, @@ -586,7 +481,7 @@ HalpIsRecognizedCard(IN PPCI_REGISTRY_INFO_INTERNAL PciRegistryInfo, return FALSE; } -INIT_FUNCTION +CODE_SEG("INIT") BOOLEAN NTAPI HalpIsIdeDevice(IN PPCI_COMMON_CONFIG PciData) @@ -639,7 +534,7 @@ HalpIsIdeDevice(IN PPCI_COMMON_CONFIG PciData) return FALSE; } -INIT_FUNCTION +CODE_SEG("INIT") BOOLEAN NTAPI HalpIsBridgeDevice(IN PPCI_COMMON_CONFIG PciData) @@ -653,7 +548,7 @@ HalpIsBridgeDevice(IN PPCI_COMMON_CONFIG PciData) (PciData->SubClass == PCI_SUBCLASS_BR_CARDBUS))); } -INIT_FUNCTION +CODE_SEG("INIT") BOOLEAN NTAPI HalpGetPciBridgeConfig(IN ULONG PciType, @@ -706,7 +601,7 @@ HalpGetPciBridgeConfig(IN ULONG PciType, return FALSE; } -INIT_FUNCTION +CODE_SEG("INIT") VOID NTAPI HalpFixupPciSupportedRanges(IN ULONG BusCount) @@ -769,7 +664,7 @@ HalpFixupPciSupportedRanges(IN ULONG BusCount) } } -INIT_FUNCTION +CODE_SEG("INIT") VOID NTAPI ShowSize(ULONG x) @@ -801,7 +696,7 @@ ShowSize(ULONG x) */ #include "pci_classes.h" #include "pci_vendors.h" -INIT_FUNCTION +CODE_SEG("INIT") VOID NTAPI HalpDebugPciDumpBus(IN ULONG i, @@ -986,7 +881,7 @@ HalpDebugPciDumpBus(IN ULONG i, } #endif -INIT_FUNCTION +CODE_SEG("INIT") VOID NTAPI HalpInitializePciBus(VOID) @@ -1225,7 +1120,7 @@ HalpInitializePciBus(VOID) #endif } -INIT_FUNCTION +CODE_SEG("INIT") VOID NTAPI HalpInitBusHandlers(VOID) @@ -1234,7 +1129,7 @@ HalpInitBusHandlers(VOID) HalpRegisterInternalBusHandlers(); } -INIT_FUNCTION +CODE_SEG("INIT") VOID NTAPI HalpRegisterKdSupportFunctions(VOID) diff --git a/hal/halx86/legacy/halpcat.c b/hal/halx86/legacy/halpcat.c index 4b6033e51ee..445b6924201 100644 --- a/hal/halx86/legacy/halpcat.c +++ b/hal/halx86/legacy/halpcat.c @@ -12,15 +12,6 @@ #define NDEBUG #include <debug.h> -#if defined(ALLOC_PRAGMA) && !defined(_MINIHAL_) -//#pragma alloc_text(INIT, HaliInitPnpDriver) -#pragma alloc_text(INIT, HalpBuildAddressMap) -#pragma alloc_text(INIT, HalpGetDebugPortTable) -#pragma alloc_text(INIT, HalpIs16BitPortDecodeSupported) -#pragma alloc_text(INIT, HalpSetupAcpiPhase0) -#pragma alloc_text(INIT, HalReportResourceUsage) -#endif - /* GLOBALS ********************************************************************/ /* This determines the HAL type */ @@ -38,7 +29,7 @@ PWCHAR HalName = L"PC Compatible Eisa/Isa HAL"; /* PRIVATE FUNCTIONS **********************************************************/ -INIT_FUNCTION +CODE_SEG("INIT") NTSTATUS NTAPI HalpSetupAcpiPhase0(IN PLOADER_PARAMETER_BLOCK LoaderBlock) @@ -47,7 +38,7 @@ HalpSetupAcpiPhase0(IN PLOADER_PARAMETER_BLOCK LoaderBlock) return STATUS_NO_SUCH_DEVICE; } -INIT_FUNCTION +CODE_SEG("INIT") VOID NTAPI HalpBuildAddressMap(VOID) @@ -59,7 +50,7 @@ HalpBuildAddressMap(VOID) //HalpAddROMRanges(); } -INIT_FUNCTION +CODE_SEG("INIT") BOOLEAN NTAPI HalpGetDebugPortTable(VOID) @@ -68,7 +59,7 @@ HalpGetDebugPortTable(VOID) return FALSE; } -INIT_FUNCTION +CODE_SEG("INIT") ULONG NTAPI HalpIs16BitPortDecodeSupported(VOID) @@ -78,7 +69,7 @@ HalpIs16BitPortDecodeSupported(VOID) } #if 0 -INIT_FUNCTION +CODE_SEG("INIT") NTSTATUS NTAPI HaliInitPnpDriver(VOID) @@ -92,7 +83,7 @@ HaliInitPnpDriver(VOID) /* * @implemented */ -INIT_FUNCTION +CODE_SEG("INIT") VOID NTAPI HalReportResourceUsage(VOID) diff --git a/hal/halx86/pc98/cmos.c b/hal/halx86/pc98/cmos.c index 99dd76135fa..f20e9567c7b 100644 --- a/hal/halx86/pc98/cmos.c +++ b/hal/halx86/pc98/cmos.c @@ -12,10 +12,6 @@ #define NDEBUG #include <debug.h> -#if defined(ALLOC_PRAGMA) && !defined(_MINIHAL_) -#pragma alloc_text(INIT, HalpInitializeCmos) -#endif - /* GLOBALS *******************************************************************/ /* @@ -165,7 +161,7 @@ HalpSetCmosData( return 0; } -INIT_FUNCTION +CODE_SEG("INIT") VOID NTAPI HalpInitializeCmos(VOID) diff --git a/hal/halx86/pcidata.cmake b/hal/halx86/pcidata.cmake index fe779417d6c..de18293f589 100644 --- a/hal/halx86/pcidata.cmake +++ b/hal/halx86/pcidata.cmake @@ -3,11 +3,11 @@ # add_custom_command( 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 INIT_SECTION ${CMAKE_CURRENT_SOURCE_DIR}/include/hal.h - DEPENDS native-bin2c ${CMAKE_CURRENT_SOURCE_DIR}/legacy/bus/pci_classes.ids) + 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 + DEPENDS native-bin2c ${CMAKE_CURRENT_SOURCE_DIR}/legacy/bus/pci_classes.ids VERBATIM) add_custom_command( 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 INIT_SECTION ${CMAKE_CURRENT_SOURCE_DIR}/include/hal.h - DEPENDS native-bin2c ${CMAKE_CURRENT_SOURCE_DIR}/legacy/bus/pci_vendors.ids) + 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 + DEPENDS native-bin2c ${CMAKE_CURRENT_SOURCE_DIR}/legacy/bus/pci_vendors.ids VERBATIM) ##################################### diff --git a/hal/halx86/up/halinit_mini.c b/hal/halx86/up/halinit_mini.c index 505a23a93e3..3f2ebf94025 100644 --- a/hal/halx86/up/halinit_mini.c +++ b/hal/halx86/up/halinit_mini.c @@ -34,7 +34,7 @@ HalpInitPhase1(VOID) { } -INIT_FUNCTION +CODE_SEG("INIT") NTSTATUS NTAPI HalpSetupAcpiPhase0(IN PLOADER_PARAMETER_BLOCK LoaderBlock) diff --git a/ntoskrnl/cache/fssup.c b/ntoskrnl/cache/fssup.c index f608361b587..fa24c83bc84 100644 --- a/ntoskrnl/cache/fssup.c +++ b/ntoskrnl/cache/fssup.c @@ -77,7 +77,7 @@ LIST_ENTRY CcpAllSharedCacheMaps; /* FUNCTIONS ******************************************************************/ -INIT_FUNCTION +CODE_SEG("INIT") BOOLEAN NTAPI CcInitializeCacheManager(VOID) @@ -108,7 +108,7 @@ CcInitializeCacheManager(VOID) return TRUE; } -INIT_FUNCTION +CODE_SEG("INIT") VOID NTAPI CcPfInitializePrefetcher(VOID) diff --git a/ntoskrnl/cache/newcc.h b/ntoskrnl/cache/newcc.h index a668c523282..adbf1c5d926 100644 --- a/ntoskrnl/cache/newcc.h +++ b/ntoskrnl/cache/newcc.h @@ -38,7 +38,6 @@ typedef struct _NOCC_CACHE_MAP ULONG ReadAheadGranularity; } NOCC_CACHE_MAP, *PNOCC_CACHE_MAP; -INIT_FUNCTION VOID NTAPI CcPfInitializePrefetcher(VOID); @@ -54,7 +53,6 @@ CcMdlWriteComplete2(IN PFILE_OBJECT FileObject, IN PLARGE_INTEGER FileOffset, IN PMDL MdlChain); -INIT_FUNCTION VOID NTAPI CcInitView(VOID); @@ -64,7 +62,6 @@ NTAPI CcpUnpinData(PNOCC_BCB Bcb, BOOLEAN ActuallyRelease); -INIT_FUNCTION BOOLEAN NTAPI CcInitializeCacheManager(VOID); diff --git a/ntoskrnl/cache/section/io.c b/ntoskrnl/cache/section/io.c index 605363e4b5b..20454abb905 100644 --- a/ntoskrnl/cache/section/io.c +++ b/ntoskrnl/cache/section/io.c @@ -50,11 +50,6 @@ #include <debug.h> #include <reactos/exeformat.h> -#if defined (ALLOC_PRAGMA) -#pragma alloc_text(INIT, MmCreatePhysicalMemorySection) -#pragma alloc_text(INIT, MmInitSectionImplementation) -#endif - KEVENT CcpLazyWriteEvent; PDEVICE_OBJECT diff --git a/ntoskrnl/cc/cacheman.c b/ntoskrnl/cc/cacheman.c index 9c7bf43298f..6086360db25 100644 --- a/ntoskrnl/cc/cacheman.c +++ b/ntoskrnl/cc/cacheman.c @@ -22,7 +22,7 @@ static ULONG BugCheckFileId = 0x4 << 16; /* FUNCTIONS *****************************************************************/ -INIT_FUNCTION +CODE_SEG("INIT") VOID NTAPI CcPfInitializePrefetcher(VOID) @@ -40,7 +40,7 @@ CcPfInitializePrefetcher(VOID) /* FIXME: Setup the rest of the prefetecher */ } -INIT_FUNCTION +CODE_SEG("INIT") BOOLEAN NTAPI CcInitializeCacheManager(VOID) diff --git a/ntoskrnl/cc/view.c b/ntoskrnl/cc/view.c index fde2bbc926a..42e9d244edd 100644 --- a/ntoskrnl/cc/view.c +++ b/ntoskrnl/cc/view.c @@ -36,10 +36,6 @@ #define NDEBUG #include <debug.h> -#if defined (ALLOC_PRAGMA) -#pragma alloc_text(INIT, CcInitView) -#endif - /* GLOBALS *******************************************************************/ LIST_ENTRY DirtyVacbListHead; @@ -1529,7 +1525,7 @@ CcGetFileObjectFromSectionPtrs ( return NULL; } -INIT_FUNCTION +CODE_SEG("INIT") VOID NTAPI CcInitView ( diff --git a/ntoskrnl/config/cmalloc.c b/ntoskrnl/config/cmalloc.c index 2c2868ea7cb..eda161da97e 100644 --- a/ntoskrnl/config/cmalloc.c +++ b/ntoskrnl/config/cmalloc.c @@ -23,7 +23,7 @@ LIST_ENTRY CmpFreeDelayItemsListHead; /* FUNCTIONS *****************************************************************/ -INIT_FUNCTION +CODE_SEG("INIT") VOID NTAPI CmpInitCmPrivateAlloc(VOID) @@ -38,7 +38,7 @@ CmpInitCmPrivateAlloc(VOID) } } -INIT_FUNCTION +CODE_SEG("INIT") VOID NTAPI CmpInitCmPrivateDelayAlloc(VOID) diff --git a/ntoskrnl/config/cmboot.c b/ntoskrnl/config/cmboot.c index f1790284fcf..fc7cbf56fde 100644 --- a/ntoskrnl/config/cmboot.c +++ b/ntoskrnl/config/cmboot.c @@ -19,7 +19,7 @@ extern ULONG InitSafeBootMode; /* FUNCTIONS ******************************************************************/ -INIT_FUNCTION +CODE_SEG("INIT") HCELL_INDEX NTAPI CmpFindControlSet(IN PHHIVE SystemHive, @@ -129,7 +129,7 @@ CmpFindControlSet(IN PHHIVE SystemHive, return ControlSetCell; } -INIT_FUNCTION +CODE_SEG("INIT") ULONG NTAPI CmpFindTagIndex(IN PHHIVE Hive, @@ -179,7 +179,7 @@ CmpFindTagIndex(IN PHHIVE Hive, return -2; } -INIT_FUNCTION +CODE_SEG("INIT") BOOLEAN NTAPI CmpAddDriverToList(IN PHHIVE Hive, @@ -346,7 +346,7 @@ CmpAddDriverToList(IN PHHIVE Hive, return TRUE; } -INIT_FUNCTION +CODE_SEG("INIT") BOOLEAN NTAPI CmpIsLoadType(IN PHHIVE Hive, @@ -377,7 +377,7 @@ CmpIsLoadType(IN PHHIVE Hive, return (*Data == LoadType); } -INIT_FUNCTION +CODE_SEG("INIT") BOOLEAN NTAPI CmpFindDrivers(IN PHHIVE Hive, @@ -499,7 +499,7 @@ CmpFindDrivers(IN PHHIVE Hive, return TRUE; } -INIT_FUNCTION +CODE_SEG("INIT") BOOLEAN NTAPI CmpDoSort(IN PLIST_ENTRY DriverListHead, @@ -556,7 +556,7 @@ CmpDoSort(IN PLIST_ENTRY DriverListHead, return TRUE; } -INIT_FUNCTION +CODE_SEG("INIT") BOOLEAN NTAPI CmpSortDriverList(IN PHHIVE Hive, @@ -605,7 +605,7 @@ CmpSortDriverList(IN PHHIVE Hive, return CmpDoSort(DriverListHead, &DependList); } -INIT_FUNCTION +CODE_SEG("INIT") BOOLEAN NTAPI CmpOrderGroup(IN PBOOT_DRIVER_NODE StartNode, @@ -668,7 +668,7 @@ CmpOrderGroup(IN PBOOT_DRIVER_NODE StartNode, return TRUE; } -INIT_FUNCTION +CODE_SEG("INIT") BOOLEAN NTAPI CmpResolveDriverDependencies(IN PLIST_ENTRY DriverListHead) @@ -718,7 +718,7 @@ CmpResolveDriverDependencies(IN PLIST_ENTRY DriverListHead) return TRUE; } -INIT_FUNCTION +CODE_SEG("INIT") BOOLEAN NTAPI CmpIsSafe(IN PHHIVE Hive, diff --git a/ntoskrnl/config/cmconfig.c b/ntoskrnl/config/cmconfig.c index be46cfeb2cf..42c428f971e 100644 --- a/ntoskrnl/config/cmconfig.c +++ b/ntoskrnl/config/cmconfig.c @@ -14,7 +14,7 @@ /* FUNCTIONS *****************************************************************/ -INIT_FUNCTION +CODE_SEG("INIT") NTSTATUS NTAPI CmpInitializeRegistryNode(IN PCONFIGURATION_COMPONENT_DATA CurrentEntry, @@ -199,7 +199,7 @@ CmpInitializeRegistryNode(IN PCONFIGURATION_COMPONENT_DATA CurrentEntry, return Status; } -INIT_FUNCTION +CODE_SEG("INIT") NTSTATUS NTAPI CmpSetupConfigurationTree(IN PCONFIGURATION_COMPONENT_DATA CurrentEntry, @@ -322,7 +322,7 @@ CmpSetupConfigurationTree(IN PCONFIGURATION_COMPONENT_DATA CurrentEntry, return STATUS_SUCCESS; } -INIT_FUNCTION +CODE_SEG("INIT") NTSTATUS NTAPI CmpInitializeHardwareConfiguration(IN PLOADER_PARAMETER_BLOCK LoaderBlock) diff --git a/ntoskrnl/config/cmcontrl.c b/ntoskrnl/config/cmcontrl.c index 935d55bf301..fdce4c9ab6d 100644 --- a/ntoskrnl/config/cmcontrl.c +++ b/ntoskrnl/config/cmcontrl.c @@ -16,7 +16,7 @@ /* FUNCTIONS *****************************************************************/ -INIT_FUNCTION +CODE_SEG("INIT") LANGID NTAPI CmpConvertLangId(IN LPWSTR Name, @@ -67,7 +67,7 @@ CmpConvertLangId(IN LPWSTR Name, return LangId; } -INIT_FUNCTION +CODE_SEG("INIT") HCELL_INDEX NTAPI CmpWalkPath(IN PHHIVE SystemHive, @@ -98,7 +98,7 @@ CmpWalkPath(IN PHHIVE SystemHive, } } -INIT_FUNCTION +CODE_SEG("INIT") VOID NTAPI CmGetSystemControlValues(IN PVOID SystemHiveData, diff --git a/ntoskrnl/config/cmdata.c b/ntoskrnl/config/cmdata.c index 922b7f847d6..eb1c39bf320 100644 --- a/ntoskrnl/config/cmdata.c +++ b/ntoskrnl/config/cmdata.c @@ -65,7 +65,7 @@ ULONG CmpTypeCount[MaximumType + 1]; HANDLE CmpRegistryRootHandle; -INIT_SECTION UNICODE_STRING CmClassName[MaximumClass + 1] = +DATA_SEG("INIT") UNICODE_STRING CmClassName[MaximumClass + 1] = { RTL_CONSTANT_STRING(L"System"), RTL_CONSTANT_STRING(L"Processor"), @@ -77,7 +77,7 @@ INIT_SECTION UNICODE_STRING CmClassName[MaximumClass + 1] = RTL_CONSTANT_STRING(L"Undefined") }; -INIT_SECTION UNICODE_STRING CmTypeName[MaximumType + 1] = +DATA_SEG("INIT") UNICODE_STRING CmTypeName[MaximumType + 1] = { RTL_CONSTANT_STRING(L"System"), RTL_CONSTANT_STRING(L"CentralProcessor"), @@ -123,7 +123,7 @@ INIT_SECTION UNICODE_STRING CmTypeName[MaximumType + 1] = RTL_CONSTANT_STRING(L"Undefined") }; -INIT_SECTION CMP_MF_TYPE CmpMultifunctionTypes[] = +DATA_SEG("INIT") CMP_MF_TYPE CmpMultifunctionTypes[] = { {"ISA", Isa, 0}, {"MCA", MicroChannel, 0}, @@ -136,7 +136,7 @@ INIT_SECTION CMP_MF_TYPE CmpMultifunctionTypes[] = {NULL, Internal, 0} }; -INIT_SECTION CM_SYSTEM_CONTROL_VECTOR CmControlVector[] = +DATA_SEG("INIT") CM_SYSTEM_CONTROL_VECTOR CmControlVector[] = { { L"Session Manager", diff --git a/ntoskrnl/config/cmdelay.c b/ntoskrnl/config/cmdelay.c index 34321eaba3c..4dfad0f6f58 100644 --- a/ntoskrnl/config/cmdelay.c +++ b/ntoskrnl/config/cmdelay.c @@ -185,7 +185,7 @@ CmpDelayCloseWorker(IN PVOID Context) CmpUnlockRegistry(); } -INIT_FUNCTION +CODE_SEG("INIT") VOID NTAPI CmpInitializeDelayedCloseTable(VOID) @@ -262,7 +262,7 @@ CmpDelayDerefKCBWorker(IN PVOID Context) CmpUnlockRegistry(); } -INIT_FUNCTION +CODE_SEG("INIT") VOID NTAPI CmpInitDelayDerefKCBEngine(VOID) diff --git a/ntoskrnl/config/cmhook.c b/ntoskrnl/config/cmhook.c index 1ba3c5bbbda..c4438d00e75 100644 --- a/ntoskrnl/config/cmhook.c +++ b/ntoskrnl/config/cmhook.c @@ -32,7 +32,7 @@ typedef struct _REGISTRY_CALLBACK /* PRIVATE FUNCTIONS *********************************************************/ -INIT_FUNCTION +CODE_SEG("INIT") VOID NTAPI CmpInitCallback(VOID) diff --git a/ntoskrnl/config/cmkcbncb.c b/ntoskrnl/config/cmkcbncb.c index d9b0941e129..cb4035f75cc 100644 --- a/ntoskrnl/config/cmkcbncb.c +++ b/ntoskrnl/config/cmkcbncb.c @@ -20,7 +20,7 @@ PCM_NAME_HASH_TABLE_ENTRY CmpNameCacheTable; /* FUNCTIONS *****************************************************************/ -INIT_FUNCTION +CODE_SEG("INIT") VOID NTAPI CmpInitializeCache(VOID) diff --git a/ntoskrnl/config/cmsysini.c b/ntoskrnl/config/cmsysini.c index 5eae71f0d31..9b9c37bd27a 100644 --- a/ntoskrnl/config/cmsysini.c +++ b/ntoskrnl/config/cmsysini.c @@ -391,7 +391,7 @@ CmpInitHiveFromFile(IN PCUNICODE_STRING HiveName, return STATUS_SUCCESS; } -INIT_FUNCTION +CODE_SEG("INIT") NTSTATUS NTAPI CmpSetSystemValues(IN PLOADER_PARAMETER_BLOCK LoaderBlock) @@ -447,7 +447,7 @@ Quit: } static -INIT_FUNCTION +CODE_SEG("INIT") NTSTATUS CmpCreateHardwareProfile(HANDLE ControlSetHandle) { @@ -518,7 +518,7 @@ done: return Status; } -INIT_FUNCTION +CODE_SEG("INIT") NTSTATUS NTAPI CmpCreateControlSet(IN PLOADER_PARAMETER_BLOCK LoaderBlock) @@ -859,7 +859,7 @@ CmpLinkHiveToMaster(IN PUNICODE_STRING LinkName, return STATUS_SUCCESS; } -INIT_FUNCTION +CODE_SEG("INIT") BOOLEAN NTAPI CmpInitializeSystemHive(IN PLOADER_PARAMETER_BLOCK LoaderBlock) @@ -976,7 +976,7 @@ CmpInitializeSystemHive(IN PLOADER_PARAMETER_BLOCK LoaderBlock) return TRUE; } -INIT_FUNCTION +CODE_SEG("INIT") NTSTATUS NTAPI CmpCreateObjectTypes(VOID) @@ -1010,7 +1010,7 @@ CmpCreateObjectTypes(VOID) return ObCreateObjectType(&Name, &ObjectTypeInitializer, NULL, &CmpKeyObjectType); } -INIT_FUNCTION +CODE_SEG("INIT") BOOLEAN NTAPI CmpCreateRootNode(IN PHHIVE Hive, @@ -1066,7 +1066,7 @@ CmpCreateRootNode(IN PHHIVE Hive, return TRUE; } -INIT_FUNCTION +CODE_SEG("INIT") BOOLEAN NTAPI CmpCreateRegistryRoot(VOID) @@ -1505,7 +1505,7 @@ CmpInitializeHiveList(VOID) CmpNoVolatileCreates = TRUE; } -INIT_FUNCTION +CODE_SEG("INIT") BOOLEAN NTAPI CmInitSystem1(VOID) @@ -1721,7 +1721,7 @@ CmInitSystem1(VOID) return TRUE; } -INIT_FUNCTION +CODE_SEG("INIT") VOID NTAPI CmpFreeDriverList(IN PHHIVE Hive, @@ -1770,7 +1770,7 @@ CmpFreeDriverList(IN PHHIVE Hive, } } -INIT_FUNCTION +CODE_SEG("INIT") PUNICODE_STRING* NTAPI CmGetSystemDriverList(VOID) diff --git a/ntoskrnl/dbgk/dbgkobj.c b/ntoskrnl/dbgk/dbgkobj.c index d335ad2b8fd..8bc2235faea 100644 --- a/ntoskrnl/dbgk/dbgkobj.c +++ b/ntoskrnl/dbgk/dbgkobj.c @@ -1492,7 +1492,7 @@ DbgkClearProcessDebugObject(IN PEPROCESS Process, return STATUS_SUCCESS; } -INIT_FUNCTION +CODE_SEG("INIT") VOID NTAPI DbgkInitialize(VOID) diff --git a/ntoskrnl/ex/callback.c b/ntoskrnl/ex/callback.c index 1d363822e69..59fc2e7135c 100644 --- a/ntoskrnl/ex/callback.c +++ b/ntoskrnl/ex/callback.c @@ -250,7 +250,7 @@ ExpDeleteCallback(IN PVOID Object) * @remarks None * *--*/ -INIT_FUNCTION +CODE_SEG("INIT") BOOLEAN NTAPI ExpInitializeCallbacks(VOID) diff --git a/ntoskrnl/ex/event.c b/ntoskrnl/ex/event.c index e00e49cb9c0..f8ddee00ad4 100644 --- a/ntoskrnl/ex/event.c +++ b/ntoskrnl/ex/event.c @@ -13,10 +13,6 @@ #define NDEBUG #include <debug.h> -#if defined (ALLOC_PRAGMA) -#pragma alloc_text(INIT, ExpInitializeEventImplementation) -#endif - /* GLOBALS *******************************************************************/ POBJECT_TYPE ExEventObjectType = NULL; @@ -37,7 +33,7 @@ static const INFORMATION_CLASS_INFO ExEventInfoClass[] = /* FUNCTIONS *****************************************************************/ -INIT_FUNCTION +CODE_SEG("INIT") BOOLEAN NTAPI ExpInitializeEventImplementation(VOID) diff --git a/ntoskrnl/ex/evtpair.c b/ntoskrnl/ex/evtpair.c index 114c160eb3a..f4171e35437 100644 --- a/ntoskrnl/ex/evtpair.c +++ b/ntoskrnl/ex/evtpair.c @@ -13,10 +13,6 @@ #define NDEBUG #include <debug.h> -#if defined (ALLOC_PRAGMA) -#pragma alloc_text(INIT, ExpInitializeEventPairImplementation) -#endif - /* GLOBALS *******************************************************************/ POBJECT_TYPE ExEventPairObjectType = NULL; @@ -31,7 +27,7 @@ GENERIC_MAPPING ExEventPairMapping = /* FUNCTIONS *****************************************************************/ -INIT_FUNCTION +CODE_SEG("INIT") BOOLEAN NTAPI ExpInitializeEventPairImplementation(VOID) diff --git a/ntoskrnl/ex/handle.c b/ntoskrnl/ex/handle.c index 061e51b8882..be4406bc56a 100644 --- a/ntoskrnl/ex/handle.c +++ b/ntoskrnl/ex/handle.c @@ -22,7 +22,7 @@ EX_PUSH_LOCK HandleTableListLock; /* PRIVATE FUNCTIONS *********************************************************/ -INIT_FUNCTION +CODE_SEG("INIT") VOID NTAPI ExpInitializeHandleTables(VOID) diff --git a/ntoskrnl/ex/hdlsterm.c b/ntoskrnl/ex/hdlsterm.c index 3b8dc13ea6f..b6b68425ebf 100644 --- a/ntoskrnl/ex/hdlsterm.c +++ b/ntoskrnl/ex/hdlsterm.c @@ -183,7 +183,7 @@ HdlspEnableTerminal(IN BOOLEAN Enable) return STATUS_SUCCESS; } -INIT_FUNCTION +CODE_SEG("INIT") VOID NTAPI HeadlessInit(IN PLOADER_PARAMETER_BLOCK LoaderBlock) diff --git a/ntoskrnl/ex/init.c b/ntoskrnl/ex/init.c index 537fba3593b..8eb867b09cd 100644 --- a/ntoskrnl/ex/init.c +++ b/ntoskrnl/ex/init.c @@ -19,7 +19,7 @@ RTL_SIZEOF_THROUGH_FIELD(LOADER_PARAMETER_EXTENSION, AcpiTableSize) /* Temporary hack */ -INIT_FUNCTION +CODE_SEG("INIT") BOOLEAN NTAPI MmArmInitSystem( @@ -92,7 +92,7 @@ BOOLEAN ExpRealTimeIsUniversal; /* FUNCTIONS ****************************************************************/ -INIT_FUNCTION +CODE_SEG("INIT") NTSTATUS NTAPI ExpCreateSystemRootLink(IN PLOADER_PARAMETER_BLOCK LoaderBlock) @@ -204,7 +204,7 @@ ExpCreateSystemRootLink(IN PLOADER_PARAMETER_BLOCK LoaderBlock) return STATUS_SUCCESS; } -INIT_FUNCTION +CODE_SEG("INIT") VOID NTAPI ExpInitNls(IN PLOADER_PARAMETER_BLOCK LoaderBlock) @@ -380,7 +380,7 @@ ExpInitNls(IN PLOADER_PARAMETER_BLOCK LoaderBlock) ExpNlsTableBase = SectionBase; } -INIT_FUNCTION +CODE_SEG("INIT") VOID NTAPI ExpLoadInitialProcess(IN PINIT_BUFFER InitBuffer, @@ -597,7 +597,7 @@ ExpLoadInitialProcess(IN PINIT_BUFFER InitBuffer, *ProcessEnvironment = EnvironmentPtr; } -INIT_FUNCTION +CODE_SEG("INIT") ULONG NTAPI ExComputeTickCountMultiplier(IN ULONG ClockIncrement) @@ -630,7 +630,7 @@ ExComputeTickCountMultiplier(IN ULONG ClockIncrement) return (MsIncrement << 24) | MsRemainder; } -INIT_FUNCTION +CODE_SEG("INIT") BOOLEAN NTAPI ExpInitSystemPhase0(VOID) @@ -653,7 +653,7 @@ ExpInitSystemPhase0(VOID) return TRUE; } -INIT_FUNCTION +CODE_SEG("INIT") BOOLEAN NTAPI ExpInitSystemPhase1(VOID) @@ -734,7 +734,7 @@ ExpInitSystemPhase1(VOID) return TRUE; } -INIT_FUNCTION +CODE_SEG("INIT") BOOLEAN NTAPI ExInitSystem(VOID) @@ -760,7 +760,7 @@ ExInitSystem(VOID) } } -INIT_FUNCTION +CODE_SEG("INIT") BOOLEAN NTAPI ExpIsLoaderValid(IN PLOADER_PARAMETER_BLOCK LoaderBlock) @@ -786,7 +786,7 @@ ExpIsLoaderValid(IN PLOADER_PARAMETER_BLOCK LoaderBlock) return TRUE; } -INIT_FUNCTION +CODE_SEG("INIT") VOID NTAPI ExpLoadBootSymbols(IN PLOADER_PARAMETER_BLOCK LoaderBlock) @@ -867,7 +867,7 @@ ExpLoadBootSymbols(IN PLOADER_PARAMETER_BLOCK LoaderBlock) } } -INIT_FUNCTION +CODE_SEG("INIT") VOID NTAPI ExBurnMemory(IN PLOADER_PARAMETER_BLOCK LoaderBlock, @@ -913,7 +913,7 @@ ExBurnMemory(IN PLOADER_PARAMETER_BLOCK LoaderBlock, } } -INIT_FUNCTION +CODE_SEG("INIT") VOID NTAPI ExpInitializeExecutive(IN ULONG Cpu, @@ -1332,7 +1332,7 @@ VOID NTAPI MmFreeLoaderBlock(IN PLOADER_PARAMETER_BLOCK LoaderBlock); -INIT_FUNCTION +CODE_SEG("INIT") VOID NTAPI Phase1InitializationDiscard(IN PVOID Context) diff --git a/ntoskrnl/ex/keyedevt.c b/ntoskrnl/ex/keyedevt.c index aff93b8fa94..50678b66ebb 100644 --- a/ntoskrnl/ex/keyedevt.c +++ b/ntoskrnl/ex/keyedevt.c @@ -42,7 +42,7 @@ GENERIC_MAPPING ExpKeyedEventMapping = /* FUNCTIONS *****************************************************************/ _IRQL_requires_max_(APC_LEVEL) -INIT_FUNCTION +CODE_SEG("INIT") BOOLEAN NTAPI ExpInitializeKeyedEventImplementation(VOID) diff --git a/ntoskrnl/ex/lookas.c b/ntoskrnl/ex/lookas.c index 376d94baf3a..89cdc49e554 100644 --- a/ntoskrnl/ex/lookas.c +++ b/ntoskrnl/ex/lookas.c @@ -12,10 +12,6 @@ #define NDEBUG #include <debug.h> -#if defined (ALLOC_PRAGMA) -#pragma alloc_text(INIT, ExpInitLookasideLists) -#endif - /* GLOBALS *******************************************************************/ LIST_ENTRY ExpNonPagedLookasideListHead; @@ -29,7 +25,7 @@ GENERAL_LOOKASIDE ExpSmallPagedPoolLookasideLists[MAXIMUM_PROCESSORS]; /* PRIVATE FUNCTIONS *********************************************************/ -INIT_FUNCTION +CODE_SEG("INIT") VOID NTAPI ExInitializeSystemLookasideList(IN PGENERAL_LOOKASIDE List, @@ -57,7 +53,7 @@ ExInitializeSystemLookasideList(IN PGENERAL_LOOKASIDE List, List->LastAllocateHits = 0; } -INIT_FUNCTION +CODE_SEG("INIT") VOID NTAPI ExInitPoolLookasidePointers(VOID) @@ -87,7 +83,7 @@ ExInitPoolLookasidePointers(VOID) } } -INIT_FUNCTION +CODE_SEG("INIT") VOID NTAPI ExpInitLookasideLists(VOID) diff --git a/ntoskrnl/ex/mutant.c b/ntoskrnl/ex/mutant.c index c69d026fe97..de3b1d947a8 100644 --- a/ntoskrnl/ex/mutant.c +++ b/ntoskrnl/ex/mutant.c @@ -13,10 +13,6 @@ #define NDEBUG #include <debug.h> -#if defined (ALLOC_PRAGMA) -#pragma alloc_text(INIT, ExpInitializeMutantImplementation) -#endif - /* DATA **********************************************************************/ POBJECT_TYPE ExMutantObjectType = NULL; @@ -50,7 +46,7 @@ ExpDeleteMutant(PVOID ObjectBody) FALSE); } -INIT_FUNCTION +CODE_SEG("INIT") BOOLEAN NTAPI ExpInitializeMutantImplementation(VOID) diff --git a/ntoskrnl/ex/profile.c b/ntoskrnl/ex/profile.c index 54540072460..45c49f2586a 100644 --- a/ntoskrnl/ex/profile.c +++ b/ntoskrnl/ex/profile.c @@ -13,10 +13,6 @@ #define NDEBUG #include <debug.h> -#if defined (ALLOC_PRAGMA) -#pragma alloc_text(INIT, ExpInitializeProfileImplementation) -#endif - #define TAG_PROFILE 'forP' /* GLOBALS *******************************************************************/ @@ -62,7 +58,7 @@ ExpDeleteProfile(PVOID ObjectBody) if (Profile->Process) ObDereferenceObject(Profile->Process); } -INIT_FUNCTION +CODE_SEG("INIT") BOOLEAN NTAPI ExpInitializeProfileImplementation(VOID) diff --git a/ntoskrnl/ex/pushlock.c b/ntoskrnl/ex/pushlock.c index 855231393a6..34deacc9c5c 100644 --- a/ntoskrnl/ex/pushlock.c +++ b/ntoskrnl/ex/pushlock.c @@ -39,7 +39,7 @@ ULONG ExPushLockSpinCount = 0; * @remarks The ExpInitializePushLocks routine sets up the spin on SMP machines. * *--*/ -INIT_FUNCTION +CODE_SEG("INIT") VOID NTAPI ExpInitializePushLocks(VOID) diff --git a/ntoskrnl/ex/resource.c b/ntoskrnl/ex/resource.c index 192f8702e30..d64de3b28d4 100644 --- a/ntoskrnl/ex/resource.c +++ b/ntoskrnl/ex/resource.c @@ -163,7 +163,7 @@ ExpCheckForApcsDisabled(IN KIRQL Irql, * @remarks This routine should only be called once, during system startup. * *--*/ -INIT_FUNCTION +CODE_SEG("INIT") VOID NTAPI ExpResourceInitialization(VOID) diff --git a/ntoskrnl/ex/sem.c b/ntoskrnl/ex/sem.c index 13db388013f..937bc614f3c 100644 --- a/ntoskrnl/ex/sem.c +++ b/ntoskrnl/ex/sem.c @@ -13,10 +13,6 @@ #define NDEBUG #include <debug.h> -#if defined (ALLOC_PRAGMA) -#pragma alloc_text(INIT, ExpInitializeSemaphoreImplementation) -#endif - /* GLOBALS ******************************************************************/ POBJECT_TYPE ExSemaphoreObjectType; @@ -37,7 +33,7 @@ static const INFORMATION_CLASS_INFO ExSemaphoreInfoClass[] = /* FUNCTIONS *****************************************************************/ -INIT_FUNCTION +CODE_SEG("INIT") BOOLEAN NTAPI ExpInitializeSemaphoreImplementation(VOID) diff --git a/ntoskrnl/ex/timer.c b/ntoskrnl/ex/timer.c index a10ee751225..b982b2f71ea 100644 --- a/ntoskrnl/ex/timer.c +++ b/ntoskrnl/ex/timer.c @@ -217,7 +217,7 @@ ExpTimerApcKernelRoutine(IN PKAPC Apc, ObDereferenceObjectEx(Timer, DerefsToDo); } -INIT_FUNCTION +CODE_SEG("INIT") BOOLEAN NTAPI ExpInitializeTimerImplementation(VOID) diff --git a/ntoskrnl/ex/uuid.c b/ntoskrnl/ex/uuid.c index b69200b1a86..b196d6e9833 100644 --- a/ntoskrnl/ex/uuid.c +++ b/ntoskrnl/ex/uuid.c @@ -29,12 +29,6 @@ /* 10000 in 100-ns model = 0.1 microsecond */ #define TIME_FRAME 10000 -#if defined (ALLOC_PRAGMA) -#pragma alloc_text(INIT, ExpUuidInitialization) -#pragma alloc_text(INIT, ExLuidInitialization) -#endif - - /* GLOBALS ****************************************************************/ FAST_MUTEX ExpUuidLock; @@ -52,7 +46,7 @@ LARGE_INTEGER ExpLuid = {{0x3e9, 0x0}}; /* * @implemented */ -INIT_FUNCTION +CODE_SEG("INIT") BOOLEAN NTAPI ExpUuidInitialization(VOID) @@ -324,7 +318,7 @@ ExpUuidGetValues(PUUID_CACHED_VALUES_STRUCT CachedValues) /* * @implemented */ -INIT_FUNCTION +CODE_SEG("INIT") BOOLEAN NTAPI ExLuidInitialization(VOID) diff --git a/ntoskrnl/ex/win32k.c b/ntoskrnl/ex/win32k.c index 5e3b02c9035..7f34cdf3125 100644 --- a/ntoskrnl/ex/win32k.c +++ b/ntoskrnl/ex/win32k.c @@ -10,10 +10,6 @@ #define NDEBUG #include <debug.h> -#if defined (ALLOC_PRAGMA) -#pragma alloc_text(INIT, ExpWin32kInit) -#endif - typedef struct _WIN32_KERNEL_OBJECT_HEADER { ULONG SessionId; @@ -257,7 +253,7 @@ ExpDesktopClose(IN PEPROCESS Process OPTIONAL, &Parameters); } -INIT_FUNCTION +CODE_SEG("INIT") BOOLEAN NTAPI ExpWin32kInit(VOID) diff --git a/ntoskrnl/ex/work.c b/ntoskrnl/ex/work.c index 4196162c1f1..3884eb0b952 100644 --- a/ntoskrnl/ex/work.c +++ b/ntoskrnl/ex/work.c @@ -12,10 +12,6 @@ #define NDEBUG #include <debug.h> -#if defined (ALLOC_PRAGMA) -#pragma alloc_text(INIT, ExpInitializeWorkerThreads) -#endif - /* DATA **********************************************************************/ /* Number of worker threads for each Queue */ @@ -515,7 +511,7 @@ ExpWorkerThreadBalanceManager(IN PVOID Context) * @remarks This routine is only called once during system initialization. * *--*/ -INIT_FUNCTION +CODE_SEG("INIT") VOID NTAPI ExpInitializeWorkerThreads(VOID) diff --git a/ntoskrnl/ex/xipdisp.c b/ntoskrnl/ex/xipdisp.c index 669a706f77b..fec7600c654 100644 --- a/ntoskrnl/ex/xipdisp.c +++ b/ntoskrnl/ex/xipdisp.c @@ -25,7 +25,7 @@ XIPDispatch(IN ULONG DispatchCode, return STATUS_NOT_IMPLEMENTED; } -INIT_FUNCTION +CODE_SEG("INIT") PMEMORY_ALLOCATION_DESCRIPTOR NTAPI XIPpFindMemoryDescriptor(IN PLOADER_PARAMETER_BLOCK LoaderBlock) @@ -49,7 +49,7 @@ XIPpFindMemoryDescriptor(IN PLOADER_PARAMETER_BLOCK LoaderBlock) return NULL; } -INIT_FUNCTION +CODE_SEG("INIT") VOID NTAPI XIPInit(IN PLOADER_PARAMETER_BLOCK LoaderBlock) diff --git a/ntoskrnl/fsrtl/fsrtlpc.c b/ntoskrnl/fsrtl/fsrtlpc.c index 30d0b46d837..8857bf29b68 100644 --- a/ntoskrnl/fsrtl/fsrtlpc.c +++ b/ntoskrnl/fsrtl/fsrtlpc.c @@ -16,7 +16,7 @@ PERESOURCE FsRtlPagingIoResources; ULONG FsRtlPagingIoResourceSelector; -INIT_FUNCTION NTSTATUS NTAPI FsRtlInitializeWorkerThread(VOID); +CODE_SEG("INIT") NTSTATUS NTAPI FsRtlInitializeWorkerThread(VOID); extern KSEMAPHORE FsRtlpUncSemaphore; static const UCHAR LegalAnsiCharacterArray[] = @@ -155,7 +155,7 @@ const UCHAR * const FsRtlLegalAnsiCharacterArray = LegalAnsiCharacterArray; /* PRIVATE FUNCTIONS *********************************************************/ -INIT_FUNCTION +CODE_SEG("INIT") BOOLEAN NTAPI FsRtlInitSystem(VOID) diff --git a/ntoskrnl/fsrtl/largemcb.c b/ntoskrnl/fsrtl/largemcb.c index a70584b6663..0ce7949e5ff 100644 --- a/ntoskrnl/fsrtl/largemcb.c +++ b/ntoskrnl/fsrtl/largemcb.c @@ -472,7 +472,7 @@ FsRtlInitializeLargeMcb(IN PLARGE_MCB Mcb, /* * @implemented */ -INIT_FUNCTION +CODE_SEG("INIT") VOID NTAPI FsRtlInitializeLargeMcbs(VOID) diff --git a/ntoskrnl/fsrtl/stackovf.c b/ntoskrnl/fsrtl/stackovf.c index 7462b83a733..5975628c2b5 100644 --- a/ntoskrnl/fsrtl/stackovf.c +++ b/ntoskrnl/fsrtl/stackovf.c @@ -144,7 +144,7 @@ FsRtlWorkerThread(IN PVOID StartContext) /* * @implemented */ -INIT_FUNCTION +CODE_SEG("INIT") NTSTATUS NTAPI FsRtlInitializeWorkerThread(VOID) diff --git a/ntoskrnl/fsrtl/tunnel.c b/ntoskrnl/fsrtl/tunnel.c index 545cf2f2144..7f40f466192 100644 --- a/ntoskrnl/fsrtl/tunnel.c +++ b/ntoskrnl/fsrtl/tunnel.c @@ -129,7 +129,7 @@ FsRtlPruneTunnelCache( } } -INIT_FUNCTION +CODE_SEG("INIT") VOID FsRtlGetTunnelParameterValue( IN PUNICODE_STRING ParameterName, @@ -193,7 +193,7 @@ FsRtlGetTunnelParameterValue( ZwClose(hKey); } -INIT_FUNCTION +CODE_SEG("INIT") VOID NTAPI FsRtlInitializeTunnels(VOID) diff --git a/ntoskrnl/inbv/inbv.c b/ntoskrnl/inbv/inbv.c index 6757f71b3bc..ae7ca62f6f8 100644 --- a/ntoskrnl/inbv/inbv.c +++ b/ntoskrnl/inbv/inbv.c @@ -347,7 +347,7 @@ BitBltAligned( /* FUNCTIONS *****************************************************************/ -INIT_FUNCTION +CODE_SEG("INIT") PVOID NTAPI FindBitmapResource(IN PLOADER_PARAMETER_BLOCK LoaderBlock, @@ -412,7 +412,7 @@ FindBitmapResource(IN PLOADER_PARAMETER_BLOCK LoaderBlock, return Data; } -INIT_FUNCTION +CODE_SEG("INIT") BOOLEAN NTAPI InbvDriverInitialize(IN PLOADER_PARAMETER_BLOCK LoaderBlock, @@ -756,7 +756,7 @@ InbvSolidColorFill(IN ULONG Left, } } -INIT_FUNCTION +CODE_SEG("INIT") VOID NTAPI InbvUpdateProgressBar(IN ULONG Progress) @@ -844,7 +844,7 @@ InbvScreenToBufferBlt(OUT PUCHAR Buffer, } } -INIT_FUNCTION +CODE_SEG("INIT") VOID NTAPI InbvSetProgressBarCoordinates(IN ULONG Left, @@ -862,7 +862,7 @@ InbvSetProgressBarCoordinates(IN ULONG Left, ShowProgressBar = TRUE; } -INIT_FUNCTION +CODE_SEG("INIT") VOID NTAPI InbvSetProgressBarSubset(IN ULONG Floor, @@ -878,7 +878,7 @@ InbvSetProgressBarSubset(IN ULONG Floor, InbvProgressState.Bias = (Ceiling * 100) - Floor; } -INIT_FUNCTION +CODE_SEG("INIT") VOID NTAPI InbvIndicateProgress(VOID) @@ -1070,7 +1070,7 @@ InbvRotationThread( PsTerminateSystemThread(STATUS_SUCCESS); } -INIT_FUNCTION +CODE_SEG("INIT") VOID NTAPI InbvRotBarInit(VOID) @@ -1080,7 +1080,7 @@ InbvRotBarInit(VOID) } #endif -INIT_FUNCTION +CODE_SEG("INIT") VOID NTAPI DisplayBootBitmap(IN BOOLEAN TextMode) @@ -1364,7 +1364,7 @@ DisplayBootBitmap(IN BOOLEAN TextMode) #endif } -INIT_FUNCTION +CODE_SEG("INIT") VOID NTAPI DisplayFilter(PCHAR *String) @@ -1388,7 +1388,7 @@ DisplayFilter(PCHAR *String) } } -INIT_FUNCTION +CODE_SEG("INIT") VOID NTAPI FinalizeBootLogo(VOID) diff --git a/ntoskrnl/include/internal/amd64/mm.h b/ntoskrnl/include/internal/amd64/mm.h index f6c96bdc7e9..1afab8fd17b 100644 --- a/ntoskrnl/include/internal/amd64/mm.h +++ b/ntoskrnl/include/internal/amd64/mm.h @@ -295,7 +295,6 @@ MI_IS_MAPPED_PTE(PMMPTE PointerPte) (PointerPte->u.Hard.PageFrameNumber != 0)); } -INIT_FUNCTION FORCEINLINE VOID MmInitGlobalKernelPageDirectory(VOID) diff --git a/ntoskrnl/include/internal/cc.h b/ntoskrnl/include/internal/cc.h index 11bf97c2707..18c0b9effa2 100644 --- a/ntoskrnl/include/internal/cc.h +++ b/ntoskrnl/include/internal/cc.h @@ -286,7 +286,6 @@ extern LAZY_WRITER LazyWriter; #define NODE_TYPE_PRIVATE_MAP 0x02FE #define NODE_TYPE_SHARED_MAP 0x02FF -INIT_FUNCTION VOID NTAPI CcPfInitializePrefetcher( @@ -323,7 +322,6 @@ CcRosGetVacb( PROS_VACB *Vacb ); -INIT_FUNCTION VOID NTAPI CcInitView(VOID); @@ -340,7 +338,6 @@ NTSTATUS NTAPI CcWriteVirtualAddress(PROS_VACB Vacb); -INIT_FUNCTION BOOLEAN NTAPI CcInitializeCacheManager(VOID); diff --git a/ntoskrnl/include/internal/cm.h b/ntoskrnl/include/internal/cm.h index 19f70265585..62d31b38544 100644 --- a/ntoskrnl/include/internal/cm.h +++ b/ntoskrnl/include/internal/cm.h @@ -695,7 +695,6 @@ CmpFlushNotify( IN BOOLEAN LockHeld ); -INIT_FUNCTION VOID NTAPI CmpInitCallback( @@ -705,28 +704,24 @@ CmpInitCallback( // // KCB Cache/Delay Routines // -INIT_FUNCTION VOID NTAPI CmpInitializeCache( VOID ); -INIT_FUNCTION VOID NTAPI CmpInitCmPrivateDelayAlloc( VOID ); -INIT_FUNCTION VOID NTAPI CmpInitCmPrivateAlloc( VOID ); -INIT_FUNCTION VOID NTAPI CmpInitDelayDerefKCBEngine( @@ -969,7 +964,6 @@ VOID NTAPI CmpRemoveFromDelayedClose(IN PCM_KEY_CONTROL_BLOCK Kcb); -INIT_FUNCTION VOID NTAPI CmpInitializeDelayedCloseTable( @@ -1168,7 +1162,6 @@ CmpCreateLinkNode( // // Boot Routines // -INIT_FUNCTION HCELL_INDEX NTAPI CmpFindControlSet( @@ -1178,7 +1171,6 @@ CmpFindControlSet( OUT PBOOLEAN AutoSelect ); -INIT_FUNCTION VOID NTAPI CmGetSystemControlValues( @@ -1195,7 +1187,6 @@ CmpSaveBootControlSet( // // Hardware Configuration Routines // -INIT_FUNCTION NTSTATUS NTAPI CmpInitializeRegistryNode( @@ -1213,7 +1204,6 @@ CmpInitializeMachineDependentConfiguration( IN PLOADER_PARAMETER_BLOCK LoaderBlock ); -INIT_FUNCTION NTSTATUS NTAPI CmpInitializeHardwareConfiguration( @@ -1418,7 +1408,6 @@ CmSaveMergedKeys( // // Startup and Shutdown // -INIT_FUNCTION BOOLEAN NTAPI CmInitSystem1( @@ -1446,14 +1435,12 @@ CmpSetVersionData( // // Driver List Routines // -INIT_FUNCTION PUNICODE_STRING* NTAPI CmGetSystemDriverList( VOID ); -INIT_FUNCTION BOOLEAN NTAPI CmpFindDrivers( @@ -1464,7 +1451,6 @@ CmpFindDrivers( IN PLIST_ENTRY DriverListHead ); -INIT_FUNCTION BOOLEAN NTAPI CmpSortDriverList( @@ -1473,14 +1459,12 @@ CmpSortDriverList( IN PLIST_ENTRY DriverListHead ); -INIT_FUNCTION BOOLEAN NTAPI CmpResolveDriverDependencies( IN PLIST_ENTRY DriverListHead ); -INIT_FUNCTION BOOLEAN NTAPI CmpIsSafe( diff --git a/ntoskrnl/include/internal/dbgk.h b/ntoskrnl/include/internal/dbgk.h index ef49aebbc53..96cbb1f309b 100644 --- a/ntoskrnl/include/internal/dbgk.h +++ b/ntoskrnl/include/internal/dbgk.h @@ -46,7 +46,6 @@ #define DBGKTRACE(x, fmt, ...) DPRINT(fmt, ##__VA_ARGS__) #endif -INIT_FUNCTION VOID NTAPI DbgkInitialize( diff --git a/ntoskrnl/include/internal/ex.h b/ntoskrnl/include/internal/ex.h index 0690b7b9801..5ec4a8434f5 100644 --- a/ntoskrnl/include/internal/ex.h +++ b/ntoskrnl/include/internal/ex.h @@ -185,7 +185,6 @@ typedef struct _UUID_CACHED_VALUES_STRUCT /* INITIALIZATION FUNCTIONS *************************************************/ -INIT_FUNCTION BOOLEAN NTAPI ExpWin32kInit(VOID); @@ -200,7 +199,6 @@ Phase1Initialization( IN PVOID Context ); -INIT_FUNCTION VOID NTAPI ExpInitializePushLocks(VOID); @@ -211,7 +209,6 @@ ExRefreshTimeZoneInformation( IN PLARGE_INTEGER SystemBootTime ); -INIT_FUNCTION VOID NTAPI ExpInitializeWorkerThreads(VOID); @@ -220,12 +217,10 @@ VOID NTAPI ExSwapinWorkerThreads(IN BOOLEAN AllowSwap); -INIT_FUNCTION VOID NTAPI ExpInitLookasideLists(VOID); -INIT_FUNCTION VOID NTAPI ExInitializeSystemLookasideList( @@ -237,22 +232,18 @@ ExInitializeSystemLookasideList( IN PLIST_ENTRY ListHead ); -INIT_FUNCTION BOOLEAN NTAPI ExpInitializeCallbacks(VOID); -INIT_FUNCTION BOOLEAN NTAPI ExpUuidInitialization(VOID); -INIT_FUNCTION BOOLEAN NTAPI ExLuidInitialization(VOID); -INIT_FUNCTION VOID NTAPI ExpInitializeExecutive( @@ -264,47 +255,38 @@ VOID NTAPI ExShutdownSystem(VOID); -INIT_FUNCTION BOOLEAN NTAPI ExpInitializeEventImplementation(VOID); -INIT_FUNCTION BOOLEAN NTAPI ExpInitializeKeyedEventImplementation(VOID); -INIT_FUNCTION BOOLEAN NTAPI ExpInitializeEventPairImplementation(VOID); -INIT_FUNCTION BOOLEAN NTAPI ExpInitializeSemaphoreImplementation(VOID); -INIT_FUNCTION BOOLEAN NTAPI ExpInitializeMutantImplementation(VOID); -INIT_FUNCTION BOOLEAN NTAPI ExpInitializeTimerImplementation(VOID); -INIT_FUNCTION BOOLEAN NTAPI ExpInitializeProfileImplementation(VOID); -INIT_FUNCTION VOID NTAPI ExpResourceInitialization(VOID); -INIT_FUNCTION VOID NTAPI ExInitPoolLookasidePointers(VOID); @@ -444,7 +426,6 @@ typedef BOOLEAN ULONG_PTR Context ); -INIT_FUNCTION VOID NTAPI ExpInitializeHandleTables( @@ -1500,14 +1481,12 @@ ExTimerRundown( VOID ); -INIT_FUNCTION VOID NTAPI HeadlessInit( IN PLOADER_PARAMETER_BLOCK LoaderBlock ); -INIT_FUNCTION VOID NTAPI XIPInit( diff --git a/ntoskrnl/include/internal/fsrtl.h b/ntoskrnl/include/internal/fsrtl.h index 67464d4abb2..6e65bd78886 100644 --- a/ntoskrnl/include/internal/fsrtl.h +++ b/ntoskrnl/include/internal/fsrtl.h @@ -108,14 +108,12 @@ typedef struct _INT_MAPPING // // Initialization Routines // -INIT_FUNCTION VOID NTAPI FsRtlInitializeLargeMcbs( VOID ); -INIT_FUNCTION VOID NTAPI FsRtlInitializeTunnels( @@ -131,7 +129,6 @@ FsRtlPTeardownPerFileObjectContexts( IN PFILE_OBJECT FileObject ); -INIT_FUNCTION BOOLEAN NTAPI FsRtlInitSystem( diff --git a/ntoskrnl/include/internal/i386/ke.h b/ntoskrnl/include/internal/i386/ke.h index 7ce491e2915..5a41246212f 100644 --- a/ntoskrnl/include/internal/i386/ke.h +++ b/ntoskrnl/include/internal/i386/ke.h @@ -321,7 +321,6 @@ KiSetTebBase(PKPCR Pcr, PVOID TebAddress) Ke386SetGdtEntryBase(&Pcr->GDT[KGDT_R3_TEB / sizeof(KGDTENTRY)], TebAddress); } -INIT_FUNCTION VOID FASTCALL Ki386InitializeTss( @@ -330,36 +329,30 @@ Ki386InitializeTss( IN PKGDTENTRY Gdt ); -INIT_FUNCTION VOID NTAPI KiSetCR0Bits(VOID); -INIT_FUNCTION VOID NTAPI KiGetCacheInformation(VOID); -INIT_FUNCTION BOOLEAN NTAPI KiIsNpxPresent( VOID ); -INIT_FUNCTION BOOLEAN NTAPI KiIsNpxErrataPresent( VOID ); -INIT_FUNCTION VOID NTAPI KiSetProcessorType(VOID); -INIT_FUNCTION ULONG NTAPI KiGetFeatureBits(VOID); @@ -394,21 +387,18 @@ Ki386SetupAndExitToV86Mode( OUT PTEB VdmTeb ); -INIT_FUNCTION VOID NTAPI KeI386VdmInitialize( VOID ); -INIT_FUNCTION ULONG_PTR NTAPI Ki386EnableGlobalPage( IN ULONG_PTR Context ); -INIT_FUNCTION ULONG_PTR NTAPI Ki386EnableTargetLargePage( @@ -436,56 +426,48 @@ Ki386EnableCurrentLargePage( IN ULONG Cr3 ); -INIT_FUNCTION VOID NTAPI KiI386PentiumLockErrataFixup( VOID ); -INIT_FUNCTION VOID NTAPI KiInitializePAT( VOID ); -INIT_FUNCTION VOID NTAPI KiInitializeMTRR( IN BOOLEAN FinalCpu ); -INIT_FUNCTION VOID NTAPI KiAmdK6InitializeMTRR( VOID ); -INIT_FUNCTION VOID NTAPI KiRestoreFastSyscallReturnState( VOID ); -INIT_FUNCTION ULONG_PTR NTAPI Ki386EnableDE( IN ULONG_PTR Context ); -INIT_FUNCTION ULONG_PTR NTAPI Ki386EnableFxsr( IN ULONG_PTR Context ); -INIT_FUNCTION ULONG_PTR NTAPI Ki386EnableXMMIExceptions( @@ -809,12 +791,11 @@ KiCheckForApcDelivery(IN PKTRAP_FRAME TrapFrame) // // Switches from boot loader to initial kernel stack // -INIT_FUNCTION FORCEINLINE VOID KiSwitchToBootStack(IN ULONG_PTR InitialStack) { - INIT_FUNCTION VOID NTAPI KiSystemStartupBootStack(VOID); + VOID NTAPI KiSystemStartupBootStack(VOID); /* We have to switch to a new stack before continuing kernel initialization */ #ifdef __GNUC__ diff --git a/ntoskrnl/include/internal/inbv.h b/ntoskrnl/include/internal/inbv.h index 148c112d367..204a2aa8023 100644 --- a/ntoskrnl/include/internal/inbv.h +++ b/ntoskrnl/include/internal/inbv.h @@ -6,7 +6,6 @@ // // Driver Initialization // -INIT_FUNCTION BOOLEAN NTAPI InbvDriverInitialize( @@ -33,14 +32,12 @@ InbvBitBlt( // // Progress-Bar Functions // -INIT_FUNCTION VOID NTAPI InbvIndicateProgress( VOID ); -INIT_FUNCTION VOID NTAPI InbvSetProgressBarSubset( @@ -48,7 +45,6 @@ InbvSetProgressBarSubset( _In_ ULONG Ceiling ); -INIT_FUNCTION VOID NTAPI InbvUpdateProgressBar( @@ -58,28 +54,24 @@ InbvUpdateProgressBar( // // Boot Splash-Screen Functions // -INIT_FUNCTION VOID NTAPI InbvRotBarInit( VOID ); -INIT_FUNCTION VOID NTAPI DisplayBootBitmap( IN BOOLEAN TextMode ); -INIT_FUNCTION VOID NTAPI DisplayFilter( IN PCHAR *String ); -INIT_FUNCTION VOID NTAPI FinalizeBootLogo( diff --git a/ntoskrnl/include/internal/io.h b/ntoskrnl/include/internal/io.h index 73f862c003d..d0e0bb5e94e 100644 --- a/ntoskrnl/include/internal/io.h +++ b/ntoskrnl/include/internal/io.h @@ -587,7 +587,6 @@ PipCallDriverAddDevice( IN PDRIVER_OBJECT DriverObject ); -INIT_FUNCTION NTSTATUS NTAPI IopInitializePlugPlayServices( @@ -698,7 +697,6 @@ IoDestroyDriverList( VOID ); -INIT_FUNCTION NTSTATUS IopInitPlugPlayEvents(VOID); @@ -754,14 +752,12 @@ IopCreateDeviceKeyPath( // // PnP Routines // -INIT_FUNCTION NTSTATUS NTAPI IopUpdateRootKey( VOID ); -INIT_FUNCTION NTSTATUS NTAPI PiInitCacheGroupInformation( @@ -799,14 +795,12 @@ PnpRegSzToString( // // Initialization Routines // -INIT_FUNCTION NTSTATUS NTAPI IopCreateArcNames( IN PLOADER_PARAMETER_BLOCK LoaderBlock ); -INIT_FUNCTION NTSTATUS NTAPI IopReassignSystemRoot( @@ -814,7 +808,6 @@ IopReassignSystemRoot( OUT PANSI_STRING NtBootPath ); -INIT_FUNCTION BOOLEAN NTAPI IoInitSystem( @@ -1011,13 +1004,11 @@ IopShutdownBaseFileSystems( // // Boot logging support // -INIT_FUNCTION VOID IopInitBootLog( IN BOOLEAN StartBootLog ); -INIT_FUNCTION VOID IopStartBootLog( VOID @@ -1089,7 +1080,6 @@ RawFsIsRawFileSystemDeviceObject( IN PDEVICE_OBJECT DeviceObject ); -INIT_FUNCTION NTSTATUS NTAPI RawFsDriverEntry( @@ -1122,14 +1112,12 @@ PnpRootRegisterDevice( // // Driver Routines // -INIT_FUNCTION VOID FASTCALL IopInitializeBootDrivers( VOID ); -INIT_FUNCTION VOID FASTCALL IopInitializeSystemDrivers( @@ -1386,7 +1374,6 @@ IoSetIoCompletion( // // Ramdisk Routines // -INIT_FUNCTION NTSTATUS NTAPI IopStartRamdisk( diff --git a/ntoskrnl/include/internal/ke.h b/ntoskrnl/include/internal/ke.h index 1abde8fff67..7bdd97fd8ee 100644 --- a/ntoskrnl/include/internal/ke.h +++ b/ntoskrnl/include/internal/ke.h @@ -724,12 +724,10 @@ KeQueryValuesProcess(IN PKPROCESS Process, /* INITIALIZATION FUNCTIONS *************************************************/ -INIT_FUNCTION BOOLEAN NTAPI KeInitSystem(VOID); -INIT_FUNCTION VOID NTAPI KeInitExceptions(VOID); @@ -738,12 +736,10 @@ VOID NTAPI KeInitInterrupts(VOID); -INIT_FUNCTION VOID NTAPI KiInitializeBugCheck(VOID); -INIT_FUNCTION VOID NTAPI KiSystemStartup( @@ -904,7 +900,6 @@ KiChainedDispatch( IN PKINTERRUPT Interrupt ); -INIT_FUNCTION VOID NTAPI KiInitializeMachineType( @@ -922,7 +917,6 @@ KiSetupStackAndInitializeKernel( IN PLOADER_PARAMETER_BLOCK LoaderBlock ); -INIT_FUNCTION VOID NTAPI KiInitSpinLocks( @@ -930,7 +924,6 @@ KiInitSpinLocks( IN CCHAR Number ); -INIT_FUNCTION LARGE_INTEGER NTAPI KiComputeReciprocal( @@ -938,7 +931,6 @@ KiComputeReciprocal( OUT PUCHAR Shift ); -INIT_FUNCTION VOID NTAPI KiInitSystem( @@ -967,7 +959,6 @@ KiCallbackReturn( IN NTSTATUS Status ); -INIT_FUNCTION VOID NTAPI KiInitMachineDependent(VOID); diff --git a/ntoskrnl/include/internal/lpc.h b/ntoskrnl/include/internal/lpc.h index 667309ebdde..e862a4f2476 100644 --- a/ntoskrnl/include/internal/lpc.h +++ b/ntoskrnl/include/internal/lpc.h @@ -137,7 +137,6 @@ LpcExitThread( // // Initialization functions // -INIT_FUNCTION BOOLEAN NTAPI LpcInitSystem( diff --git a/ntoskrnl/include/internal/mm.h b/ntoskrnl/include/internal/mm.h index fb70f3b460b..4ef728cd25b 100644 --- a/ntoskrnl/include/internal/mm.h +++ b/ntoskrnl/include/internal/mm.h @@ -565,7 +565,6 @@ MiCheckAllProcessMemoryAreas(VOID); /* npool.c *******************************************************************/ -INIT_FUNCTION VOID NTAPI MiInitializeNonPagedPool(VOID); @@ -616,7 +615,6 @@ MmInit1( VOID ); -INIT_FUNCTION BOOLEAN NTAPI MmInitSystem(IN ULONG Phase, @@ -633,7 +631,6 @@ VOID NTAPI MmFreeSwapPage(SWAPENTRY Entry); -INIT_FUNCTION VOID NTAPI MmInitPagingFile(VOID); @@ -802,7 +799,6 @@ MmDeleteKernelStack(PVOID Stack, /* balance.c *****************************************************************/ -INIT_FUNCTION VOID NTAPI MmInitializeMemoryConsumer( @@ -810,7 +806,6 @@ MmInitializeMemoryConsumer( NTSTATUS (*Trim)(ULONG Target, ULONG Priority, PULONG NrFreed) ); -INIT_FUNCTION VOID NTAPI MmInitializeBalancer( @@ -833,7 +828,6 @@ MmRequestPageMemoryConsumer( PPFN_NUMBER AllocatedPage ); -INIT_FUNCTION VOID NTAPI MiInitBalancerThread(VOID); @@ -879,7 +873,6 @@ MmDeleteRmap( PVOID Address ); -INIT_FUNCTION VOID NTAPI MmInitializeRmapList(VOID); @@ -1089,7 +1082,6 @@ MmIsDisabledPage( PVOID Address ); -INIT_FUNCTION VOID NTAPI MmInitGlobalKernelPageDirectory(VOID); @@ -1192,7 +1184,6 @@ MmCreateProcessAddressSpace( IN PULONG_PTR DirectoryTableBase ); -INIT_FUNCTION NTSTATUS NTAPI MmInitializeHandBuiltProcess( @@ -1200,7 +1191,6 @@ MmInitializeHandBuiltProcess( IN PULONG_PTR DirectoryTableBase ); -INIT_FUNCTION NTSTATUS NTAPI MmInitializeHandBuiltProcess2( @@ -1320,7 +1310,6 @@ MmProtectSectionView( PULONG OldProtect ); -INIT_FUNCTION NTSTATUS NTAPI MmInitSectionImplementation(VOID); @@ -1343,7 +1332,6 @@ MmPageOutSectionView( ULONG_PTR Entry ); -INIT_FUNCTION NTSTATUS NTAPI MmCreatePhysicalMemorySection(VOID); @@ -1362,14 +1350,12 @@ MmFreeSectionSegments(PFILE_OBJECT FileObject); /* sysldr.c ******************************************************************/ -INIT_FUNCTION VOID NTAPI MiReloadBootLoadedDrivers( IN PLOADER_PARAMETER_BLOCK LoaderBlock ); -INIT_FUNCTION BOOLEAN NTAPI MiInitializeLoadedModuleList( diff --git a/ntoskrnl/include/internal/ob.h b/ntoskrnl/include/internal/ob.h index 41e1af894a9..f73b99b0a72 100644 --- a/ntoskrnl/include/internal/ob.h +++ b/ntoskrnl/include/internal/ob.h @@ -159,7 +159,6 @@ typedef struct _OB_TEMP_BUFFER // // Startup and Shutdown Functions // -INIT_FUNCTION BOOLEAN NTAPI ObInitSystem( @@ -430,7 +429,6 @@ ObInheritDeviceMap( IN PEPROCESS Process ); -INIT_FUNCTION NTSTATUS NTAPI ObpCreateDosDevicesDirectory( @@ -452,7 +450,6 @@ ObpReferenceDeviceMap( // // Security descriptor cache functions // -INIT_FUNCTION NTSTATUS NTAPI ObpInitSdCache( diff --git a/ntoskrnl/include/internal/po.h b/ntoskrnl/include/internal/po.h index 0d722347381..beb3f3b4112 100644 --- a/ntoskrnl/include/internal/po.h +++ b/ntoskrnl/include/internal/po.h @@ -264,14 +264,12 @@ typedef struct _POP_SHUTDOWN_WAIT_ENTRY // // Initialization routines // -INIT_FUNCTION BOOLEAN NTAPI PoInitSystem( IN ULONG BootPhase ); -INIT_FUNCTION VOID NTAPI PoInitializePrcb( diff --git a/ntoskrnl/include/internal/ps.h b/ntoskrnl/include/internal/ps.h index fd360cfa330..b6eb06d2504 100644 --- a/ntoskrnl/include/internal/ps.h +++ b/ntoskrnl/include/internal/ps.h @@ -90,7 +90,6 @@ PspShutdownProcessManager( VOID ); -INIT_FUNCTION BOOLEAN NTAPI PsInitSystem( @@ -121,7 +120,6 @@ PspMapSystemDll( IN BOOLEAN UseLargePages ); -INIT_FUNCTION NTSTATUS NTAPI PsLocateSystemDll( @@ -354,7 +352,6 @@ PspRemoveProcessFromJob( IN PEJOB Job ); -INIT_FUNCTION VOID NTAPI PspInitializeJobStructures( @@ -418,7 +415,6 @@ PspIsProcessExiting(IN PEPROCESS Process); // // Apphelp functions // -INIT_FUNCTION NTSTATUS NTAPI ApphelpCacheInitialize(VOID); diff --git a/ntoskrnl/include/internal/se.h b/ntoskrnl/include/internal/se.h index 722d2d9a2aa..56a1287d8bf 100644 --- a/ntoskrnl/include/internal/se.h +++ b/ntoskrnl/include/internal/se.h @@ -243,27 +243,22 @@ SepSidInTokenEx( ); /* Functions */ -INIT_FUNCTION BOOLEAN NTAPI SeInitSystem(VOID); -INIT_FUNCTION VOID NTAPI SepInitPrivileges(VOID); -INIT_FUNCTION BOOLEAN NTAPI SepInitSecurityIDs(VOID); -INIT_FUNCTION BOOLEAN NTAPI SepInitDACLs(VOID); -INIT_FUNCTION BOOLEAN NTAPI SepInitSDs(VOID); @@ -330,7 +325,6 @@ SepCreateImpersonationTokenDacl( _Out_ PACL* Dacl ); -INIT_FUNCTION VOID NTAPI SepInitializeTokenImplementation(VOID); diff --git a/ntoskrnl/io/iomgr/arcname.c b/ntoskrnl/io/iomgr/arcname.c index 852f7e02632..2e7cbb968b1 100644 --- a/ntoskrnl/io/iomgr/arcname.c +++ b/ntoskrnl/io/iomgr/arcname.c @@ -21,13 +21,13 @@ PCHAR IoLoaderArcBootDeviceName; /* FUNCTIONS *****************************************************************/ -INIT_FUNCTION +CODE_SEG("INIT") NTSTATUS NTAPI IopCreateArcNamesCd(IN PLOADER_PARAMETER_BLOCK LoaderBlock ); -INIT_FUNCTION +CODE_SEG("INIT") NTSTATUS NTAPI IopCreateArcNamesDisk(IN PLOADER_PARAMETER_BLOCK LoaderBlock, @@ -35,7 +35,7 @@ IopCreateArcNamesDisk(IN PLOADER_PARAMETER_BLOCK LoaderBlock, IN PBOOLEAN FoundBoot ); -INIT_FUNCTION +CODE_SEG("INIT") NTSTATUS NTAPI IopCreateArcNames(IN PLOADER_PARAMETER_BLOCK LoaderBlock) @@ -146,7 +146,7 @@ IopCreateArcNames(IN PLOADER_PARAMETER_BLOCK LoaderBlock) return Status; } -INIT_FUNCTION +CODE_SEG("INIT") NTSTATUS NTAPI IopCreateArcNamesCd(IN PLOADER_PARAMETER_BLOCK LoaderBlock) @@ -408,7 +408,7 @@ Cleanup: return Status; } -INIT_FUNCTION +CODE_SEG("INIT") NTSTATUS NTAPI IopCreateArcNamesDisk(IN PLOADER_PARAMETER_BLOCK LoaderBlock, @@ -830,7 +830,7 @@ Cleanup: return Status; } -INIT_FUNCTION +CODE_SEG("INIT") NTSTATUS NTAPI IopReassignSystemRoot(IN PLOADER_PARAMETER_BLOCK LoaderBlock, diff --git a/ntoskrnl/io/iomgr/bootlog.c b/ntoskrnl/io/iomgr/bootlog.c index 347a25d9b11..df2af12ee07 100644 --- a/ntoskrnl/io/iomgr/bootlog.c +++ b/ntoskrnl/io/iomgr/bootlog.c @@ -13,11 +13,6 @@ #define NDEBUG #include <debug.h> -#if defined (ALLOC_PRAGMA) -#pragma alloc_text(INIT, IopInitBootLog) -#pragma alloc_text(INIT, IopStartBootLog) -#endif - /* GLOBALS ******************************************************************/ static BOOLEAN IopBootLogCreate = FALSE; @@ -29,7 +24,7 @@ static ERESOURCE IopBootLogResource; /* FUNCTIONS ****************************************************************/ -INIT_FUNCTION +CODE_SEG("INIT") VOID IopInitBootLog(BOOLEAN StartBootLog) { @@ -38,7 +33,7 @@ IopInitBootLog(BOOLEAN StartBootLog) } -INIT_FUNCTION +CODE_SEG("INIT") VOID IopStartBootLog(VOID) { diff --git a/ntoskrnl/io/iomgr/driver.c b/ntoskrnl/io/iomgr/driver.c index 330a0bf8ed9..3c4f3433ecf 100644 --- a/ntoskrnl/io/iomgr/driver.c +++ b/ntoskrnl/io/iomgr/driver.c @@ -722,7 +722,7 @@ MiResolveImageReferences(IN PVOID ImageBase, // // Used for images already loaded (boot drivers) // -INIT_FUNCTION +CODE_SEG("INIT") NTSTATUS NTAPI LdrProcessDriverModule(PLDR_DATA_TABLE_ENTRY LdrEntry, @@ -804,7 +804,7 @@ LdrProcessDriverModule(PLDR_DATA_TABLE_ENTRY LdrEntry, * * Initialize a driver that is already loaded in memory. */ -INIT_FUNCTION +CODE_SEG("INIT") NTSTATUS NTAPI IopInitializeBuiltinDriver(IN PLDR_DATA_TABLE_ENTRY BootLdrEntry) @@ -935,7 +935,7 @@ IopInitializeBuiltinDriver(IN PLDR_DATA_TABLE_ENTRY BootLdrEntry) * Return Value * None */ -INIT_FUNCTION +CODE_SEG("INIT") VOID FASTCALL IopInitializeBootDrivers(VOID) @@ -1135,7 +1135,7 @@ IopInitializeBootDrivers(VOID) PnPBootDriversLoaded = TRUE; } -INIT_FUNCTION +CODE_SEG("INIT") VOID FASTCALL IopInitializeSystemDrivers(VOID) diff --git a/ntoskrnl/io/iomgr/iomgr.c b/ntoskrnl/io/iomgr/iomgr.c index d815dda0c3b..ecdf3fbdb5e 100644 --- a/ntoskrnl/io/iomgr/iomgr.c +++ b/ntoskrnl/io/iomgr/iomgr.c @@ -87,13 +87,9 @@ extern GENERAL_LOOKASIDE IoCompletionPacketLookaside; PLOADER_PARAMETER_BLOCK IopLoaderBlock; -#if defined (ALLOC_PRAGMA) -#pragma alloc_text(INIT, IoInitSystem) -#endif - /* INIT FUNCTIONS ************************************************************/ -INIT_FUNCTION +CODE_SEG("INIT") VOID NTAPI IopInitLookasideLists(VOID) @@ -240,7 +236,7 @@ IopInitLookasideLists(VOID) } } -INIT_FUNCTION +CODE_SEG("INIT") BOOLEAN NTAPI IopCreateObjectTypes(VOID) @@ -329,7 +325,7 @@ IopCreateObjectTypes(VOID) return TRUE; } -INIT_FUNCTION +CODE_SEG("INIT") BOOLEAN NTAPI IopCreateRootDirectories(VOID) @@ -394,7 +390,7 @@ IopCreateRootDirectories(VOID) return TRUE; } -INIT_FUNCTION +CODE_SEG("INIT") BOOLEAN NTAPI IopMarkBootPartition(IN PLOADER_PARAMETER_BLOCK LoaderBlock) @@ -464,7 +460,7 @@ IopMarkBootPartition(IN PLOADER_PARAMETER_BLOCK LoaderBlock) return TRUE; } -INIT_FUNCTION +CODE_SEG("INIT") BOOLEAN NTAPI IoInitSystem(IN PLOADER_PARAMETER_BLOCK LoaderBlock) diff --git a/ntoskrnl/io/iomgr/ramdisk.c b/ntoskrnl/io/iomgr/ramdisk.c index fd78ddf4601..b959e964fff 100644 --- a/ntoskrnl/io/iomgr/ramdisk.c +++ b/ntoskrnl/io/iomgr/ramdisk.c @@ -18,15 +18,9 @@ extern KEVENT PiEnumerationFinished; -/* DATA ***********************************************************************/ - -#if defined (ALLOC_PRAGMA) -#pragma alloc_text(INIT, IopStartRamdisk) -#endif - /* FUNCTIONS ******************************************************************/ -INIT_FUNCTION +CODE_SEG("INIT") NTSTATUS NTAPI IopStartRamdisk(IN PLOADER_PARAMETER_BLOCK LoaderBlock) diff --git a/ntoskrnl/io/iomgr/rawfs.c b/ntoskrnl/io/iomgr/rawfs.c index e653131f5a2..b903fe3a31d 100644 --- a/ntoskrnl/io/iomgr/rawfs.c +++ b/ntoskrnl/io/iomgr/rawfs.c @@ -1187,7 +1187,7 @@ RawUnload(IN PDRIVER_OBJECT DriverObject) #endif } -INIT_FUNCTION +CODE_SEG("INIT") NTSTATUS NTAPI RawFsDriverEntry(IN PDRIVER_OBJECT DriverObject, diff --git a/ntoskrnl/io/iomgr/volume.c b/ntoskrnl/io/iomgr/volume.c index 878c0426dbd..024823636f5 100644 --- a/ntoskrnl/io/iomgr/volume.c +++ b/ntoskrnl/io/iomgr/volume.c @@ -15,11 +15,6 @@ #define NDEBUG #include <debug.h> -#if defined (ALLOC_PRAGMA) -#pragma alloc_text(INIT, IoInitFileSystemImplementation) -#pragma alloc_text(INIT, IoInitVpbImplementation) -#endif - /* GLOBALS ******************************************************************/ ERESOURCE IopDatabaseResource; diff --git a/ntoskrnl/io/pnpmgr/plugplay.c b/ntoskrnl/io/pnpmgr/plugplay.c index 933e514d9f9..4f930e9bc55 100644 --- a/ntoskrnl/io/pnpmgr/plugplay.c +++ b/ntoskrnl/io/pnpmgr/plugplay.c @@ -12,10 +12,6 @@ #define NDEBUG #include <debug.h> -#if defined (ALLOC_PRAGMA) -#pragma alloc_text(INIT, IopInitPlugPlayEvents) -#endif - typedef struct _PNP_EVENT_ENTRY { LIST_ENTRY ListEntry; @@ -30,7 +26,8 @@ static KEVENT IopPnpNotifyEvent; /* FUNCTIONS *****************************************************************/ -NTSTATUS INIT_FUNCTION +CODE_SEG("INIT") +NTSTATUS IopInitPlugPlayEvents(VOID) { InitializeListHead(&IopPnpEventQueueHead); diff --git a/ntoskrnl/io/pnpmgr/pnpinit.c b/ntoskrnl/io/pnpmgr/pnpinit.c index b4c99683609..dd33a4b0258 100644 --- a/ntoskrnl/io/pnpmgr/pnpinit.c +++ b/ntoskrnl/io/pnpmgr/pnpinit.c @@ -93,7 +93,7 @@ IopInitializeArbiters(VOID) } -INIT_FUNCTION +CODE_SEG("INIT") NTSTATUS NTAPI PiInitCacheGroupInformation(VOID) @@ -425,7 +425,7 @@ Exit: return Status; } -INIT_FUNCTION +CODE_SEG("INIT") NTSTATUS NTAPI IopInitializePlugPlayServices(VOID) diff --git a/ntoskrnl/io/pnpmgr/pnpmgr.c b/ntoskrnl/io/pnpmgr/pnpmgr.c index 50e608e3730..3e142b081d0 100644 --- a/ntoskrnl/io/pnpmgr/pnpmgr.c +++ b/ntoskrnl/io/pnpmgr/pnpmgr.c @@ -1025,7 +1025,7 @@ cleanup: } static -INIT_FUNCTION +CODE_SEG("INIT") NTSTATUS IopEnumerateDetectedDevices( IN HANDLE hBaseKey, @@ -1466,7 +1466,7 @@ cleanup: } static -INIT_FUNCTION +CODE_SEG("INIT") BOOLEAN IopIsFirmwareMapperDisabled(VOID) { @@ -1535,7 +1535,7 @@ IopIsFirmwareMapperDisabled(VOID) return (KeyValue != 0) ? TRUE : FALSE; } -INIT_FUNCTION +CODE_SEG("INIT") NTSTATUS NTAPI IopUpdateRootKey(VOID) diff --git a/ntoskrnl/kd/kdinit.c b/ntoskrnl/kd/kdinit.c index a73ec17ecad..fddde5a5bfd 100644 --- a/ntoskrnl/kd/kdinit.c +++ b/ntoskrnl/kd/kdinit.c @@ -39,7 +39,7 @@ extern ANSI_STRING KdpLogFileName; /* PRIVATE FUNCTIONS *********************************************************/ -INIT_FUNCTION +CODE_SEG("INIT") PCHAR NTAPI KdpGetDebugMode(PCHAR Currentp2) @@ -135,7 +135,7 @@ KdpGetDebugMode(PCHAR Currentp2) return p2; } -INIT_FUNCTION +CODE_SEG("INIT") VOID NTAPI KdpCallInitRoutine(ULONG BootPhase) diff --git a/ntoskrnl/kd/kdio.c b/ntoskrnl/kd/kdio.c index 678a335741f..b1bfae48224 100644 --- a/ntoskrnl/kd/kdio.c +++ b/ntoskrnl/kd/kdio.c @@ -58,7 +58,7 @@ static KSPIN_LOCK KdpDmesgLogSpinLock; * * See also: kd64\kdinit.c */ -static INIT_FUNCTION +static CODE_SEG("INIT") SIZE_T KdpGetMemorySizeInMBs(IN PLOADER_PARAMETER_BLOCK LoaderBlock) { @@ -99,7 +99,7 @@ KdpGetMemorySizeInMBs(IN PLOADER_PARAMETER_BLOCK LoaderBlock) } /* See also: kd64\kdinit.c */ -static INIT_FUNCTION +static CODE_SEG("INIT") VOID KdpPrintBanner(IN SIZE_T MemSizeMBs) { diff --git a/ntoskrnl/kd64/kdinit.c b/ntoskrnl/kd64/kdinit.c index 43d2e8fc6b5..6b8319605db 100644 --- a/ntoskrnl/kd64/kdinit.c +++ b/ntoskrnl/kd64/kdinit.c @@ -26,7 +26,7 @@ * * See also: kd\kdio.c */ -static INIT_FUNCTION +static CODE_SEG("INIT") SIZE_T KdpGetMemorySizeInMBs(IN PLOADER_PARAMETER_BLOCK LoaderBlock) { @@ -67,7 +67,7 @@ KdpGetMemorySizeInMBs(IN PLOADER_PARAMETER_BLOCK LoaderBlock) } /* See also: kd\kdio.c */ -static INIT_FUNCTION +static CODE_SEG("INIT") VOID KdpPrintBanner(IN SIZE_T MemSizeMBs) { diff --git a/ntoskrnl/ke/amd64/cpu.c b/ntoskrnl/ke/amd64/cpu.c index 3c2b706a906..e41f0083552 100644 --- a/ntoskrnl/ke/amd64/cpu.c +++ b/ntoskrnl/ke/amd64/cpu.c @@ -50,6 +50,7 @@ static const CHAR CmpRiseID[] = "RiseRiseRise"; /* FUNCTIONS *****************************************************************/ +CODE_SEG("INIT") VOID NTAPI KiSetProcessorType(VOID) @@ -120,6 +121,7 @@ KiGetCpuVendor(VOID) return CPU_UNKNOWN; } +CODE_SEG("INIT") ULONG NTAPI KiGetFeatureBits(VOID) @@ -209,6 +211,7 @@ KiGetFeatureBits(VOID) return FeatureBits; } +CODE_SEG("INIT") VOID NTAPI KiGetCacheInformation(VOID) diff --git a/ntoskrnl/ke/amd64/except.c b/ntoskrnl/ke/amd64/except.c index 40b01064d84..c095bb0dc5d 100644 --- a/ntoskrnl/ke/amd64/except.c +++ b/ntoskrnl/ke/amd64/except.c @@ -53,7 +53,7 @@ KDESCRIPTOR KiIdtDescriptor = {{0}, sizeof(KiIdt) - 1, KiIdt}; /* FUNCTIONS *****************************************************************/ -INIT_FUNCTION +CODE_SEG("INIT") VOID NTAPI KeInitExceptions(VOID) diff --git a/ntoskrnl/ke/amd64/kiinit.c b/ntoskrnl/ke/amd64/kiinit.c index c951a083657..c8610b83e6b 100644 --- a/ntoskrnl/ke/amd64/kiinit.c +++ b/ntoskrnl/ke/amd64/kiinit.c @@ -40,7 +40,7 @@ void KiSystemCallEntry32(); /* FUNCTIONS *****************************************************************/ -INIT_FUNCTION +CODE_SEG("INIT") VOID NTAPI KiInitMachineDependent(VOID) @@ -160,6 +160,7 @@ KiInitializePcr(IN PKIPCR Pcr, KeSetCurrentIrql(PASSIVE_LEVEL); } +CODE_SEG("INIT") VOID NTAPI KiInitializeCpu(PKIPCR Pcr) @@ -268,7 +269,7 @@ KiInitializeTss(IN PKTSS64 Tss, __ltr(KGDT64_SYS_TSS); } -INIT_FUNCTION +CODE_SEG("INIT") VOID NTAPI KiInitializeKernelMachineDependent( @@ -365,7 +366,7 @@ KiInitModuleList(IN PLOADER_PARAMETER_BLOCK LoaderBlock) } } -INIT_FUNCTION +CODE_SEG("INIT") VOID NTAPI KiSystemStartup(IN PLOADER_PARAMETER_BLOCK LoaderBlock) diff --git a/ntoskrnl/ke/amd64/krnlinit.c b/ntoskrnl/ke/amd64/krnlinit.c index 93519095f98..8b5d7003cdf 100644 --- a/ntoskrnl/ke/amd64/krnlinit.c +++ b/ntoskrnl/ke/amd64/krnlinit.c @@ -20,7 +20,7 @@ extern BOOLEAN RtlpUse16ByteSLists; /* FUNCTIONS *****************************************************************/ -INIT_FUNCTION +CODE_SEG("INIT") VOID NTAPI KiInitializeKernel(IN PKPROCESS InitProcess, @@ -51,7 +51,7 @@ KiInitializeHandBuiltThread( } -INIT_FUNCTION +CODE_SEG("INIT") VOID NTAPI KiSystemStartupBootStack(VOID) @@ -134,7 +134,7 @@ KiSystemStartupBootStack(VOID) KiIdleLoop(); } -INIT_FUNCTION +CODE_SEG("INIT") VOID NTAPI KiInitializeKernel(IN PKPROCESS InitProcess, diff --git a/ntoskrnl/ke/arm/kiinit.c b/ntoskrnl/ke/arm/kiinit.c index ef7f9949a74..03f22153de3 100644 --- a/ntoskrnl/ke/arm/kiinit.c +++ b/ntoskrnl/ke/arm/kiinit.c @@ -31,6 +31,7 @@ extern PVOID KiArmVectorTable; /* FUNCTIONS ******************************************************************/ +CODE_SEG("INIT") VOID NTAPI KiInitMachineDependent(VOID) @@ -305,6 +306,7 @@ KiInitializePcr(IN ULONG ProcessorNumber, #endif } +CODE_SEG("INIT") VOID KiInitializeMachineType(VOID) { diff --git a/ntoskrnl/ke/bug.c b/ntoskrnl/ke/bug.c index 5d5a4a7e2d4..f7b9175feab 100644 --- a/ntoskrnl/ke/bug.c +++ b/ntoskrnl/ke/bug.c @@ -13,10 +13,6 @@ #define NDEBUG #include <debug.h> -#if defined (ALLOC_PRAGMA) -#pragma alloc_text(INIT, KiInitializeBugCheck) -#endif - /* GLOBALS *******************************************************************/ LIST_ENTRY KeBugcheckCallbackListHead; @@ -295,7 +291,7 @@ KeRosDumpStackFrames(IN PULONG_PTR Frame OPTIONAL, } } -INIT_FUNCTION +CODE_SEG("INIT") VOID NTAPI KiInitializeBugCheck(VOID) diff --git a/ntoskrnl/ke/config.c b/ntoskrnl/ke/config.c index ca3d8b009b3..b5b958552e5 100644 --- a/ntoskrnl/ke/config.c +++ b/ntoskrnl/ke/config.c @@ -17,7 +17,7 @@ /* * @implemented */ -INIT_FUNCTION +CODE_SEG("INIT") PCONFIGURATION_COMPONENT_DATA NTAPI KeFindConfigurationEntry(IN PCONFIGURATION_COMPONENT_DATA Child, @@ -38,7 +38,7 @@ KeFindConfigurationEntry(IN PCONFIGURATION_COMPONENT_DATA Child, /* * @implemented */ -INIT_FUNCTION +CODE_SEG("INIT") PCONFIGURATION_COMPONENT_DATA NTAPI KeFindConfigurationNextEntry(IN PCONFIGURATION_COMPONENT_DATA Child, diff --git a/ntoskrnl/ke/i386/cpu.c b/ntoskrnl/ke/i386/cpu.c index 224178d2e60..043ab2b62d2 100644 --- a/ntoskrnl/ke/i386/cpu.c +++ b/ntoskrnl/ke/i386/cpu.c @@ -85,7 +85,7 @@ setCx86(UCHAR reg, UCHAR data) /* FUNCTIONS *****************************************************************/ -INIT_FUNCTION +CODE_SEG("INIT") VOID NTAPI KiSetProcessorType(VOID) @@ -152,7 +152,7 @@ KiSetProcessorType(VOID) __writeeflags(EFlags); } -INIT_FUNCTION +CODE_SEG("INIT") ULONG NTAPI KiGetCpuVendor(VOID) @@ -208,7 +208,7 @@ KiGetCpuVendor(VOID) return CPU_UNKNOWN; } -INIT_FUNCTION +CODE_SEG("INIT") ULONG NTAPI KiGetFeatureBits(VOID) @@ -454,7 +454,7 @@ KiGetFeatureBits(VOID) return FeatureBits; } -INIT_FUNCTION +CODE_SEG("INIT") VOID NTAPI KiGetCacheInformation(VOID) @@ -722,7 +722,7 @@ KiGetCacheInformation(VOID) Pcr->SecondLevelCacheAssociativity); } -INIT_FUNCTION +CODE_SEG("INIT") VOID NTAPI KiSetCR0Bits(VOID) @@ -739,7 +739,7 @@ KiSetCR0Bits(VOID) __writecr0(Cr0); } -INIT_FUNCTION +CODE_SEG("INIT") VOID NTAPI KiInitializeTSS2(IN PKTSS Tss, @@ -793,7 +793,7 @@ KiInitializeTSS(IN PKTSS Tss) Tss->Ss0 = KGDT_R0_DATA; } -INIT_FUNCTION +CODE_SEG("INIT") VOID FASTCALL Ki386InitializeTss(IN PKTSS Tss, @@ -982,7 +982,7 @@ KiSaveProcessorControlState(OUT PKPROCESSOR_STATE ProcessorState) ProcessorState->SpecialRegisters.Ldtr = Ke386GetLocalDescriptorTable(); } -INIT_FUNCTION +CODE_SEG("INIT") VOID NTAPI KiInitializeMachineType(VOID) @@ -991,7 +991,7 @@ KiInitializeMachineType(VOID) KeI386MachineType = KeLoaderBlock->u.I386.MachineType & 0x000FF; } -INIT_FUNCTION +CODE_SEG("INIT") ULONG_PTR NTAPI KiLoadFastSyscallMachineSpecificRegisters(IN ULONG_PTR Context) @@ -1005,7 +1005,7 @@ KiLoadFastSyscallMachineSpecificRegisters(IN ULONG_PTR Context) return 0; } -INIT_FUNCTION +CODE_SEG("INIT") VOID NTAPI KiRestoreFastSyscallReturnState(VOID) @@ -1039,7 +1039,7 @@ KiRestoreFastSyscallReturnState(VOID) } } -INIT_FUNCTION +CODE_SEG("INIT") ULONG_PTR NTAPI Ki386EnableDE(IN ULONG_PTR Context) @@ -1049,7 +1049,7 @@ Ki386EnableDE(IN ULONG_PTR Context) return 0; } -INIT_FUNCTION +CODE_SEG("INIT") ULONG_PTR NTAPI Ki386EnableFxsr(IN ULONG_PTR Context) @@ -1059,7 +1059,7 @@ Ki386EnableFxsr(IN ULONG_PTR Context) return 0; } -INIT_FUNCTION +CODE_SEG("INIT") ULONG_PTR NTAPI Ki386EnableXMMIExceptions(IN ULONG_PTR Context) @@ -1082,7 +1082,7 @@ Ki386EnableXMMIExceptions(IN ULONG_PTR Context) return 0; } -INIT_FUNCTION +CODE_SEG("INIT") VOID NTAPI KiI386PentiumLockErrataFixup(VOID) @@ -1158,7 +1158,7 @@ KiSaveProcessorState(IN PKTRAP_FRAME TrapFrame, KiSaveProcessorControlState(&Prcb->ProcessorState); } -INIT_FUNCTION +CODE_SEG("INIT") BOOLEAN NTAPI KiIsNpxPresent(VOID) @@ -1199,7 +1199,7 @@ KiIsNpxPresent(VOID) return TRUE; } -INIT_FUNCTION +CODE_SEG("INIT") BOOLEAN NTAPI KiIsNpxErrataPresent(VOID) diff --git a/ntoskrnl/ke/i386/exp.c b/ntoskrnl/ke/i386/exp.c index 25cc92f4f01..a64faa1d60c 100644 --- a/ntoskrnl/ke/i386/exp.c +++ b/ntoskrnl/ke/i386/exp.c @@ -17,7 +17,7 @@ /* FUNCTIONS *****************************************************************/ -INIT_FUNCTION +CODE_SEG("INIT") VOID NTAPI KeInitExceptions(VOID) diff --git a/ntoskrnl/ke/i386/kiinit.c b/ntoskrnl/ke/i386/kiinit.c index 7fc38067730..9fb22698bca 100644 --- a/ntoskrnl/ke/i386/kiinit.c +++ b/ntoskrnl/ke/i386/kiinit.c @@ -31,7 +31,7 @@ ULONGLONG BootCycles, BootCyclesEnd; /* FUNCTIONS *****************************************************************/ -INIT_FUNCTION +CODE_SEG("INIT") VOID NTAPI KiInitMachineDependent(VOID) @@ -330,7 +330,7 @@ KiInitMachineDependent(VOID) KiSetCR0Bits(); } -INIT_FUNCTION +CODE_SEG("INIT") VOID NTAPI KiInitializePcr(IN ULONG ProcessorNumber, @@ -392,7 +392,7 @@ KiInitializePcr(IN ULONG ProcessorNumber, Pcr->PrcbData.MultiThreadProcessorSet = Pcr->PrcbData.SetMember; } -INIT_FUNCTION +CODE_SEG("INIT") VOID NTAPI KiInitializeKernel(IN PKPROCESS InitProcess, @@ -615,7 +615,7 @@ KiInitializeKernel(IN PKPROCESS InitProcess, LoaderBlock->Prcb = 0; } -INIT_FUNCTION +CODE_SEG("INIT") VOID FASTCALL KiGetMachineBootPointers(IN PKGDTENTRY *Gdt, @@ -656,7 +656,7 @@ KiGetMachineBootPointers(IN PKGDTENTRY *Gdt, TssSelector.HighWord.Bytes.BaseHi << 24); } -INIT_FUNCTION +CODE_SEG("INIT") VOID NTAPI KiSystemStartupBootStack(VOID) @@ -708,7 +708,7 @@ KiMarkPageAsReadOnly( __invlpg(Address); } -INIT_FUNCTION +CODE_SEG("INIT") VOID NTAPI KiSystemStartup(IN PLOADER_PARAMETER_BLOCK LoaderBlock) diff --git a/ntoskrnl/ke/i386/mtrr.c b/ntoskrnl/ke/i386/mtrr.c index ed2a7fb7ba1..67a59509964 100644 --- a/ntoskrnl/ke/i386/mtrr.c +++ b/ntoskrnl/ke/i386/mtrr.c @@ -16,7 +16,7 @@ /* FUNCTIONS *****************************************************************/ -INIT_FUNCTION +CODE_SEG("INIT") VOID NTAPI KiInitializeMTRR(IN BOOLEAN FinalCpu) @@ -25,7 +25,7 @@ KiInitializeMTRR(IN BOOLEAN FinalCpu) DPRINT("MTRR support detected but not yet taken advantage of\n"); } -INIT_FUNCTION +CODE_SEG("INIT") VOID NTAPI KiAmdK6InitializeMTRR(VOID) diff --git a/ntoskrnl/ke/i386/patpge.c b/ntoskrnl/ke/i386/patpge.c index 8a27d7a7384..80324ac7b7e 100644 --- a/ntoskrnl/ke/i386/patpge.c +++ b/ntoskrnl/ke/i386/patpge.c @@ -17,7 +17,7 @@ /* FUNCTIONS *****************************************************************/ -INIT_FUNCTION +CODE_SEG("INIT") ULONG_PTR NTAPI Ki386EnableGlobalPage(IN ULONG_PTR Context) @@ -55,7 +55,7 @@ Ki386EnableGlobalPage(IN ULONG_PTR Context) return 0; } -INIT_FUNCTION +CODE_SEG("INIT") VOID NTAPI KiInitializePAT(VOID) @@ -64,7 +64,7 @@ KiInitializePAT(VOID) DPRINT("PAT support detected but not yet taken advantage of\n"); } -INIT_FUNCTION +CODE_SEG("INIT") ULONG_PTR NTAPI Ki386EnableTargetLargePage(IN ULONG_PTR Context) diff --git a/ntoskrnl/ke/krnlinit.c b/ntoskrnl/ke/krnlinit.c index accdeae7efb..d74d805715d 100644 --- a/ntoskrnl/ke/krnlinit.c +++ b/ntoskrnl/ke/krnlinit.c @@ -65,7 +65,7 @@ KSPIN_LOCK KiReverseStallIpiLock; /* FUNCTIONS *****************************************************************/ -INIT_FUNCTION +CODE_SEG("INIT") VOID NTAPI KiInitSystem(VOID) @@ -117,7 +117,7 @@ KiInitSystem(VOID) sizeof(KeServiceDescriptorTable)); } -INIT_FUNCTION +CODE_SEG("INIT") LARGE_INTEGER NTAPI KiComputeReciprocal(IN LONG Divisor, @@ -181,7 +181,7 @@ KiComputeReciprocal(IN LONG Divisor, return Reciprocal; } -INIT_FUNCTION +CODE_SEG("INIT") VOID NTAPI KiInitSpinLocks(IN PKPRCB Prcb, @@ -287,7 +287,7 @@ KiInitSpinLocks(IN PKPRCB Prcb, } } -INIT_FUNCTION +CODE_SEG("INIT") BOOLEAN NTAPI KeInitSystem(VOID) diff --git a/ntoskrnl/ke/powerpc/cpu.c b/ntoskrnl/ke/powerpc/cpu.c index 571389ea995..c3f72573a36 100644 --- a/ntoskrnl/ke/powerpc/cpu.c +++ b/ntoskrnl/ke/powerpc/cpu.c @@ -57,6 +57,7 @@ RDMSR(IN ULONG Register) /* FUNCTIONS *****************************************************************/ +CODE_SEG("INIT") VOID NTAPI KiSetProcessorType(VOID) @@ -70,6 +71,7 @@ KiGetCpuVendor(VOID) return 0; } +CODE_SEG("INIT") ULONG NTAPI KiGetFeatureBits(VOID) @@ -79,6 +81,7 @@ KiGetFeatureBits(VOID) return FeatureBits; } +CODE_SEG("INIT") VOID NTAPI KiGetCacheInformation(VOID) @@ -124,6 +127,7 @@ KiSaveProcessorControlState(OUT PKPROCESSOR_STATE ProcessorState) { } +CODE_SEG("INIT") VOID NTAPI KiInitializeMachineType(VOID) @@ -137,12 +141,14 @@ KiLoadFastSyscallMachineSpecificRegisters(IN ULONG_PTR Context) return 0; } +CODE_SEG("INIT") VOID NTAPI KiRestoreFastSyscallReturnState(VOID) { } +CODE_SEG("INIT") ULONG_PTR NTAPI Ki386EnableDE(IN ULONG_PTR Context) @@ -150,6 +156,7 @@ Ki386EnableDE(IN ULONG_PTR Context) return 0; } +CODE_SEG("INIT") ULONG_PTR NTAPI Ki386EnableFxsr(IN ULONG_PTR Context) diff --git a/ntoskrnl/ke/powerpc/exp.c b/ntoskrnl/ke/powerpc/exp.c index 52cced20b6f..9de6097cba3 100644 --- a/ntoskrnl/ke/powerpc/exp.c +++ b/ntoskrnl/ke/powerpc/exp.c @@ -17,7 +17,7 @@ /* FUNCTIONS *****************************************************************/ -INIT_FUNCTION +CODE_SEG("INIT") VOID NTAPI KeInitExceptions(VOID) diff --git a/ntoskrnl/ke/powerpc/kiinit.c b/ntoskrnl/ke/powerpc/kiinit.c index 5b564092893..01f6c2aa57d 100644 --- a/ntoskrnl/ke/powerpc/kiinit.c +++ b/ntoskrnl/ke/powerpc/kiinit.c @@ -343,6 +343,7 @@ AppCpuInit: (PVOID)LoaderBlock); } +CODE_SEG("INIT") VOID NTAPI KiInitMachineDependent(VOID) diff --git a/ntoskrnl/ke/powerpc/ppc_irq.c b/ntoskrnl/ke/powerpc/ppc_irq.c index 25cdb1168a3..baa933b4f2c 100644 --- a/ntoskrnl/ke/powerpc/ppc_irq.c +++ b/ntoskrnl/ke/powerpc/ppc_irq.c @@ -145,7 +145,7 @@ static ISR_TABLE IsrTable[NR_TRAPS][1]; /* FUNCTIONS ****************************************************************/ -INIT_FUNCTION +CODE_SEG("INIT") VOID NTAPI KeInitInterrupts (VOID) diff --git a/ntoskrnl/lpc/port.c b/ntoskrnl/lpc/port.c index ea49eb0c4b5..19597b154fe 100644 --- a/ntoskrnl/lpc/port.c +++ b/ntoskrnl/lpc/port.c @@ -31,7 +31,7 @@ static GENERIC_MAPPING LpcpPortMapping = /* PRIVATE FUNCTIONS *********************************************************/ -INIT_FUNCTION +CODE_SEG("INIT") BOOLEAN NTAPI LpcInitSystem(VOID) diff --git a/ntoskrnl/mm/ARM3/arm/init.c b/ntoskrnl/mm/ARM3/arm/init.c index 106044b5b4d..60d0be5be86 100644 --- a/ntoskrnl/mm/ARM3/arm/init.c +++ b/ntoskrnl/mm/ARM3/arm/init.c @@ -57,7 +57,7 @@ PVOID MmHyperSpaceEnd; /* PRIVATE FUNCTIONS **********************************************************/ -INIT_FUNCTION +CODE_SEG("INIT") NTSTATUS NTAPI MiInitMachineDependent(IN PLOADER_PARAMETER_BLOCK LoaderBlock) diff --git a/ntoskrnl/mm/ARM3/expool.c b/ntoskrnl/mm/ARM3/expool.c index e5c3bfe007f..2cda0ac5b06 100644 --- a/ntoskrnl/mm/ARM3/expool.c +++ b/ntoskrnl/mm/ARM3/expool.c @@ -622,7 +622,7 @@ MiDumpPoolConsumers(BOOLEAN CalledFromDbg, ULONG Tag, ULONG Mask, ULONG Flags) /* PRIVATE FUNCTIONS **********************************************************/ -INIT_FUNCTION +CODE_SEG("INIT") VOID NTAPI ExpSeedHotTags(VOID) @@ -952,7 +952,7 @@ ExpInsertPoolTracker(IN ULONG Key, DPRINT1("Out of pool tag space, ignoring...\n"); } -INIT_FUNCTION +CODE_SEG("INIT") VOID NTAPI ExInitializePoolDescriptor(IN PPOOL_DESCRIPTOR PoolDescriptor, @@ -1003,7 +1003,7 @@ ExInitializePoolDescriptor(IN PPOOL_DESCRIPTOR PoolDescriptor, ASSERT(PoolType != PagedPoolSession); } -INIT_FUNCTION +CODE_SEG("INIT") VOID NTAPI InitializePool(IN POOL_TYPE PoolType, diff --git a/ntoskrnl/mm/ARM3/i386/init.c b/ntoskrnl/mm/ARM3/i386/init.c index bd14a83e19b..fce53bee2ee 100644 --- a/ntoskrnl/mm/ARM3/i386/init.c +++ b/ntoskrnl/mm/ARM3/i386/init.c @@ -39,7 +39,7 @@ MMPTE MmDecommittedPte = {{MM_DECOMMIT << MM_PTE_SOFTWARE_PROTECTION_BITS}}; /* PRIVATE FUNCTIONS **********************************************************/ -INIT_FUNCTION +CODE_SEG("INIT") VOID NTAPI MiInitializeSessionSpaceLayout(VOID) @@ -120,7 +120,7 @@ MiInitializeSessionSpaceLayout(VOID) MM_ALLOCATION_GRANULARITY); } -INIT_FUNCTION +CODE_SEG("INIT") VOID NTAPI MiComputeNonPagedPoolVa(IN ULONG FreePages) @@ -236,7 +236,7 @@ MiComputeNonPagedPoolVa(IN ULONG FreePages) } } -INIT_FUNCTION +CODE_SEG("INIT") NTSTATUS NTAPI MiInitMachineDependent(IN PLOADER_PARAMETER_BLOCK LoaderBlock) diff --git a/ntoskrnl/mm/ARM3/largepag.c b/ntoskrnl/mm/ARM3/largepag.c index e0c5ce9d56c..9611ab88fa1 100644 --- a/ntoskrnl/mm/ARM3/largepag.c +++ b/ntoskrnl/mm/ARM3/largepag.c @@ -28,7 +28,7 @@ BOOLEAN MiLargePageAllDrivers; /* FUNCTIONS ******************************************************************/ -INIT_FUNCTION +CODE_SEG("INIT") VOID NTAPI MiInitializeLargePageSupport(VOID) @@ -48,7 +48,7 @@ MiInitializeLargePageSupport(VOID) #endif } -INIT_FUNCTION +CODE_SEG("INIT") VOID NTAPI MiSyncCachedRanges(VOID) @@ -62,7 +62,7 @@ MiSyncCachedRanges(VOID) } } -INIT_FUNCTION +CODE_SEG("INIT") VOID NTAPI MiInitializeDriverLargePageList(VOID) diff --git a/ntoskrnl/mm/ARM3/miarm.h b/ntoskrnl/mm/ARM3/miarm.h index 8b6cc19b45e..b374e94ad75 100644 --- a/ntoskrnl/mm/ARM3/miarm.h +++ b/ntoskrnl/mm/ARM3/miarm.h @@ -1703,7 +1703,6 @@ MiQueryPageTableReferences(IN PVOID Address) return *RefCount; } -INIT_FUNCTION BOOLEAN NTAPI MmArmInitSystem( @@ -1711,40 +1710,34 @@ MmArmInitSystem( IN PLOADER_PARAMETER_BLOCK LoaderBlock ); -INIT_FUNCTION VOID NTAPI MiInitializeSessionSpaceLayout(VOID); -INIT_FUNCTION NTSTATUS NTAPI MiInitMachineDependent( IN PLOADER_PARAMETER_BLOCK LoaderBlock ); -INIT_FUNCTION VOID NTAPI MiComputeColorInformation( VOID ); -INIT_FUNCTION VOID NTAPI MiMapPfnDatabase( IN PLOADER_PARAMETER_BLOCK LoaderBlock ); -INIT_FUNCTION VOID NTAPI MiInitializeColorTables( VOID ); -INIT_FUNCTION VOID NTAPI MiInitializePfnDatabase( @@ -1763,21 +1756,18 @@ MiInitializeSessionIds( VOID ); -INIT_FUNCTION BOOLEAN NTAPI MiInitializeMemoryEvents( VOID ); -INIT_FUNCTION PFN_NUMBER NTAPI MxGetNextPage( IN PFN_NUMBER PageCount ); -INIT_FUNCTION PPHYSICAL_MEMORY_DESCRIPTOR NTAPI MmInitializeMemoryLimits( @@ -1824,28 +1814,24 @@ MiCheckPdeForPagedPool( IN PVOID Address ); -INIT_FUNCTION VOID NTAPI MiInitializeNonPagedPool( VOID ); -INIT_FUNCTION VOID NTAPI MiInitializeNonPagedPoolThresholds( VOID ); -INIT_FUNCTION VOID NTAPI MiInitializePoolEvents( VOID ); -INIT_FUNCTION VOID // NTAPI // InitializePool( // @@ -1854,7 +1840,6 @@ InitializePool( // ); // // FIXFIX: THIS ONE TOO -INIT_FUNCTION VOID NTAPI ExInitializePoolDescriptor( @@ -1871,7 +1856,6 @@ MiInitializeSessionPool( VOID ); -INIT_FUNCTION VOID NTAPI MiInitializeSystemPtes( @@ -2033,21 +2017,18 @@ MiLookupDataTableEntry( IN PVOID Address ); -INIT_FUNCTION VOID NTAPI MiInitializeDriverLargePageList( VOID ); -INIT_FUNCTION VOID NTAPI MiInitializeLargePageSupport( VOID ); -INIT_FUNCTION VOID NTAPI MiSyncCachedRanges( diff --git a/ntoskrnl/mm/ARM3/mminit.c b/ntoskrnl/mm/ARM3/mminit.c index 0bae38e3e02..64e2193a558 100644 --- a/ntoskrnl/mm/ARM3/mminit.c +++ b/ntoskrnl/mm/ARM3/mminit.c @@ -477,7 +477,7 @@ MiScanMemoryDescriptors(IN PLOADER_PARAMETER_BLOCK LoaderBlock) MxOldFreeDescriptor = *MxFreeDescriptor; } -INIT_FUNCTION +CODE_SEG("INIT") PFN_NUMBER NTAPI MxGetNextPage(IN PFN_NUMBER PageCount) @@ -502,7 +502,7 @@ MxGetNextPage(IN PFN_NUMBER PageCount) return Pfn; } -INIT_FUNCTION +CODE_SEG("INIT") VOID NTAPI MiComputeColorInformation(VOID) @@ -556,7 +556,7 @@ MiComputeColorInformation(VOID) KeGetCurrentPrcb()->SecondaryColorMask = MmSecondaryColorMask; } -INIT_FUNCTION +CODE_SEG("INIT") VOID NTAPI MiInitializeColorTables(VOID) @@ -607,7 +607,7 @@ MiInitializeColorTables(VOID) } #ifndef _M_AMD64 -INIT_FUNCTION +CODE_SEG("INIT") BOOLEAN NTAPI MiIsRegularMemory(IN PLOADER_PARAMETER_BLOCK LoaderBlock, @@ -666,7 +666,7 @@ MiIsRegularMemory(IN PLOADER_PARAMETER_BLOCK LoaderBlock, return FALSE; } -INIT_FUNCTION +CODE_SEG("INIT") VOID NTAPI MiMapPfnDatabase(IN PLOADER_PARAMETER_BLOCK LoaderBlock) @@ -762,7 +762,7 @@ MiMapPfnDatabase(IN PLOADER_PARAMETER_BLOCK LoaderBlock) MxFreeDescriptor->PageCount = FreePageCount; } -INIT_FUNCTION +CODE_SEG("INIT") VOID NTAPI MiBuildPfnDatabaseFromPages(IN PLOADER_PARAMETER_BLOCK LoaderBlock) @@ -871,7 +871,7 @@ MiBuildPfnDatabaseFromPages(IN PLOADER_PARAMETER_BLOCK LoaderBlock) } } -INIT_FUNCTION +CODE_SEG("INIT") VOID NTAPI MiBuildPfnDatabaseZeroPage(VOID) @@ -894,7 +894,7 @@ MiBuildPfnDatabaseZeroPage(VOID) } } -INIT_FUNCTION +CODE_SEG("INIT") VOID NTAPI MiBuildPfnDatabaseFromLoaderBlock(IN PLOADER_PARAMETER_BLOCK LoaderBlock) @@ -1038,7 +1038,7 @@ MiBuildPfnDatabaseFromLoaderBlock(IN PLOADER_PARAMETER_BLOCK LoaderBlock) } } -INIT_FUNCTION +CODE_SEG("INIT") VOID NTAPI MiBuildPfnDatabaseSelf(VOID) @@ -1068,7 +1068,7 @@ MiBuildPfnDatabaseSelf(VOID) } } -INIT_FUNCTION +CODE_SEG("INIT") VOID NTAPI MiInitializePfnDatabase(IN PLOADER_PARAMETER_BLOCK LoaderBlock) @@ -1087,7 +1087,7 @@ MiInitializePfnDatabase(IN PLOADER_PARAMETER_BLOCK LoaderBlock) } #endif /* !_M_AMD64 */ -INIT_FUNCTION +CODE_SEG("INIT") VOID NTAPI MmFreeLoaderBlock(IN PLOADER_PARAMETER_BLOCK LoaderBlock) @@ -1197,7 +1197,7 @@ MmFreeLoaderBlock(IN PLOADER_PARAMETER_BLOCK LoaderBlock) ExFreePoolWithTag(Buffer, 'lMmM'); } -INIT_FUNCTION +CODE_SEG("INIT") VOID NTAPI MiAdjustWorkingSetManagerParameters(IN BOOLEAN Client) @@ -1212,7 +1212,7 @@ MiAdjustWorkingSetManagerParameters(IN BOOLEAN Client) } } -INIT_FUNCTION +CODE_SEG("INIT") VOID NTAPI MiNotifyMemoryEvents(VOID) @@ -1238,7 +1238,7 @@ MiNotifyMemoryEvents(VOID) } } -INIT_FUNCTION +CODE_SEG("INIT") NTSTATUS NTAPI MiCreateMemoryEvent(IN PUNICODE_STRING Name, @@ -1333,7 +1333,7 @@ CleanUp: return Status; } -INIT_FUNCTION +CODE_SEG("INIT") BOOLEAN NTAPI MiInitializeMemoryEvents(VOID) @@ -1412,7 +1412,7 @@ MiInitializeMemoryEvents(VOID) return TRUE; } -INIT_FUNCTION +CODE_SEG("INIT") VOID NTAPI MiAddHalIoMappings(VOID) @@ -1616,7 +1616,7 @@ MmDumpArmPfnDatabase(IN BOOLEAN StatusOnly) KeLowerIrql(OldIrql); } -INIT_FUNCTION +CODE_SEG("INIT") PPHYSICAL_MEMORY_DESCRIPTOR NTAPI MmInitializeMemoryLimits(IN PLOADER_PARAMETER_BLOCK LoaderBlock, @@ -1745,7 +1745,7 @@ MmInitializeMemoryLimits(IN PLOADER_PARAMETER_BLOCK LoaderBlock, return Buffer; } -INIT_FUNCTION +CODE_SEG("INIT") VOID NTAPI MiBuildPagedPool(VOID) @@ -1988,7 +1988,7 @@ MiBuildPagedPool(VOID) MiInitializeSystemSpaceMap(NULL); } -INIT_FUNCTION +CODE_SEG("INIT") VOID NTAPI MiDbgDumpMemoryDescriptors(VOID) @@ -2040,7 +2040,7 @@ MiDbgDumpMemoryDescriptors(VOID) DPRINT1("Total: %08lX (%lu MB)\n", (ULONG)TotalPages, (ULONG)(TotalPages * PAGE_SIZE) / 1024 / 1024); } -INIT_FUNCTION +CODE_SEG("INIT") BOOLEAN NTAPI MmArmInitSystem(IN ULONG Phase, diff --git a/ntoskrnl/mm/ARM3/pool.c b/ntoskrnl/mm/ARM3/pool.c index 347aa6ba967..7c0e1bb93ba 100644 --- a/ntoskrnl/mm/ARM3/pool.c +++ b/ntoskrnl/mm/ARM3/pool.c @@ -178,7 +178,7 @@ MiProtectedPoolRemoveEntryList(IN PLIST_ENTRY Entry) if (PoolBlink) MiProtectFreeNonPagedPool(PoolBlink, 1); } -INIT_FUNCTION +CODE_SEG("INIT") VOID NTAPI MiInitializeNonPagedPoolThresholds(VOID) @@ -195,7 +195,7 @@ MiInitializeNonPagedPoolThresholds(VOID) ASSERT(MiLowNonPagedPoolThreshold < MiHighNonPagedPoolThreshold); } -INIT_FUNCTION +CODE_SEG("INIT") VOID NTAPI MiInitializePoolEvents(VOID) @@ -270,7 +270,7 @@ MiInitializePoolEvents(VOID) KeReleaseQueuedSpinLock(LockQueueMmNonPagedPoolLock, OldIrql); } -INIT_FUNCTION +CODE_SEG("INIT") VOID NTAPI MiInitializeNonPagedPool(VOID) diff --git a/ntoskrnl/mm/ARM3/procsup.c b/ntoskrnl/mm/ARM3/procsup.c index e3aa8336bbd..a183f8a099f 100644 --- a/ntoskrnl/mm/ARM3/procsup.c +++ b/ntoskrnl/mm/ARM3/procsup.c @@ -1117,7 +1117,7 @@ MmInitializeProcessAddressSpace(IN PEPROCESS Process, return Status; } -INIT_FUNCTION +CODE_SEG("INIT") NTSTATUS NTAPI MmInitializeHandBuiltProcess(IN PEPROCESS Process, @@ -1142,7 +1142,7 @@ MmInitializeHandBuiltProcess(IN PEPROCESS Process, return STATUS_SUCCESS; } -INIT_FUNCTION +CODE_SEG("INIT") NTSTATUS NTAPI MmInitializeHandBuiltProcess2(IN PEPROCESS Process) diff --git a/ntoskrnl/mm/ARM3/sysldr.c b/ntoskrnl/mm/ARM3/sysldr.c index d414b1f6b43..811defcde8b 100644 --- a/ntoskrnl/mm/ARM3/sysldr.c +++ b/ntoskrnl/mm/ARM3/sysldr.c @@ -587,7 +587,7 @@ MiProcessLoaderEntry(IN PLDR_DATA_TABLE_ENTRY LdrEntry, KeLeaveCriticalRegion(); } -INIT_FUNCTION +CODE_SEG("INIT") VOID NTAPI MiUpdateThunks(IN PLOADER_PARAMETER_BLOCK LoaderBlock, @@ -1445,7 +1445,7 @@ MiFreeInitializationCode(IN PVOID InitStart, NULL); } -INIT_FUNCTION +CODE_SEG("INIT") VOID NTAPI MiFindInitializationCode(OUT PVOID *StartVa, @@ -1688,7 +1688,7 @@ MmFreeDriverInitialization(IN PLDR_DATA_TABLE_ENTRY LdrEntry) MiDeleteSystemPageableVm(StartPte, PageCount, 0, NULL); } -INIT_FUNCTION +CODE_SEG("INIT") VOID NTAPI MiReloadBootLoadedDrivers(IN PLOADER_PARAMETER_BLOCK LoaderBlock) @@ -1877,7 +1877,7 @@ MiReloadBootLoadedDrivers(IN PLOADER_PARAMETER_BLOCK LoaderBlock) ... 1445 lines suppressed ...