mirror of
https://github.com/reactos/reactos.git
synced 2025-08-07 05:43:08 +00:00
[FORMATTING] Remove trailing whitespace. Addendum to 34593d93
.
Excluded: 3rd-party code (incl. wine) and most of the win32ss.
This commit is contained in:
parent
bbabe2489e
commit
9393fc320e
701 changed files with 14685 additions and 14693 deletions
|
@ -12,7 +12,7 @@
|
|||
|
||||
NESTED_ENTRY _start
|
||||
PROLOG_END _start
|
||||
|
||||
|
||||
#ifdef _BEAGLE_ // This is only used for TI BootROM on Beagle/Emulator for now
|
||||
/*
|
||||
* On Beagle, the boot is directly from TI BootROM that reads NAND flash.
|
||||
|
@ -53,7 +53,7 @@
|
|||
.byte 2 // ARM
|
||||
.byte 2 // Kernel
|
||||
.byte 0 // No compression
|
||||
.ascii "ReactOS ARM Low-Level Bootloader"
|
||||
.ascii "ReactOS ARM Low-Level Bootloader"
|
||||
#endif
|
||||
|
||||
/* Load C entrypoint and setup LLB stack */
|
||||
|
|
|
@ -50,7 +50,7 @@ DbgPrint(const char *fmt, ...)
|
|||
va_start(args, fmt);
|
||||
i = vsprintf(Buffer, fmt, args);
|
||||
va_end(args);
|
||||
|
||||
|
||||
for (j = 0; j < i; j++) LlbSerialPutChar(Buffer[j]);
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -16,13 +16,13 @@ ULONG LlbEnvRamDiskSize = 0;
|
|||
ULONG LlbEnvHwRevision;
|
||||
CHAR LlbEnvCmdLine[256];
|
||||
CHAR LlbValueData[32];
|
||||
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
LlbEnvParseArguments(IN PATAG Arguments)
|
||||
{
|
||||
PATAG Atag;
|
||||
|
||||
|
||||
/* Parse the ATAGs */
|
||||
Atag = Arguments;
|
||||
while (Atag->Hdr.Size)
|
||||
|
@ -31,59 +31,59 @@ LlbEnvParseArguments(IN PATAG Arguments)
|
|||
switch (Atag->Hdr.Tag)
|
||||
{
|
||||
case ATAG_CORE:
|
||||
|
||||
|
||||
/* Save page size */
|
||||
LlbEnvHwPageSize = Atag->u.Core.PageSize;
|
||||
break;
|
||||
|
||||
|
||||
case ATAG_REVISION:
|
||||
|
||||
/* Save page size */
|
||||
LlbEnvHwRevision = Atag->u.Revision.Rev;
|
||||
break;
|
||||
|
||||
|
||||
case ATAG_MEM:
|
||||
|
||||
|
||||
/* Save RAM start and size */
|
||||
if (!LlbEnvHwMemStart) LlbEnvHwMemStart = Atag->u.Mem.Start;
|
||||
LlbEnvHwMemSize += Atag->u.Mem.Size;
|
||||
break;
|
||||
|
||||
|
||||
case ATAG_INITRD2:
|
||||
|
||||
|
||||
/* Save RAMDISK start and size */
|
||||
LlbEnvRamDiskStart = Atag->u.InitRd2.Start;
|
||||
LlbEnvRamDiskSize = Atag->u.InitRd2.Size;
|
||||
|
||||
|
||||
#ifdef _BEAGLE_
|
||||
/* Make sure it's 16MB-aligned */
|
||||
LlbEnvRamDiskSize = (LlbEnvRamDiskSize + (16 * 1024 * 1024) - 1)
|
||||
LlbEnvRamDiskSize = (LlbEnvRamDiskSize + (16 * 1024 * 1024) - 1)
|
||||
&~ ((16 * 1024 * 1024) - 1);
|
||||
|
||||
|
||||
/* The RAMDISK actually starts 16MB later */
|
||||
LlbEnvRamDiskStart += 16 * 1024 * 1024;
|
||||
LlbEnvRamDiskSize -= 16 * 1024 * 1024;
|
||||
#endif
|
||||
break;
|
||||
|
||||
|
||||
case ATAG_CMDLINE:
|
||||
|
||||
|
||||
/* Save command line */
|
||||
strncpy(LlbEnvCmdLine,
|
||||
Atag->u.CmdLine.CmdLine,
|
||||
Atag->Hdr.Size * sizeof(ULONG));
|
||||
break;
|
||||
|
||||
|
||||
/* Nothing left to handle */
|
||||
case ATAG_NONE:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
/* Next tag */
|
||||
Atag = (PATAG)((PULONG)Atag + Atag->Hdr.Size);
|
||||
}
|
||||
|
||||
|
||||
/* For debugging */
|
||||
DbgPrint("[BOOTROM] Board Revision: %lx PageSize: %dKB RAM: %dMB CMDLINE: %s\n"
|
||||
"[RAMDISK] Base: %lx Size: %dMB\n",
|
||||
|
@ -115,7 +115,7 @@ LlbEnvGetRamDiskInformation(IN PULONG Base,
|
|||
*Size = 0;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
/* Return ramdisk information */
|
||||
*Base = LlbEnvRamDiskStart;
|
||||
*Size = LlbEnvRamDiskSize;
|
||||
|
@ -128,7 +128,7 @@ LlbEnvRead(IN PCHAR ValueName)
|
|||
{
|
||||
PCHAR ValuePointer;
|
||||
ULONG Length = 0;
|
||||
|
||||
|
||||
/* Search for the value name */
|
||||
ValuePointer = strstr(LlbEnvCmdLine, ValueName);
|
||||
if (ValuePointer)
|
||||
|
@ -145,11 +145,11 @@ LlbEnvRead(IN PCHAR ValueName)
|
|||
/* Stop before the string ends */
|
||||
Length = strlen(ValuePointer);
|
||||
}
|
||||
|
||||
|
||||
/* Copy it */
|
||||
strncpy(LlbValueData, ValuePointer, Length);
|
||||
}
|
||||
|
||||
|
||||
/* Terminate the data */
|
||||
LlbValueData[Length] = ANSI_NULL;
|
||||
|
||||
|
|
|
@ -72,7 +72,7 @@ LlbFwVideoGetDisplaySize(OUT PULONG Width,
|
|||
/* Query static settings */
|
||||
*Width = LlbHwGetScreenWidth() / 8;
|
||||
*Height = LlbHwGetScreenHeight() / 16;
|
||||
|
||||
|
||||
/* Depth is always 16 bpp */
|
||||
*Depth = 16;
|
||||
}
|
||||
|
@ -92,7 +92,7 @@ LlbFwVideoPutChar(IN INT c,
|
|||
{
|
||||
ULONG Color, BackColor;
|
||||
PUSHORT Buffer;
|
||||
|
||||
|
||||
/* Convert EGA index to color used by hardware */
|
||||
Color = LlbHwVideoCreateColor(ColorPalette[Attr & 0xF][0],
|
||||
ColorPalette[Attr & 0xF][1],
|
||||
|
@ -100,10 +100,10 @@ LlbFwVideoPutChar(IN INT c,
|
|||
BackColor = LlbHwVideoCreateColor(ColorPalette[Attr >> 4][0],
|
||||
ColorPalette[Attr >> 4][1],
|
||||
ColorPalette[Attr >> 4][2]);
|
||||
|
||||
|
||||
/* Compute buffer address */
|
||||
Buffer = (PUSHORT)LlbHwGetFrameBuffer() + (LlbHwGetScreenWidth() * (Y * 16)) + (X * 8);
|
||||
|
||||
|
||||
/* Draw it */
|
||||
LlbVideoDrawChar(c, Buffer, Color, BackColor);
|
||||
}
|
||||
|
|
|
@ -100,7 +100,7 @@ CHAR LlbHwScanCodeToAsciiTable[58][2] =
|
|||
{ 0,0 } ,
|
||||
{ ' ',' ' } ,
|
||||
};
|
||||
|
||||
|
||||
/* EXTENDED KEY TABLE *********************************************************/
|
||||
|
||||
UCHAR LlbHwExtendedScanCodeTable[128] =
|
||||
|
@ -143,14 +143,14 @@ UCHAR LlbHwExtendedScanCodeTable[128] =
|
|||
/* FUNCTIONS ******************************************************************/
|
||||
|
||||
USHORT LlbKbdLastScanCode;
|
||||
|
||||
|
||||
UCHAR
|
||||
NTAPI
|
||||
LlbKbdTranslateScanCode(IN USHORT ScanCode,
|
||||
IN PUCHAR KeyCode)
|
||||
{
|
||||
ULONG LastScanCode;
|
||||
|
||||
|
||||
/* Check for extended scan codes */
|
||||
if ((ScanCode == 0xE0) || (ScanCode == 0xE1))
|
||||
{
|
||||
|
@ -166,7 +166,7 @@ LlbKbdTranslateScanCode(IN USHORT ScanCode,
|
|||
LlbKbdLastScanCode = 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/* Only act on the break, not the make */
|
||||
if (ScanCode > 0x80) return 0;
|
||||
|
||||
|
@ -183,10 +183,10 @@ LlbKbdTranslateScanCode(IN USHORT ScanCode,
|
|||
{
|
||||
/* E0 extended codes */
|
||||
case 0xE0:
|
||||
|
||||
|
||||
/* Skip bogus codes */
|
||||
if ((ScanCode == 0x2A) || (ScanCode == 0x36)) return 0;
|
||||
|
||||
|
||||
/* Lookup the code for it */
|
||||
if (!LlbHwExtendedScanCodeTable[ScanCode]) return 0;
|
||||
*KeyCode = LlbHwExtendedScanCodeTable[ScanCode];
|
||||
|
@ -194,7 +194,7 @@ LlbKbdTranslateScanCode(IN USHORT ScanCode,
|
|||
|
||||
/* E1 extended codes */
|
||||
case 0xE1:
|
||||
|
||||
|
||||
/* Only recognize one (the SYSREQ/PAUSE sequence) */
|
||||
if (ScanCode != 0x1D) return 0;
|
||||
LlbKbdLastScanCode = 0x100;
|
||||
|
@ -202,7 +202,7 @@ LlbKbdTranslateScanCode(IN USHORT ScanCode,
|
|||
|
||||
/* PAUSE sequence */
|
||||
case 0x100:
|
||||
|
||||
|
||||
/* Make sure it's the one */
|
||||
if (ScanCode != 0x45) return 0;
|
||||
*KeyCode = E1_PAUSE;
|
||||
|
@ -219,22 +219,22 @@ LlbKbdTranslateScanCode(IN USHORT ScanCode,
|
|||
/* Translation success */
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
CHAR
|
||||
NTAPI
|
||||
LlbKeyboardGetChar(VOID)
|
||||
{
|
||||
UCHAR ScanCode, KeyCode;
|
||||
|
||||
|
||||
do
|
||||
{
|
||||
/* Read the scan code and convert it to a virtual key code */
|
||||
ScanCode = LlbHwKbdRead();
|
||||
} while (!LlbKbdTranslateScanCode(ScanCode, &KeyCode));
|
||||
|
||||
|
||||
/* Is this ASCII? */
|
||||
if (KeyCode > 96) return ScanCode;
|
||||
|
||||
|
||||
/* Return the ASCII character */
|
||||
return LlbHwScanCodeToAsciiTable[KeyCode][0];
|
||||
}
|
||||
|
|
|
@ -23,18 +23,18 @@ UCHAR KeyMatrix[8][8] =
|
|||
};
|
||||
|
||||
/* FUNCTIONS ******************************************************************/
|
||||
|
||||
|
||||
CHAR
|
||||
NTAPI
|
||||
LlbKeypadGetChar(VOID)
|
||||
{
|
||||
UCHAR ScanCode;
|
||||
UCHAR Col, Row;
|
||||
|
||||
|
||||
ScanCode = LlbHwKbdRead();
|
||||
Col = ScanCode >> 4;
|
||||
Row = ScanCode & 0xF;
|
||||
|
||||
|
||||
/* Return the ASCII character */
|
||||
return KeyMatrix[Col][Row];
|
||||
}
|
||||
|
|
|
@ -34,7 +34,7 @@ NTAPI
|
|||
LlbHwGetSerialUart(VOID)
|
||||
{
|
||||
return 3;
|
||||
}
|
||||
}
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
|
@ -70,7 +70,7 @@ LlbHwGetScreenHeight(VOID)
|
|||
{
|
||||
return 720;
|
||||
}
|
||||
|
||||
|
||||
PVOID
|
||||
NTAPI
|
||||
LlbHwGetFrameBuffer(VOID)
|
||||
|
@ -102,28 +102,28 @@ LlbHwBuildMemoryMap(IN PBIOS_MEMORY_MAP MemoryMap)
|
|||
{
|
||||
PBIOS_MEMORY_MAP MapEntry;
|
||||
ULONG Base, Size, FsBase, FsSize;
|
||||
|
||||
|
||||
/* Parse hardware memory map */
|
||||
MapEntry = LlbHwOmap3MemoryMap;
|
||||
while (MapEntry->Length)
|
||||
{
|
||||
/* Add this entry */
|
||||
LlbAllocateMemoryEntry(MapEntry->Type, MapEntry->BaseAddress, MapEntry->Length);
|
||||
|
||||
|
||||
/* Move to the next one */
|
||||
MapEntry++;
|
||||
}
|
||||
|
||||
|
||||
/* Query memory and RAMDISK information */
|
||||
LlbEnvGetMemoryInformation(&Base, &Size);
|
||||
LlbEnvGetRamDiskInformation(&FsBase, &FsSize);
|
||||
|
||||
|
||||
/* Add-in the size of the ramdisk */
|
||||
Base = FsBase + FsSize;
|
||||
|
||||
|
||||
/* Subtract size of ramdisk and anything else before it */
|
||||
Size -= Base;
|
||||
|
||||
|
||||
/* Allocate an entry for it */
|
||||
LlbAllocateMemoryEntry(BiosMemoryUsable, Base, Size);
|
||||
}
|
||||
|
|
|
@ -41,13 +41,13 @@ LlbHwGetUartBase(IN ULONG Port)
|
|||
}
|
||||
else if (Port == 2)
|
||||
{
|
||||
return 0x4806C000;
|
||||
return 0x4806C000;
|
||||
}
|
||||
else if (Port == 3)
|
||||
{
|
||||
return 0x49020000;
|
||||
return 0x49020000;
|
||||
}
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -38,14 +38,14 @@ NTAPI
|
|||
LlbHwGetSerialUart(VOID)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
ULONG
|
||||
LlbHwRtcRead(VOID)
|
||||
{
|
||||
/* Issue the GET_TIME request on the RTC control register */
|
||||
LlbHwOmap3TwlWrite1(0x4B, 0x29, 0x41);
|
||||
|
||||
|
||||
/* Read the BCD registers and convert them */
|
||||
LlbTime.Second = BCD_INT(LlbHwOmap3TwlRead1(0x4B, 0x1C));
|
||||
LlbTime.Minute = BCD_INT(LlbHwOmap3TwlRead1(0x4B, 0x1D));
|
||||
|
|
|
@ -61,18 +61,18 @@ LlbHwBuildMemoryMap(IN PBIOS_MEMORY_MAP MemoryMap)
|
|||
{
|
||||
PBIOS_MEMORY_MAP MapEntry;
|
||||
ULONG Base, Size, FsBase, FsSize;
|
||||
|
||||
|
||||
/* Parse hardware memory map */
|
||||
MapEntry = LlbHwOmap3MemoryMap;
|
||||
while (MapEntry->Length)
|
||||
{
|
||||
/* Add this entry */
|
||||
LlbAllocateMemoryEntry(MapEntry->Type, MapEntry->BaseAddress, MapEntry->Length);
|
||||
|
||||
|
||||
/* Move to the next one */
|
||||
MapEntry++;
|
||||
}
|
||||
|
||||
|
||||
/* Query memory and RAMDISK information */
|
||||
LlbEnvGetMemoryInformation(&Base, &Size);
|
||||
LlbEnvGetRamDiskInformation(&FsBase, &FsSize);
|
||||
|
@ -80,10 +80,10 @@ LlbHwBuildMemoryMap(IN PBIOS_MEMORY_MAP MemoryMap)
|
|||
#ifdef _BEAGLE_
|
||||
/* Add-in the size of the ramdisk */
|
||||
Base = FsBase + FsSize;
|
||||
|
||||
|
||||
/* Subtract size of ramdisk and anything else before it */
|
||||
Size -= Base;
|
||||
|
||||
|
||||
/* Allocate an entry for it */
|
||||
LlbAllocateMemoryEntry(BiosMemoryUsable, Base, Size);
|
||||
#endif
|
||||
|
@ -95,10 +95,10 @@ LlbHwInitialize(VOID)
|
|||
{
|
||||
/* Setup the UART (NS16550) */
|
||||
LlbHwOmap3UartInitialize();
|
||||
|
||||
|
||||
/* Setup the NEC WVGA LCD Panel and the Display Controller */
|
||||
LlbHwOmap3LcdInitialize();
|
||||
|
||||
|
||||
/* Setup the keyboard */
|
||||
LlbHwOmap3SynKpdInitialize();
|
||||
}
|
||||
|
|
|
@ -34,7 +34,7 @@ LlbHwOmap3LcdInitialize(VOID)
|
|||
/* Now turn on the functional and interface clocks in the CORE domain */
|
||||
WRITE_REGISTER_ULONG(0x48004a00, 0x03fffe29); /* Functional clocks */
|
||||
WRITE_REGISTER_ULONG(0x48004a10, 0x3ffffffb); /* Interface clocks */
|
||||
|
||||
|
||||
/* The HS I2C interface is now on, configure it */
|
||||
WRITE_REGISTER_USHORT(0x48070024, 0x0); /* Disable I2c */
|
||||
WRITE_REGISTER_USHORT(0x48070030, 0x17); /* Configure clock divider */
|
||||
|
@ -44,7 +44,7 @@ LlbHwOmap3LcdInitialize(VOID)
|
|||
WRITE_REGISTER_USHORT(0x4807000c, 0x636f); /* Select wakeup bits */
|
||||
WRITE_REGISTER_USHORT(0x48070014, 0x4343); /* Disable DMA */
|
||||
WRITE_REGISTER_USHORT(0x48070024, 0x8000); /* Enable I2C */
|
||||
|
||||
|
||||
/*
|
||||
* Set the VPLL2 to cover all device groups instead of just P3.
|
||||
* This essentially enables the VRRTC to power up the LCD panel.
|
||||
|
@ -59,7 +59,7 @@ LlbHwOmap3LcdInitialize(VOID)
|
|||
|
||||
/* Set GPIO pin 7 signal on the TWL4030 ON. This powers the LCD backlight */
|
||||
LlbHwOmap3TwlWrite1(0x49, 0xA4, 0x80);
|
||||
|
||||
|
||||
/* Now go on the McSPI interface and program it on for the channel */
|
||||
WRITE_REGISTER_ULONG(0x48098010, 0x15);
|
||||
WRITE_REGISTER_ULONG(0x48098020, 0x1);
|
||||
|
@ -77,7 +77,7 @@ LlbHwOmap3LcdInitialize(VOID)
|
|||
|
||||
/* Reset the Display Controller (DISPC) */
|
||||
WRITE_REGISTER_ULONG(0x48050410, 0x00000005); // DISPC_SYSCONFIG
|
||||
|
||||
|
||||
/* Set the frame buffer address */
|
||||
WRITE_REGISTER_ULONG(0x48050480, 0x800A0000); // DISPC_GFX_BA0
|
||||
|
||||
|
@ -102,7 +102,7 @@ LlbHwGetScreenWidth(VOID)
|
|||
{
|
||||
return 800;
|
||||
}
|
||||
|
||||
|
||||
ULONG
|
||||
NTAPI
|
||||
LlbHwGetScreenHeight(VOID)
|
||||
|
|
|
@ -19,13 +19,13 @@ LlbHwOmap3SynKpdInitialize(VOID)
|
|||
|
||||
/* Set GPIO pin 8 signal on the TWL4030 ON. This powers the keypad backlight */
|
||||
LlbHwOmap3TwlWrite1(0x49, 0xA4, 0xC0);
|
||||
|
||||
|
||||
/* Set PENDDIS and COR on the the keypad interrupt controller */
|
||||
LlbHwOmap3TwlWrite1(0x4A, 0xE9, 0x06);
|
||||
|
||||
/* Only falling edge detection for key pressed */
|
||||
LlbHwOmap3TwlWrite1(0x4A, 0xE8, 0x01);
|
||||
|
||||
|
||||
/* Unmask key-pressed events */
|
||||
LlbHwOmap3TwlWrite1(0x4A, 0xE4, 0x0E);
|
||||
|
||||
|
@ -46,10 +46,10 @@ LlbHwKbdReady(VOID)
|
|||
|
||||
Value = LlbHwOmap3TwlRead1(0x4A, 0xE3);
|
||||
if (!Value) return FALSE;
|
||||
|
||||
|
||||
LastState ^= 1;
|
||||
if (!LastState) return FALSE;
|
||||
|
||||
|
||||
/* Return whether or not an interrupt is pending */
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -59,7 +59,7 @@ NTAPI
|
|||
LlbHwKbdRead(VOID)
|
||||
{
|
||||
UCHAR ActiveCol = 0, ActiveRow = 0, col, coldata, row;
|
||||
|
||||
|
||||
for (col = 0; col < 8; col++)
|
||||
{
|
||||
coldata = LlbHwOmap3TwlRead1(0x4A, 0xDB + col);
|
||||
|
@ -76,7 +76,7 @@ LlbHwKbdRead(VOID)
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return ((ActiveCol << 4) | ActiveRow);
|
||||
}
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ LlbHwOmap3TwlRead1(IN UCHAR ChipAddress,
|
|||
IN UCHAR RegisterAddress)
|
||||
{
|
||||
volatile int i = 1000;
|
||||
|
||||
|
||||
/* Select the register */
|
||||
LlbHwOmap3TwlWrite(ChipAddress, RegisterAddress, 0, NULL);
|
||||
|
||||
|
@ -43,7 +43,7 @@ LlbHwOmap3TwlWrite(IN UCHAR ChipAddress,
|
|||
/* Enable master transmit mode */
|
||||
WRITE_REGISTER_USHORT(0x48070024, 0x8601);
|
||||
WRITE_REGISTER_USHORT(0x4807001c, RegisterAddress);
|
||||
|
||||
|
||||
/* Loop each byte */
|
||||
for (j = 0; j < Length; j++)
|
||||
{
|
||||
|
|
|
@ -55,7 +55,7 @@ LlbHwGetUartBase(IN ULONG Port)
|
|||
{
|
||||
return 0x10000000;
|
||||
}
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -14,10 +14,10 @@ LlbSerialPutChar(IN CHAR c)
|
|||
{
|
||||
/* Properly support new-lines */
|
||||
if (c == '\n') LlbSerialPutChar('\r');
|
||||
|
||||
|
||||
/* Wait for ready */
|
||||
while (!LlbHwUartTxReady());
|
||||
|
||||
|
||||
/* Send character */
|
||||
LlbHwUartSendChar(c);
|
||||
}
|
||||
|
|
|
@ -48,7 +48,7 @@ LlbConvertRtcTime(IN ULONG RtcTime,
|
|||
|
||||
/* Get the year, based on days since 1970 */
|
||||
Year = 1970 + Days / 365;
|
||||
|
||||
|
||||
/* Account for leap years which changed the number of days/year */
|
||||
Days -= (Year - 1970) * 365 + LEAPS_THRU_END_OF(Year - 1) - LEAPS_THRU_END_OF(1970 - 1);
|
||||
if (Days < 0)
|
||||
|
@ -64,8 +64,8 @@ LlbConvertRtcTime(IN ULONG RtcTime,
|
|||
/* How many days in this month? */
|
||||
DaysLeft = Days - LlbDayOfMonth(Month, Year);
|
||||
if (DaysLeft < 0) break;
|
||||
|
||||
/* How many days left total? */
|
||||
|
||||
/* How many days left total? */
|
||||
Days = DaysLeft;
|
||||
}
|
||||
|
||||
|
|
|
@ -31,11 +31,11 @@ LlbHwVersaClcdInitialize(VOID)
|
|||
/* Set framebuffer address */
|
||||
WRITE_REGISTER_ULONG(PL110_LCDUPBASE, (ULONG)LlbHwGetFrameBuffer());
|
||||
WRITE_REGISTER_ULONG(PL110_LCDLPBASE, (ULONG)LlbHwGetFrameBuffer());
|
||||
|
||||
|
||||
/* Initialize timings to 720x400 */
|
||||
WRITE_REGISTER_ULONG(PL110_LCDTIMING0, LCDTIMING0_PPL(LlbHwGetScreenWidth()));
|
||||
WRITE_REGISTER_ULONG(PL110_LCDTIMING1, LCDTIMING1_LPP(LlbHwGetScreenHeight()));
|
||||
|
||||
|
||||
/* Enable the TFT/LCD Display */
|
||||
WRITE_REGISTER_ULONG(PL110_LCDCONTROL,
|
||||
LCDCONTROL_LCDEN |
|
||||
|
@ -50,7 +50,7 @@ LlbHwGetScreenWidth(VOID)
|
|||
{
|
||||
return 720;
|
||||
}
|
||||
|
||||
|
||||
ULONG
|
||||
NTAPI
|
||||
LlbHwGetScreenHeight(VOID)
|
||||
|
|
|
@ -74,28 +74,28 @@ LlbHwBuildMemoryMap(IN PBIOS_MEMORY_MAP MemoryMap)
|
|||
{
|
||||
PBIOS_MEMORY_MAP MapEntry;
|
||||
ULONG Base, Size, FsBase, FsSize;
|
||||
|
||||
|
||||
/* Parse hardware memory map */
|
||||
MapEntry = LlbHwVersaMemoryMap;
|
||||
while (MapEntry->Length)
|
||||
{
|
||||
/* Add this entry */
|
||||
LlbAllocateMemoryEntry(MapEntry->Type, MapEntry->BaseAddress, MapEntry->Length);
|
||||
|
||||
|
||||
/* Move to the next one */
|
||||
MapEntry++;
|
||||
}
|
||||
|
||||
|
||||
/* Query memory and RAMDISK information */
|
||||
LlbEnvGetMemoryInformation(&Base, &Size);
|
||||
LlbEnvGetRamDiskInformation(&FsBase, &FsSize);
|
||||
|
||||
|
||||
/* Add-in the size of the ramdisk */
|
||||
Base = FsBase + FsSize;
|
||||
|
||||
|
||||
/* Subtract size of ramdisk and anything else before it */
|
||||
Size -= Base;
|
||||
|
||||
|
||||
/* Allocate an entry for it */
|
||||
LlbAllocateMemoryEntry(BiosMemoryUsable, Base, Size);
|
||||
}
|
||||
|
|
|
@ -14,10 +14,10 @@ LlbHwInitialize(VOID)
|
|||
{
|
||||
/* Setup the CLCD (PL110) */
|
||||
LlbHwVersaClcdInitialize();
|
||||
|
||||
|
||||
/* Setup the UART (PL011) */
|
||||
LlbHwVersaUartInitialize();
|
||||
|
||||
|
||||
/* Setup the KMI (PL050) */
|
||||
LlbHwVersaKmiInitialize();
|
||||
}
|
||||
|
@ -32,20 +32,20 @@ LlbHwLoadOsLoaderFromRam(VOID)
|
|||
ULONG Base, RootFs, Size;
|
||||
PCHAR Offset;
|
||||
CHAR CommandLine[64];
|
||||
|
||||
|
||||
/* On versatile we load the RAMDISK with initrd */
|
||||
LlbEnvGetRamDiskInformation(&RootFs, &Size);
|
||||
|
||||
|
||||
/* The OS Loader is at 0x20000, always */
|
||||
Base = 0x20000;
|
||||
|
||||
|
||||
/* Read image offset */
|
||||
Offset = LlbEnvRead("rdoffset");
|
||||
|
||||
|
||||
/* Set parameters for the OS loader */
|
||||
sprintf(CommandLine, "rdbase=0x%x rdsize=0x%x rdoffset=%s", RootFs, Size, Offset);
|
||||
LlbSetCommandLine(CommandLine);
|
||||
|
||||
|
||||
/* Return the OS loader base address */
|
||||
return (POSLOADER_INIT)Base;
|
||||
}
|
||||
|
|
|
@ -64,13 +64,13 @@ NTAPI
|
|||
LlbHwVersaKmiSendAndWait(IN ULONG Value)
|
||||
{
|
||||
volatile int i = 1000;
|
||||
|
||||
|
||||
/* Send the value */
|
||||
LlbHwKbdSend(Value);
|
||||
|
||||
|
||||
/* Wait a bit */
|
||||
while (--i);
|
||||
|
||||
|
||||
/* Now make sure we received an ACK */
|
||||
if (LlbHwKbdRead() != PS2_I_ACK) DbgPrint("PS/2 FAILURE!\n");
|
||||
}
|
||||
|
@ -80,7 +80,7 @@ NTAPI
|
|||
LlbHwVersaKmiInitialize(VOID)
|
||||
{
|
||||
UCHAR Divisor;
|
||||
|
||||
|
||||
/* Setup divisor and enable KMI */
|
||||
Divisor = (LlbHwGetPClk() / 8000000) - 1;
|
||||
WRITE_REGISTER_UCHAR(PL050_KMICLKDIV, Divisor);
|
||||
|
@ -104,13 +104,13 @@ LlbHwKbdSend(IN ULONG Value)
|
|||
{
|
||||
ULONG Status;
|
||||
|
||||
/* Wait for ready signal */
|
||||
/* Wait for ready signal */
|
||||
do
|
||||
{
|
||||
/* Read TX buffer state */
|
||||
Status = READ_REGISTER_UCHAR(PL050_KMISTAT);
|
||||
} while (!(Status & KMISTAT_TXEMPTY));
|
||||
|
||||
|
||||
/* Send value */
|
||||
WRITE_REGISTER_UCHAR(PL050_KMIDATA, Value);
|
||||
}
|
||||
|
|
|
@ -53,26 +53,26 @@ LlbHwVersaUartInitialize(VOID)
|
|||
/* Query peripheral rate, hardcore baudrate */
|
||||
ClockRate = LlbHwGetPClk();
|
||||
Baudrate = 115200;
|
||||
|
||||
|
||||
/* Calculate baudrate clock divider and remainder */
|
||||
Divider = ClockRate / (16 * Baudrate);
|
||||
Remainder = ClockRate % (16 * Baudrate);
|
||||
|
||||
|
||||
/* Calculate the fractional part */
|
||||
Fraction = (8 * Remainder / Baudrate) >> 1;
|
||||
Fraction += (8 * Remainder / Baudrate) & 1;
|
||||
|
||||
|
||||
/* Disable interrupts */
|
||||
WRITE_REGISTER_ULONG(UART_PL011_CR, 0);
|
||||
|
||||
|
||||
/* Set the baud rate to 115200 bps */
|
||||
WRITE_REGISTER_ULONG(UART_PL011_IBRD, Divider);
|
||||
WRITE_REGISTER_ULONG(UART_PL011_FBRD, Fraction);
|
||||
|
||||
|
||||
/* Set 8 bits for data, 1 stop bit, no parity, FIFO enabled */
|
||||
WRITE_REGISTER_ULONG(UART_PL011_LCRH,
|
||||
UART_PL011_LCRH_WLEN_8 | UART_PL011_LCRH_FEN);
|
||||
|
||||
|
||||
/* Clear and enable FIFO */
|
||||
WRITE_REGISTER_ULONG(UART_PL011_CR,
|
||||
UART_PL011_CR_UARTEN |
|
||||
|
@ -106,9 +106,9 @@ LlbHwGetUartBase(IN ULONG Port)
|
|||
}
|
||||
else if (Port == 1)
|
||||
{
|
||||
return 0x101F2000;
|
||||
return 0x101F2000;
|
||||
}
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -299,7 +299,7 @@ LlbVideoDrawChar(IN UCHAR c,
|
|||
Buffer[x] = (Line & 1) ? Color : BackColor;
|
||||
Line >>= 1;
|
||||
}
|
||||
|
||||
|
||||
/* Next line */
|
||||
Buffer += ScreenWidth;
|
||||
}
|
||||
|
@ -312,11 +312,11 @@ LlbVideoClearScreen(IN BOOLEAN OsLoader)
|
|||
ULONG ScreenSize, p;
|
||||
ULONG BackColor;
|
||||
PUSHORT VideoBuffer;
|
||||
|
||||
|
||||
/* Get frame buffer and reset cursor position */
|
||||
VideoBuffer = LlbHwGetFrameBuffer();
|
||||
ScreenCursor = 0;
|
||||
|
||||
|
||||
/* Backcolor on this machine */
|
||||
if (OsLoader)
|
||||
{
|
||||
|
@ -333,10 +333,10 @@ LlbVideoClearScreen(IN BOOLEAN OsLoader)
|
|||
#endif
|
||||
BackColor = (BackColor << 16) | BackColor;
|
||||
}
|
||||
|
||||
|
||||
/* Screen size on this machine */
|
||||
ScreenSize = LlbHwGetScreenWidth() * LlbHwGetScreenHeight();
|
||||
|
||||
|
||||
/* Clear the screen with the given color */
|
||||
for (p = 0; p < ScreenSize * 2; p += 4)
|
||||
{
|
||||
|
@ -349,14 +349,14 @@ NTAPI
|
|||
LlbVideoPutChar(IN UCHAR c)
|
||||
{
|
||||
ULONG cx, cy, CharsPerLine, BackColor, ScreenWidth;
|
||||
|
||||
|
||||
/* Backcolor on this machine */
|
||||
#ifdef BLUE_SCREEN
|
||||
BackColor = LlbHwVideoCreateColor(14, 0, 82);
|
||||
#else
|
||||
BackColor = LlbHwVideoCreateColor(0, 0, 0);
|
||||
#endif
|
||||
|
||||
|
||||
/* Amount of characters in a line */
|
||||
ScreenWidth = LlbHwGetScreenWidth();
|
||||
CharsPerLine = ScreenWidth / 8;
|
||||
|
@ -366,7 +366,7 @@ LlbVideoPutChar(IN UCHAR c)
|
|||
{
|
||||
/* Move a line down */
|
||||
ScreenCursor += CharsPerLine - (ScreenCursor % CharsPerLine);
|
||||
|
||||
|
||||
/* FIXME: Scrolling */
|
||||
}
|
||||
else
|
||||
|
|
|
@ -69,7 +69,7 @@ VOID
|
|||
LlbFwVideoClearScreen(
|
||||
IN UCHAR Attr
|
||||
);
|
||||
|
||||
|
||||
VOID
|
||||
LlbFwVideoPutChar(
|
||||
IN INT c,
|
||||
|
|
|
@ -17,7 +17,7 @@ NTAPI
|
|||
LlbHwGetScreenWidth(
|
||||
VOID
|
||||
);
|
||||
|
||||
|
||||
ULONG
|
||||
NTAPI
|
||||
LlbHwGetScreenHeight(
|
||||
|
@ -55,7 +55,7 @@ NTAPI
|
|||
LlbHwGetTmr0Base(
|
||||
VOID
|
||||
);
|
||||
|
||||
|
||||
ULONG
|
||||
NTAPI
|
||||
LlbHwGetUartBase(
|
||||
|
@ -67,7 +67,7 @@ NTAPI
|
|||
LlbHwGetSerialUart(
|
||||
VOID
|
||||
);
|
||||
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
LlbHwUartSendChar(
|
||||
|
|
|
@ -26,5 +26,5 @@ LlbVideoDrawChar(
|
|||
IN USHORT Color,
|
||||
IN USHORT BackColor
|
||||
);
|
||||
|
||||
|
||||
/* EOF */
|
||||
|
|
|
@ -21,13 +21,13 @@ LlbStartup(IN ULONG Reserved,
|
|||
|
||||
/* Either QEMU or U-Boot itself should send this information */
|
||||
LlbEnvParseArguments(Arguments);
|
||||
|
||||
|
||||
/* Clean up the screen */
|
||||
LlbVideoClearScreen(FALSE);
|
||||
|
||||
/* Print header */
|
||||
printf("\nReactOS ARM Low-Level Boot Loader [" __DATE__ " "__TIME__ "]\n");
|
||||
|
||||
|
||||
/* Boot the OS Loader */
|
||||
LlbBoot();
|
||||
while (TRUE);
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
BIOS_MEMORY_MAP MemoryMap[32];
|
||||
ARM_BOARD_CONFIGURATION_BLOCK ArmBlock;
|
||||
POSLOADER_INIT LoaderInit;
|
||||
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
LlbAllocateMemoryEntry(IN BIOS_MEMORY_TYPE Type,
|
||||
|
@ -19,16 +19,16 @@ LlbAllocateMemoryEntry(IN BIOS_MEMORY_TYPE Type,
|
|||
IN ULONG Length)
|
||||
{
|
||||
PBIOS_MEMORY_MAP Entry;
|
||||
|
||||
|
||||
/* Get the next memory entry */
|
||||
Entry = MemoryMap;
|
||||
while (Entry->Length) Entry++;
|
||||
|
||||
|
||||
/* Fill it out */
|
||||
Entry->Length = Length;
|
||||
Entry->BaseAddress = BaseAddress;
|
||||
Entry->Type = Type;
|
||||
|
||||
|
||||
/* Block count */
|
||||
ArmBlock.MemoryMapEntryCount++;
|
||||
}
|
||||
|
@ -48,27 +48,27 @@ LlbBuildArmBlock(VOID)
|
|||
/* Write version number */
|
||||
ArmBlock.MajorVersion = ARM_BOARD_CONFIGURATION_MAJOR_VERSION;
|
||||
ArmBlock.MinorVersion = ARM_BOARD_CONFIGURATION_MINOR_VERSION;
|
||||
|
||||
|
||||
/* Get arch type */
|
||||
ArmBlock.BoardType = LlbHwGetBoardType();
|
||||
|
||||
|
||||
/* Get peripheral clock rate */
|
||||
ArmBlock.ClockRate = LlbHwGetPClk();
|
||||
|
||||
|
||||
/* Get timer and serial port base addresses */
|
||||
ArmBlock.TimerRegisterBase = LlbHwGetTmr0Base();
|
||||
ArmBlock.UartRegisterBase = LlbHwGetUartBase(LlbHwGetSerialUart());
|
||||
|
||||
|
||||
/* Debug */
|
||||
DbgPrint("Machine Identifier: %lx\nPCLK: %d\nTIMER 0: %p\nSERIAL UART: %p\n",
|
||||
ArmBlock.BoardType,
|
||||
ArmBlock.ClockRate,
|
||||
ArmBlock.TimerRegisterBase,
|
||||
ArmBlock.UartRegisterBase);
|
||||
|
||||
|
||||
/* Now load the memory map */
|
||||
ArmBlock.MemoryMap = MemoryMap;
|
||||
|
||||
|
||||
/* Write firmware callbacks */
|
||||
ArmBlock.ConsPutChar = LlbFwPutChar;
|
||||
ArmBlock.ConsKbHit = LlbFwKbHit;
|
||||
|
@ -101,24 +101,24 @@ LlbHwLoadOsLoaderFromRam(VOID)
|
|||
ULONG Base, RootFs, Size;
|
||||
PCHAR Offset;
|
||||
CHAR CommandLine[64];
|
||||
|
||||
|
||||
/* On versatile we load the RAMDISK with initrd */
|
||||
LlbEnvGetRamDiskInformation(&RootFs, &Size);
|
||||
DbgPrint("Root fs: %lx, size: %lx\n", RootFs, Size);
|
||||
|
||||
|
||||
/* The OS Loader is at 0x20000, always */
|
||||
Base = 0x20000;
|
||||
|
||||
|
||||
/* Read image offset */
|
||||
Offset = LlbEnvRead("rdoffset");
|
||||
|
||||
|
||||
/* Set parameters for the OS loader */
|
||||
snprintf(CommandLine,
|
||||
sizeof(CommandLine),
|
||||
"rdbase=0x%lx rdsize=0x%lx rdoffset=%s",
|
||||
RootFs, Size, Offset);
|
||||
LlbSetCommandLine(CommandLine);
|
||||
|
||||
|
||||
/* Return the OS loader base address */
|
||||
return (POSLOADER_INIT)Base;
|
||||
}
|
||||
|
@ -128,7 +128,7 @@ NTAPI
|
|||
LlbLoadOsLoader(VOID)
|
||||
{
|
||||
PCHAR BootDevice;
|
||||
|
||||
|
||||
/* Read the current boot device */
|
||||
BootDevice = LlbEnvRead("boot-device");
|
||||
printf("Loading OS Loader from: %s...\n", BootDevice);
|
||||
|
@ -150,7 +150,7 @@ LlbLoadOsLoader(VOID)
|
|||
{
|
||||
//todo
|
||||
}
|
||||
|
||||
|
||||
LoaderInit = (PVOID)0x80000000;
|
||||
#ifdef _ZOOM2_ // need something better than this...
|
||||
LoaderInit = (PVOID)0x81070000;
|
||||
|
@ -164,10 +164,10 @@ LlbBoot(VOID)
|
|||
{
|
||||
/* Setup the ARM block */
|
||||
LlbBuildArmBlock();
|
||||
|
||||
|
||||
/* Build the memory map */
|
||||
LlbBuildMemoryMap();
|
||||
|
||||
|
||||
/* Load the OS loader */
|
||||
LlbLoadOsLoader();
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
@echo off
|
||||
ECHO
|
||||
ECHO
|
||||
ECHO Installing Programs...
|
||||
ECHO
|
||||
|
||||
|
@ -12,10 +12,10 @@ REM start /WAIT dbgprint.exe SYSREG_CHECKPOINT:ABIWORD_INSTALL_COMPLETE
|
|||
REM ECHO
|
||||
REM ECHO Installing OpenOffice
|
||||
REM ECHO
|
||||
REM START /WAIT openoffice.msi /Q
|
||||
REM START /WAIT openoffice.msi /Q
|
||||
REM start /WAIT dbgprint.exe SYSREG_CHECKPOINT:OPENOFFICE_INSTALL_COMPLETE
|
||||
|
||||
ECHO
|
||||
ECHO
|
||||
ECHO Informing Sysreg that we are done
|
||||
ECHO
|
||||
START dbgprint.exe SYSREG_CHECKPOINT:THIRDBOOT_COMPLETE
|
||||
|
|
|
@ -12,9 +12,9 @@ DestinationPartitionNumber = 1
|
|||
InstallationDirectory=ReactOS
|
||||
|
||||
; MBRInstallType=0 skips MBR installation
|
||||
; MBRInstallType=1 install MBR on floppy
|
||||
; MBRInstallType=1 install MBR on floppy
|
||||
; MBRInstallType=2 install MBR on hdd
|
||||
MBRInstallType=2
|
||||
MBRInstallType=2
|
||||
|
||||
FullName="MyName"
|
||||
;OrgName="MyOrg"
|
||||
|
|
|
@ -543,7 +543,7 @@ HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Print\Printers\Dummy Printer
|
|||
HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Print\Printers\Dummy Printer On LPT1","Printer Driver",,"Dummy Printer Driver"
|
||||
HKLM,"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Print\Printers\Dummy Printer On LPT1","Status",0x00010001,0
|
||||
|
||||
; Image File Execution Options (NtGlobalFlag with FLG_SHOW_LDR_SNAPS set for loadlib.exe)
|
||||
; Image File Execution Options (NtGlobalFlag with FLG_SHOW_LDR_SNAPS set for loadlib.exe)
|
||||
HKLM,"Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\loadlib.exe","GlobalFlag",0x00000000,"0x02000000"
|
||||
;HKLM,"Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\loaddll.exe","GlobalFlag",0x00010001,0x00000002
|
||||
;HKLM,"Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\soffice.exe","GlobalFlag",0x00010001,0x00000002
|
||||
|
|
|
@ -320,7 +320,7 @@ BmFwInitializeBootDirectoryPath (
|
|||
/* Try to open the boot device */
|
||||
Status = BlpDeviceOpen(BlpBootDevice,
|
||||
BL_DEVICE_READ_ACCESS,
|
||||
0,
|
||||
0,
|
||||
&DeviceHandle);
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
|
@ -2007,7 +2007,7 @@ Quickie:
|
|||
return Status;
|
||||
}
|
||||
|
||||
NTSTATUS
|
||||
NTSTATUS
|
||||
BmLaunchRecoverySequence (
|
||||
_In_ PBL_LOADED_APPLICATION_ENTRY BootEntry,
|
||||
_In_ ULONG LaunchCode
|
||||
|
@ -2095,7 +2095,7 @@ BmLaunchRecoverySequence (
|
|||
Quickie:
|
||||
/* Did we have a sequence of entries? */
|
||||
if (Sequence)
|
||||
{
|
||||
{
|
||||
/* Loop through each one */
|
||||
for (RecoveryIndex = 0; RecoveryIndex < Count; RecoveryIndex++)
|
||||
{
|
||||
|
@ -2118,7 +2118,7 @@ Quickie:
|
|||
/* Free it */
|
||||
BlMmFreeHeap(RecoverySequence);
|
||||
}
|
||||
|
||||
|
||||
/* Return back to caller */
|
||||
return Status;
|
||||
}
|
||||
|
@ -2840,7 +2840,7 @@ BmMain (
|
|||
|
||||
/* Copy the library parameters and add the re-initialization flag */
|
||||
RtlCopyMemory(&LibraryParameters,
|
||||
&BlpLibraryParameters,
|
||||
&BlpLibraryParameters,
|
||||
sizeof(LibraryParameters));
|
||||
LibraryParameters.LibraryFlags |= (BL_LIBRARY_FLAG_REINITIALIZE_ALL |
|
||||
BL_LIBRARY_FLAG_REINITIALIZE);
|
||||
|
|
|
@ -29,7 +29,7 @@ BOOT_APPLICATION_PARAMETER_BLOCK_SCRATCH EfiInitScratch;
|
|||
/*++
|
||||
* @name AhCreateLoadOptionsList
|
||||
*
|
||||
* The AhCreateLoadOptionsList routine
|
||||
* The AhCreateLoadOptionsList routine
|
||||
*
|
||||
* @param CommandLine
|
||||
* UEFI Image Handle for the current loaded application.
|
||||
|
@ -68,7 +68,7 @@ AhCreateLoadOptionsList (
|
|||
/*++
|
||||
* @name EfiInitpAppendPathString
|
||||
*
|
||||
* The EfiInitpAppendPathString routine
|
||||
* The EfiInitpAppendPathString routine
|
||||
*
|
||||
* @param DestinationPath
|
||||
* UEFI Image Handle for the current loaded application.
|
||||
|
@ -177,7 +177,7 @@ EfiInitpAppendPathString (
|
|||
/*++
|
||||
* @name EfiInitpConvertEfiDevicePath
|
||||
*
|
||||
* The EfiInitpConvertEfiDevicePath routine
|
||||
* The EfiInitpConvertEfiDevicePath routine
|
||||
*
|
||||
* @param DevicePath
|
||||
* UEFI Image Handle for the current loaded application.
|
||||
|
@ -294,7 +294,7 @@ Quickie:
|
|||
/*++
|
||||
* @name EfiInitpGetDeviceNode
|
||||
*
|
||||
* The EfiInitpGetDeviceNode routine
|
||||
* The EfiInitpGetDeviceNode routine
|
||||
*
|
||||
* @param DevicePath
|
||||
* UEFI Image Handle for the current loaded application.
|
||||
|
@ -332,7 +332,7 @@ EfiInitpGetDeviceNode (
|
|||
/*++
|
||||
* @name EfiInitTranslateDevicePath
|
||||
*
|
||||
* The EfiInitTranslateDevicePath routine
|
||||
* The EfiInitTranslateDevicePath routine
|
||||
*
|
||||
* @param DevicePath
|
||||
* UEFI Image Handle for the current loaded application.
|
||||
|
@ -455,7 +455,7 @@ EfiInitTranslateDevicePath (
|
|||
|
||||
/* Copy the signature GUID */
|
||||
RtlCopyMemory(&DeviceEntry->Partition.Gpt.PartitionGuid,
|
||||
DiskPath->Signature,
|
||||
DiskPath->Signature,
|
||||
sizeof(GUID));
|
||||
|
||||
DeviceEntry->Flags |= 4u;
|
||||
|
@ -491,7 +491,7 @@ EfiInitTranslateDevicePath (
|
|||
/*++
|
||||
* @name EfiInitpConvertEfiDevicePath
|
||||
*
|
||||
* The EfiInitpConvertEfiDevicePath routine
|
||||
* The EfiInitpConvertEfiDevicePath routine
|
||||
*
|
||||
* @param DevicePath
|
||||
* UEFI Image Handle for the current loaded application.
|
||||
|
@ -560,7 +560,7 @@ Quickie:
|
|||
/*++
|
||||
* @name EfiInitpCreateApplicationEntry
|
||||
*
|
||||
* The EfiInitpCreateApplicationEntry routine
|
||||
* The EfiInitpCreateApplicationEntry routine
|
||||
*
|
||||
* @param SystemTable
|
||||
* UEFI Image Handle for the current loaded application.
|
||||
|
|
|
@ -206,7 +206,7 @@ OslpRemoveInternalApplicationOptions (
|
|||
Status = STATUS_SUCCESS;
|
||||
|
||||
/* Remove attempts to disable integrity checks or ELAM driver load */
|
||||
BlRemoveBootOption(BlpApplicationEntry.BcdData,
|
||||
BlRemoveBootOption(BlpApplicationEntry.BcdData,
|
||||
BcdLibraryBoolean_DisableIntegrityChecks);
|
||||
BlRemoveBootOption(BlpApplicationEntry.BcdData,
|
||||
BcdOSLoaderBoolean_DisableElamDrivers);
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -177,7 +177,7 @@ C_ASSERT(BL_MM_INCLUDE_ONLY_FIRMWARE_MEMORY == 0x240);
|
|||
|
||||
#define BL_LOAD_PE_IMG_VIRTUAL_BUFFER BL_LOAD_IMG_VIRTUAL_BUFFER
|
||||
#define BL_LOAD_PE_IMG_CHECK_MACHINE 0x02
|
||||
#define BL_LOAD_PE_IMG_EXISTING_BUFFER BL_LOAD_IMG_EXISTING_BUFFER
|
||||
#define BL_LOAD_PE_IMG_EXISTING_BUFFER BL_LOAD_IMG_EXISTING_BUFFER
|
||||
#define BL_LOAD_PE_IMG_COMPUTE_HASH 0x10
|
||||
#define BL_LOAD_PE_IMG_CHECK_SUBSYSTEM 0x80
|
||||
#define BL_LOAD_PE_IMG_SKIP_RELOCATIONS 0x100
|
||||
|
@ -2411,7 +2411,7 @@ BlDisplayInvalidateOemBitmap (
|
|||
|
||||
PBITMAP
|
||||
BlDisplayGetOemBitmap (
|
||||
_Out_ PCOORD Offset,
|
||||
_Out_ PCOORD Offset,
|
||||
_Out_opt_ PULONG Flags
|
||||
);
|
||||
|
||||
|
@ -2806,7 +2806,7 @@ ConsolepClearBuffer (
|
|||
_In_ ULONG ScanlineWidth,
|
||||
_In_ ULONG PixelDepth
|
||||
);
|
||||
|
||||
|
||||
NTSTATUS
|
||||
ConsolepConvertColorToPixel (
|
||||
_In_ BL_COLOR Color,
|
||||
|
|
|
@ -30,7 +30,7 @@ _Archx86TransferTo32BitApplicationAsm:
|
|||
push esi
|
||||
push edi
|
||||
push ebx
|
||||
|
||||
|
||||
/* Save data segments */
|
||||
push es
|
||||
push ds
|
||||
|
|
|
@ -422,7 +422,7 @@ BlGetApplicationIdentifier (
|
|||
|
||||
NTSTATUS
|
||||
BlGetApplicationBaseAndSize (
|
||||
_Out_ PVOID* ImageBase,
|
||||
_Out_ PVOID* ImageBase,
|
||||
_Out_ PULONG ImageSize
|
||||
)
|
||||
{
|
||||
|
|
|
@ -367,8 +367,8 @@ Quickie:
|
|||
|
||||
NTSTATUS
|
||||
EfiOpenProtocol (
|
||||
_In_ EFI_HANDLE Handle,
|
||||
_In_ EFI_GUID *Protocol,
|
||||
_In_ EFI_HANDLE Handle,
|
||||
_In_ EFI_GUID *Protocol,
|
||||
_Outptr_ PVOID* Interface
|
||||
)
|
||||
{
|
||||
|
@ -971,7 +971,7 @@ EfiGetMemoryMap (
|
|||
|
||||
NTSTATUS
|
||||
EfiFreePages (
|
||||
_In_ ULONG Pages,
|
||||
_In_ ULONG Pages,
|
||||
_In_ EFI_PHYSICAL_ADDRESS PhysicalAddress
|
||||
)
|
||||
{
|
||||
|
@ -1295,7 +1295,7 @@ EfiGopGetFrameBuffer (
|
|||
NTSTATUS
|
||||
EfiGopGetCurrentMode (
|
||||
_In_ EFI_GRAPHICS_OUTPUT_PROTOCOL *GopInterface,
|
||||
_Out_ UINTN* Mode,
|
||||
_Out_ UINTN* Mode,
|
||||
_Out_ EFI_GRAPHICS_OUTPUT_MODE_INFORMATION *Information
|
||||
)
|
||||
{
|
||||
|
@ -2256,7 +2256,7 @@ LoopAgain:
|
|||
MmMdFreeDescriptor(Descriptor);
|
||||
goto Quickie;
|
||||
}
|
||||
|
||||
|
||||
/* Add it back as free memory */
|
||||
Status = MmMdAddDescriptorToList(MemoryMap,
|
||||
Descriptor,
|
||||
|
|
|
@ -1521,7 +1521,7 @@ BlockIoFirmwareOpen (
|
|||
|
||||
/* Free the device handle buffer array */
|
||||
BlMmFreeHeap(DeviceHandles);
|
||||
|
||||
|
||||
/* Return status */
|
||||
return Status;
|
||||
}
|
||||
|
@ -2260,7 +2260,7 @@ BlpDeviceOpen (
|
|||
/* It's a network device, call the UDP device handler */
|
||||
Status = UdpFunctionTable.Open(Device, DeviceEntry);
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
/* Unsupported type of device */
|
||||
Status = STATUS_NOT_IMPLEMENTED;
|
||||
|
|
|
@ -478,7 +478,7 @@ DsppReinitialize (
|
|||
{
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
||||
/* Now check our current graphical resolution */
|
||||
Status = ((PBL_GRAPHICS_CONSOLE_VTABLE)GraphicsConsole->TextConsole.Callbacks)->GetGraphicalResolution(GraphicsConsole,
|
||||
&CurrentResolution);
|
||||
|
|
|
@ -197,7 +197,7 @@ ConsoleEfiTextGetStateFromMode (
|
|||
NTSTATUS
|
||||
ConsoleFirmwareTextSetState (
|
||||
_In_ PBL_TEXT_CONSOLE TextConsole,
|
||||
_In_ UCHAR Mask,
|
||||
_In_ UCHAR Mask,
|
||||
_In_ PBL_DISPLAY_STATE State
|
||||
)
|
||||
{
|
||||
|
@ -554,8 +554,8 @@ ConsoleInputLocalEraseBuffer (
|
|||
}
|
||||
|
||||
NTSTATUS
|
||||
ConsoleFirmwareTextClear (
|
||||
_In_ PBL_TEXT_CONSOLE Console,
|
||||
ConsoleFirmwareTextClear (
|
||||
_In_ PBL_TEXT_CONSOLE Console,
|
||||
_In_ BOOLEAN LineOnly
|
||||
)
|
||||
{
|
||||
|
@ -573,7 +573,7 @@ ConsoleFirmwareTextClear (
|
|||
/* Get the current column and row */
|
||||
Column = Console->State.XPos / TextWidth;
|
||||
Row = Console->State.YPos / TextHeight;
|
||||
|
||||
|
||||
/* Loop over every remaining character */
|
||||
for (i = 0; i < Console->DisplayMode.HRes - Column - 1; i++)
|
||||
{
|
||||
|
|
|
@ -427,7 +427,7 @@ ConsoleGraphicalEnable (
|
|||
|
||||
NTSTATUS
|
||||
ConsoleGraphicalGetGraphicalResolution (
|
||||
_In_ PBL_GRAPHICS_CONSOLE Console,
|
||||
_In_ PBL_GRAPHICS_CONSOLE Console,
|
||||
_In_ PBL_DISPLAY_MODE DisplayMode
|
||||
)
|
||||
{
|
||||
|
@ -445,7 +445,7 @@ ConsoleGraphicalGetGraphicalResolution (
|
|||
|
||||
NTSTATUS
|
||||
ConsoleGraphicalGetOriginalResolution (
|
||||
_In_ PBL_GRAPHICS_CONSOLE Console,
|
||||
_In_ PBL_GRAPHICS_CONSOLE Console,
|
||||
_In_ PBL_DISPLAY_MODE DisplayMode
|
||||
)
|
||||
{
|
||||
|
|
|
@ -184,7 +184,7 @@ ConsolepFindResolution (
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
BL_INPUT_CONSOLE_VTABLE ConsoleInputLocalVtbl =
|
||||
BL_INPUT_CONSOLE_VTABLE ConsoleInputLocalVtbl =
|
||||
{
|
||||
(PCONSOLE_DESTRUCT)ConsoleInputLocalDestruct,
|
||||
(PCONSOLE_REINITIALIZE)ConsoleInputBaseReinitialize,
|
||||
|
|
|
@ -333,7 +333,7 @@ Quickie:
|
|||
|
||||
NTSTATUS
|
||||
EtfspSearchForDirent (
|
||||
_In_ PBL_FILE_ENTRY DirectoryEntry,
|
||||
_In_ PBL_FILE_ENTRY DirectoryEntry,
|
||||
_In_ PWCHAR FileName,
|
||||
_Out_ PRAW_DIR_REC *DirEntry,
|
||||
_Out_ PULONG DirentOffset
|
||||
|
@ -435,7 +435,7 @@ EtfspCachedSearchForDirent (
|
|||
NTSTATUS
|
||||
EtfsRead (
|
||||
_In_ PBL_FILE_ENTRY FileEntry,
|
||||
_In_ PVOID Buffer,
|
||||
_In_ PVOID Buffer,
|
||||
_In_ ULONG Size,
|
||||
_Out_opt_ PULONG BytesReturned
|
||||
)
|
||||
|
@ -538,7 +538,7 @@ NTSTATUS
|
|||
EtfsOpen (
|
||||
_In_ PBL_FILE_ENTRY Directory,
|
||||
_In_ PWCHAR FileName,
|
||||
_In_ ULONG Flags,
|
||||
_In_ ULONG Flags,
|
||||
_Out_ PBL_FILE_ENTRY *FileEntry
|
||||
)
|
||||
{
|
||||
|
|
|
@ -169,7 +169,7 @@ FileTableCompareWithSameAttributes (
|
|||
|
||||
NTSTATUS
|
||||
FileTableDestroyEntry (
|
||||
_In_ PBL_FILE_ENTRY FileEntry,
|
||||
_In_ PBL_FILE_ENTRY FileEntry,
|
||||
_In_ ULONG Index
|
||||
)
|
||||
{
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
|
||||
VOID
|
||||
BiNotifyEnumerationError (
|
||||
_In_ HANDLE ObjectHandle,
|
||||
_In_ HANDLE ObjectHandle,
|
||||
_In_ PWCHAR ElementName,
|
||||
_In_ NTSTATUS Status
|
||||
)
|
||||
|
@ -78,7 +78,7 @@ BiConvertRegistryDataToElement (
|
|||
case BCD_TYPE_DEVICE:
|
||||
|
||||
/* First, make sure it's at least big enough for an empty descriptor */
|
||||
if (DataLength < FIELD_OFFSET(BCD_DEVICE_OPTION,
|
||||
if (DataLength < FIELD_OFFSET(BCD_DEVICE_OPTION,
|
||||
DeviceDescriptor.Unknown))
|
||||
{
|
||||
return STATUS_OBJECT_TYPE_MISMATCH;
|
||||
|
@ -172,7 +172,7 @@ BiConvertRegistryDataToElement (
|
|||
Status = STATUS_BUFFER_TOO_SMALL;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
/* Yep, copy the GUID */
|
||||
RtlInitUnicodeString(&GuidString, BcdString);
|
||||
Status = RtlGUIDFromString(&GuidString, ElementGuid);
|
||||
|
@ -350,7 +350,7 @@ NTSTATUS
|
|||
BiConvertBcdElements (
|
||||
_In_ PBCD_PACKED_ELEMENT Elements,
|
||||
_Out_opt_ PBCD_ELEMENT Buffer,
|
||||
_Inout_ PULONG BufferSize,
|
||||
_Inout_ PULONG BufferSize,
|
||||
_Inout_ PULONG ElementCount
|
||||
)
|
||||
{
|
||||
|
@ -627,10 +627,10 @@ BiEnumerateSubElements (
|
|||
_Out_ PULONG ElementCount
|
||||
)
|
||||
{
|
||||
NTSTATUS Status;
|
||||
NTSTATUS Status;
|
||||
PBCD_PACKED_ELEMENT Element;
|
||||
HANDLE ObjectHandle;
|
||||
ULONG ParsedElements, RequiredSize;
|
||||
ULONG ParsedElements, RequiredSize;
|
||||
|
||||
/* Assume empty */
|
||||
*ElementCount = 0;
|
||||
|
@ -698,7 +698,7 @@ BiEnumerateSubObjectElements (
|
|||
NTSTATUS Status;
|
||||
ULONG SubElementCount, TotalSize, RequiredSize, CurrentSize, i;
|
||||
PBCD_PACKED_ELEMENT PreviousElement;
|
||||
|
||||
|
||||
/* Assume empty list */
|
||||
*ElementCount = 0;
|
||||
Status = STATUS_SUCCESS;
|
||||
|
@ -1199,7 +1199,7 @@ BiGetObjectDescription (
|
|||
/* Read the type */
|
||||
Length = 0;
|
||||
Status = BiGetRegistryValue(DescriptionHandle,
|
||||
L"Type",
|
||||
L"Type",
|
||||
REG_DWORD,
|
||||
(PVOID*)&Data,
|
||||
&Length);
|
||||
|
|
|
@ -351,7 +351,7 @@ BiInitializeAndValidateHive (
|
|||
if (NT_SUCCESS(Status))
|
||||
{
|
||||
/* Cleanup volatile/old data */
|
||||
CmPrepareHive(&Hive->Hive.Hive); // CmCheckRegistry
|
||||
CmPrepareHive(&Hive->Hive.Hive); // CmCheckRegistry
|
||||
Status = STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
|
|
|
@ -65,7 +65,7 @@ BfLoadFontFile (
|
|||
|
||||
/* Zero it out */
|
||||
RtlZeroMemory(DeferredFont, sizeof(*DeferredFont));
|
||||
|
||||
|
||||
/* Allocate a copy for the file path */
|
||||
FontPathSize = sizeof(WCHAR) * wcslen(FontPath) + sizeof(UNICODE_NULL);
|
||||
DeferredFont->FontPath = (PWCHAR)BlMmAllocateHeap(FontPathSize);
|
||||
|
@ -74,7 +74,7 @@ BfLoadFontFile (
|
|||
BfiFreeDeferredFontFile(DeferredFont);
|
||||
return STATUS_NO_MEMORY;
|
||||
}
|
||||
|
||||
|
||||
/* Allocate a copy for the device */
|
||||
DeferredFont->Device = BlMmAllocateHeap(Device->Size);
|
||||
if (!DeferredFont->Device)
|
||||
|
@ -113,7 +113,7 @@ BfLoadDeferredFontFiles (
|
|||
{
|
||||
/* Get the font */
|
||||
DeferredFont = CONTAINING_RECORD(NextEntry, BL_DEFERRED_FONT_FILE, ListEntry);
|
||||
|
||||
|
||||
/* Move to the next entry and remove this one */
|
||||
NextEntry = NextEntry->Flink;
|
||||
RemoveEntryList(&DeferredFont->ListEntry);
|
||||
|
|
|
@ -607,7 +607,7 @@ Quickie:
|
|||
return Status;
|
||||
}
|
||||
|
||||
PIMAGE_SECTION_HEADER
|
||||
PIMAGE_SECTION_HEADER
|
||||
BlImgFindSection (
|
||||
_In_ PVOID ImageBase,
|
||||
_In_ ULONG ImageSize
|
||||
|
@ -650,11 +650,11 @@ BlImgFindSection (
|
|||
VOID
|
||||
BlImgQueryCodeIntegrityBootOptions (
|
||||
_In_ PBL_LOADED_APPLICATION_ENTRY ApplicationEntry,
|
||||
_Out_ PBOOLEAN IntegrityChecksDisabled,
|
||||
_Out_ PBOOLEAN IntegrityChecksDisabled,
|
||||
_Out_ PBOOLEAN TestSigning
|
||||
)
|
||||
{
|
||||
|
||||
|
||||
NTSTATUS Status;
|
||||
BOOLEAN Value;
|
||||
|
||||
|
@ -1656,7 +1656,7 @@ NTSTATUS
|
|||
ImgpInitializeBootApplicationParameters (
|
||||
_In_ PBL_BUFFER_DESCRIPTOR ImageParameters,
|
||||
_In_ PBL_APPLICATION_ENTRY AppEntry,
|
||||
_In_ PVOID ImageBase,
|
||||
_In_ PVOID ImageBase,
|
||||
_In_ ULONG ImageSize
|
||||
)
|
||||
{
|
||||
|
@ -1704,8 +1704,8 @@ ImgpInitializeBootApplicationParameters (
|
|||
BlpBootDevice->Size +
|
||||
MemoryParameters.BufferSize +
|
||||
sizeof(*ReturnArguments) +
|
||||
sizeof(*MemoryData) +
|
||||
sizeof(*FirmwareParameters) +
|
||||
sizeof(*MemoryData) +
|
||||
sizeof(*FirmwareParameters) +
|
||||
sizeof(*ParameterBlock);
|
||||
|
||||
/* Check if this gives us enough space */
|
||||
|
|
|
@ -152,12 +152,12 @@ ResFindDirectoryEntry (
|
|||
|
||||
NTSTATUS
|
||||
ResFindDataEntryFromImage (
|
||||
_In_opt_ PVOID ImageBase,
|
||||
_In_opt_ PVOID ImageBase,
|
||||
_In_opt_ ULONG ImageSize,
|
||||
_In_ USHORT DirectoryId,
|
||||
_In_ PUSHORT EntryId,
|
||||
_In_ PUSHORT EntryId,
|
||||
_In_ PWCHAR Name,
|
||||
_Out_ PIMAGE_RESOURCE_DATA_ENTRY *DataEntryOut,
|
||||
_Out_ PIMAGE_RESOURCE_DATA_ENTRY *DataEntryOut,
|
||||
_Out_ PVOID* ResourceOut
|
||||
)
|
||||
{
|
||||
|
@ -445,7 +445,7 @@ BlResourceFindMessage (
|
|||
(MsgId <= MsgData->Blocks[j].HighId))
|
||||
{
|
||||
/* Get the first entry */
|
||||
MsgEntry = (PMESSAGE_RESOURCE_ENTRY)((ULONG_PTR)MsgData +
|
||||
MsgEntry = (PMESSAGE_RESOURCE_ENTRY)((ULONG_PTR)MsgData +
|
||||
MsgData->Blocks[j].OffsetToEntries);
|
||||
|
||||
/* Loop till we find the right one */
|
||||
|
|
|
@ -40,7 +40,7 @@ BlUtlGetAcpiTable (
|
|||
NTSTATUS Status;
|
||||
PRSDT Rsdt;
|
||||
PXSDT Xsdt;
|
||||
PHYSICAL_ADDRESS PhysicalAddress;
|
||||
PHYSICAL_ADDRESS PhysicalAddress;
|
||||
PDESCRIPTION_HEADER Header;
|
||||
|
||||
Header = 0;
|
||||
|
|
|
@ -208,7 +208,7 @@ MmMdCountList (
|
|||
{
|
||||
PLIST_ENTRY First, NextEntry;
|
||||
ULONG Count;
|
||||
|
||||
|
||||
/* Iterate the list */
|
||||
for (Count = 0, First = MdList->First, NextEntry = First->Flink;
|
||||
NextEntry != First;
|
||||
|
@ -220,7 +220,7 @@ MmMdCountList (
|
|||
|
||||
VOID
|
||||
MmMdInitializeList (
|
||||
_In_ PBL_MEMORY_DESCRIPTOR_LIST MdList,
|
||||
_In_ PBL_MEMORY_DESCRIPTOR_LIST MdList,
|
||||
_In_ ULONG Type,
|
||||
_In_ PLIST_ENTRY ListHead
|
||||
)
|
||||
|
@ -247,10 +247,10 @@ MmMdInitializeList (
|
|||
|
||||
NTSTATUS
|
||||
MmMdCopyList (
|
||||
_In_ PBL_MEMORY_DESCRIPTOR_LIST DestinationList,
|
||||
_In_ PBL_MEMORY_DESCRIPTOR_LIST DestinationList,
|
||||
_In_ PBL_MEMORY_DESCRIPTOR_LIST SourceList,
|
||||
_In_opt_ PBL_MEMORY_DESCRIPTOR ListDescriptor,
|
||||
_Out_ PULONG ActualCount,
|
||||
_Out_ PULONG ActualCount,
|
||||
_In_ ULONG Count,
|
||||
_In_ ULONG Flags
|
||||
)
|
||||
|
@ -286,7 +286,7 @@ MmMdCopyList (
|
|||
Count = MmGlobalMemoryDescriptorCount;
|
||||
ListDescriptor = MmGlobalMemoryDescriptors;
|
||||
}
|
||||
|
||||
|
||||
/* Never truncate descriptors during a list copy */
|
||||
Flags |= BL_MM_ADD_DESCRIPTOR_NEVER_TRUNCATE_FLAG;
|
||||
|
||||
|
@ -640,7 +640,7 @@ MmMdAddDescriptorToList (
|
|||
ThisDescriptor = CONTAINING_RECORD(ThisEntry, BL_MEMORY_DESCRIPTOR, ListEntry);
|
||||
|
||||
/* Is the address smaller, or equal but more important? */
|
||||
if ((MemoryDescriptor->BasePage < ThisDescriptor->BasePage) ||
|
||||
if ((MemoryDescriptor->BasePage < ThisDescriptor->BasePage) ||
|
||||
((MemoryDescriptor->BasePage == ThisDescriptor->BasePage) &&
|
||||
(MmMdpHasPrecedence(MemoryDescriptor->Type, ThisDescriptor->Type))))
|
||||
{
|
||||
|
@ -789,7 +789,7 @@ MmMdRemoveRegionFromMdlEx (
|
|||
{
|
||||
Descriptor->VirtualPage += RegionSize;
|
||||
}
|
||||
|
||||
|
||||
/* Initialize a descriptor for the start of the region */
|
||||
NewDescriptor = MmMdInitByteGranularDescriptor(Descriptor->Flags,
|
||||
Descriptor->Type,
|
||||
|
@ -958,8 +958,8 @@ Quickie:
|
|||
|
||||
PBL_MEMORY_DESCRIPTOR
|
||||
MmMdFindDescriptorFromMdl (
|
||||
_In_ PBL_MEMORY_DESCRIPTOR_LIST MdList,
|
||||
_In_ ULONG Flags,
|
||||
_In_ PBL_MEMORY_DESCRIPTOR_LIST MdList,
|
||||
_In_ ULONG Flags,
|
||||
_In_ ULONGLONG Page
|
||||
)
|
||||
{
|
||||
|
@ -987,7 +987,7 @@ MmMdFindDescriptorFromMdl (
|
|||
IsVirtual = TRUE;
|
||||
NextEntry = MdList->First->Flink;
|
||||
}
|
||||
|
||||
|
||||
/* Check if this is a physical search */
|
||||
if (!IsVirtual)
|
||||
{
|
||||
|
@ -1047,7 +1047,7 @@ MmMdFindDescriptorFromMdl (
|
|||
|
||||
PBL_MEMORY_DESCRIPTOR
|
||||
MmMdFindDescriptor (
|
||||
_In_ ULONG WhichList,
|
||||
_In_ ULONG WhichList,
|
||||
_In_ ULONG Flags,
|
||||
_In_ ULONGLONG Page
|
||||
)
|
||||
|
|
|
@ -106,8 +106,8 @@ MmDefZeroVirtualAddressRange (
|
|||
|
||||
BOOLEAN
|
||||
MmArchTranslateVirtualAddress (
|
||||
_In_ PVOID VirtualAddress,
|
||||
_Out_opt_ PPHYSICAL_ADDRESS PhysicalAddress,
|
||||
_In_ PVOID VirtualAddress,
|
||||
_Out_opt_ PPHYSICAL_ADDRESS PhysicalAddress,
|
||||
_Out_opt_ PULONG CachingFlags
|
||||
)
|
||||
{
|
||||
|
@ -526,7 +526,7 @@ MmMapPhysicalAddress (
|
|||
PhysicalAddressPtr->QuadPart = PhysicalAddress;
|
||||
*VirtualAddressPtr = VirtualAddress;
|
||||
*SizePtr = Size;
|
||||
|
||||
|
||||
/* Flush the TLB if paging is enabled */
|
||||
if (BlMmIsTranslationEnabled())
|
||||
{
|
||||
|
@ -545,7 +545,7 @@ Mmx86MapInitStructure (
|
|||
)
|
||||
{
|
||||
NTSTATUS Status;
|
||||
|
||||
|
||||
/* Make a virtual mapping for this physical address */
|
||||
Status = MmMapPhysicalAddress(&PhysicalAddress, &VirtualAddress, &Size, 0);
|
||||
if (!NT_SUCCESS(Status))
|
||||
|
@ -938,7 +938,7 @@ MmDefInitializeTranslation (
|
|||
RtlZeroMemory(MmArchReferencePage, MmArchReferencePageSize);
|
||||
|
||||
/* Allocate 4MB worth of self-map pages */
|
||||
Status = MmPaReserveSelfMapPages(&Mmx86SelfMapBase,
|
||||
Status = MmPaReserveSelfMapPages(&Mmx86SelfMapBase,
|
||||
(4 * 1024 * 1024) >> PAGE_SHIFT,
|
||||
(4 * 1024 * 1024) >> PAGE_SHIFT);
|
||||
if (!NT_SUCCESS(Status))
|
||||
|
|
|
@ -22,8 +22,8 @@ ULONG MmDescriptorCallTreeCount;
|
|||
|
||||
NTSTATUS
|
||||
TrpGenerateMappingTracker (
|
||||
_In_ PVOID VirtualAddress,
|
||||
_In_ ULONG Flags,
|
||||
_In_ PVOID VirtualAddress,
|
||||
_In_ ULONG Flags,
|
||||
_In_ LARGE_INTEGER PhysicalAddress,
|
||||
_In_ ULONGLONG Size
|
||||
)
|
||||
|
@ -50,7 +50,7 @@ TrpGenerateMappingTracker (
|
|||
InsertTailList(ListHead, &Descriptor->ListEntry);
|
||||
goto Quickie;
|
||||
}
|
||||
|
||||
|
||||
/* Otherwise, go to the last descriptor */
|
||||
NextDescriptor = CONTAINING_RECORD(NextEntry,
|
||||
BL_MEMORY_DESCRIPTOR,
|
||||
|
@ -540,7 +540,7 @@ BlMmTranslateVirtualAddress (
|
|||
NTSTATUS
|
||||
BlpMmInitialize (
|
||||
_In_ PBL_MEMORY_DATA MemoryData,
|
||||
_In_ BL_TRANSLATION_TYPE TranslationType,
|
||||
_In_ BL_TRANSLATION_TYPE TranslationType,
|
||||
_In_ PBL_LIBRARY_PARAMETERS LibraryParameters
|
||||
)
|
||||
{
|
||||
|
|
|
@ -178,7 +178,7 @@ MmPapAllocateRegionFromMdl (
|
|||
_In_ PBL_MEMORY_DESCRIPTOR_LIST NewList,
|
||||
_Out_opt_ PBL_MEMORY_DESCRIPTOR Descriptor,
|
||||
_In_ PBL_MEMORY_DESCRIPTOR_LIST CurrentList,
|
||||
_In_ PBL_PA_REQUEST Request,
|
||||
_In_ PBL_PA_REQUEST Request,
|
||||
_In_ BL_MEMORY_TYPE Type
|
||||
)
|
||||
{
|
||||
|
@ -220,7 +220,7 @@ MmPapAllocateRegionFromMdl (
|
|||
FoundDescriptor = CONTAINING_RECORD(NextEntry,
|
||||
BL_MEMORY_DESCRIPTOR,
|
||||
ListEntry);
|
||||
|
||||
|
||||
/* See if it matches the request */
|
||||
if (MmMdFindSatisfyingRegion(FoundDescriptor,
|
||||
&LocalDescriptor,
|
||||
|
@ -379,7 +379,7 @@ MmPapAllocateRegionFromMdl (
|
|||
NTSTATUS
|
||||
MmPaAllocatePages (
|
||||
_In_ PBL_MEMORY_DESCRIPTOR_LIST NewList,
|
||||
_In_ PBL_MEMORY_DESCRIPTOR Descriptor,
|
||||
_In_ PBL_MEMORY_DESCRIPTOR Descriptor,
|
||||
_In_ PBL_MEMORY_DESCRIPTOR_LIST CurrentList,
|
||||
_In_ PBL_PA_REQUEST Request,
|
||||
_In_ BL_MEMORY_TYPE MemoryType
|
||||
|
@ -442,7 +442,7 @@ MmPapAllocatePhysicalPagesInRange (
|
|||
_In_ ULONG Attributes,
|
||||
_In_ ULONG Alignment,
|
||||
_In_ PBL_MEMORY_DESCRIPTOR_LIST NewList,
|
||||
_In_opt_ PBL_ADDRESS_RANGE Range,
|
||||
_In_opt_ PBL_ADDRESS_RANGE Range,
|
||||
_In_ ULONG RangeType
|
||||
)
|
||||
{
|
||||
|
@ -994,7 +994,7 @@ MmPaInitialize (
|
|||
}
|
||||
|
||||
NTSTATUS
|
||||
BlMmAllocatePhysicalPages(
|
||||
BlMmAllocatePhysicalPages(
|
||||
_In_ PPHYSICAL_ADDRESS Address,
|
||||
_In_ BL_MEMORY_TYPE MemoryType,
|
||||
_In_ ULONGLONG PageCount,
|
||||
|
@ -1563,7 +1563,7 @@ MmPaReleaseSelfMapPages (
|
|||
NTSTATUS
|
||||
MmPaReserveSelfMapPages (
|
||||
_Inout_ PPHYSICAL_ADDRESS PhysicalAddress,
|
||||
_In_ ULONG Alignment,
|
||||
_In_ ULONG Alignment,
|
||||
_In_ ULONG PageCount
|
||||
)
|
||||
{
|
||||
|
@ -1624,7 +1624,7 @@ Quickie:
|
|||
NTSTATUS
|
||||
MmSelectMappingAddress (
|
||||
_Out_ PVOID* MappingAddress,
|
||||
_In_ PVOID PreferredAddress,
|
||||
_In_ PVOID PreferredAddress,
|
||||
_In_ ULONGLONG Size,
|
||||
_In_ ULONG AllocationAttributes,
|
||||
_In_ ULONG Flags,
|
||||
|
@ -1694,7 +1694,7 @@ MmSelectMappingAddress (
|
|||
PreferredAddress = (PVOID)((ULONG_PTR)PreferredAddress +
|
||||
BYTE_OFFSET(PhysicalAddress.QuadPart));
|
||||
}
|
||||
|
||||
|
||||
Success:
|
||||
/* Return the mapping address and success */
|
||||
*MappingAddress = PreferredAddress;
|
||||
|
|
|
@ -42,8 +42,8 @@ MmMapPhysicalAddress (
|
|||
|
||||
BOOLEAN
|
||||
MmArchTranslateVirtualAddress (
|
||||
_In_ PVOID VirtualAddress,
|
||||
_Out_opt_ PPHYSICAL_ADDRESS PhysicalAddress,
|
||||
_In_ PVOID VirtualAddress,
|
||||
_Out_opt_ PPHYSICAL_ADDRESS PhysicalAddress,
|
||||
_Out_opt_ PULONG CachingFlags
|
||||
)
|
||||
{
|
||||
|
|
|
@ -78,7 +78,7 @@ main:
|
|||
mov byte ptr [BootDrive], dl
|
||||
|
||||
// Now check if this computer supports extended reads. This boot sector will not work without it
|
||||
CheckInt13hExtensions:
|
||||
CheckInt13hExtensions:
|
||||
mov ah, HEX(41) // AH = 41h
|
||||
mov bx, HEX(55aa) // BX = 55AAh
|
||||
int HEX(13) // IBM/MS INT 13 Extensions - INSTALLATION CHECK
|
||||
|
|
|
@ -1,25 +1,25 @@
|
|||
.section .text
|
||||
.globl setup_bats
|
||||
|
||||
_start:
|
||||
_start:
|
||||
.long 0xe00000 + 12
|
||||
.long 0
|
||||
.long 0
|
||||
|
||||
|
||||
_begin:
|
||||
sync
|
||||
sync
|
||||
isync
|
||||
|
||||
lis %r1,stack@ha
|
||||
addi %r1,%r1,stack@l
|
||||
lis %r1,stack@ha
|
||||
addi %r1,%r1,stack@l
|
||||
addi %r1,%r1,16384 - 0x10
|
||||
|
||||
mfmsr %r8
|
||||
li %r0,0
|
||||
mtmsr %r0
|
||||
isync
|
||||
|
||||
bl setup_bats
|
||||
mfmsr %r8
|
||||
li %r0,0
|
||||
mtmsr %r0
|
||||
isync
|
||||
|
||||
bl setup_bats
|
||||
|
||||
li %r8,0x3030
|
||||
mtmsr %r8
|
||||
|
@ -52,15 +52,15 @@ _begin:
|
|||
|
||||
/* Zero CTR */
|
||||
mtcr %r31
|
||||
|
||||
|
||||
lis %r3,0x8000@ha
|
||||
addi %r3,%r3,0x8000@l
|
||||
|
||||
mtlr %r3
|
||||
|
||||
|
||||
lis %r3,call_ofw@ha
|
||||
addi %r3,%r3,call_ofw - _start
|
||||
|
||||
|
||||
b call_freeldr
|
||||
|
||||
/*
|
||||
|
@ -110,7 +110,7 @@ setup_bats:
|
|||
5: sync
|
||||
isync
|
||||
blr
|
||||
|
||||
|
||||
.align 4
|
||||
call_freeldr:
|
||||
/* Get the address of the functions list --
|
||||
|
@ -122,14 +122,14 @@ call_freeldr:
|
|||
mtmsr %r10
|
||||
|
||||
nop
|
||||
|
||||
|
||||
/* Note that this is little-endian from here on */
|
||||
blr
|
||||
nop
|
||||
|
||||
.align 4
|
||||
call_ofw:
|
||||
/* R3 has the function offset to call (n * 4)
|
||||
/* R3 has the function offset to call (n * 4)
|
||||
* Other arg registers are unchanged.
|
||||
* Note that these 4 instructions are in reverse order due to
|
||||
* little-endian convention */
|
||||
|
@ -149,7 +149,7 @@ call_ofw:
|
|||
add %r9,%r3,%r10
|
||||
lwz %r3,ofw_functions - _start@l(%r9)
|
||||
mtctr %r3
|
||||
|
||||
|
||||
mr %r3,%r4
|
||||
mr %r4,%r5
|
||||
mr %r5,%r6
|
||||
|
@ -180,7 +180,7 @@ zero_registers:
|
|||
xor %r2,%r2,%r2
|
||||
mr %r0,%r2
|
||||
mr %r3,%r2
|
||||
|
||||
|
||||
mr %r4,%r2
|
||||
mr %r5,%r2
|
||||
mr %r6,%r2
|
||||
|
@ -195,47 +195,47 @@ zero_registers:
|
|||
mr %r13,%r2
|
||||
mr %r14,%r2
|
||||
mr %r15,%r2
|
||||
|
||||
|
||||
mr %r12,%r2
|
||||
mr %r13,%r2
|
||||
mr %r14,%r2
|
||||
mr %r15,%r2
|
||||
|
||||
|
||||
mr %r16,%r2
|
||||
mr %r17,%r2
|
||||
mr %r18,%r2
|
||||
mr %r19,%r2
|
||||
|
||||
|
||||
mr %r20,%r2
|
||||
mr %r21,%r2
|
||||
mr %r22,%r2
|
||||
mr %r23,%r2
|
||||
|
||||
|
||||
mr %r24,%r2
|
||||
mr %r25,%r2
|
||||
mr %r26,%r2
|
||||
mr %r27,%r2
|
||||
|
||||
|
||||
mr %r28,%r2
|
||||
mr %r29,%r2
|
||||
mr %r30,%r2
|
||||
mr %r31,%r2
|
||||
|
||||
blr
|
||||
|
||||
|
||||
prim_strlen:
|
||||
mr %r5,%r3
|
||||
prim_strlen_loop:
|
||||
prim_strlen_loop:
|
||||
lbz %r4,0(%r3)
|
||||
cmpi 0,0,%r4,0
|
||||
beq prim_strlen_done
|
||||
addi %r3,%r3,1
|
||||
b prim_strlen_loop
|
||||
|
||||
|
||||
prim_strlen_done:
|
||||
sub %r3,%r3,%r5
|
||||
blr
|
||||
|
||||
|
||||
copy_bits:
|
||||
cmp 0,0,%r3,%r4
|
||||
beqlr
|
||||
|
@ -248,14 +248,14 @@ copy_bits:
|
|||
ofw_print_string_hook:
|
||||
bl ofw_print_number
|
||||
bl ofw_exit
|
||||
|
||||
|
||||
ofw_print_string:
|
||||
/* Reserve some stack space */
|
||||
subi %r1,%r1,32
|
||||
|
||||
/* Save args */
|
||||
stw %r3,0(%r1)
|
||||
|
||||
|
||||
/* Save the lr, a scratch register */
|
||||
stw %r8,8(%r1)
|
||||
mflr %r8
|
||||
|
@ -284,7 +284,7 @@ ofw_print_string:
|
|||
lwz %r3,0(%r1)
|
||||
bl prim_strlen
|
||||
mr %r5,%r3
|
||||
|
||||
|
||||
lwz %r3,20(%r1)
|
||||
lwz %r4,0(%r1)
|
||||
|
||||
|
@ -295,7 +295,7 @@ ofw_print_string:
|
|||
lwz %r8,12(%r1)
|
||||
mtlr %r8
|
||||
lwz %r8,8(%r1)
|
||||
|
||||
|
||||
addi %r1,%r1,32
|
||||
blr
|
||||
|
||||
|
@ -329,16 +329,16 @@ ofw_number_loop:
|
|||
srwi %r7,%r7,4
|
||||
|
||||
nop
|
||||
|
||||
|
||||
cmpi 0,0,%r4,10
|
||||
bge ofw_number_letter
|
||||
addi %r4,%r4,'0'
|
||||
b ofw_number_digit_out
|
||||
|
||||
|
||||
ofw_number_letter:
|
||||
addi %r4,%r4,'A' - 10
|
||||
|
||||
ofw_number_digit_out:
|
||||
ofw_number_digit_out:
|
||||
stb %r4,12(%r1)
|
||||
addi %r3,%r1,12
|
||||
|
||||
|
@ -346,17 +346,17 @@ ofw_number_digit_out:
|
|||
stw %r7,20(%r1)
|
||||
stw %r8,24(%r1)
|
||||
stw %r9,28(%r1)
|
||||
|
||||
|
||||
bl ofw_print_string
|
||||
|
||||
lwz %r6,16(%r1)
|
||||
lwz %r7,20(%r1)
|
||||
lwz %r8,24(%r1)
|
||||
lwz %r9,28(%r1)
|
||||
|
||||
|
||||
b ofw_number_loop
|
||||
|
||||
ofw_number_return:
|
||||
ofw_number_return:
|
||||
/* Return */
|
||||
lwz %r9,8(%r1)
|
||||
lwz %r8,4(%r1)
|
||||
|
@ -416,7 +416,7 @@ ofw_print_space:
|
|||
addi %r1,%r1,16
|
||||
blr
|
||||
|
||||
ofw_print_regs:
|
||||
ofw_print_regs:
|
||||
/* Construct ofw exit call */
|
||||
subi %r1,%r1,0xa0
|
||||
|
||||
|
@ -429,32 +429,32 @@ ofw_print_regs:
|
|||
stw %r5,20(%r1)
|
||||
stw %r6,24(%r1)
|
||||
stw %r7,28(%r1)
|
||||
|
||||
|
||||
stw %r8,32(%r1)
|
||||
stw %r9,36(%r1)
|
||||
stw %r10,40(%r1)
|
||||
stw %r11,44(%r1)
|
||||
|
||||
|
||||
stw %r12,48(%r1)
|
||||
stw %r13,52(%r1)
|
||||
stw %r14,56(%r1)
|
||||
stw %r15,60(%r1)
|
||||
|
||||
|
||||
stw %r16,64(%r1)
|
||||
stw %r17,68(%r1)
|
||||
stw %r18,72(%r1)
|
||||
stw %r19,76(%r1)
|
||||
|
||||
|
||||
stw %r20,80(%r1)
|
||||
stw %r21,84(%r1)
|
||||
stw %r22,88(%r1)
|
||||
stw %r23,92(%r1)
|
||||
|
||||
|
||||
stw %r24,96(%r1)
|
||||
stw %r25,100(%r1)
|
||||
stw %r26,104(%r1)
|
||||
stw %r27,108(%r1)
|
||||
|
||||
|
||||
stw %r28,112(%r1)
|
||||
stw %r29,116(%r1)
|
||||
stw %r30,120(%r1)
|
||||
|
@ -474,7 +474,7 @@ ofw_print_regs:
|
|||
stw %r0,144(%r1)
|
||||
mr %r3,%r1
|
||||
stw %r3,148(%r1)
|
||||
|
||||
|
||||
/* Body, print the regname, then the register */
|
||||
ofw_register_loop:
|
||||
lwz %r3,144(%r1)
|
||||
|
@ -497,26 +497,26 @@ ofw_register_loop:
|
|||
stw %r3,144(%r1)
|
||||
b done_dump
|
||||
|
||||
dump_optional:
|
||||
dump_optional:
|
||||
bl ofw_print_space
|
||||
bl ofw_print_space
|
||||
lwz %r3,152(%r1)
|
||||
lwz %r3,0(%r3)
|
||||
bl ofw_print_number
|
||||
bl ofw_print_space
|
||||
bl ofw_print_space
|
||||
lwz %r3,152(%r1)
|
||||
lwz %r3,4(%r3)
|
||||
bl ofw_print_number
|
||||
bl ofw_print_space
|
||||
bl ofw_print_space
|
||||
lwz %r3,152(%r1)
|
||||
lwz %r3,8(%r3)
|
||||
bl ofw_print_number
|
||||
bl ofw_print_space
|
||||
bl ofw_print_space
|
||||
lwz %r3,152(%r1)
|
||||
lwz %r3,12(%r3)
|
||||
bl ofw_print_number
|
||||
bl ofw_print_space
|
||||
done_dump:
|
||||
done_dump:
|
||||
bl ofw_print_eol
|
||||
b ofw_register_loop
|
||||
|
||||
|
@ -529,7 +529,7 @@ ofw_register_special:
|
|||
lwz %r3,128(%r1)
|
||||
bl ofw_print_number
|
||||
bl ofw_print_eol
|
||||
|
||||
|
||||
/* CR */
|
||||
lis %r3,0xe00000@ha
|
||||
addi %r3,%r3,freeldr_reg_cr - _start
|
||||
|
@ -538,7 +538,7 @@ ofw_register_special:
|
|||
lwz %r3,132(%r1)
|
||||
bl ofw_print_number
|
||||
bl ofw_print_eol
|
||||
|
||||
|
||||
/* CTR */
|
||||
lis %r3,0xe00000@ha
|
||||
addi %r3,%r3,freeldr_reg_ctr - _start
|
||||
|
@ -547,7 +547,7 @@ ofw_register_special:
|
|||
lwz %r3,136(%r1)
|
||||
bl ofw_print_number
|
||||
bl ofw_print_eol
|
||||
|
||||
|
||||
/* MSR */
|
||||
lis %r3,0xe00000@ha
|
||||
addi %r3,%r3,freeldr_reg_msr - _start
|
||||
|
@ -560,7 +560,7 @@ ofw_register_special:
|
|||
/* Return */
|
||||
lwz %r0,128(%r1)
|
||||
mtlr %r0
|
||||
|
||||
|
||||
lwz %r0,0(%r1)
|
||||
lwz %r2,8(%r1)
|
||||
lwz %r3,12(%r1)
|
||||
|
@ -571,9 +571,9 @@ ofw_register_special:
|
|||
lwz %r7,28(%r1)
|
||||
|
||||
addi %r1,%r1,0xa0
|
||||
|
||||
|
||||
blr
|
||||
|
||||
|
||||
ofw_finddevice_hook:
|
||||
subi %r1,%r1,32
|
||||
stw %r3,0(%r1)
|
||||
|
@ -585,9 +585,9 @@ ofw_finddevice_hook:
|
|||
lwz %r3,4(%r1)
|
||||
mtlr %r3
|
||||
lwz %r3,0(%r1)
|
||||
addi %r1,%r1,32
|
||||
addi %r1,%r1,32
|
||||
blr
|
||||
|
||||
|
||||
ofw_finddevice:
|
||||
/* Reserve stack space ...
|
||||
* 20 bytes for the ofw call,
|
||||
|
@ -599,7 +599,7 @@ ofw_finddevice:
|
|||
stw %r9,24(%r1)
|
||||
mflr %r8
|
||||
stw %r8,28(%r1)
|
||||
|
||||
|
||||
/* Get finddevice name */
|
||||
lis %r8,0xe00000@ha
|
||||
addi %r9,%r8,ofw_finddevice_name - _start
|
||||
|
@ -618,20 +618,20 @@ ofw_finddevice:
|
|||
|
||||
/* Set argument */
|
||||
mr %r3,%r1
|
||||
|
||||
|
||||
/* Fire */
|
||||
blrl
|
||||
|
||||
|
||||
lwz %r3,16(%r1)
|
||||
|
||||
|
||||
/* Restore registers */
|
||||
lwz %r8,28(%r1)
|
||||
mtlr %r8
|
||||
lwz %r9,24(%r1)
|
||||
lwz %r8,20(%r1)
|
||||
|
||||
|
||||
addi %r1,%r1,32
|
||||
|
||||
|
||||
/* Return */
|
||||
blr
|
||||
|
||||
|
@ -646,7 +646,7 @@ ofw_open:
|
|||
stw %r9,24(%r1)
|
||||
mflr %r8
|
||||
stw %r8,28(%r1)
|
||||
|
||||
|
||||
/* Get open name */
|
||||
lis %r8,0xe00000@ha
|
||||
addi %r9,%r8,ofw_open_name - _start
|
||||
|
@ -665,20 +665,20 @@ ofw_open:
|
|||
|
||||
/* Set argument */
|
||||
mr %r3,%r1
|
||||
|
||||
|
||||
/* Fire */
|
||||
blrl
|
||||
|
||||
|
||||
lwz %r3,16(%r1)
|
||||
|
||||
|
||||
/* Restore registers */
|
||||
lwz %r8,28(%r1)
|
||||
mtlr %r8
|
||||
lwz %r9,24(%r1)
|
||||
lwz %r8,20(%r1)
|
||||
|
||||
|
||||
addi %r1,%r1,32
|
||||
|
||||
|
||||
/* Return */
|
||||
blr
|
||||
|
||||
|
@ -686,7 +686,7 @@ ofw_getprop_hook:
|
|||
/* Reserve stack space:
|
||||
* 32 bytes for the ofw call
|
||||
* 12 bytes for r8, r9, lr
|
||||
*/
|
||||
*/
|
||||
/* Reserve stack space ...
|
||||
* 20 bytes for the ofw call,
|
||||
* r8, r9, and lr */
|
||||
|
@ -697,7 +697,7 @@ ofw_getprop_hook:
|
|||
stw %r9,36(%r1)
|
||||
mflr %r8
|
||||
stw %r8,40(%r1)
|
||||
|
||||
|
||||
/* Get getprop name */
|
||||
lis %r8,0xe00000@ha
|
||||
addi %r9,%r8,ofw_getprop_name - _start
|
||||
|
@ -713,7 +713,7 @@ ofw_getprop_hook:
|
|||
stw %r4,16(%r1) /* Property */
|
||||
stw %r5,20(%r1) /* Return buffer */
|
||||
stw %r6,24(%r1) /* Buffer size */
|
||||
|
||||
|
||||
/* Load up the call address */
|
||||
lwz %r9,ofw_call_addr - _start(%r8)
|
||||
mtlr %r9
|
||||
|
@ -727,7 +727,7 @@ ofw_getprop_hook:
|
|||
/* Workaround to a wierd crash ... not sure what causes it.
|
||||
* XXX investigate me */
|
||||
bl ofw_print_nothing
|
||||
|
||||
|
||||
/* Return */
|
||||
lwz %r3,28(%r1)
|
||||
|
||||
|
@ -736,9 +736,9 @@ ofw_getprop_hook:
|
|||
mtlr %r8
|
||||
lwz %r9,36(%r1)
|
||||
lwz %r8,32(%r1)
|
||||
|
||||
|
||||
addi %r1,%r1,48
|
||||
|
||||
|
||||
/* Return */
|
||||
blr
|
||||
|
||||
|
@ -746,7 +746,7 @@ ofw_getprop:
|
|||
/* Reserve stack space:
|
||||
* 32 bytes for the ofw call
|
||||
* 12 bytes for r8, r9, lr
|
||||
*/
|
||||
*/
|
||||
/* Reserve stack space ...
|
||||
* 20 bytes for the ofw call,
|
||||
* r8, r9, and lr */
|
||||
|
@ -757,7 +757,7 @@ ofw_getprop:
|
|||
stw %r9,36(%r1)
|
||||
mflr %r8
|
||||
stw %r8,40(%r1)
|
||||
|
||||
|
||||
/* Get getprop name */
|
||||
lis %r8,0xe00000@ha
|
||||
addi %r9,%r8,ofw_getprop_name - _start
|
||||
|
@ -773,7 +773,7 @@ ofw_getprop:
|
|||
stw %r4,16(%r1) /* Property */
|
||||
stw %r5,20(%r1) /* Return buffer */
|
||||
stw %r6,24(%r1) /* Buffer size */
|
||||
|
||||
|
||||
/* Load up the call address */
|
||||
lwz %r9,ofw_call_addr - _start(%r8)
|
||||
mtlr %r9
|
||||
|
@ -783,7 +783,7 @@ ofw_getprop:
|
|||
|
||||
/* Fire */
|
||||
blrl
|
||||
|
||||
|
||||
/* Return */
|
||||
lwz %r3,28(%r1)
|
||||
|
||||
|
@ -793,30 +793,30 @@ ofw_getprop:
|
|||
mtlr %r8
|
||||
lwz %r9,36(%r1)
|
||||
lwz %r8,32(%r1)
|
||||
|
||||
|
||||
addi %r1,%r1,48
|
||||
|
||||
|
||||
/* Return */
|
||||
blr
|
||||
|
||||
|
||||
ofw_write:
|
||||
/* Reserve stack space:
|
||||
* 28 bytes for the ofw call
|
||||
* 12 bytes for r8, r9, lr
|
||||
*/
|
||||
*/
|
||||
/* Reserve stack space ...
|
||||
* 20 bytes for the ofw call,
|
||||
* r8, r9, and lr */
|
||||
subi %r1,%r1,48
|
||||
|
||||
nop
|
||||
|
||||
|
||||
/* Store r8, r9, lr */
|
||||
stw %r8,28(%r1)
|
||||
stw %r9,32(%r1)
|
||||
mflr %r8
|
||||
stw %r8,36(%r1)
|
||||
|
||||
|
||||
/* Get write name */
|
||||
lis %r8,0xe00000@ha
|
||||
addi %r9,%r8,ofw_write_name - _start
|
||||
|
@ -831,7 +831,7 @@ ofw_write:
|
|||
stw %r3,12(%r1)
|
||||
stw %r4,16(%r1)
|
||||
stw %r5,20(%r1)
|
||||
|
||||
|
||||
/* Load up the call address */
|
||||
lwz %r9,ofw_call_addr - _start(%r8)
|
||||
mtlr %r9
|
||||
|
@ -850,9 +850,9 @@ ofw_write:
|
|||
mtlr %r8
|
||||
lwz %r9,32(%r1)
|
||||
lwz %r8,28(%r1)
|
||||
|
||||
|
||||
addi %r1,%r1,48
|
||||
|
||||
|
||||
/* Return */
|
||||
blr
|
||||
|
||||
|
@ -860,20 +860,20 @@ ofw_read:
|
|||
/* Reserve stack space:
|
||||
* 28 bytes for the ofw call
|
||||
* 12 bytes for r8, r9, lr
|
||||
*/
|
||||
*/
|
||||
/* Reserve stack space ...
|
||||
* 20 bytes for the ofw call,
|
||||
* r8, r9, and lr */
|
||||
subi %r1,%r1,48
|
||||
|
||||
nop
|
||||
|
||||
|
||||
/* Store r8, r9, lr */
|
||||
stw %r8,28(%r1)
|
||||
stw %r9,32(%r1)
|
||||
mflr %r8
|
||||
stw %r8,36(%r1)
|
||||
|
||||
|
||||
/* Get read name */
|
||||
lis %r8,0xe00000@ha
|
||||
addi %r9,%r8,ofw_read_name - _start
|
||||
|
@ -888,7 +888,7 @@ ofw_read:
|
|||
stw %r3,12(%r1)
|
||||
stw %r4,16(%r1)
|
||||
stw %r5,20(%r1)
|
||||
|
||||
|
||||
/* Load up the call address */
|
||||
lwz %r9,ofw_call_addr - _start(%r8)
|
||||
mtlr %r9
|
||||
|
@ -907,19 +907,19 @@ ofw_read:
|
|||
mtlr %r8
|
||||
lwz %r9,32(%r1)
|
||||
lwz %r8,28(%r1)
|
||||
|
||||
|
||||
addi %r1,%r1,48
|
||||
|
||||
|
||||
/* Return */
|
||||
blr
|
||||
|
||||
|
||||
ofw_exit:
|
||||
lis %r3,0xe00000@ha
|
||||
addi %r3,%r3,freeldr_halt - _start
|
||||
|
||||
bl ofw_print_string
|
||||
/*
|
||||
ofw_exit_loop:
|
||||
/*
|
||||
ofw_exit_loop:
|
||||
b ofw_exit_loop
|
||||
*/
|
||||
/* Load the exit name */
|
||||
|
@ -931,7 +931,7 @@ ofw_exit_loop:
|
|||
xor %r9,%r9,%r9
|
||||
stw %r9,4(%r1)
|
||||
stw %r9,8(%r1)
|
||||
|
||||
|
||||
/* Load up the call address */
|
||||
lwz %r9,ofw_call_addr - _start(%r8)
|
||||
mtlr %r9
|
||||
|
@ -953,7 +953,7 @@ ofw_child:
|
|||
stw %r9,24(%r1)
|
||||
mflr %r8
|
||||
stw %r8,28(%r1)
|
||||
|
||||
|
||||
/* Get child name */
|
||||
lis %r8,0xe00000@ha
|
||||
addi %r9,%r8,ofw_child_name - _start
|
||||
|
@ -972,23 +972,23 @@ ofw_child:
|
|||
|
||||
/* Set argument */
|
||||
mr %r3,%r1
|
||||
|
||||
|
||||
/* Fire */
|
||||
blrl
|
||||
|
||||
|
||||
lwz %r3,16(%r1)
|
||||
|
||||
|
||||
/* Restore registers */
|
||||
lwz %r8,28(%r1)
|
||||
mtlr %r8
|
||||
lwz %r9,24(%r1)
|
||||
lwz %r8,20(%r1)
|
||||
|
||||
|
||||
addi %r1,%r1,32
|
||||
|
||||
|
||||
/* Return */
|
||||
blr
|
||||
|
||||
|
||||
ofw_peer:
|
||||
/* Reserve stack space ...
|
||||
* 20 bytes for the ofw call,
|
||||
|
@ -1000,7 +1000,7 @@ ofw_peer:
|
|||
stw %r9,24(%r1)
|
||||
mflr %r8
|
||||
stw %r8,28(%r1)
|
||||
|
||||
|
||||
/* Get peer name */
|
||||
lis %r8,0xe00000@ha
|
||||
addi %r9,%r8,ofw_peer_name - _start
|
||||
|
@ -1019,23 +1019,23 @@ ofw_peer:
|
|||
|
||||
/* Set argument */
|
||||
mr %r3,%r1
|
||||
|
||||
|
||||
/* Fire */
|
||||
blrl
|
||||
|
||||
|
||||
lwz %r3,16(%r1)
|
||||
|
||||
|
||||
/* Restore registers */
|
||||
lwz %r8,28(%r1)
|
||||
mtlr %r8
|
||||
lwz %r9,24(%r1)
|
||||
lwz %r8,20(%r1)
|
||||
|
||||
|
||||
addi %r1,%r1,32
|
||||
|
||||
|
||||
/* Return */
|
||||
blr
|
||||
|
||||
|
||||
ofw_seek:
|
||||
/* Reserve stack space ...
|
||||
* 20 bytes for the ofw call,
|
||||
|
@ -1047,7 +1047,7 @@ ofw_seek:
|
|||
stw %r9,24(%r1)
|
||||
mflr %r8
|
||||
stw %r8,28(%r1)
|
||||
|
||||
|
||||
/* Get peer name */
|
||||
lis %r8,0xe00000@ha
|
||||
addi %r9,%r8,ofw_seek_name - _start
|
||||
|
@ -1069,20 +1069,20 @@ ofw_seek:
|
|||
|
||||
/* Set argument */
|
||||
mr %r3,%r1
|
||||
|
||||
|
||||
/* Fire */
|
||||
blrl
|
||||
|
||||
|
||||
lwz %r3,16(%r1)
|
||||
|
||||
|
||||
/* Restore registers */
|
||||
lwz %r8,28(%r1)
|
||||
mtlr %r8
|
||||
lwz %r9,24(%r1)
|
||||
lwz %r8,20(%r1)
|
||||
|
||||
|
||||
addi %r1,%r1,32
|
||||
|
||||
|
||||
/* Return */
|
||||
blr
|
||||
|
||||
|
@ -1097,21 +1097,21 @@ setup_exc:
|
|||
stw %r9,12(%r1)
|
||||
stw %r10,16(%r1)
|
||||
stw %r12,20(%r1)
|
||||
|
||||
|
||||
lis %r8,0xe00000@ha
|
||||
xor %r12,%r12,%r12
|
||||
addi %r12,%r12,0x300
|
||||
addi %r9,%r8,dsi_exc - _start
|
||||
addi %r10,%r8,dsi_end - _start
|
||||
|
||||
copy_loop:
|
||||
copy_loop:
|
||||
cmp 0,0,%r9,%r10
|
||||
beq ret_setup_exc
|
||||
|
||||
mr %r3,%r12
|
||||
bl ofw_print_number
|
||||
bl ofw_print_space
|
||||
|
||||
|
||||
lwz %r3,0(%r9)
|
||||
stw %r3,0(%r12)
|
||||
|
||||
|
@ -1121,12 +1121,12 @@ copy_loop:
|
|||
addi %r12,%r12,4
|
||||
addi %r9,%r9,4
|
||||
b copy_loop
|
||||
|
||||
|
||||
ret_setup_exc:
|
||||
mfmsr %r12
|
||||
andi. %r12,%r12,0xffbf
|
||||
andi. %r12,%r12,0xffbf
|
||||
mtmsr %r12
|
||||
|
||||
|
||||
lwz %r12,20(%r1)
|
||||
lwz %r10,16(%r1)
|
||||
lwz %r9,12(%r1)
|
||||
|
@ -1135,12 +1135,12 @@ ret_setup_exc:
|
|||
lwz %r3,4(%r1)
|
||||
mtlr %r3
|
||||
lwz %r3,0(%r1)
|
||||
|
||||
|
||||
blr
|
||||
|
||||
dsi_exc:
|
||||
subi %r1,%r1,16
|
||||
|
||||
|
||||
stw %r0,0(%r1)
|
||||
stw %r3,4(%r1)
|
||||
|
||||
|
@ -1151,14 +1151,14 @@ dsi_exc:
|
|||
/* mfsrr1 %r3 */
|
||||
/* ori %r3,%r3,2 */
|
||||
/* mtsrr1 %r3 */
|
||||
|
||||
|
||||
lwz %r3,4(%r1)
|
||||
lwz %r0,0(%r1)
|
||||
|
||||
addi %r1,%r1,16
|
||||
rfi
|
||||
dsi_end:
|
||||
|
||||
dsi_end:
|
||||
|
||||
.org 0x1000
|
||||
freeldr_banner:
|
||||
.ascii "ReactOS OpenFirmware Boot Program\r\n\0"
|
||||
|
@ -1168,16 +1168,16 @@ freeldr_halt:
|
|||
|
||||
freeldr_reg_init:
|
||||
.ascii "r\0"
|
||||
freeldr_reg_lr:
|
||||
freeldr_reg_lr:
|
||||
.ascii "lr \0"
|
||||
freeldr_reg_cr:
|
||||
freeldr_reg_cr:
|
||||
.ascii "cr \0"
|
||||
freeldr_reg_ctr:
|
||||
freeldr_reg_ctr:
|
||||
.ascii "ctr\0"
|
||||
freeldr_reg_msr:
|
||||
freeldr_reg_msr:
|
||||
.ascii "msr\0"
|
||||
|
||||
ofw_call_addr:
|
||||
|
||||
ofw_call_addr:
|
||||
.long 0
|
||||
|
||||
ofw_memory_size:
|
||||
|
@ -1185,10 +1185,10 @@ ofw_memory_size:
|
|||
.long 0
|
||||
.long 0
|
||||
.long 0
|
||||
|
||||
|
||||
ofw_finddevice_name:
|
||||
.ascii "finddevice\0"
|
||||
|
||||
|
||||
ofw_getprop_name:
|
||||
.ascii "getprop\0"
|
||||
|
||||
|
@ -1197,7 +1197,7 @@ ofw_write_name:
|
|||
|
||||
ofw_read_name:
|
||||
.ascii "read\0"
|
||||
|
||||
|
||||
ofw_exit_name:
|
||||
.ascii "exit\0"
|
||||
|
||||
|
@ -1209,10 +1209,10 @@ ofw_child_name:
|
|||
|
||||
ofw_peer_name:
|
||||
.ascii "peer\0"
|
||||
|
||||
|
||||
ofw_seek_name:
|
||||
.ascii "seek\0"
|
||||
|
||||
|
||||
ofw_chosen_name:
|
||||
.ascii "/chosen\0"
|
||||
|
||||
|
@ -1224,7 +1224,7 @@ ofw_memory_name:
|
|||
|
||||
ofw_reg_name:
|
||||
.ascii "reg\0"
|
||||
|
||||
|
||||
ofw_functions:
|
||||
.long ofw_finddevice_hook
|
||||
.long ofw_getprop_hook
|
||||
|
@ -1238,7 +1238,7 @@ ofw_functions:
|
|||
.long ofw_child
|
||||
.long ofw_peer
|
||||
.long ofw_seek
|
||||
|
||||
|
||||
.org 0x2000
|
||||
stack:
|
||||
.space 0x4000
|
||||
|
|
|
@ -381,7 +381,7 @@ XboxPrepareForReactOS(VOID)
|
|||
XboxVideoPrepareForReactOS();
|
||||
XboxDiskInit(FALSE);
|
||||
DiskStopFloppyMotor();
|
||||
|
||||
|
||||
/* Turn off debug messages to screen */
|
||||
DebugDisableScreenPort();
|
||||
}
|
||||
|
|
|
@ -930,7 +930,7 @@ PUCHAR FatGetFatSector(PFAT_VOLUME_INFO Volume, UINT32 FatSectorNumber)
|
|||
|
||||
for (i = 0; i < SectorsToRead; i++)
|
||||
{
|
||||
Volume->FatCacheIndex[CacheIndex + i] = SectorNumAbsolute + i;
|
||||
Volume->FatCacheIndex[CacheIndex + i] = SectorNumAbsolute + i;
|
||||
}
|
||||
|
||||
TRACE("FAT cache miss: read sector 0x%x from disk\n", SectorNumAbsolute);
|
||||
|
@ -1128,7 +1128,7 @@ BOOLEAN FatReadClusterChain(PFAT_VOLUME_INFO Volume, UINT32 StartClusterNumber,
|
|||
|
||||
TRACE("FatReadClusterChain() StartClusterNumber = %d NumberOfClusters = %d Buffer = 0x%x\n", StartClusterNumber, NumberOfClusters, Buffer);
|
||||
|
||||
ASSERT(NumberOfClusters > 0);
|
||||
ASSERT(NumberOfClusters > 0);
|
||||
|
||||
while (FatReadAdjacentClusters(Volume, StartClusterNumber, ClustersLeft, Buffer, &ClustersRead, &NextClusterNumber))
|
||||
{
|
||||
|
|
|
@ -330,7 +330,7 @@ ULONG FsGetNumPathParts(PCSTR Path)
|
|||
size_t i;
|
||||
size_t len;
|
||||
ULONG num;
|
||||
|
||||
|
||||
len = strlen(Path);
|
||||
|
||||
for (i = 0, num = 0; i < len; i++)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue