- Un-optimize KeGetPcr and make it use fs:20h instead of hard-coding the 0xFF.... address, because someone decided that ROS should have a different KPCR address then NT.

- This gets NTLDR working with ReactOS and I can boot all the way to MmInit1 (which fails due to missing KeMemoryMap & freeldr data).
- Serial port output works with DPRINT1 as well ;-)

svn path=/trunk/; revision=24352
This commit is contained in:
Alex Ionescu 2006-10-01 20:27:36 +00:00
parent 2855e1f08f
commit 0c1b724e79
3 changed files with 17 additions and 4 deletions

View file

@ -20,11 +20,11 @@
/* FUNCTIONS *****************************************************************/
VOID STDCALL
HalInitializeProcessor(ULONG ProcessorNumber,
PLOADER_PARAMETER_BLOCK LoaderBlock)
VOID
NTAPI
HalInitializeProcessor(IN ULONG ProcessorNumber,
IN PLOADER_PARAMETER_BLOCK LoaderBlock)
{
DPRINT("HalInitializeProcessor(%lu %p)\n", ProcessorNumber, LoaderBlock);
/* Set default IDR */
KeGetPcr()->IDR = 0xFFFFFFFB;
KeGetPcr()->StallScaleFactor = INITIAL_STALL_COUNT;

View file

@ -92,7 +92,11 @@ Author:
//
#define K0IPCR ((ULONG_PTR)(KIP0PCRADDRESS))
#define PCR ((volatile KPCR * const)K0IPCR)
#ifdef _WE_USE_THE_SAME_PCR_ADDRESS
#define KeGetPcr() PCR
#else
#define KeGetPcr() ((volatile KPCR * const)__readfsdword(0x1C))
#endif
//
// Number of dispatch codes supported by KINTERRUPT

View file

@ -168,6 +168,15 @@ KdInitSystem(ULONG BootPhase,
ULONG i;
PCHAR p1, p2;
#if 0
/* NTLDR HACK */
KdpSerialInit(&DispatchTable[KdSerial], 0);
KdpDebugMode.Serial = TRUE;
SerialPortInfo.ComPort = 1;
KdpPort = 1;
KdDebuggerEnabled = TRUE;
#endif
/* Set Default Port Options */
if (BootPhase == 0)
{