mirror of
https://github.com/reactos/reactos.git
synced 2025-02-23 17:05:46 +00:00
- Fixup and enable my new HAL IRQL implementation from a couple of months ago, and remove the temporary Mm hacks from Dmitry Gorbachev, since DPCs don't interrupt DISPATCH_LEVEL Code anymore.
- This fixes a critical system malfunction and architectural bug, as well as speeds up ReactOS incredibly -- setup takes seconds again, and boot is almost instantenous (except the Explorer loading bug). - Proper fix for bootvid regression that Aleksey "Fixed". Video mode is now properly setup wether in setup or non-setup mode, so bootvid works again. - Enable bootvid in freeldr.ini, currently using only /SOS mode since full-screen logo isn't implemented yet. svn path=/trunk/; revision=25800
This commit is contained in:
parent
e542b2c634
commit
d006bab906
16 changed files with 55 additions and 57 deletions
|
@ -398,6 +398,13 @@ CreateFreeLoaderIniForReactos(PWCHAR IniPath,
|
|||
L"SystemPath",
|
||||
ArcPath);
|
||||
|
||||
/* Options=/SOS*/
|
||||
IniCacheInsertKey(IniSection,
|
||||
NULL,
|
||||
INSERT_LAST,
|
||||
L"Options",
|
||||
L"/SOS");
|
||||
|
||||
/* Create "ReactOS_Debug" section */
|
||||
IniSection = IniCacheAppendSection(IniCache,
|
||||
L"ReactOS_Debug");
|
||||
|
@ -421,7 +428,7 @@ CreateFreeLoaderIniForReactos(PWCHAR IniPath,
|
|||
NULL,
|
||||
INSERT_LAST,
|
||||
L"Options",
|
||||
L"/DEBUGPORT=COM1 /NOGUIBOOT /SOS");
|
||||
L"/DEBUGPORT=COM1 /SOS");
|
||||
|
||||
/* Save the ini file */
|
||||
IniCacheSave(IniCache, IniPath);
|
||||
|
|
|
@ -1106,9 +1106,16 @@ PcVideoSync(VOID)
|
|||
}
|
||||
|
||||
VOID
|
||||
PcVideoPrepareForReactOS(VOID)
|
||||
PcVideoPrepareForReactOS(IN BOOLEAN Setup)
|
||||
{
|
||||
PcVideoSetMode80x50_80x43();
|
||||
if (Setup)
|
||||
{
|
||||
PcVideoSetMode80x50_80x43();
|
||||
}
|
||||
else
|
||||
{
|
||||
PcVideoSetBiosMode(0x12);
|
||||
}
|
||||
PcVideoHideShowTextCursor(FALSE);
|
||||
}
|
||||
|
||||
|
|
|
@ -234,7 +234,7 @@ XboxVideoSync()
|
|||
}
|
||||
|
||||
VOID
|
||||
XboxVideoPrepareForReactOS(VOID)
|
||||
XboxVideoPrepareForReactOS(IN BOOLEAN Setup)
|
||||
{
|
||||
XboxVideoClearScreenColor(MAKE_COLOR(0, 0, 0), TRUE);
|
||||
}
|
||||
|
|
|
@ -44,7 +44,7 @@ BOOLEAN PcVideoIsPaletteFixed(VOID);
|
|||
VOID PcVideoSetPaletteColor(UCHAR Color, UCHAR Red, UCHAR Green, UCHAR Blue);
|
||||
VOID PcVideoGetPaletteColor(UCHAR Color, UCHAR* Red, UCHAR* Green, UCHAR* Blue);
|
||||
VOID PcVideoSync(VOID);
|
||||
VOID PcVideoPrepareForReactOS(VOID);
|
||||
VOID PcVideoPrepareForReactOS(IN BOOLEAN Setup);
|
||||
|
||||
ULONG PcMemGetMemoryMap(PBIOS_MEMORY_MAP BiosMemoryMap, ULONG MaxMemoryMapSize);
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ BOOLEAN XboxVideoIsPaletteFixed(VOID);
|
|||
VOID XboxVideoSetPaletteColor(UCHAR Color, UCHAR Red, UCHAR Green, UCHAR Blue);
|
||||
VOID XboxVideoGetPaletteColor(UCHAR Color, UCHAR* Red, UCHAR* Green, UCHAR* Blue);
|
||||
VOID XboxVideoSync(VOID);
|
||||
VOID XboxVideoPrepareForReactOS(VOID);
|
||||
VOID XboxVideoPrepareForReactOS(IN BOOLEAN Setup);
|
||||
|
||||
VOID XboxMemInit(VOID);
|
||||
PVOID XboxMemReserveMemory(ULONG MbToReserve);
|
||||
|
|
|
@ -52,7 +52,7 @@ typedef struct tagMACHVTBL
|
|||
VOID (*VideoSetPaletteColor)(UCHAR Color, UCHAR Red, UCHAR Green, UCHAR Blue);
|
||||
VOID (*VideoGetPaletteColor)(UCHAR Color, UCHAR* Red, UCHAR* Green, UCHAR* Blue);
|
||||
VOID (*VideoSync)(VOID);
|
||||
VOID (*VideoPrepareForReactOS)(VOID);
|
||||
VOID (*VideoPrepareForReactOS)(IN BOOLEAN Setup);
|
||||
|
||||
ULONG (*GetMemoryMap)(PBIOS_MEMORY_MAP BiosMemoryMap, ULONG MaxMemoryMapSize);
|
||||
|
||||
|
@ -91,7 +91,7 @@ BOOLEAN MachVideoIsPaletteFixed(VOID);
|
|||
VOID MachVideoSetPaletteColor(UCHAR Color, UCHAR Red, UCHAR Green, UCHAR Blue);
|
||||
VOID MachVideoGetPaletteColor(UCHAR Color, UCHAR *Red, UCHAR *Green, UCHAR *Blue);
|
||||
VOID MachVideoSync(VOID);
|
||||
VOID MachVideoPrepareForReactOS(VOID);
|
||||
VOID MachVideoPrepareForReactOS(IN BOOLEAN Setup);
|
||||
ULONG MachGetMemoryMap(PBIOS_MEMORY_MAP BiosMemoryMap, ULONG MaxMemoryMapSize);
|
||||
BOOLEAN MachDiskGetBootVolume(PULONG DriveNumber, PULONGLONG StartSector, PULONGLONG SectorCount, int *FsType);
|
||||
BOOLEAN
|
||||
|
@ -128,7 +128,7 @@ VOID MachHwDetect(VOID);
|
|||
#define MachVideoSetPaletteColor(Col, R, G, B) MachVtbl.VideoSetPaletteColor((Col), (R), (G), (B))
|
||||
#define MachVideoGetPaletteColor(Col, R, G, B) MachVtbl.VideoGetPaletteColor((Col), (R), (G), (B))
|
||||
#define MachVideoSync() MachVtbl.VideoSync()
|
||||
#define MachVideoPrepareForReactOS() MachVtbl.VideoPrepareForReactOS()
|
||||
#define MachVideoPrepareForReactOS(a) MachVtbl.VideoPrepareForReactOS(a)
|
||||
#define MachGetMemoryMap(MMap, Size) MachVtbl.GetMemoryMap((MMap), (Size))
|
||||
#define MachDiskGetBootVolume(Drv, Start, Cnt, FsType) MachVtbl.DiskGetBootVolume((Drv), (Start), (Cnt), (FsType))
|
||||
#define MachDiskGetSystemVolume(SysPath, RemPath, Dev, Drv, Start, Cnt, FsType) MachVtbl.DiskGetSystemVolume((SysPath), (RemPath), (Dev), (Drv), (Start), (Cnt), (FsType))
|
||||
|
|
|
@ -142,9 +142,9 @@ MachVideoSync(VOID)
|
|||
}
|
||||
|
||||
VOID
|
||||
MachVideoPrepareForReactOS(VOID)
|
||||
MachVideoPrepareForReactOS(IN BOOLEAN Setup)
|
||||
{
|
||||
MachVtbl.VideoPrepareForReactOS();
|
||||
MachVtbl.VideoPrepareForReactOS(Setup);
|
||||
}
|
||||
|
||||
ULONG
|
||||
|
|
|
@ -932,7 +932,7 @@ LoadAndBootReactOS(PCSTR OperatingSystemName)
|
|||
* Now boot the kernel
|
||||
*/
|
||||
DiskStopFloppyMotor();
|
||||
MachVideoPrepareForReactOS();
|
||||
MachVideoPrepareForReactOS(FrLdrBootType);
|
||||
FrLdrStartup(0x2badb002);
|
||||
}
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
<define name="_DISABLE_TIDENTS" />
|
||||
<define name="_NTHAL_" />
|
||||
<define name="__USE_W32API" />
|
||||
<file>irql.c</file>
|
||||
<file>irq.s</file>
|
||||
<file>halinit.c</file>
|
||||
<file>processor.c</file>
|
||||
<file>spinlock.c</file>
|
||||
|
|
|
@ -282,7 +282,7 @@ AfterMask:
|
|||
and PCR[KPCR_IDR], eax
|
||||
|
||||
/* Get the current IRQL and mask the IRQs in the PIC */
|
||||
movzx eax, byte ptr PCR[KPCR_IRQL]
|
||||
mov eax, PCR[KPCR_IRQL]
|
||||
mov eax, KiI8259MaskTable[eax*4]
|
||||
or eax, PCR[KPCR_IDR]
|
||||
out 0x21, al
|
||||
|
@ -309,9 +309,9 @@ Invalid:
|
|||
_HalBeginSystemInterrupt@12:
|
||||
|
||||
/* Convert to IRQ and call the handler */
|
||||
movzx edx, byte ptr [esp+8]
|
||||
sub edx, PRIMARY_VECTOR_BASE
|
||||
jmp HalpSysIntHandler[edx*4]
|
||||
movzx ebx, byte ptr [esp+8]
|
||||
sub ebx, PRIMARY_VECTOR_BASE
|
||||
jmp HalpSysIntHandler[ebx*4]
|
||||
|
||||
IRQ15:
|
||||
/* This is IRQ 15, check if it's spurious */
|
||||
|
@ -344,12 +344,12 @@ IRQ7:
|
|||
GenericIRQ:
|
||||
/* Return the current IRQL */
|
||||
mov eax, [esp+12]
|
||||
movzx ecx, byte ptr PCR[KPCR_IRQL]
|
||||
mov ecx, PCR[KPCR_IRQL]
|
||||
mov [eax], cl
|
||||
|
||||
/* Set the new IRQL */
|
||||
movzx eax, byte ptr [esp+4]
|
||||
mov PCR[KPCR_IRQL], al
|
||||
mov PCR[KPCR_IRQL], eax
|
||||
|
||||
/* Set IRQ mask in the PIC */
|
||||
mov eax, KiI8259MaskTable[eax*4]
|
||||
|
@ -359,7 +359,7 @@ GenericIRQ:
|
|||
out 0xA1, al
|
||||
|
||||
/* Check to which PIC the EOI was sent */
|
||||
mov eax, edx
|
||||
mov eax, ebx
|
||||
cmp eax, 8
|
||||
jnb Pic1
|
||||
|
||||
|
@ -396,7 +396,7 @@ _HalEndSystemInterrupt@8:
|
|||
|
||||
/* Get the IRQL and check if it's a software interrupt */
|
||||
movzx ecx, byte ptr [esp+4]
|
||||
cmp byte ptr PCR[KPCR_IRQL], DISPATCH_LEVEL
|
||||
cmp dword ptr PCR[KPCR_IRQL], DISPATCH_LEVEL
|
||||
jbe SkipMask2
|
||||
|
||||
/* Hardware interrupt, mask the appropriate IRQs in the PIC */
|
||||
|
@ -409,7 +409,7 @@ _HalEndSystemInterrupt@8:
|
|||
SkipMask2:
|
||||
|
||||
/* Set IRQL and check if there are pending software interrupts */
|
||||
mov PCR[KPCR_IRQL], cl
|
||||
mov PCR[KPCR_IRQL], ecx
|
||||
mov eax, PCR[KPCR_IRR]
|
||||
mov al, SoftIntByteTable[eax]
|
||||
cmp al, cl
|
||||
|
@ -439,7 +439,7 @@ _@KfLowerIrql@4:
|
|||
#endif
|
||||
|
||||
/* Disable interrupts and check if IRQL is below DISPATCH_LEVEL */
|
||||
cmp byte ptr PCR[KPCR_IRQL], DISPATCH_LEVEL
|
||||
cmp dword ptr PCR[KPCR_IRQL], DISPATCH_LEVEL
|
||||
cli
|
||||
jbe SkipMask
|
||||
|
||||
|
@ -453,7 +453,7 @@ _@KfLowerIrql@4:
|
|||
SkipMask:
|
||||
|
||||
/* Set the new IRQL and check if there's a pending software interrupt */
|
||||
mov PCR[KPCR_IRQL], cl
|
||||
mov PCR[KPCR_IRQL], ecx
|
||||
mov eax, PCR[KPCR_IRR]
|
||||
mov al, SoftIntByteTable[eax]
|
||||
cmp al, cl
|
||||
|
@ -466,8 +466,8 @@ SkipMask:
|
|||
#if DBG
|
||||
InvalidIrql:
|
||||
/* Set HIGH_LEVEL */
|
||||
movzx eax, byte ptr PCR[KPCR_IRQL]
|
||||
mov byte ptr PCR[KPCR_IRQL], HIGH_LEVEL
|
||||
mov eax, PCR[KPCR_IRQL]
|
||||
mov dword ptr PCR[KPCR_IRQL], HIGH_LEVEL
|
||||
|
||||
/* Bugcheck the system */
|
||||
push 3
|
||||
|
@ -493,8 +493,7 @@ _@KfRaiseIrql@4:
|
|||
@KfRaiseIrql@4:
|
||||
|
||||
/* Get the IRQL */
|
||||
xor eax, eax
|
||||
mov al, PCR[KPCR_IRQL]
|
||||
mov eax, PCR[KPCR_IRQL]
|
||||
movzx ecx, cl
|
||||
|
||||
#if DBG
|
||||
|
@ -532,13 +531,13 @@ _@KfRaiseIrql@4:
|
|||
SetIrql:
|
||||
|
||||
/* Set the IRQL and return */
|
||||
mov PCR[KPCR_IRQL], cl
|
||||
mov PCR[KPCR_IRQL], ecx
|
||||
ret
|
||||
|
||||
#if DBG
|
||||
InvalidKfRaise:
|
||||
/* Set to passive */
|
||||
mov byte ptr PCR[KPCR_IRQL], PASSIVE_LEVEL
|
||||
mov dword ptr PCR[KPCR_IRQL], PASSIVE_LEVEL
|
||||
|
||||
/* Bugcheck the system */
|
||||
push 9
|
||||
|
@ -555,7 +554,7 @@ InvalidKfRaise:
|
|||
_KeGetCurrentIrql@0:
|
||||
|
||||
/* Return the IRQL */
|
||||
movzx eax, byte ptr PCR[KPCR_IRQL]
|
||||
mov eax, PCR[KPCR_IRQL]
|
||||
ret
|
||||
.endfunc
|
||||
|
||||
|
@ -564,15 +563,14 @@ _KeGetCurrentIrql@0:
|
|||
_KeRaiseIrqlToDpcLevel@0:
|
||||
|
||||
/* Get the current IRQL */
|
||||
xor eax, eax
|
||||
mov al, PCR[KPCR_IRQL]
|
||||
mov eax, PCR[KPCR_IRQL]
|
||||
|
||||
/* Set DISPATCH_LEVEL */
|
||||
mov byte ptr PCR[KPCR_IRQL], DISPATCH_LEVEL
|
||||
mov dword ptr PCR[KPCR_IRQL], DISPATCH_LEVEL
|
||||
|
||||
#if DBG
|
||||
/* Make sure we were not higher then dispatch */
|
||||
cmp al, DISPATCH_LEVEL
|
||||
cmp eax, DISPATCH_LEVEL
|
||||
ja InvalidRaise
|
||||
#endif
|
||||
ret
|
||||
|
@ -605,13 +603,13 @@ _KeRaiseIrqlToSynchLevel@0:
|
|||
out 0xA1, al
|
||||
|
||||
/* Return the old IRQL, enable interrupts and set to DISPATCH */
|
||||
mov al, PCR[KPCR_IRQL]
|
||||
mov byte ptr PCR[KPCR_IRQL], DISPATCH_LEVEL
|
||||
mov eax, PCR[KPCR_IRQL]
|
||||
mov dword ptr PCR[KPCR_IRQL], DISPATCH_LEVEL
|
||||
popf
|
||||
|
||||
#if DBG
|
||||
/* Validate raise */
|
||||
cmp al, DISPATCH_LEVEL
|
||||
cmp eax, DISPATCH_LEVEL
|
||||
ja InvalidSyRaise
|
||||
#endif
|
||||
|
||||
|
@ -632,6 +630,8 @@ InvalidSyRaise:
|
|||
|
||||
.globl _HalpApcInterrupt
|
||||
.func HalpApcInterrupt
|
||||
Dr_hapc: DR_TRAP_FIXUP
|
||||
V86_hapc: V86_TRAP_FIXUP
|
||||
_HalpApcInterrupt:
|
||||
|
||||
/* Create fake interrupt stack */
|
||||
|
@ -679,6 +679,8 @@ DeliverApc:
|
|||
|
||||
.globl _HalpDispatchInterrupt
|
||||
.func HalpDispatchInterrupt
|
||||
Dr_hdpc: DR_TRAP_FIXUP
|
||||
V86_hdpc: V86_TRAP_FIXUP
|
||||
_HalpDispatchInterrupt:
|
||||
|
||||
/* Create fake interrupt stack */
|
||||
|
@ -688,7 +690,7 @@ _HalpDispatchInterrupt:
|
|||
push eax
|
||||
|
||||
/* Enter interrupt */
|
||||
INT_PROLOG hapc, DoPushFakeErrorCode
|
||||
INT_PROLOG hdpc, DoPushFakeErrorCode
|
||||
.endfunc
|
||||
|
||||
.globl _HalpDispatchInterrupt2ndEntry
|
||||
|
|
|
@ -14,9 +14,6 @@
|
|||
#define NDEBUG
|
||||
#include <internal/debug.h>
|
||||
|
||||
#undef KeAcquireSpinLock
|
||||
#define KeAcquireSpinLock(a,b) { _disable(); *(b) = KfAcquireSpinLock(a); }
|
||||
|
||||
#if defined (ALLOC_PRAGMA)
|
||||
#pragma alloc_text(INIT, MmInitializeBalancer)
|
||||
#pragma alloc_text(INIT, MmInitializeMemoryConsumer)
|
||||
|
|
|
@ -15,9 +15,6 @@
|
|||
#define NDEBUG
|
||||
#include <internal/debug.h>
|
||||
|
||||
#undef KeAcquireSpinLock
|
||||
#define KeAcquireSpinLock(a,b) { _disable(); *(b) = KfAcquireSpinLock(a); }
|
||||
|
||||
#if defined (ALLOC_PRAGMA)
|
||||
#pragma alloc_text(INIT, MmInitializePageList)
|
||||
#endif
|
||||
|
|
|
@ -14,9 +14,6 @@
|
|||
#define NDEBUG
|
||||
#include <internal/debug.h>
|
||||
|
||||
#undef KeAcquireSpinLock
|
||||
#define KeAcquireSpinLock(a,b) { _disable(); *(b) = KfAcquireSpinLock(a); }
|
||||
|
||||
#if defined (ALLOC_PRAGMA)
|
||||
#pragma alloc_text(INIT, MmInitializeMdlImplementation)
|
||||
#endif
|
||||
|
|
|
@ -16,9 +16,6 @@
|
|||
#define NDEBUG
|
||||
#include <internal/debug.h>
|
||||
|
||||
#undef KeAcquireSpinLock
|
||||
#define KeAcquireSpinLock(a,b) { _disable(); *(b) = KfAcquireSpinLock(a); }
|
||||
|
||||
#if defined (ALLOC_PRAGMA)
|
||||
#pragma alloc_text(INIT, MiInitializeNonPagedPool)
|
||||
#endif
|
||||
|
|
|
@ -31,9 +31,6 @@
|
|||
#define NDEBUG
|
||||
#include <internal/debug.h>
|
||||
|
||||
#undef KeAcquireSpinLock
|
||||
#define KeAcquireSpinLock(a,b) { _disable(); *(b) = KfAcquireSpinLock(a); }
|
||||
|
||||
#if defined (ALLOC_PRAGMA)
|
||||
#pragma alloc_text(INIT, MmInitPagingFile)
|
||||
#endif
|
||||
|
|
|
@ -14,9 +14,6 @@
|
|||
#define NDEBUG
|
||||
#include <internal/debug.h>
|
||||
|
||||
#undef KeAcquireSpinLock
|
||||
#define KeAcquireSpinLock(a,b) { _disable(); *(b) = KfAcquireSpinLock(a); }
|
||||
|
||||
#if defined (ALLOC_PRAGMA)
|
||||
#pragma alloc_text(INIT, MmInitializePageOp)
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue