Skip to content

Commit

Permalink
hmm
Browse files Browse the repository at this point in the history
  • Loading branch information
DarkFire01 committed Nov 11, 2024
1 parent 59052db commit 895e6d2
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 60 deletions.
34 changes: 0 additions & 34 deletions ntoskrnl/ke/i386/cpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -1333,25 +1333,7 @@ NTSTATUS
NTAPI
KeSaveFloatingPointState(OUT PKFLOATING_SAVE Save)
{
PFNSAVE_FORMAT FpState;
ASSERT(KeGetCurrentIrql() <= DISPATCH_LEVEL);
UNIMPLEMENTED_ONCE;

FpState = ExAllocatePool(NonPagedPool, sizeof (FNSAVE_FORMAT));
if (!FpState) return STATUS_INSUFFICIENT_RESOURCES;

*((PVOID *) Save) = FpState;
#ifdef __GNUC__
asm volatile("fnsave %0\n\t" : "=m" (*FpState));
#else
__asm
{
mov eax, [FpState]
fnsave [eax]
};
#endif

KeGetCurrentThread()->Header.NpxIrql = KeGetCurrentIrql();
return STATUS_SUCCESS;
}

Expand All @@ -1362,23 +1344,7 @@ NTSTATUS
NTAPI
KeRestoreFloatingPointState(IN PKFLOATING_SAVE Save)
{
PFNSAVE_FORMAT FpState = *((PVOID *) Save);
ASSERT(KeGetCurrentThread()->Header.NpxIrql == KeGetCurrentIrql());
UNIMPLEMENTED_ONCE;

#ifdef __GNUC__
asm volatile("fnclex\n\t");
asm volatile("frstor %0\n\t" : "=m" (*FpState));
#else
__asm
{
fnclex
mov eax, [FpState]
frstor [eax]
};
#endif

ExFreePool(FpState);
return STATUS_SUCCESS;
}

Expand Down
28 changes: 4 additions & 24 deletions ntoskrnl/mm/ARM3/pagfault.c
Original file line number Diff line number Diff line change
Expand Up @@ -1818,12 +1818,7 @@ MmArmAccessFault(IN ULONG FaultCode,
/* Always check if the PDE is valid */
(PointerPde->u.Hard.Valid == 0))
{
/* PXE/PPE/PDE (still) not valid, kill the system */
KeBugCheckEx(PAGE_FAULT_IN_NONPAGED_AREA,
(ULONG_PTR)Address,
FaultCode,
(ULONG_PTR)TrapInformation,
2);

}

/* Not handling session faults yet */
Expand Down Expand Up @@ -1883,12 +1878,7 @@ MmArmAccessFault(IN ULONG FaultCode,
Status = MiCheckPdeForSessionSpace(Address);
if (!NT_SUCCESS(Status))
{
/* It failed, this address is invalid */
KeBugCheckEx(PAGE_FAULT_IN_NONPAGED_AREA,
(ULONG_PTR)Address,
FaultCode,
(ULONG_PTR)TrapInformation,
6);

}
}
#else
Expand Down Expand Up @@ -2057,23 +2047,13 @@ _WARN("Session space stuff is not implemented yet!")
/* Check for no-access PTE */
if (TempPte.u.Soft.Protection == MM_NOACCESS)
{
/* Bugcheck the system! */
KeBugCheckEx(PAGE_FAULT_IN_NONPAGED_AREA,
(ULONG_PTR)Address,
FaultCode,
(ULONG_PTR)TrapInformation,
1);

}

/* Check for no protecton at all */
if (TempPte.u.Soft.Protection == MM_ZERO_ACCESS)
{
/* Bugcheck the system! */
KeBugCheckEx(PAGE_FAULT_IN_NONPAGED_AREA,
(ULONG_PTR)Address,
FaultCode,
(ULONG_PTR)TrapInformation,
0);

}
}

Expand Down
2 changes: 1 addition & 1 deletion sdk/include/reactos/subsys/csr/csrsrv.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* with extended debugging information.
*/
#if DBG
#define CSR_DBG
//#define CSR_DBG
#endif

#include "csrmsg.h"
Expand Down
2 changes: 1 addition & 1 deletion win32ss/gdi/eng/surface.c
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ SURFACE_AllocSurface(
cBitsPixel = gajBitsPerFormat[iFormat];

/* Are bits and a width in bytes given? */
if (pvBits && cjWidth)
if (pvBits && cjWidth && cjWidth != 0xDEADBEEF)
{
/* Align the width (Windows compatibility, drivers expect that) */
cjWidth = WIDTH_BYTES_ALIGN32((cjWidth << 3) / cBitsPixel, cBitsPixel);
Expand Down
2 changes: 2 additions & 0 deletions win32ss/gdi/ntgdi/dclife.c
Original file line number Diff line number Diff line change
Expand Up @@ -659,6 +659,7 @@ GreOpenDCW(
if (!ppdev)
{
DPRINT1("Didn't find a suitable PDEV\n");
__debugbreak();
return NULL;
}

Expand Down Expand Up @@ -850,6 +851,7 @@ GreCreateCompatibleDC(HDC hdc, BOOL bAltDc)
if (!ppdev)
{
DPRINT1("Didn't find a suitable PDEV\n");
__debugbreak();
return NULL;
}

Expand Down

0 comments on commit 895e6d2

Please sign in to comment.