mirror of
https://github.com/reactos/reactos.git
synced 2025-02-23 17:05:46 +00:00
Synched makefiles
svn path=/trunk/; revision=400
This commit is contained in:
parent
dcd4ed3e62
commit
db068d0cae
2 changed files with 17 additions and 23 deletions
|
@ -6,6 +6,7 @@
|
|||
# Select your host
|
||||
#
|
||||
#HOST = mingw32-linux
|
||||
#HOST = djgpp-msdos
|
||||
HOST = mingw32-windows
|
||||
|
||||
include rules.mak
|
||||
|
@ -13,8 +14,8 @@ include rules.mak
|
|||
#
|
||||
# Required to run the system
|
||||
#
|
||||
COMPONENTS = iface_native ntoskrnl
|
||||
DLLS = ntdll kernel32
|
||||
COMPONENTS = iface_native ntoskrnl
|
||||
DLLS = ntdll kernel32 crtdll
|
||||
#DLLS = crtdll mingw32
|
||||
|
||||
#
|
||||
|
@ -30,14 +31,14 @@ LOADERS = dos
|
|||
|
||||
#
|
||||
# Select the device drivers and filesystems you want
|
||||
#
|
||||
DEVICE_DRIVERS = blue ide keyboard mouse null parallel sdisk serial
|
||||
#
|
||||
DEVICE_DRIVERS = blue ide keyboard mouse null parallel serial
|
||||
# DEVICE_DRIVERS = beep event floppy ide_test sound test test1
|
||||
FS_DRIVERS = minix vfat ext2
|
||||
# FS_DRIVERS = template
|
||||
KERNEL_SERVICES = $(DEVICE_DRIVERS) $(FS_DRIVERS)
|
||||
|
||||
APPS = args hello shell
|
||||
|
||||
APPS = args hello shell test cat bench
|
||||
# APPS = cmd
|
||||
|
||||
all: $(COMPONENTS) $(DLLS) $(LOADERS) $(KERNEL_SERVICES) $(APPS)
|
||||
|
|
|
@ -108,13 +108,13 @@ void VirtualInit(boot_param* bp)
|
|||
MmInitSectionImplementation();
|
||||
}
|
||||
|
||||
ULONG MmCommitedSectionHandleFault(MEMORY_AREA* MemoryArea, PVOID Address)
|
||||
NTSTATUS MmCommitedSectionHandleFault(MEMORY_AREA* MemoryArea, PVOID Address)
|
||||
{
|
||||
MmSetPage(PsGetCurrentProcess(),
|
||||
Address,
|
||||
MemoryArea->Attributes,
|
||||
(ULONG)MmAllocPage());
|
||||
return(TRUE);
|
||||
return(STATUS_SUCCESS);
|
||||
}
|
||||
|
||||
NTSTATUS MmSectionHandleFault(MEMORY_AREA* MemoryArea, PVOID Address)
|
||||
|
@ -160,7 +160,7 @@ asmlinkage int page_fault_handler(unsigned int cs,
|
|||
KPROCESSOR_MODE FaultMode;
|
||||
MEMORY_AREA* MemoryArea;
|
||||
KIRQL oldlvl;
|
||||
ULONG stat;
|
||||
NTSTATUS Status;
|
||||
|
||||
/*
|
||||
* Get the address for the page fault
|
||||
|
@ -184,7 +184,7 @@ asmlinkage int page_fault_handler(unsigned int cs,
|
|||
/*
|
||||
* Find the memory area for the faulting address
|
||||
*/
|
||||
if (cr2>=KERNEL_BASE)
|
||||
if (cr2 >= KERNEL_BASE)
|
||||
{
|
||||
/*
|
||||
* Check permissions
|
||||
|
@ -211,34 +211,27 @@ asmlinkage int page_fault_handler(unsigned int cs,
|
|||
switch (MemoryArea->Type)
|
||||
{
|
||||
case MEMORY_AREA_SYSTEM:
|
||||
stat = 0;
|
||||
Status = STATUS_UNSUCCESSFUL;
|
||||
break;
|
||||
|
||||
case MEMORY_AREA_SECTION_VIEW_COMMIT:
|
||||
if (MmSectionHandleFault(MemoryArea, (PVOID)cr2)==STATUS_SUCCESS)
|
||||
{
|
||||
stat = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
stat = 0;
|
||||
}
|
||||
Status = MmSectionHandleFault(MemoryArea, (PVOID)cr2);
|
||||
break;
|
||||
|
||||
case MEMORY_AREA_COMMIT:
|
||||
stat = MmCommitedSectionHandleFault(MemoryArea,(PVOID)cr2);
|
||||
Status = MmCommitedSectionHandleFault(MemoryArea,(PVOID)cr2);
|
||||
break;
|
||||
|
||||
default:
|
||||
stat = 0;
|
||||
Status = STATUS_UNSUCCESSFUL;
|
||||
break;
|
||||
}
|
||||
DPRINT("Completed page fault handling\n");
|
||||
if (stat)
|
||||
if (NT_SUCCESS(Status))
|
||||
{
|
||||
KeLowerIrql(oldlvl);
|
||||
}
|
||||
return(stat);
|
||||
return(NT_SUCCESS(Status));
|
||||
}
|
||||
|
||||
BOOLEAN MmIsThisAnNtAsSystem(VOID)
|
||||
|
|
Loading…
Reference in a new issue