mirror of
https://github.com/reactos/reactos.git
synced 2025-05-19 00:54:18 +00:00
- 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:
parent
2855e1f08f
commit
0c1b724e79
3 changed files with 17 additions and 4 deletions
|
@ -20,11 +20,11 @@
|
||||||
|
|
||||||
/* FUNCTIONS *****************************************************************/
|
/* FUNCTIONS *****************************************************************/
|
||||||
|
|
||||||
VOID STDCALL
|
VOID
|
||||||
HalInitializeProcessor(ULONG ProcessorNumber,
|
NTAPI
|
||||||
PLOADER_PARAMETER_BLOCK LoaderBlock)
|
HalInitializeProcessor(IN ULONG ProcessorNumber,
|
||||||
|
IN PLOADER_PARAMETER_BLOCK LoaderBlock)
|
||||||
{
|
{
|
||||||
DPRINT("HalInitializeProcessor(%lu %p)\n", ProcessorNumber, LoaderBlock);
|
|
||||||
/* Set default IDR */
|
/* Set default IDR */
|
||||||
KeGetPcr()->IDR = 0xFFFFFFFB;
|
KeGetPcr()->IDR = 0xFFFFFFFB;
|
||||||
KeGetPcr()->StallScaleFactor = INITIAL_STALL_COUNT;
|
KeGetPcr()->StallScaleFactor = INITIAL_STALL_COUNT;
|
||||||
|
|
|
@ -92,7 +92,11 @@ Author:
|
||||||
//
|
//
|
||||||
#define K0IPCR ((ULONG_PTR)(KIP0PCRADDRESS))
|
#define K0IPCR ((ULONG_PTR)(KIP0PCRADDRESS))
|
||||||
#define PCR ((volatile KPCR * const)K0IPCR)
|
#define PCR ((volatile KPCR * const)K0IPCR)
|
||||||
|
#ifdef _WE_USE_THE_SAME_PCR_ADDRESS
|
||||||
#define KeGetPcr() PCR
|
#define KeGetPcr() PCR
|
||||||
|
#else
|
||||||
|
#define KeGetPcr() ((volatile KPCR * const)__readfsdword(0x1C))
|
||||||
|
#endif
|
||||||
|
|
||||||
//
|
//
|
||||||
// Number of dispatch codes supported by KINTERRUPT
|
// Number of dispatch codes supported by KINTERRUPT
|
||||||
|
|
|
@ -168,6 +168,15 @@ KdInitSystem(ULONG BootPhase,
|
||||||
ULONG i;
|
ULONG i;
|
||||||
PCHAR p1, p2;
|
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 */
|
/* Set Default Port Options */
|
||||||
if (BootPhase == 0)
|
if (BootPhase == 0)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue