Author: ros-arm-bringup
Date: Thu Jun 26 01:38:42 2008
New Revision: 34091
URL:
http://svn.reactos.org/svn/reactos?rev=34091&view=rev
Log:
- Fix several interlocked list functions -- they should return NULL if the list is empty.
- Fix a bug in FreeLDR-ARM, we forgot to set the RegistryLength, resulting in a corrupted
registry. We can now load the system registry.
- Enable code to handle DPC, Timer and Deferred Ready cleanup (portable code that's
already written).
- Enable code to handle quantum end.
- We now load all the way to IoInitSystem!IopInitializeBootDrivers.
Modified:
trunk/reactos/boot/freeldr/freeldr/arch/arm/loader.c
trunk/reactos/ntoskrnl/config/arm/cmhardwr.c
trunk/reactos/ntoskrnl/ex/fastinterlck.c
trunk/reactos/ntoskrnl/ke/arm/trapc.c
Modified: trunk/reactos/boot/freeldr/freeldr/arch/arm/loader.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/arch/arm/loader.c [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/arch/arm/loader.c [iso-8859-1] Thu Jun 26 01:38:42
2008
@@ -1163,6 +1163,7 @@
// Setup registry data
//
ArmLoaderBlock->RegistryBase = (PVOID)((ULONG_PTR)RegistryData | KSEG0_BASE);
+ ArmLoaderBlock->RegistryLength = RegistrySize;
//
// Create an MD for it
Modified: trunk/reactos/ntoskrnl/config/arm/cmhardwr.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/config/arm/cmhard…
==============================================================================
--- trunk/reactos/ntoskrnl/config/arm/cmhardwr.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/config/arm/cmhardwr.c [iso-8859-1] Thu Jun 26 01:38:42 2008
@@ -20,6 +20,8 @@
NTAPI
CmpInitializeMachineDependentConfiguration(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
{
- UNIMPLEMENTED;
- return STATUS_NOT_IMPLEMENTED;
+ //
+ // Nothing to do on ARM
+ //
+ return STATUS_SUCCESS;
}
Modified: trunk/reactos/ntoskrnl/ex/fastinterlck.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ex/fastinterlck.c…
==============================================================================
--- trunk/reactos/ntoskrnl/ex/fastinterlck.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/ex/fastinterlck.c [iso-8859-1] Thu Jun 26 01:38:42 2008
@@ -136,7 +136,7 @@
{
KIRQL OldIrql;
PLIST_ENTRY OldHead = NULL;
- KeAcquireSpinLock(Lock,&OldIrql);
+ KeAcquireSpinLock(Lock, &OldIrql);
if (!IsListEmpty(ListHead)) OldHead = ListEntry->Blink;
InsertTailList(ListHead, ListEntry);
KeReleaseSpinLock(Lock, OldIrql);
@@ -223,7 +223,7 @@
{
KIRQL OldIrql;
PLIST_ENTRY OldHead = NULL;
- KeAcquireSpinLock(Lock,&OldIrql);
+ KeAcquireSpinLock(Lock, &OldIrql);
if (!IsListEmpty(ListHead)) OldHead = ListEntry->Flink;
InsertHeadList(ListHead, ListEntry);
KeReleaseSpinLock(Lock, OldIrql);
@@ -238,7 +238,7 @@
{
KIRQL OldIrql;
PLIST_ENTRY OldHead = NULL;
- KeAcquireSpinLock(Lock,&OldIrql);
+ KeAcquireSpinLock(Lock, &OldIrql);
if (!IsListEmpty(ListHead)) OldHead = ListEntry->Blink;
InsertTailList(ListHead, ListEntry);
KeReleaseSpinLock(Lock, OldIrql);
@@ -252,8 +252,8 @@
{
KIRQL OldIrql;
PSINGLE_LIST_ENTRY OldHead = NULL;
- KeAcquireSpinLock(Lock,&OldIrql);
- OldHead = PopEntryList(ListHead);
+ KeAcquireSpinLock(Lock, &OldIrql);
+ if (!ListHead->Next) OldHead = PopEntryList(ListHead);
KeReleaseSpinLock(Lock, OldIrql);
return OldHead;
}
@@ -266,8 +266,8 @@
{
KIRQL OldIrql;
PSINGLE_LIST_ENTRY OldHead = NULL;
- KeAcquireSpinLock(Lock,&OldIrql);
- OldHead = PushEntryList(ListHead, ListEntry);
+ KeAcquireSpinLock(Lock, &OldIrql);
+ if (!ListHead->Next) OldHead = PushEntryList(ListHead, ListEntry);
KeReleaseSpinLock(Lock, OldIrql);
return OldHead;
}
@@ -279,8 +279,8 @@
{
KIRQL OldIrql;
PLIST_ENTRY OldHead = NULL;
- KeAcquireSpinLock(Lock,&OldIrql);
- OldHead = RemoveHeadList(ListHead);
+ KeAcquireSpinLock(Lock, &OldIrql);
+ if (!IsListEmpty(ListHead)) OldHead = RemoveHeadList(ListHead);
KeReleaseSpinLock(Lock, OldIrql);
return OldHead;
}
Modified: trunk/reactos/ntoskrnl/ke/arm/trapc.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/arm/trapc.c?re…
==============================================================================
--- trunk/reactos/ntoskrnl/ke/arm/trapc.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/ke/arm/trapc.c [iso-8859-1] Thu Jun 26 01:38:42 2008
@@ -25,6 +25,18 @@
IN ULONG ArgumentCount
);
+VOID
+FASTCALL
+KiRetireDpcList(
+ IN PKPRCB Prcb
+);
+
+VOID
+FASTCALL
+KiQuantumEnd(
+ VOID
+);
+
/* FUNCTIONS ******************************************************************/
VOID
@@ -58,10 +70,9 @@
HalClearSoftwareInterrupt(DISPATCH_LEVEL);
//
- // FIXME: TODO
- //
- DPRINT1("DPC/Timer Delivery!\n");
- while (TRUE);
+ // Retire DPCs
+ //
+ KiRetireDpcList(Prcb);
}
//
@@ -242,10 +253,9 @@
(Prcb->DeferredReadyListHead.Next))
{
//
- // FIXME: TODO
- //
- DPRINT1("DPC/Timer Delivery!\n");
- while (TRUE);
+ // Retire DPCs
+ //
+ KiRetireDpcList(Prcb);
}
//
@@ -259,10 +269,10 @@
if (Prcb->QuantumEnd)
{
//
- // FIXME: TODO
- //
- DPRINT1("Quantum End!\n");
- while (TRUE);
+ // Handle quantum end
+ //
+ Prcb->QuantumEnd = FALSE;
+ KiQuantumEnd();
return;
}