- Boot sector code now reports to freeldr.sys the partition
that it was installed on. This is specified by a byte
value in the boot sector code. By default the boot partition
is set to zero which indicates the active (bootable)
partition, unless the installer sets the value to non-zero.
If FreeLoader is installed on a partition other than
the active (bootable) partition then the installer must
set this byte to that partition number. Otherwise
FreeLoader will not be able to find freeldr.ini.
- i386trap.S: Added debug macros BREAKPOINT(),
INSTRUCTION_BREAKPOINTX(), MEMORY_READWRITE_BREAKPOINTX(), &
MEMORY_WRITE_BREAKPOINTX().
- partition.c (DiskGetPartitionEntry): Add the relative offset
of the extended partition to the partitions start sector.
- ext2.c (Ext2ReadBlockPointerList, Ext2CopyIndirectBlockPointers,
Ext2CopyDoubleIndirectBlockPointers, Ext2CopyTripleIndirectBlockPointers):
Rewrote the block pointer functions so they actually work.
- ini_init.c (IniFileInitialize, IniOpenIniFile): Looks for freeldr.ini
on both the active (bootable) partition and the partition
passed in from the boot sector code.
- meminit.c (MmInitializeMemoryManager, MmFixupSystemMemoryMap,
MmGetEndAddressOfAnyMemory, MmGetAddressablePageCountIncludingHoles,
MmInitPageLookupTable): Fixed bug that would cause FreeLoader to
have an off-by-one error when accessing the last entry in the
page lookup table on systems with 4GB of memory (or memory mapped
at the end of the address space).
svn path=/trunk/; revision=3372
- Removed initialization of caching in vfatAttacheFCBToFileObject.
The cache for files is initialized at the first read/write operation.
- Merged vfatExtendSpace and VfatSetAllocationSizeInformation in one function.
svn path=/trunk/; revision=3339
CcSetDirtyPinedData. There is no working shutdown function
for writing back each modified cache segment. A reboot or
crash can damage the disk.
- Added CcRosReferenceCache and CcRosDereferenceCache.
- Check at each call to CcRosInitializeFileCache if the cache was
initialized for the file stream by a previous call to this function.
- Check at each call to CcRosReleaseFileCache if this is possible
to delete the caching for the file stream.
svn path=/trunk/; revision=3338
operation for a section. This prevents the cache from uninitialization
for a mapped file (data or image) at the cleanup of a given file object
or force the uninitialization if the last section of a file is deleted.
svn path=/trunk/; revision=3337
* ntoskrnl/mm/rmap.c (MmWritePagePhysicalAddress): Ensure the
process isn't freed in the middle of our operations.
2002-08-17 David Welch <welch@computer2.darkstar.org>
* drivers/fs/vfat/finfo.c (VfatSetAllocationSizeInformation): Fixed.
svn path=/trunk/; revision=3336
* ntoskrnl/ps/create.c (PiDeleteThread): Don't dereference
the thread's process while holding the thread list lock.
2002-08-17 David Welch <welch@computer2.darkstar.org>
* ntoskrnl/mm/section.c (MmMapViewOfSection): Check there is
enough space for all parts of an image before mapping it; if
there isn't enough space free at the preferred base address
then try to choose a different one.
2002-08-17 David Welch <welch@computer2.darkstar.org>
* ntoskrnl/mm/mpw.c (MmInitMpwThread): Run the MPW thread at
idle priority.
2002-08-17 David Welch <welch@computer2.darkstar.org>
* ntoskrnl/mm/kmap.c (ExUnmapPage, ExAllocatePageWithPhysPage,
MiFreeNonPagedPoolRegion, MiAllocNonPagedPoolRegion): Maintain
a hint of the next free page; makes running with whole page
allocation more bearable.
2002-08-17 David Welch <welch@computer2.darkstar.org>
* ntoskrnl/mm/anonmem.c (MmPageOutVirtualMemory): Show an
out of swap space message if we are out of swap space.
* ntoskrnl/mm/section.c (MmPageOutSectionView): Show an
out of swap space message if we are out of swap space.
* ntoskrnl/mm/pagefile.c (MmAllocSwapPage): Don't automatically
show an out of swap space message on failure.
* ntoskrnl/mm/pagefile.c (MmShowOutOfSpaceMessagePagingFile): New
function to notify the user that the pagefile is full.
2002-08-17 David Welch <welch@computer2.darkstar.org>
* drivers/lib/zlib/Makefile: Create a dummy zlib.sym
svn path=/trunk/; revision=3335
* ntoskrnl/mm/npool.c (ExAllocateWholePageBlock): Converted
to use PHYSICAL_ADDRESS type for page address.
2002-08-16 David Welch <welch@computer2.darkstar.org>
* subsys/win32k/ntuser/class.c (W32kCreateClass): Corrected
typo when calculating the offset into the class object to
put the class name string.
2002-08-16 David Welch <welch@computer2.darkstar.org>
* ntoskrnl/ps/thread.c (PsDispatchThreadNoLock): Don't call
the reaper function directly; set an event to wake up a seperate
reaper thread.
* ntoskrnl/ps/thread.c (PsReaperThreadMain): New function that
waits for a notification and then calls PsReapThreads.
* ntoskrnl/ps/thread.c (PsInitThreadManagement): Create the
reaper thread.
svn path=/trunk/; revision=3333
* subsys/smss/init.c (SmPagingFilesQueryRoutine): If possible
take the size of the paging file from the registry.
2002-08-14 David Welch <welch@computer2.darkstar.org>
* ntoskrnl/mm/section.c (MmCreateDataFileSection): Extend the
section if necessary.
2002-08-14 David Welch <welch@computer2.darkstar.org>
* ntoskrnl/mm/pagefile.c (NtCreatePagingFile): Set the file
size using the FileAllocationInformation class.
2002-08-14 David Welch <welch@computer2.darkstar.org>
* ntoskrnl/mm/anonmem.c (MmWritePageVirtualMemory): Implemented
function to write anonymous memory pages to the swap file.
* ntoskrnl/mm/anonmem.c (MmFreeVirtualMemoryPage): Free any
swap page associated with the page.
* ntoskrnl/mm/mpw.c (MmWriteDirtyPages): New function to find
pages to write to disk.
* ntoskrnl/mm/mpw.c (MmMpwThreadMain): Implemented MPW functionality.
* ntoskrnl/mm/rmap.c (MmWritePagePhysicalAddress): New function
to write a single page back to disk.
* ntoskrnl/mm/rmap.c (MmSetCleanAllRmaps, MmSetDirtyAllRmaps,
MmIsDirtyPageRmap): New rmap function to support the MPW thread.
* ntoskrnl/mm/section.c (MmWritePageSectionView): Implemented
function to write back section pages.
* ntoskrnl/mm/section.c (MmFreeSectionPage): Free any swap
entry associated with the page; mark pages shared with
the cache as dirty if necessary.
2002-08-14 David Welch <welch@computer2.darkstar.org>
* ntoskrnl/ldr/loader.c (LdrPEProcessModule): Set name of
the module into the module text structure.
2002-08-14 David Welch <welch@computer2.darkstar.org>
* ntoskrnl/io/rw.c (NtReadFile, NtWriteFile): Use the correct
test for whether to wait for the completion of i/o.
2002-08-14 David Welch <welch@computer2.darkstar.org>
* ntoskrnl/cm/ntfunc.c (NtFlushKey): Request synchronous i/o
from NtOpenFile.
* ntoskrnl/cm/regfile (CmiInitPermanentRegistryHive): Request
synchronous i/o from NtCreateFile.
* ntoskrnl/dbg/kdb_stabs.c (LdrpLoadModuleSymbols): Request
synchronous i/o from NtOpenFile.
* ntoskrnl/ldr/sysdll.c (LdrpMapSystemDll): Request synchronous i/o
from NtOpenFile.
2002-08-14 David Welch <welch@computer2.darkstar.org>
* ntoskrnl/cc/view.c (CcRosSuggestFreeCacheSegment): Maintain the
correct reference count.
2002-08-14 David Welch <welch@computer2.darkstar.org>
* ntoskrnl/cc/view.c (CcRosFlushCacheSegment): New function to
write back a modified cache segment.
* ntoskrnl/cc/view.c (CcRosFlushDirtyPages): New function to
flush some dirty pages from the cache.
* ntoskrnl/cc/view.c (CcRosMarkDirtyCacheSegment): New function to
mark a cache segment modified while mapped into memory as dirty.
2002-08-14 David Welch <welch@computer2.darkstar.org>
* ntoskrnl/cc/pin.c (CcMapData, CcUnpinData, CcSetDirtyPinnedData):
Store the dirty status in the BCB; don't write back dirty data
immediately.
2002-08-14 David Welch <welch@computer2.darkstar.org>
* include/ntos/mm.h: Added SEC_XXXX defines from 'Windows NT/2000
Native API Reference'
2002-08-14 David Welch <welch@computer2.darkstar.org>
* drivers/fs/vfat/ea.c (VfatSetExtendedAttributes): Empty
placeholder for extended attribute functions.
2002-08-14 David Welch <welch@computer2.darkstar.org>
* drivers/fs/vfat/finfo.c (VfatSetAllocationSizeInformation):
Added function to set allocation size.
2002-08-14 David Welch <welch@computer2.darkstar.org>
* drivers/fs/vfat/fcb.c (vfatFCBInitializeCache): Renamed
to vfatFCBInitializeCacheFromVolume.
* drivers/fs/vfat/fcb.c (vfatMakeFCBFromDirEntry): Don't
initialise the cache with a file object representing the
volume unless the FCB is for a directory.
2002-08-14 David Welch <welch@computer2.darkstar.org>
* drivers/fs/vfat/create.c (VfatPagingFileCreate): Added a
new function for handling paging file only code.
* drivers/fs/vfat/create.c (VfatSupersedeFile): Added a
new function for doing a file supersede.
* drivers/fs/vfat/create.c (VfatCreateFile): Reformatted and
adjusted control flow. Set allocation size and extended attributes
on create.
* drivers/fs/vfat/create.c (VfatCreate): Removed goto.
2002-08-14 David Welch <welch@computer2.darkstar.org>
* drivers/fs/vfat/cleanup.c (VfatCleanupFile): Renamed
updEntry to VfatUpdateEntry.
* drivers/fs/vfat/close.c (VfatCloseFile): Renamed
updEntry to VfatUpdateEntry.
* drivers/fs/vfat/dirwr.c (updEntry): Renamed to
VfatUpdateEntry.
* drivers/fs/vfat/dirwr.c (addEntry): Renamed to
VfatAddEntry.
2002-08-14 David Welch <welch@computer2.darkstar.org>
* apps/tests/sectest/sectest.c (main): Fixed formatting.
svn path=/trunk/; revision=3331
* ntoskrnl/mm/i386/page.c (MmSetPageProtect): Fixed
behaviour when called on the system address space.
2002-08-10 David Welch <welch@computer2.darkstar.org>
* ntoskrnl/mm/virtual.c (MmQueryAnonMem, MmProtectAnonMem,
NtAllocateVirtualMemory, NtFreeVirtualMemory): Renamed
segments to regions; moved region code to seperate file.
Implemented NtQueryVirtualMemory and NtProtectVirtualMemory
for anonymous memory areas.
2002-08-10 David Welch <welch@computer2.darkstar.org>
* ntoskrnl/mm/anonmem.c: Moved functions relating to
areas created with NtAllocateVirtualMemory to a
seperate file.
2002-08-10 David Welch <welch@computer2.darkstar.org>
* ntoskrnl/mm/section.c (MmQuerySectionView): Implemented
NtQueryVirtualMemory for section views.
2002-08-10 David Welch <welch@computer2.darkstar.org>
* ntoskrnl/mm/section.c (MmAccessFaultSectionView,
MmNotPresentFaultSectionView, MmProtectSectionView,
MmMapViewOfSegment, MmAlterViewAttributes): Implemented
NtProtectVirtualMemory for section views.
2002-08-10 David Welch <welch@computer2.darkstar.org>
* ntoskrnl/ke/main.c: Removed SEH test code.
2002-08-10 David Welch <welch@computer2.darkstar.org>
* lib/ntdll/ldr/utils.c (LdrFixupImports): Remove the readonly
protection from the IAT before writing to it.
2002-08-10 David Welch <welch@computer2.darkstar.org>
* lib/ntdll/ldr/utils.c (LdrAdjustDllName): Properly null terminate
the base name of the DLL.
2002-08-10 David Welch <welch@computer2.darkstar.org>
* ntoskrnl/ldr/loader.c (LdrPEProcessModule): Set the text segment
of modules to readonly after loading.
svn path=/trunk/; revision=3327
* ntoskrnl/ps/create.c (NtCreateThread): Call PsSuspendThread
if NtCreateThread has CreateSuspended as TRUE.
* ntoskrnl/ps/suspend.c (PsSuspendThread, PsResumeThread,
PiSuspendThreadKernelRoutine): Fixed suspend functionality.
2002-08-09 David Welch <welch@computer2.darkstar.org>
* ntoskrnl/ke/i386/usertrap.c (print_user_address): Copy
the LDR variable from the right address.
2002-08-09 David Welch <welch@computer2.darkstar.org>
* ntoskrnl/ke/apc.c (KiDeliverNormalApc): Check for
kernel APCs pending on exit from the kernel.
* ntoskrnl/ke/apc.c (KiDeliverNormalApc, KiDeliverUserApc,
KiDeliverApc): Set the APC's inserted flag to FALSE after
removing it from the thread's queue.
2002-08-09 David Welch <welch@computer2.darkstar.org>
* lib/kernel32/thread/thread.c (ThreadStartup): Don't
call DLL entrypoints; this is done by LdrInitializeThunk.
* lib/ntdll/ldr/startup.c (LdrInitializeThunk): Call
DLLs in initialization order; take the loader lock before
calling.
2002-08-09 David Welch <welch@computer2.darkstar.org>
* apps/tests/thread/thread.c (main): Test suspend and
resume functionality.
svn path=/trunk/; revision=3324