//
// Global:
// - TODO: Complete the list of bufxies
-// - Fix atapi.sys or serial.sys loading one more time at each boot.
+// - Fix boot on VMWare.
+// - Fix weird crash on boot with 0x867-0x872 EIP.
+// - Fix trap.s AMD64 VMWare "Greatlord Issue".
+// - Support SSE/MMX.
//
///////////////////////////////////////////////////////////////////////////////
#include <ntoskrnl.h>
#define NDEBUG
-#include <internal/debug.h>
+#include <debug.h>
/* DATA **********************************************************************/
ULONG ExPushLockSpinCount;
+#undef EX_PUSH_LOCK
+#undef PEX_PUSH_LOCK
/* PRIVATE FUNCTIONS *********************************************************/
FASTCALL
ExfAcquirePushLockExclusive(PEX_PUSH_LOCK PushLock)
{
- DEFINE_WAIT_BLOCK(WaitBlock);
EX_PUSH_LOCK OldValue = *PushLock, NewValue, TempValue;
BOOLEAN NeedWake;
ULONG i;
+ DEFINE_WAIT_BLOCK(WaitBlock);
/* Start main loop */
for (;;)
FASTCALL
ExfAcquirePushLockShared(PEX_PUSH_LOCK PushLock)
{
- DEFINE_WAIT_BLOCK(WaitBlock);
EX_PUSH_LOCK OldValue = *PushLock, NewValue;
BOOLEAN NeedWake;
ULONG i;
+ DEFINE_WAIT_BLOCK(WaitBlock);
/* Start main loop */
for (;;)
/* Null-terminate it and set it */
ServiceKeyName.Buffer[ServiceKeyName.Length / sizeof(WCHAR)] = UNICODE_NULL;
- DriverObject->DriverExtension->ServiceKeyName = ServiceKeyName;
+ DriverObject->DriverExtension->ServiceKeyName = ServiceKeyName;
/* Also store it in the Driver Object. This is a bit of a hack. */
RtlCopyMemory(&DriverObject->DriverName,
/*
* Compiler defined symbols
*/
+#if 0
extern unsigned int _image_base__;
extern unsigned int _text_start__;
extern unsigned int _text_end__;
extern unsigned int _init_end__;
extern unsigned int _bss_end__;
-
+#endif
static BOOLEAN IsThisAnNtAsSystem = FALSE;
MM_SYSTEMSIZE MmSystemSize = MmSmallSystem;
VOID INIT_FUNCTION NTAPI MmInitVirtualMemory(ULONG_PTR LastKernelAddress, ULONG KernelLength);
-#if defined (ALLOC_PRAGMA)
-#pragma alloc_text(INIT, MmInitVirtualMemory)
-#pragma alloc_text(INIT, MmInit1)
-#pragma alloc_text(INIT, MmInit2)
-#pragma alloc_text(INIT, MmInit3)
-#endif
-
/* FUNCTIONS ****************************************************************/
/*
{
PVOID BaseAddress;
ULONG Length;
- ULONG ParamLength = KernelLength;
+ //ULONG ParamLength = KernelLength;
NTSTATUS Status;
PHYSICAL_ADDRESS BoundaryAddressMultiple;
PFN_TYPE Pfn;
0,
BoundaryAddressMultiple);
+#if 0
+ DPRINT1("LD Vars: %lx %lx %lx %lx %lx %lx. Last: %lx\n",
+ &_image_base__,
+ &_text_start__,
+ &_text_end__,
+ &_init_start__,
+ &_init_end__,
+ &_bss_end__,
+ LastKernelAddress);
BaseAddress = (PVOID)&_image_base__;
+ DPRINT1("Non-LD Vars: %lx %lx %lx %lx %lx %lx. Last: %lx\n",
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ LastKernelAddress);
Length = PAGE_ROUND_UP(((ULONG_PTR)&_text_end__)) - (ULONG_PTR)&_image_base__;
ParamLength = ParamLength - Length;
TRUE,
0,
BoundaryAddressMultiple);
+#endif
BaseAddress = MiNonPagedPoolStart;
MmCreateMemoryArea(MmGetKernelAddressSpace(),
return TRUE;
}
+#if 0
+
VOID static
MiFreeInitMemoryPage(PVOID Context, MEMORY_AREA* MemoryArea, PVOID Address,
PFN_TYPE Page, SWAPENTRY SwapEntry,
NULL);
MmUnlockAddressSpace(MmGetKernelAddressSpace());
}
+#endif