mirror of
https://github.com/reactos/reactos.git
synced 2025-06-23 07:00:17 +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
|
# Select your host
|
||||||
#
|
#
|
||||||
#HOST = mingw32-linux
|
#HOST = mingw32-linux
|
||||||
|
#HOST = djgpp-msdos
|
||||||
HOST = mingw32-windows
|
HOST = mingw32-windows
|
||||||
|
|
||||||
include rules.mak
|
include rules.mak
|
||||||
|
@ -14,7 +15,7 @@ include rules.mak
|
||||||
# Required to run the system
|
# Required to run the system
|
||||||
#
|
#
|
||||||
COMPONENTS = iface_native ntoskrnl
|
COMPONENTS = iface_native ntoskrnl
|
||||||
DLLS = ntdll kernel32
|
DLLS = ntdll kernel32 crtdll
|
||||||
#DLLS = crtdll mingw32
|
#DLLS = crtdll mingw32
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@ -31,13 +32,13 @@ LOADERS = dos
|
||||||
#
|
#
|
||||||
# Select the device drivers and filesystems you want
|
# 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
|
# DEVICE_DRIVERS = beep event floppy ide_test sound test test1
|
||||||
FS_DRIVERS = minix vfat ext2
|
FS_DRIVERS = minix vfat ext2
|
||||||
# FS_DRIVERS = template
|
# FS_DRIVERS = template
|
||||||
KERNEL_SERVICES = $(DEVICE_DRIVERS) $(FS_DRIVERS)
|
KERNEL_SERVICES = $(DEVICE_DRIVERS) $(FS_DRIVERS)
|
||||||
|
|
||||||
APPS = args hello shell
|
APPS = args hello shell test cat bench
|
||||||
# APPS = cmd
|
# APPS = cmd
|
||||||
|
|
||||||
all: $(COMPONENTS) $(DLLS) $(LOADERS) $(KERNEL_SERVICES) $(APPS)
|
all: $(COMPONENTS) $(DLLS) $(LOADERS) $(KERNEL_SERVICES) $(APPS)
|
||||||
|
|
|
@ -108,13 +108,13 @@ void VirtualInit(boot_param* bp)
|
||||||
MmInitSectionImplementation();
|
MmInitSectionImplementation();
|
||||||
}
|
}
|
||||||
|
|
||||||
ULONG MmCommitedSectionHandleFault(MEMORY_AREA* MemoryArea, PVOID Address)
|
NTSTATUS MmCommitedSectionHandleFault(MEMORY_AREA* MemoryArea, PVOID Address)
|
||||||
{
|
{
|
||||||
MmSetPage(PsGetCurrentProcess(),
|
MmSetPage(PsGetCurrentProcess(),
|
||||||
Address,
|
Address,
|
||||||
MemoryArea->Attributes,
|
MemoryArea->Attributes,
|
||||||
(ULONG)MmAllocPage());
|
(ULONG)MmAllocPage());
|
||||||
return(TRUE);
|
return(STATUS_SUCCESS);
|
||||||
}
|
}
|
||||||
|
|
||||||
NTSTATUS MmSectionHandleFault(MEMORY_AREA* MemoryArea, PVOID Address)
|
NTSTATUS MmSectionHandleFault(MEMORY_AREA* MemoryArea, PVOID Address)
|
||||||
|
@ -160,7 +160,7 @@ asmlinkage int page_fault_handler(unsigned int cs,
|
||||||
KPROCESSOR_MODE FaultMode;
|
KPROCESSOR_MODE FaultMode;
|
||||||
MEMORY_AREA* MemoryArea;
|
MEMORY_AREA* MemoryArea;
|
||||||
KIRQL oldlvl;
|
KIRQL oldlvl;
|
||||||
ULONG stat;
|
NTSTATUS Status;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Get the address for the page fault
|
* 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
|
* Find the memory area for the faulting address
|
||||||
*/
|
*/
|
||||||
if (cr2>=KERNEL_BASE)
|
if (cr2 >= KERNEL_BASE)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* Check permissions
|
* Check permissions
|
||||||
|
@ -211,34 +211,27 @@ asmlinkage int page_fault_handler(unsigned int cs,
|
||||||
switch (MemoryArea->Type)
|
switch (MemoryArea->Type)
|
||||||
{
|
{
|
||||||
case MEMORY_AREA_SYSTEM:
|
case MEMORY_AREA_SYSTEM:
|
||||||
stat = 0;
|
Status = STATUS_UNSUCCESSFUL;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case MEMORY_AREA_SECTION_VIEW_COMMIT:
|
case MEMORY_AREA_SECTION_VIEW_COMMIT:
|
||||||
if (MmSectionHandleFault(MemoryArea, (PVOID)cr2)==STATUS_SUCCESS)
|
Status = MmSectionHandleFault(MemoryArea, (PVOID)cr2);
|
||||||
{
|
|
||||||
stat = 1;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
stat = 0;
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case MEMORY_AREA_COMMIT:
|
case MEMORY_AREA_COMMIT:
|
||||||
stat = MmCommitedSectionHandleFault(MemoryArea,(PVOID)cr2);
|
Status = MmCommitedSectionHandleFault(MemoryArea,(PVOID)cr2);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
stat = 0;
|
Status = STATUS_UNSUCCESSFUL;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
DPRINT("Completed page fault handling\n");
|
DPRINT("Completed page fault handling\n");
|
||||||
if (stat)
|
if (NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
KeLowerIrql(oldlvl);
|
KeLowerIrql(oldlvl);
|
||||||
}
|
}
|
||||||
return(stat);
|
return(NT_SUCCESS(Status));
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOLEAN MmIsThisAnNtAsSystem(VOID)
|
BOOLEAN MmIsThisAnNtAsSystem(VOID)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue