Author: hbelusca
Date: Sat Jan 28 20:06:03 2017
New Revision: 73610
URL:
http://svn.reactos.org/svn/reactos?rev=73610&view=rev
Log:
[FREELDR]: Gently merge my local changes, part 1/x:
- Adjust the prototype of DiskGetBootPath;
- Add back 1 HW helper function.
Modified:
trunk/reactos/boot/freeldr/freeldr/arch/archwsup.c
trunk/reactos/boot/freeldr/freeldr/arch/arm/macharm.c
trunk/reactos/boot/freeldr/freeldr/arch/i386/pcdisk.c
trunk/reactos/boot/freeldr/freeldr/arch/powerpc/mach.c
trunk/reactos/boot/freeldr/freeldr/disk/disk.c
trunk/reactos/boot/freeldr/freeldr/include/arch/archwsup.h
trunk/reactos/boot/freeldr/freeldr/include/disk.h
trunk/reactos/boot/freeldr/freeldr/include/machine.h
Modified: trunk/reactos/boot/freeldr/freeldr/arch/archwsup.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/arch/archwsup.c [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/arch/archwsup.c [iso-8859-1] Sat Jan 28 20:06:03
2017
@@ -22,24 +22,16 @@
/* FUNCTIONS ******************************************************************/
-#define TAG_HW_COMPONENT_DATA 'DCwH'
-#define TAG_HW_NAME 'mNwH'
+#define TAG_HW_COMPONENT_DATA 'DCwH'
+#define TAG_HW_NAME 'mNwH'
-PVOID
-NTAPI
-FldrpHwHeapAlloc(IN SIZE_T Size)
-{
- /* Allocate memory from generic bootloader heap */
- return FrLdrHeapAlloc(Size, 'pHwH');
-}
-
-static VOID
+VOID
NTAPI
FldrSetIdentifier(IN PCONFIGURATION_COMPONENT_DATA ComponentData,
IN PCHAR IdentifierString)
{
+ PCONFIGURATION_COMPONENT Component = &ComponentData->ComponentEntry;
SIZE_T IdentifierLength;
- PCONFIGURATION_COMPONENT Component = &ComponentData->ComponentEntry;
PCHAR Identifier;
/* Allocate memory for the identifier */
@@ -53,6 +45,17 @@
/* Set component information */
Component->IdentifierLength = (ULONG)IdentifierLength;
Component->Identifier = Identifier;
+}
+
+VOID
+NTAPI
+FldrSetConfigurationData(IN PCONFIGURATION_COMPONENT_DATA ComponentData,
+ IN PCM_PARTIAL_RESOURCE_LIST ResourceList,
+ IN ULONG Size)
+{
+ /* Set component information */
+ ComponentData->ConfigurationData = ResourceList;
+ ComponentData->ComponentEntry.ConfigurationDataLength = Size;
}
VOID
@@ -155,10 +158,7 @@
/* Set configuration data */
if (ResourceList)
- {
- ComponentData->ConfigurationData = ResourceList;
- ComponentData->ComponentEntry.ConfigurationDataLength = Size;
- }
+ FldrSetConfigurationData(ComponentData, ResourceList, Size);
/* Return the child */
*ComponentKey = ComponentData;
Modified: trunk/reactos/boot/freeldr/freeldr/arch/arm/macharm.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/arch/arm/macharm.c [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/arch/arm/macharm.c [iso-8859-1] Sat Jan 28 20:06:03
2017
@@ -97,8 +97,7 @@
}
BOOLEAN
-ArmDiskGetBootPath(OUT PCHAR BootPath,
- IN unsigned Size)
+ArmDiskGetBootPath(OUT PCHAR BootPath, IN ULONG Size)
{
PCCH Path = "ramdisk(0)";
Modified: trunk/reactos/boot/freeldr/freeldr/arch/i386/pcdisk.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/arch/i386/pcdisk.c [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/arch/i386/pcdisk.c [iso-8859-1] Sat Jan 28 20:06:03
2017
@@ -386,7 +386,7 @@
}
BOOLEAN
-PcDiskGetBootPath(char *BootPath, unsigned Size)
+PcDiskGetBootPath(OUT PCHAR BootPath, IN ULONG Size)
{
// FIXME: Keep it there, or put it in DiskGetBootPath?
// Or, abstract the notion of network booting to make
Modified: trunk/reactos/boot/freeldr/freeldr/arch/powerpc/mach.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/arch/powerpc/mach.c [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/arch/powerpc/mach.c [iso-8859-1] Sat Jan 28
20:06:03 2017
@@ -247,7 +247,7 @@
return slots;
}
-BOOLEAN PpcDiskGetBootPath( char *OutBootPath, unsigned Size ) {
+BOOLEAN PpcDiskGetBootPath(PCHAR OutBootPath, ULONG Size) {
strncpy( OutBootPath, BootPath, Size );
return TRUE;
}
Modified: trunk/reactos/boot/freeldr/freeldr/disk/disk.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/disk/…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/disk/disk.c [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/disk/disk.c [iso-8859-1] Sat Jan 28 20:06:03 2017
@@ -102,7 +102,7 @@
}
BOOLEAN
-DiskGetBootPath(char *BootPath, unsigned Size)
+DiskGetBootPath(OUT PCHAR BootPath, IN ULONG Size)
{
static char Path[] = "multi(0)disk(0)";
char Device[4];
Modified: trunk/reactos/boot/freeldr/freeldr/include/arch/archwsup.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/inclu…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/include/arch/archwsup.h [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/include/arch/archwsup.h [iso-8859-1] Sat Jan 28
20:06:03 2017
@@ -27,6 +27,21 @@
//
VOID
NTAPI
+FldrSetIdentifier(
+ IN PCONFIGURATION_COMPONENT_DATA ComponentData,
+ IN PCHAR IdentifierString
+);
+
+VOID
+NTAPI
+FldrSetConfigurationData(
+ IN PCONFIGURATION_COMPONENT_DATA ComponentData,
+ IN PCM_PARTIAL_RESOURCE_LIST ResourceList,
+ IN ULONG Size
+);
+
+VOID
+NTAPI
FldrCreateSystemKey(
OUT PCONFIGURATION_COMPONENT_DATA *SystemKey
);
Modified: trunk/reactos/boot/freeldr/freeldr/include/disk.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/inclu…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/include/disk.h [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/include/disk.h [iso-8859-1] Sat Jan 28 20:06:03
2017
@@ -135,7 +135,7 @@
extern PVOID DiskReadBuffer;
extern SIZE_T DiskReadBufferSize;
-BOOLEAN DiskGetBootPath(char *BootPath, unsigned Size);
+BOOLEAN DiskGetBootPath(OUT PCHAR BootPath, IN ULONG Size);
///////////////////////////////////////////////////////////////////////////////////////
Modified: trunk/reactos/boot/freeldr/freeldr/include/machine.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/inclu…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/include/machine.h [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/include/machine.h [iso-8859-1] Sat Jan 28 20:06:03
2017
@@ -61,7 +61,7 @@
FREELDR_MEMORY_DESCRIPTOR* (*GetMemoryDescriptor)(FREELDR_MEMORY_DESCRIPTOR*
Current);
PFREELDR_MEMORY_DESCRIPTOR (*GetMemoryMap)(PULONG MaxMemoryMapSize);
- BOOLEAN (*DiskGetBootPath)(char *BootPath, unsigned Size);
+ BOOLEAN (*DiskGetBootPath)(PCHAR BootPath, ULONG Size);
BOOLEAN (*DiskReadLogicalSectors)(UCHAR DriveNumber, ULONGLONG SectorNumber, ULONG
SectorCount, PVOID Buffer);
BOOLEAN (*DiskGetDriveGeometry)(UCHAR DriveNumber, PGEOMETRY DriveGeometry);
ULONG (*DiskGetCacheableBlockCount)(UCHAR DriveNumber);