Author: ion
Date: Sun Feb 19 02:24:52 2012
New Revision: 55693
URL:
http://svn.reactos.org/svn/reactos?rev=55693&view=rev
Log:
[NTOSKRNL]: Implement ThreadBreakOnTermination for the SET case.
Cleanup some dbgprints.
Modified:
trunk/reactos/hal/halx86/acpi/halacpi.c
trunk/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c
trunk/reactos/ntoskrnl/mm/ARM3/procsup.c
trunk/reactos/ntoskrnl/ps/query.c
trunk/reactos/subsystems/win32/win32k/eng/mouse.c
Modified: trunk/reactos/hal/halx86/acpi/halacpi.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halx86/acpi/halacpi.c?…
==============================================================================
--- trunk/reactos/hal/halx86/acpi/halacpi.c [iso-8859-1] (original)
+++ trunk/reactos/hal/halx86/acpi/halacpi.c [iso-8859-1] Sun Feb 19 02:24:52 2012
@@ -190,7 +190,6 @@
}
/* Validate the signature */
- DPRINT1("ACPI DSDT at 0x%p\n", Header);
if (Header->Signature != DSDT_SIGNATURE)
{
/* Fail and unmap */
@@ -231,7 +230,6 @@
if (!Xsdt) return NULL;
/* Won't be using the RSDT */
- DPRINT1("ACPI XSDT at 0x%p\n", Xsdt);
Rsdt = NULL;
}
@@ -333,12 +331,6 @@
MmUnmapIoSpace(Header, 2 * PAGE_SIZE);
}
- DPRINT1("Failed to find ACPI table %c%c%c%c\n",
- (Signature & 0xFF),
- (Signature & 0xFF00) >> 8,
- (Signature & 0xFF0000) >> 16,
- (Signature & 0xFF000000) >> 24);
-
/* Didn't find anything */
return NULL;
}
@@ -532,8 +524,7 @@
/* Get the boot table */
BootTable = HalAcpiGetTable(LoaderBlock, BOOT_SIGNATURE);
HalpSimpleBootFlagTable = BootTable;
- DPRINT1("ACPI BOOT at 0x%p\n", HalpSimpleBootFlagTable);
-
+
/* Validate it */
if ((BootTable) &&
(BootTable->Header.Length >= sizeof(BOOT_TABLE)) &&
@@ -693,7 +684,6 @@
}
/* Validate it */
- DPRINT1("ACPI RSDT at 0x%p\n", Rsdt);
if ((Rsdt->Header.Signature != RSDT_SIGNATURE) &&
(Rsdt->Header.Signature != XSDT_SIGNATURE))
{
@@ -772,8 +762,6 @@
}
}
- DPRINT1("ACPI %d.0 detected\n", (Rsdt->Header.Revision + 1));
-
/* Done */
return Status;
}
@@ -786,15 +774,15 @@
PAGED_CODE();
/* Is this in the init phase? */
- if (!TimerPort )
+ if (!TimerPort)
{
/* Get the data from the FADT */
TimerPort = HalpFixedAcpiDescTable.pm_tmr_blk_io_port;
TimerValExt = HalpFixedAcpiDescTable.flags & ACPI_TMR_VAL_EXT;
+ DPRINT1("ACPI Timer at: %Xh (EXT: %d)\n", TimerPort, TimerValExt);
}
/* FIXME: Now proceed to the timer initialization */
- DPRINT1("ACPI Timer at: %Xh (EXT: %d)\n", TimerPort, TimerValExt);
//HalaAcpiTimerInit(TimerPort, TimerValExt);
}
@@ -808,7 +796,6 @@
PHYSICAL_ADDRESS PhysicalAddress;
/* Only do this once */
- DPRINT("You are booting the ACPI HAL!\n");
if (HalpProcessedACPIPhase0) return STATUS_SUCCESS;
/* Setup the ACPI table cache */
@@ -825,7 +812,6 @@
}
/* Assume typical size, otherwise whatever the descriptor table says */
- DPRINT1("ACPI FACP at 0x%p\n", Fadt);
TableLength = sizeof(FADT);
if (Fadt->Header.Length < sizeof(FADT)) TableLength = Fadt->Header.Length;
@@ -837,14 +823,12 @@
/* Get the debug table for KD */
HalpDebugPortTable = HalAcpiGetTable(LoaderBlock, DBGP_SIGNATURE);
- DPRINT1("ACPI DBGP at 0x%p\n", HalpDebugPortTable);
/* Initialize NUMA through the SRAT */
HalpNumaInitializeStaticConfiguration(LoaderBlock);
/* Initialize hotplug through the SRAT */
HalpDynamicSystemResourceConfiguration(LoaderBlock);
- DPRINT1("ACPI SRAT at 0x%p\n", HalpAcpiSrat);
if (HalpAcpiSrat)
{
DPRINT1("Your machine has a SRAT, but NUMA/HotPlug are not
supported!\n");
@@ -885,6 +869,38 @@
/* Setup the boot table */
HalpInitBootTable(LoaderBlock);
+
+ /* Debugging code */
+ {
+ PLIST_ENTRY ListHead, NextEntry;
+ PACPI_CACHED_TABLE CachedTable;
+
+ /* Loop cached tables */
+ ListHead = &HalpAcpiTableCacheList;
+ NextEntry = ListHead->Flink;
+ while (NextEntry != ListHead)
+ {
+ /* Get the table */
+ CachedTable = CONTAINING_RECORD(NextEntry, ACPI_CACHED_TABLE, Links);
+
+ /* Compare signatures */
+ if ((CachedTable->Header.Signature == RSDT_SIGNATURE) ||
+ (CachedTable->Header.Signature == XSDT_SIGNATURE))
+ {
+ DPRINT1("ACPI %d.0 Detected. Tables: ",
(CachedTable->Header.Revision + 1));
+ }
+
+ DbgPrint("[%c%c%c%c] ",
+ (CachedTable->Header.Signature & 0xFF),
+ (CachedTable->Header.Signature & 0xFF00) >> 8,
+ (CachedTable->Header.Signature & 0xFF0000) >> 16,
+ (CachedTable->Header.Signature & 0xFF000000) >> 24);
+
+ /* Keep going */
+ NextEntry = NextEntry->Flink;
+ }
+ DbgPrint("\n");
+ }
/* Return success */
return STATUS_SUCCESS;
Modified: trunk/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/io/pnpmgr/pnpmgr.…
==============================================================================
--- trunk/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c [iso-8859-1] Sun Feb 19 02:24:52 2012
@@ -2467,7 +2467,7 @@
if (NT_SUCCESS(IopQueryDeviceCapabilities(DeviceNode, &DeviceCaps))
&&
DeviceCaps.RawDeviceOK)
{
- DPRINT1("%wZ is using parent bus driver (%wZ)\n",
&DeviceNode->InstancePath, &ParentDeviceNode->ServiceName);
+ DPRINT("%wZ is using parent bus driver (%wZ)\n",
&DeviceNode->InstancePath, &ParentDeviceNode->ServiceName);
DeviceNode->ServiceName.Length = 0;
DeviceNode->ServiceName.MaximumLength = 0;
Modified: trunk/reactos/ntoskrnl/mm/ARM3/procsup.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/ARM3/procsup.c…
==============================================================================
--- trunk/reactos/ntoskrnl/mm/ARM3/procsup.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/mm/ARM3/procsup.c [iso-8859-1] Sun Feb 19 02:24:52 2012
@@ -1551,7 +1551,6 @@
/* Set and assert the flags, and return */
PspSetProcessFlag(Process, PSF_PROCESS_IN_SESSION_BIT);
ASSERT(MiSessionLeaderExists == 1);
- if (NT_SUCCESS(Status)) DPRINT1("New session created: %lx\n", *SessionId);
return Status;
}
Modified: trunk/reactos/ntoskrnl/ps/query.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ps/query.c?rev=55…
==============================================================================
--- trunk/reactos/ntoskrnl/ps/query.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/ps/query.c [iso-8859-1] Sun Feb 19 02:24:52 2012
@@ -1727,6 +1727,7 @@
PEPROCESS Process;
ULONG_PTR DisableBoost = 0;
ULONG_PTR IdealProcessor = 0;
+ ULONG_PTR Break = 0;
PTEB Teb;
ULONG_PTR TlsIndex = 0;
PVOID *ExpansionSlots;
@@ -2121,10 +2122,51 @@
/* All done */
break;
+
+ case ThreadBreakOnTermination:
+
+ /* Check buffer length */
+ if (ThreadInformationLength != sizeof(ULONG))
+ {
+ Status = STATUS_INFO_LENGTH_MISMATCH;
+ break;
+ }
+
+ /* Enter SEH for direct buffer read */
+ _SEH2_TRY
+ {
+ Break = *(PULONG)ThreadInformation;
+ }
+ _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
+ {
+ /* Get exception code */
+ Break = 0;
+ Status = _SEH2_GetExceptionCode();
+ _SEH2_YIELD(break);
+ }
+ _SEH2_END;
+
+ /* Setting 'break on termination' requires the SeDebugPrivilege */
+ if (!SeSinglePrivilegeCheck(SeDebugPrivilege, PreviousMode))
+ {
+ Status = STATUS_PRIVILEGE_NOT_HELD;
+ break;
+ }
+
+ /* Set or clear the flag */
+ if (Break)
+ {
+ PspSetCrossThreadFlag(Thread, CT_BREAK_ON_TERMINATION_BIT);
+ }
+ else
+ {
+ PspClearCrossThreadFlag(Thread, CT_BREAK_ON_TERMINATION_BIT);
+ }
+ break;
default:
/* We don't implement it yet */
- DPRINT1("Not implemented: %lx\n", ThreadInformationClass);
+ DPRINT1("Not implemented: %d\n", ThreadInformationClass);
Status = STATUS_NOT_IMPLEMENTED;
}
Modified: trunk/reactos/subsystems/win32/win32k/eng/mouse.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/en…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/eng/mouse.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/eng/mouse.c [iso-8859-1] Sun Feb 19 02:24:52
2012
@@ -148,7 +148,7 @@
if (!pgp->psurfSave)
{
- DPRINT1("No SaveSurface!\n");
+ DPRINT("No SaveSurface!\n");
return;
}