Author: tkreuzer
Date: Wed Jul 23 20:22:30 2008
New Revision: 34722
URL:
http://svn.reactos.org/svn/reactos?rev=34722&view=rev
Log:
freeldr:
- make SectionId a ULONG_PTR
- same for some Loaderblock members
Modified:
branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/bootmgr.c
branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/include/inifile.h
branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/inifile/inifile.c
branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/oslist.c
branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/reactos/reactos.c
branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/reactos/setupldr.c
branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/ui/ui.c
Modified: branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/bootmgr.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/boot/…
==============================================================================
--- branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/bootmgr.c [iso-8859-1]
(original)
+++ branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/bootmgr.c [iso-8859-1] Wed Jul
23 20:22:30 2008
@@ -23,7 +23,7 @@
{
CHAR SettingName[80];
CHAR SettingValue[80];
- ULONG SectionId;
+ ULONG_PTR SectionId;
ULONG OperatingSystemCount;
PCSTR *OperatingSystemSectionNames;
PCSTR *OperatingSystemDisplayNames;
@@ -169,7 +169,7 @@
{
CHAR DefaultOSText[80];
PCSTR DefaultOSName;
- ULONG SectionId;
+ ULONG_PTR SectionId;
ULONG DefaultOS = 0;
ULONG Idx;
@@ -206,7 +206,7 @@
{
CHAR TimeOutText[20];
LONG TimeOut;
- ULONG SectionId;
+ ULONG_PTR SectionId;
TimeOut = CmdLineGetTimeOut();
if (0 <= TimeOut)
Modified: branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/include/inifile.h
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/boot/…
==============================================================================
--- branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/include/inifile.h [iso-8859-1]
(original)
+++ branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/include/inifile.h [iso-8859-1]
Wed Jul 23 20:22:30 2008
@@ -72,14 +72,14 @@
BOOLEAN IniFileInitialize(VOID);
-BOOLEAN IniOpenSection(PCSTR SectionName, ULONG* SectionId);
-ULONG IniGetNumSectionItems(ULONG SectionId);
-ULONG IniGetSectionSettingNameSize(ULONG SectionId, ULONG SettingIndex);
-ULONG IniGetSectionSettingValueSize(ULONG SectionId, ULONG SettingIndex);
-BOOLEAN IniReadSettingByNumber(ULONG SectionId, ULONG SettingNumber, PCHAR SettingName,
ULONG NameSize, PCHAR SettingValue, ULONG ValueSize);
-BOOLEAN IniReadSettingByName(ULONG SectionId, PCSTR SettingName, PCHAR Buffer, ULONG
BufferSize);
-BOOLEAN IniAddSection(PCSTR SectionName, ULONG* SectionId);
-BOOLEAN IniAddSettingValueToSection(ULONG SectionId, PCSTR SettingName, PCSTR
SettingValue);
+BOOLEAN IniOpenSection(PCSTR SectionName, ULONG_PTR* SectionId);
+ULONG IniGetNumSectionItems(ULONG_PTR SectionId);
+ULONG IniGetSectionSettingNameSize(ULONG_PTR SectionId, ULONG SettingIndex);
+ULONG IniGetSectionSettingValueSize(ULONG_PTR SectionId, ULONG SettingIndex);
+BOOLEAN IniReadSettingByNumber(ULONG_PTR SectionId, ULONG SettingNumber, PCHAR
SettingName, ULONG NameSize, PCHAR SettingValue, ULONG ValueSize);
+BOOLEAN IniReadSettingByName(ULONG_PTR SectionId, PCSTR SettingName, PCHAR Buffer, ULONG
BufferSize);
+BOOLEAN IniAddSection(PCSTR SectionName, ULONG_PTR* SectionId);
+BOOLEAN IniAddSettingValueToSection(ULONG_PTR SectionId, PCSTR SettingName, PCSTR
SettingValue);
#endif // defined __PARSEINI_H
Modified: branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/inifile/inifile.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/boot/…
==============================================================================
--- branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/inifile/inifile.c [iso-8859-1]
(original)
+++ branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/inifile/inifile.c [iso-8859-1]
Wed Jul 23 20:22:30 2008
@@ -20,7 +20,7 @@
#include <freeldr.h>
#include <debug.h>
-BOOLEAN IniOpenSection(PCSTR SectionName, ULONG* SectionId)
+BOOLEAN IniOpenSection(PCSTR SectionName, ULONG_PTR* SectionId)
{
PINI_SECTION Section;
@@ -35,7 +35,7 @@
{
// We found it
if (SectionId)
- *SectionId = (ULONG)Section;
+ *SectionId = (ULONG_PTR)Section;
DbgPrint((DPRINT_INIFILE, "IniOpenSection() Found it! SectionId = 0x%x\n",
SectionId));
return TRUE;
}
@@ -49,7 +49,7 @@
return FALSE;
}
-ULONG IniGetNumSectionItems(ULONG SectionId)
+ULONG IniGetNumSectionItems(ULONG_PTR SectionId)
{
PINI_SECTION Section = (PINI_SECTION)SectionId;
@@ -59,7 +59,7 @@
return Section->SectionItemCount;
}
-PINI_SECTION_ITEM IniGetSettingByNumber(ULONG SectionId, ULONG SettingNumber)
+PINI_SECTION_ITEM IniGetSettingByNumber(ULONG_PTR SectionId, ULONG SettingNumber)
{
PINI_SECTION Section = (PINI_SECTION)SectionId;
PINI_SECTION_ITEM SectionItem;
@@ -83,7 +83,7 @@
return NULL;
}
-ULONG IniGetSectionSettingNameSize(ULONG SectionId, ULONG SettingIndex)
+ULONG IniGetSectionSettingNameSize(ULONG_PTR SectionId, ULONG SettingIndex)
{
PINI_SECTION_ITEM SectionItem;
@@ -96,7 +96,7 @@
return (strlen(SectionItem->ItemName) + 1);
}
-ULONG IniGetSectionSettingValueSize(ULONG SectionId, ULONG SettingIndex)
+ULONG IniGetSectionSettingValueSize(ULONG_PTR SectionId, ULONG SettingIndex)
{
PINI_SECTION_ITEM SectionItem;
@@ -109,7 +109,7 @@
return (strlen(SectionItem->ItemValue) + 1);
}
-BOOLEAN IniReadSettingByNumber(ULONG SectionId, ULONG SettingNumber, PCHAR SettingName,
ULONG NameSize, PCHAR SettingValue, ULONG ValueSize)
+BOOLEAN IniReadSettingByNumber(ULONG_PTR SectionId, ULONG SettingNumber, PCHAR
SettingName, ULONG NameSize, PCHAR SettingValue, ULONG ValueSize)
{
PINI_SECTION_ITEM SectionItem;
DbgPrint((DPRINT_INIFILE, ".001 NameSize = %d ValueSize = %d\n", NameSize,
ValueSize));
@@ -142,7 +142,7 @@
return TRUE;
}
-BOOLEAN IniReadSettingByName(ULONG SectionId, PCSTR SettingName, PCHAR Buffer, ULONG
BufferSize)
+BOOLEAN IniReadSettingByName(ULONG_PTR SectionId, PCSTR SettingName, PCHAR Buffer, ULONG
BufferSize)
{
PINI_SECTION Section = (PINI_SECTION)SectionId;
PINI_SECTION_ITEM SectionItem;
@@ -174,7 +174,7 @@
return FALSE;
}
-BOOLEAN IniAddSection(PCSTR SectionName, ULONG* SectionId)
+BOOLEAN IniAddSection(PCSTR SectionName, ULONG_PTR* SectionId)
{
PINI_SECTION Section;
@@ -202,12 +202,12 @@
IniFileSectionCount++;
InsertHeadList(&IniFileSectionListHead, &Section->ListEntry);
- *SectionId = (ULONG)Section;
+ *SectionId = (ULONG_PTR)Section;
return TRUE;
}
-BOOLEAN IniAddSettingValueToSection(ULONG SectionId, PCSTR SettingName, PCSTR
SettingValue)
+BOOLEAN IniAddSettingValueToSection(ULONG_PTR SectionId, PCSTR SettingName, PCSTR
SettingValue)
{
PINI_SECTION Section = (PINI_SECTION)SectionId;
PINI_SECTION_ITEM SectionItem;
Modified: branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/oslist.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/boot/…
==============================================================================
--- branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/oslist.c [iso-8859-1]
(original)
+++ branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/oslist.c [iso-8859-1] Wed Jul
23 20:22:30 2008
@@ -26,8 +26,8 @@
CHAR SettingName[260];
CHAR SettingValue[260];
ULONG OperatingSystemCount;
- ULONG SectionId;
- ULONG OperatingSystemSectionId;
+ ULONG_PTR SectionId;
+ ULONG_PTR OperatingSystemSectionId;
ULONG SectionSettingCount;
PCHAR *OperatingSystemSectionNames;
PCHAR *OperatingSystemDisplayNames;
Modified: branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/reactos/reactos.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/boot/…
==============================================================================
--- branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/reactos/reactos.c [iso-8859-1]
(original)
+++ branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/reactos/reactos.c [iso-8859-1]
Wed Jul 23 20:22:30 2008
@@ -571,7 +571,7 @@
CHAR szKernelName[255];
CHAR szFileName[255];
CHAR MsgBuffer[256];
- ULONG SectionId;
+ ULONG_PTR SectionId;
PIMAGE_NT_HEADERS NtHeader;
PVOID LoadBase;
ULONG_PTR Base;
@@ -596,19 +596,19 @@
* Setup multiboot information structure
*/
LoaderBlock.CommandLine = reactos_kernel_cmdline;
- LoaderBlock.PageDirectoryStart = (ULONG)&PageDirectoryStart;
- LoaderBlock.PageDirectoryEnd = (ULONG)&PageDirectoryEnd;
+ LoaderBlock.PageDirectoryStart = (ULONG_PTR)&PageDirectoryStart;
+ LoaderBlock.PageDirectoryEnd = (ULONG_PTR)&PageDirectoryEnd;
LoaderBlock.ModsCount = 0;
LoaderBlock.ModsAddr = reactos_modules;
LoaderBlock.DrivesAddr = reactos_arc_disk_info;
- LoaderBlock.RdAddr = (ULONG)gRamDiskBase;
+ LoaderBlock.RdAddr = (ULONG_PTR)gRamDiskBase;
LoaderBlock.RdLength = gRamDiskSize;
- LoaderBlock.MmapLength = (unsigned
long)MachGetMemoryMap((PBIOS_MEMORY_MAP)reactos_memory_map, 32) * sizeof(memory_map_t);
+ LoaderBlock.MmapLength =
(SIZE_T)MachGetMemoryMap((PBIOS_MEMORY_MAP)reactos_memory_map, 32) *
sizeof(memory_map_t);
if (LoaderBlock.MmapLength)
{
ULONG i;
LoaderBlock.Flags |= MB_FLAGS_MEM_INFO | MB_FLAGS_MMAP_INFO;
- LoaderBlock.MmapAddr = (unsigned long)&reactos_memory_map;
+ LoaderBlock.MmapAddr = (ULONG_PTR)&reactos_memory_map;
reactos_memory_map_descriptor_size = sizeof(memory_map_t); // GetBiosMemoryMap
uses a fixed value of 24
for (i=0; i<(LoaderBlock.MmapLength/sizeof(memory_map_t)); i++)
{
@@ -698,7 +698,7 @@
/*
* Detect hardware
*/
- LoaderBlock.ArchExtra = (ULONG)MachHwDetect();
+ LoaderBlock.ArchExtra = (ULONG_PTR)MachHwDetect();
UiDrawProgressBarCenter(5, 100, szLoadingMsg);
LoaderBlock.DrivesCount = reactos_disk_count;
Modified: branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/reactos/setupldr.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/boot/…
==============================================================================
--- branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/reactos/setupldr.c
[iso-8859-1] (original)
+++ branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/reactos/setupldr.c
[iso-8859-1] Wed Jul 23 20:22:30 2008
@@ -183,20 +183,20 @@
/* Setup multiboot information structure */
LoaderBlock.CommandLine = reactos_kernel_cmdline;
- LoaderBlock.PageDirectoryStart = (ULONG)&PageDirectoryStart;
- LoaderBlock.PageDirectoryEnd = (ULONG)&PageDirectoryEnd;
+ LoaderBlock.PageDirectoryStart = (ULONG_PTR)&PageDirectoryStart;
+ LoaderBlock.PageDirectoryEnd = (ULONG_PTR)&PageDirectoryEnd;
LoaderBlock.ModsCount = 0;
LoaderBlock.ModsAddr = reactos_modules;
LoaderBlock.MmapLength = (unsigned
long)MachGetMemoryMap((PBIOS_MEMORY_MAP)reactos_memory_map, 32) * sizeof(memory_map_t);
if (LoaderBlock.MmapLength)
{
-#ifdef _M_IX86
+#if defined (_M_IX86) || defined (_M_AMD64)
ULONG i;
#endif
LoaderBlock.Flags |= MB_FLAGS_MEM_INFO | MB_FLAGS_MMAP_INFO;
- LoaderBlock.MmapAddr = (unsigned long)&reactos_memory_map;
+ LoaderBlock.MmapAddr = (ULONG_PTR)&reactos_memory_map;
reactos_memory_map_descriptor_size = sizeof(memory_map_t); // GetBiosMemoryMap uses
a fixed value of 24
-#ifdef _M_IX86
+#if defined (_M_IX86) || defined (_M_AMD64)
for (i=0; i<(LoaderBlock.MmapLength/sizeof(memory_map_t)); i++)
{
if (BiosMemoryUsable == reactos_memory_map[i].type &&
@@ -231,7 +231,7 @@
/* Detect hardware */
UiDrawStatusText("Detecting hardware...");
- LoaderBlock.ArchExtra = (ULONG)MachHwDetect();
+ LoaderBlock.ArchExtra = (ULONG_PTR)MachHwDetect();
UiDrawStatusText("");
/* set boot device */
Modified: branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/ui/ui.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/boot/…
==============================================================================
--- branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/ui/ui.c [iso-8859-1]
(original)
+++ branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/ui/ui.c [iso-8859-1] Wed Jul
23 20:22:30 2008
@@ -80,7 +80,7 @@
{
VIDEODISPLAYMODE UiDisplayMode; // Tells us if we are in text or graphics mode
BOOLEAN UiMinimal = FALSE; // Tells us if we should use a minimal console-like UI
- ULONG SectionId;
+ ULONG_PTR SectionId;
CHAR DisplayModeText[260];
CHAR SettingText[260];
ULONG Depth;
@@ -408,7 +408,7 @@
CHAR SettingValue[80];
PCHAR MessageBoxText;
ULONG MessageBoxTextSize;
- ULONG SectionId;
+ ULONG_PTR SectionId;
if (!IniOpenSection(SectionName, &SectionId))
{