https://git.reactos.org/?p=reactos.git;a=commitdiff;h=91948dea80126028a05e3…
commit 91948dea80126028a05e3ee83f9857d06ed5370f
Author: Timo Kreuzer <timo.kreuzer(a)reactos.org>
AuthorDate: Thu Dec 12 14:44:05 2024 +0200
Commit: Timo Kreuzer <timo.kreuzer(a)reactos.org>
CommitDate: Mon Dec 16 16:18:45 2024 +0200
[NTOS:KE/x64] Fix handling of PCR::UserRsp
This is a temporary helper for the system call entry point to store the user mode stack, before switching to the kernel mode stack. Initially it was copied to the trap frame inside KiSystemCallHandler. This has been moved to the system call entry point, but some remnants remained. The problem is that KiSystemCallHandler can be called twice in a system call (when the call is the first GUI call and the stack needs to be extended). In that scenario, when the thread was preempted, a new v [...]
---
ntoskrnl/ke/amd64/traphandler.c | 5 ++---
ntoskrnl/ke/amd64/usercall.c | 3 ---
2 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/ntoskrnl/ke/amd64/traphandler.c b/ntoskrnl/ke/amd64/traphandler.c
index dc72d08fc63..ef2cb4d7dae 100644
--- a/ntoskrnl/ke/amd64/traphandler.c
+++ b/ntoskrnl/ke/amd64/traphandler.c
@@ -159,9 +159,8 @@ KiSystemCallHandler(
/* We don't have an exception frame yet */
TrapFrame->ExceptionFrame = 0;
- /* Before enabling interrupts get the user rsp from the KPCR */
- UserRsp = __readgsqword(FIELD_OFFSET(KIPCR, UserRsp));
- TrapFrame->Rsp = UserRsp;
+ /* Get the user Stack pointer */
+ UserRsp = TrapFrame->Rsp;
/* Enable interrupts */
_enable();
diff --git a/ntoskrnl/ke/amd64/usercall.c b/ntoskrnl/ke/amd64/usercall.c
index 9bcc81384b4..81f7a81fdfc 100644
--- a/ntoskrnl/ke/amd64/usercall.c
+++ b/ntoskrnl/ke/amd64/usercall.c
@@ -318,9 +318,6 @@ KeUserModeCallback(
/* Restore stack and return */
*UserStackPointer = OldStack;
-#ifdef _M_AMD64 // could probably move the update to TrapFrame->Rsp from the C handler to the asm code
- __writegsqword(FIELD_OFFSET(KIPCR, UserRsp), OldStack);
-#endif
return CallbackStatus;
}
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=5df3a0bb4aeb73f752182…
commit 5df3a0bb4aeb73f7521828225d5ae00b68f4c3d0
Author: Doug Lyons <douglyons(a)douglyons.com>
AuthorDate: Mon Dec 16 04:42:47 2024 -0600
Commit: GitHub <noreply(a)github.com>
CommitDate: Mon Dec 16 13:42:47 2024 +0300
[EVENTVWR] Fix typo in Romanian (ro-RO) translation (#7561)
Addendum to 0.4.16-dev-323-g c212c184f39 (#7352).
In the usage help message one line started with '\pentru', but it should have been '\tpentru'.
Fixes GCC compiler error:
base/applications/mscutils/eventvwr/lang/ro-RO.rc:177: unrecognized escape sequence
Co-authored-by: George Bișoc <george.bisoc(a)reactos.org>
---
base/applications/mscutils/eventvwr/lang/ro-RO.rc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/base/applications/mscutils/eventvwr/lang/ro-RO.rc b/base/applications/mscutils/eventvwr/lang/ro-RO.rc
index 947cfad7da7..b888fd857a8 100644
--- a/base/applications/mscutils/eventvwr/lang/ro-RO.rc
+++ b/base/applications/mscutils/eventvwr/lang/ro-RO.rc
@@ -179,7 +179,7 @@ BEGIN
EventVwr [numele computerului] [/L:<fișier de jurnal de evenimente>] [/?]\n\
\n\
""numele computerului"" : Specifică computerul de la distanță unde să se conecteze\n\
-\pentru a prelua evenimentele de afișat. Dacă nu este specificat niciun nume,\n\
+\tpentru a prelua evenimentele de afișat. Dacă nu este specificat niciun nume,\n\
\tcomputerul local este folosit.\n\
\n\
/L:<fișier de jurnal de evenimente> : Specifică deschiderea unui fișier.\n\
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=cc40a5870a67a2eaefa03…
commit cc40a5870a67a2eaefa03e1931408996621c5ffa
Author: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
AuthorDate: Sat Aug 10 21:22:11 2024 +0200
Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
CommitDate: Sun Dec 15 22:15:13 2024 +0100
[NTOS:CM] Implement Win7+ VolatileBoot support.
Its support is controlled with a REG_DWORD value named
`VolatileBoot` inside the registry key
`HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Configuration Manager` .
Its implementation is very trivial: when enabled, CmpShareSystemHives
is set to TRUE and doesn't change state during runtime.
In a sense this is similar to what happens in WinPE-boot, except that
ALL hives without exception (system hives and others) will be loaded
in shared mode.
---
ntoskrnl/config/cmdata.c | 9 +++++++++
ntoskrnl/config/cmsysini.c | 6 +++++-
ntoskrnl/include/internal/cm.h | 1 +
3 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/ntoskrnl/config/cmdata.c b/ntoskrnl/config/cmdata.c
index aa9b1f010be..e428377a6fc 100644
--- a/ntoskrnl/config/cmdata.c
+++ b/ntoskrnl/config/cmdata.c
@@ -54,6 +54,8 @@ UNICODE_STRING CmSymbolicLinkValueName =
UNICODE_STRING CmpLoadOptions;
+/* TRUE if all hives must be loaded in shared mode */
+ULONG CmpVolatileBoot;
/* TRUE if the system hives must be loaded in shared mode */
BOOLEAN CmpShareSystemHives;
/* TRUE when the registry is in PE mode */
@@ -673,6 +675,13 @@ DATA_SEG("INITDATA") CM_SYSTEM_CONTROL_VECTOR CmControlVector[] =
NULL,
NULL
},
+ {
+ L"Session Manager\\Configuration Manager",
+ L"VolatileBoot",
+ &CmpVolatileBoot,
+ NULL,
+ NULL
+ },
{
L"Session Manager",
L"ForceNpxEmulation",
diff --git a/ntoskrnl/config/cmsysini.c b/ntoskrnl/config/cmsysini.c
index a8ddc104073..df1de46a210 100644
--- a/ntoskrnl/config/cmsysini.c
+++ b/ntoskrnl/config/cmsysini.c
@@ -1164,7 +1164,7 @@ CmpCreateRegistryRoot(VOID)
return FALSE;
}
- /* Completely sucessful */
+ /* Completely successful */
return TRUE;
}
@@ -1635,6 +1635,10 @@ CmInitSystem1(VOID)
CmpMiniNTBoot = TRUE;
CmpShareSystemHives = TRUE;
}
+ /* If we are in volatile boot mode, ALL hives without exception
+ * (system hives and others) will be loaded in shared mode */
+ if (CmpVolatileBoot)
+ CmpShareSystemHives = TRUE;
/* Initialize the hive list and lock */
InitializeListHead(&CmpHiveListHead);
diff --git a/ntoskrnl/include/internal/cm.h b/ntoskrnl/include/internal/cm.h
index 8d33736c482..02d8b9e177c 100644
--- a/ntoskrnl/include/internal/cm.h
+++ b/ntoskrnl/include/internal/cm.h
@@ -1420,6 +1420,7 @@ CmGetSystemDriverList(
extern ULONG CmpTraceLevel;
extern BOOLEAN CmpSpecialBootCondition;
extern BOOLEAN CmpFlushOnLockRelease;
+extern ULONG CmpVolatileBoot;
extern BOOLEAN CmpShareSystemHives;
extern BOOLEAN CmpMiniNTBoot;
extern BOOLEAN CmpNoVolatileCreates;
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=3abb21080d1bdd39ac339…
commit 3abb21080d1bdd39ac33993895bff401d4543135
Author: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
AuthorDate: Thu Dec 12 21:26:25 2024 +0100
Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
CommitDate: Sat Dec 14 23:38:43 2024 +0100
[NTOS:KE/EX] Add minimal EMS (headless) support for bugcheck.
In particular, the HeadlessGlobals->InBugCheck flag MUST be set prior
to displaying the blue-screen, because the HDL global lock function
would trigger a (nested) BSoD otherwise.
Regarding the unimplemented HeadlessCmdSendBlueScreenData:
it sends to the management console an XML description of the bugcheck.
An example can be seen in this issue report:
https://github.com/cloud-hypervisor/cloud-hypervisor/issues/3168
For more information, please consult:
https://download.microsoft.com/download/1/6/1/161ba512-40e2-4cc9-843a-92314…
---
ntoskrnl/ex/hdlsterm.c | 10 ++++++++++
ntoskrnl/ke/bug.c | 16 ++++++++++++++--
2 files changed, 24 insertions(+), 2 deletions(-)
diff --git a/ntoskrnl/ex/hdlsterm.c b/ntoskrnl/ex/hdlsterm.c
index b4fd7b949f6..bfed212d91d 100644
--- a/ntoskrnl/ex/hdlsterm.c
+++ b/ntoskrnl/ex/hdlsterm.c
@@ -450,8 +450,15 @@ HdlspDispatch(IN HEADLESS_CMD Command,
case HeadlessCmdGetLine:
break;
+
case HeadlessCmdStartBugCheck:
+ {
+ HeadlessGlobals->InBugCheck = TRUE;
+ HeadlessGlobals->ProcessingCmd = FALSE;
+ Status = STATUS_SUCCESS;
break;
+ }
+
case HeadlessCmdDoBugCheckProcessing:
break;
@@ -518,7 +525,10 @@ HdlspDispatch(IN HEADLESS_CMD Command,
}
case HeadlessCmdSendBlueScreenData:
+ // TODO: Send XML description of bugcheck.
+ // InputBuffer points to the BugCheckCode.
break;
+
case HeadlessCmdQueryGUID:
break;
diff --git a/ntoskrnl/ke/bug.c b/ntoskrnl/ke/bug.c
index 1bf6e7cafbd..297de556fe4 100644
--- a/ntoskrnl/ke/bug.c
+++ b/ntoskrnl/ke/bug.c
@@ -615,8 +615,20 @@ KiDisplayBlueScreen(IN ULONG MessageId,
IN PCHAR HardErrMessage OPTIONAL,
IN PCHAR Message)
{
+ ULONG BugCheckCode = (ULONG)KiBugCheckData[0];
+ BOOLEAN Enable = TRUE;
CHAR AnsiName[107];
+ /* Enable headless support for bugcheck */
+ HeadlessDispatch(HeadlessCmdStartBugCheck,
+ NULL, 0, NULL, NULL);
+ HeadlessDispatch(HeadlessCmdEnableTerminal,
+ &Enable, sizeof(Enable),
+ NULL, NULL);
+ HeadlessDispatch(HeadlessCmdSendBlueScreenData,
+ &BugCheckCode, sizeof(BugCheckCode),
+ NULL, NULL);
+
/* Check if bootvid is installed */
if (InbvIsBootDriverInstalled())
{
@@ -664,7 +676,7 @@ KiDisplayBlueScreen(IN ULONG MessageId,
if (MessageId == BUGCODE_PSS_MESSAGE)
{
/* It is, so get the bug code string as well */
- KeGetBugMessageText((ULONG)KiBugCheckData[0], NULL);
+ KeGetBugMessageText(BugCheckCode, NULL);
InbvDisplayString("\r\n\r\n");
}
@@ -683,7 +695,7 @@ KiDisplayBlueScreen(IN ULONG MessageId,
RtlStringCbPrintfA(AnsiName,
sizeof(AnsiName),
"\r\n\r\n*** STOP: 0x%08lX (0x%p,0x%p,0x%p,0x%p)\r\n\r\n",
- (ULONG)KiBugCheckData[0],
+ BugCheckCode,
(PVOID)KiBugCheckData[1],
(PVOID)KiBugCheckData[2],
(PVOID)KiBugCheckData[3],
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=b15dcb5cf61bf5e72537a…
commit b15dcb5cf61bf5e72537a7b8f66981ebe22967d1
Author: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
AuthorDate: Sat Dec 7 16:29:02 2024 +0100
Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
CommitDate: Sat Dec 14 23:33:53 2024 +0100
[NTOS:KD64] The DbgKdPageInApi, introduced in NT4, has been obsoleted in NT5.
It has been replaced by ExpDebuggerPageIn support in ExpDebuggerWorker().
---
ntoskrnl/kd64/kdapi.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/ntoskrnl/kd64/kdapi.c b/ntoskrnl/kd64/kdapi.c
index 089af9c5f86..4baeb4d9c42 100644
--- a/ntoskrnl/kd64/kdapi.c
+++ b/ntoskrnl/kd64/kdapi.c
@@ -1497,8 +1497,9 @@ SendPacket:
case DbgKdPageInApi:
- /* TODO */
- KdpDprintf("Page-In support is unimplemented!\n");
+ /* This API, introduced in NT4, has been obsoleted in NT5. It is
+ * replaced by ExpDebuggerPageIn support in ExpDebuggerWorker(). */
+ KdpDprintf("DbgKdPageInApi is obsolete!\n");
KdpNotSupported(&ManipulateState);
break;