mirror of
https://github.com/reactos/reactos.git
synced 2025-05-08 19:27:00 +00:00
- fix the release build for Colin.
- clean up formatting of a file I was playing with. svn path=/trunk/; revision=26861
This commit is contained in:
parent
d746c66d94
commit
41624f4f99
2 changed files with 45 additions and 46 deletions
|
@ -19,8 +19,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <freeldr.h>
|
#include <freeldr.h>
|
||||||
|
|
||||||
#define NDEBUG
|
|
||||||
#include <debug.h>
|
#include <debug.h>
|
||||||
|
|
||||||
BOOLEAN AcpiPresent = FALSE;
|
BOOLEAN AcpiPresent = FALSE;
|
||||||
|
@ -28,49 +26,49 @@ BOOLEAN AcpiPresent = FALSE;
|
||||||
static BOOLEAN
|
static BOOLEAN
|
||||||
FindAcpiBios(VOID)
|
FindAcpiBios(VOID)
|
||||||
{
|
{
|
||||||
PUCHAR Ptr;
|
PUCHAR Ptr;
|
||||||
|
|
||||||
/* Find the 'Root System Descriptor Table Pointer' */
|
/* Find the 'Root System Descriptor Table Pointer' */
|
||||||
Ptr = (PUCHAR)0xE0000;
|
Ptr = (PUCHAR)0xE0000;
|
||||||
while ((ULONG)Ptr < 0x100000)
|
while ((ULONG)Ptr < 0x100000)
|
||||||
{
|
{
|
||||||
if (!memcmp(Ptr, "RSD PTR ", 8))
|
if (!memcmp(Ptr, "RSD PTR ", 8))
|
||||||
{
|
{
|
||||||
DbgPrint((DPRINT_HWDETECT, "ACPI supported\n"));
|
DbgPrint((DPRINT_HWDETECT, "ACPI supported\n"));
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
Ptr = (PUCHAR)((ULONG)Ptr + 0x10);
|
Ptr = (PUCHAR)((ULONG)Ptr + 0x10);
|
||||||
}
|
}
|
||||||
|
|
||||||
DbgPrint((DPRINT_HWDETECT, "ACPI not supported\n"));
|
DbgPrint((DPRINT_HWDETECT, "ACPI not supported\n"));
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
DetectAcpiBios(FRLDRHKEY SystemKey, ULONG *BusNumber)
|
DetectAcpiBios(FRLDRHKEY SystemKey, ULONG *BusNumber)
|
||||||
{
|
{
|
||||||
WCHAR Buffer[80];
|
WCHAR Buffer[80];
|
||||||
FRLDRHKEY BiosKey;
|
FRLDRHKEY BiosKey;
|
||||||
LONG Error;
|
LONG Error;
|
||||||
|
|
||||||
if (FindAcpiBios())
|
if (FindAcpiBios())
|
||||||
{
|
{
|
||||||
AcpiPresent = TRUE;
|
AcpiPresent = TRUE;
|
||||||
/* Create new bus key */
|
/* Create new bus key */
|
||||||
swprintf(Buffer,
|
swprintf(Buffer,
|
||||||
L"MultifunctionAdapter\\%u", *BusNumber);
|
L"MultifunctionAdapter\\%u", *BusNumber);
|
||||||
Error = RegCreateKey(SystemKey,
|
Error = RegCreateKey(SystemKey,
|
||||||
Buffer,
|
Buffer,
|
||||||
&BiosKey);
|
&BiosKey);
|
||||||
if (Error != ERROR_SUCCESS)
|
if (Error != ERROR_SUCCESS)
|
||||||
{
|
{
|
||||||
DbgPrint((DPRINT_HWDETECT, "RegCreateKey() failed (Error %u)\n", (int)Error));
|
DbgPrint((DPRINT_HWDETECT, "RegCreateKey() failed (Error %u)\n", (int)Error));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
/* Set 'Component Information' */
|
/* Set 'Component Information' */
|
||||||
|
@ -80,20 +78,20 @@ DetectAcpiBios(FRLDRHKEY SystemKey, ULONG *BusNumber)
|
||||||
0xFFFFFFFF);
|
0xFFFFFFFF);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Increment bus number */
|
/* Increment bus number */
|
||||||
(*BusNumber)++;
|
(*BusNumber)++;
|
||||||
|
|
||||||
/* Set 'Identifier' value */
|
/* Set 'Identifier' value */
|
||||||
Error = RegSetValue(BiosKey,
|
Error = RegSetValue(BiosKey,
|
||||||
L"Identifier",
|
L"Identifier",
|
||||||
REG_SZ,
|
REG_SZ,
|
||||||
(PCHAR)L"ACPI BIOS",
|
(PCHAR)L"ACPI BIOS",
|
||||||
10 * sizeof(WCHAR));
|
10 * sizeof(WCHAR));
|
||||||
if (Error != ERROR_SUCCESS)
|
if (Error != ERROR_SUCCESS)
|
||||||
{
|
{
|
||||||
DbgPrint((DPRINT_HWDETECT, "RegSetValue() failed (Error %u)\n", (int)Error));
|
DbgPrint((DPRINT_HWDETECT, "RegSetValue() failed (Error %u)\n", (int)Error));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,15 +35,16 @@
|
||||||
#define DPRINT_HWDETECT 0x00000400 // OR this with DebugPrintMask to enable hardware detection messages
|
#define DPRINT_HWDETECT 0x00000400 // OR this with DebugPrintMask to enable hardware detection messages
|
||||||
#define DPRINT_WINDOWS 0x00000800 // OR this with DebugPrintMask to enable messages from Windows loader
|
#define DPRINT_WINDOWS 0x00000800 // OR this with DebugPrintMask to enable messages from Windows loader
|
||||||
|
|
||||||
|
VOID DebugPrint(ULONG Mask, char *format, ...);
|
||||||
|
|
||||||
#ifdef DBG
|
#ifdef DBG
|
||||||
|
|
||||||
VOID DebugInit(VOID);
|
VOID DebugInit(VOID);
|
||||||
VOID DebugPrint(ULONG Mask, char *format, ...);
|
|
||||||
VOID DebugPrint1(char *format, ...);
|
VOID DebugPrint1(char *format, ...);
|
||||||
VOID DebugDumpBuffer(ULONG Mask, PVOID Buffer, ULONG Length);
|
VOID DebugDumpBuffer(ULONG Mask, PVOID Buffer, ULONG Length);
|
||||||
|
|
||||||
#define DbgPrint(_x_) DebugPrint _x_ ;
|
#define DbgPrint(_x_) DebugPrint _x_ ;
|
||||||
#define DPRINT1 DebugPrint1
|
#define DPRINT1 DebugPrint1
|
||||||
#define BugCheck(_x_) { DebugPrint(DPRINT_WARNING, "Fatal Error: %s:%d(%s)\n", __FILE__, __LINE__, __FUNCTION__); DebugPrint _x_ ; for (;;); }
|
#define BugCheck(_x_) { DebugPrint(DPRINT_WARNING, "Fatal Error: %s:%d(%s)\n", __FILE__, __LINE__, __FUNCTION__); DebugPrint _x_ ; for (;;); }
|
||||||
#define DbgDumpBuffer(_x_, _y_, _z_) DebugDumpBuffer(_x_, _y_, _z_)
|
#define DbgDumpBuffer(_x_, _y_, _z_) DebugDumpBuffer(_x_, _y_, _z_)
|
||||||
|
|
||||||
|
@ -77,7 +78,7 @@ void MEMORY_WRITE_BREAKPOINT4(unsigned long addr);
|
||||||
#else
|
#else
|
||||||
|
|
||||||
#define DebugInit()
|
#define DebugInit()
|
||||||
#define DbgPrint(_x_) { if (0) DebugPrint _x_; }
|
#define DbgPrint(_x_) { if (0) DebugPrint _x_; }
|
||||||
#define DPRINT1(_x_) { if (0) printf _x_; }
|
#define DPRINT1(_x_) { if (0) printf _x_; }
|
||||||
#define BugCheck(_x_)
|
#define BugCheck(_x_)
|
||||||
#define DbgDumpBuffer(_x_, _y_, _z_)
|
#define DbgDumpBuffer(_x_, _y_, _z_)
|
||||||
|
|
Loading…
Reference in a new issue