mirror of
https://github.com/reactos/reactos.git
synced 2025-04-25 16:10:29 +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>
|
||||
|
||||
#define NDEBUG
|
||||
#include <debug.h>
|
||||
|
||||
BOOLEAN AcpiPresent = FALSE;
|
||||
|
@ -28,49 +26,49 @@ BOOLEAN AcpiPresent = FALSE;
|
|||
static BOOLEAN
|
||||
FindAcpiBios(VOID)
|
||||
{
|
||||
PUCHAR Ptr;
|
||||
PUCHAR Ptr;
|
||||
|
||||
/* Find the 'Root System Descriptor Table Pointer' */
|
||||
Ptr = (PUCHAR)0xE0000;
|
||||
while ((ULONG)Ptr < 0x100000)
|
||||
/* Find the 'Root System Descriptor Table Pointer' */
|
||||
Ptr = (PUCHAR)0xE0000;
|
||||
while ((ULONG)Ptr < 0x100000)
|
||||
{
|
||||
if (!memcmp(Ptr, "RSD PTR ", 8))
|
||||
{
|
||||
DbgPrint((DPRINT_HWDETECT, "ACPI supported\n"));
|
||||
if (!memcmp(Ptr, "RSD PTR ", 8))
|
||||
{
|
||||
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
|
||||
DetectAcpiBios(FRLDRHKEY SystemKey, ULONG *BusNumber)
|
||||
{
|
||||
WCHAR Buffer[80];
|
||||
FRLDRHKEY BiosKey;
|
||||
LONG Error;
|
||||
WCHAR Buffer[80];
|
||||
FRLDRHKEY BiosKey;
|
||||
LONG Error;
|
||||
|
||||
if (FindAcpiBios())
|
||||
if (FindAcpiBios())
|
||||
{
|
||||
AcpiPresent = TRUE;
|
||||
/* Create new bus key */
|
||||
swprintf(Buffer,
|
||||
L"MultifunctionAdapter\\%u", *BusNumber);
|
||||
Error = RegCreateKey(SystemKey,
|
||||
Buffer,
|
||||
&BiosKey);
|
||||
if (Error != ERROR_SUCCESS)
|
||||
{
|
||||
DbgPrint((DPRINT_HWDETECT, "RegCreateKey() failed (Error %u)\n", (int)Error));
|
||||
return;
|
||||
}
|
||||
AcpiPresent = TRUE;
|
||||
/* Create new bus key */
|
||||
swprintf(Buffer,
|
||||
L"MultifunctionAdapter\\%u", *BusNumber);
|
||||
Error = RegCreateKey(SystemKey,
|
||||
Buffer,
|
||||
&BiosKey);
|
||||
if (Error != ERROR_SUCCESS)
|
||||
{
|
||||
DbgPrint((DPRINT_HWDETECT, "RegCreateKey() failed (Error %u)\n", (int)Error));
|
||||
return;
|
||||
}
|
||||
|
||||
#if 0
|
||||
/* Set 'Component Information' */
|
||||
|
@ -80,20 +78,20 @@ DetectAcpiBios(FRLDRHKEY SystemKey, ULONG *BusNumber)
|
|||
0xFFFFFFFF);
|
||||
#endif
|
||||
|
||||
/* Increment bus number */
|
||||
(*BusNumber)++;
|
||||
/* Increment bus number */
|
||||
(*BusNumber)++;
|
||||
|
||||
/* Set 'Identifier' value */
|
||||
Error = RegSetValue(BiosKey,
|
||||
L"Identifier",
|
||||
REG_SZ,
|
||||
(PCHAR)L"ACPI BIOS",
|
||||
10 * sizeof(WCHAR));
|
||||
if (Error != ERROR_SUCCESS)
|
||||
{
|
||||
DbgPrint((DPRINT_HWDETECT, "RegSetValue() failed (Error %u)\n", (int)Error));
|
||||
return;
|
||||
}
|
||||
/* Set 'Identifier' value */
|
||||
Error = RegSetValue(BiosKey,
|
||||
L"Identifier",
|
||||
REG_SZ,
|
||||
(PCHAR)L"ACPI BIOS",
|
||||
10 * sizeof(WCHAR));
|
||||
if (Error != ERROR_SUCCESS)
|
||||
{
|
||||
DbgPrint((DPRINT_HWDETECT, "RegSetValue() failed (Error %u)\n", (int)Error));
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -35,15 +35,16 @@
|
|||
#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
|
||||
|
||||
VOID DebugPrint(ULONG Mask, char *format, ...);
|
||||
|
||||
#ifdef DBG
|
||||
|
||||
VOID DebugInit(VOID);
|
||||
VOID DebugPrint(ULONG Mask, char *format, ...);
|
||||
VOID DebugPrint1(char *format, ...);
|
||||
VOID DebugDumpBuffer(ULONG Mask, PVOID Buffer, ULONG Length);
|
||||
|
||||
#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 DbgDumpBuffer(_x_, _y_, _z_) DebugDumpBuffer(_x_, _y_, _z_)
|
||||
|
||||
|
@ -77,7 +78,7 @@ void MEMORY_WRITE_BREAKPOINT4(unsigned long addr);
|
|||
#else
|
||||
|
||||
#define DebugInit()
|
||||
#define DbgPrint(_x_) { if (0) DebugPrint _x_; }
|
||||
#define DbgPrint(_x_) { if (0) DebugPrint _x_; }
|
||||
#define DPRINT1(_x_) { if (0) printf _x_; }
|
||||
#define BugCheck(_x_)
|
||||
#define DbgDumpBuffer(_x_, _y_, _z_)
|
||||
|
|
Loading…
Reference in a new issue