Author: tkreuzer
Date: Wed Sep 28 09:54:05 2011
New Revision: 53881
URL:
http://svn.reactos.org/svn/reactos?rev=53881&view=rev
Log:
[FREELDR]
Cleanup headers
Removed:
trunk/reactos/boot/freeldr/freeldr/include/rtl.h
Modified:
trunk/reactos/boot/freeldr/freeldr/arch/i386/i386rtl.c
trunk/reactos/boot/freeldr/freeldr/arch/i386/winldr.c
trunk/reactos/boot/freeldr/freeldr/arch/powerpc/mboot.c
trunk/reactos/boot/freeldr/freeldr/include/arch/i386/i386.h
trunk/reactos/boot/freeldr/freeldr/include/freeldr.h
trunk/reactos/boot/freeldr/freeldr/include/reactos.h
Modified: trunk/reactos/boot/freeldr/freeldr/arch/i386/i386rtl.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/arch/i386/i386rtl.c [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/arch/i386/i386rtl.c [iso-8859-1] Wed Sep 28
09:54:05 2011
@@ -18,6 +18,9 @@
*/
#include <freeldr.h>
+
+void sound(int freq);
+void delay(unsigned msec);
void PcBeep(void)
{
Modified: trunk/reactos/boot/freeldr/freeldr/arch/i386/winldr.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/arch/i386/winldr.c [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/arch/i386/winldr.c [iso-8859-1] Wed Sep 28 09:54:05
2011
@@ -338,16 +338,14 @@
{
*ExtendedBIOSDataArea = BiosRegs.w.es << 4;
*ExtendedBIOSDataSize = 1024;
- ERR(">> *ExtendedBIOSDataArea = 0x%lx\n",
*ExtendedBIOSDataArea);
+ TRACE("*ExtendedBIOSDataArea = 0x%lx\n", *ExtendedBIOSDataArea);
}
else
{
- ERR("Couldn't get address of extended BIOS data area\n");
+ WARN("Couldn't get address of extended BIOS data area\n");
*ExtendedBIOSDataArea = 0;
*ExtendedBIOSDataSize = 0;
}
-
- /* Store size of the extended bios data area in 0x740 */
}
void WinLdrSetupMachineDependent(PLOADER_PARAMETER_BLOCK LoaderBlock)
Modified: trunk/reactos/boot/freeldr/freeldr/arch/powerpc/mboot.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/arch/powerpc/mboot.c [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/arch/powerpc/mboot.c [iso-8859-1] Wed Sep 28
09:54:05 2011
@@ -55,6 +55,8 @@
#define BAT_GRANULARITY (64 * 1024)
#define KernelMemorySize (8 * 1024 * 1024)
#define XROUNDUP(x,n) ((((ULONG)x) + ((n) - 1)) & (~((n) - 1)))
+
+char reactos_module_strings[64][256]; // Array to hold module names
/* Load Address of Next Module */
ULONG_PTR NextModuleBase = 0;
@@ -178,7 +180,7 @@
set->info = newinfo;
set->mapsize *= 2;
}
-
+
set->info[set->usecount].flags = MMU_ALL_RW;
set->info[set->usecount].proc = proc;
set->info[set->usecount].addr = virt;
@@ -208,7 +210,7 @@
while(OldModCount != LoaderBlock.ModsCount)
{
- printf("Added %d modules last pass\n",
+ printf("Added %d modules last pass\n",
LoaderBlock.ModsCount - OldModCount);
OldModCount = LoaderBlock.ModsCount;
@@ -224,7 +226,7 @@
((PVOID)reactos_modules[i].ModStart,
(PCHAR)reactos_modules[i].String);
}
- }
+ }
}
printf("Starting mmu\n");
@@ -233,7 +235,7 @@
printf("Allocating vsid 0 (kernel)\n");
MmuAllocVsid(0, 0xff00);
-
+
/* We'll use vsid 1 for freeldr (expendable) */
printf("Allocating vsid 1 (freeldr)\n");
MmuAllocVsid(1, 0xff);
@@ -247,7 +249,7 @@
i += (1<<PFN_SHIFT) ) {
FrLdrAddPageMapping(&memmap, 1, i, 0);
}
-
+
printf("KernelBase %x\n", KernelBase);
/* Heap pages -- this gets the entire freeldr heap */
@@ -255,7 +257,7 @@
tmp = i<<PFN_SHIFT;
if (FreeLdrMap[i].PageAllocated == LoaderSystemCode) {
UsedEntries++;
- if (tmp >= (ULONG)KernelMemory &&
+ if (tmp >= (ULONG)KernelMemory &&
tmp < (ULONG)KernelMemory + KernelMemorySize) {
FrLdrAddPageMapping(&memmap, 0, tmp, KernelBase + tmp -
(ULONG)KernelMemory);
} else {
@@ -721,7 +723,7 @@
} while(TempName);
NameBuffer = reactos_module_strings[LoaderBlock.ModsCount];
-
+
/* Get Module Size */
LocalModuleSize = FsGetFileSize(ModuleImage);
@@ -773,7 +775,7 @@
PVOID ModuleBase = (PVOID)NextModuleBase;
if(FrLdrMapModule(Image, ShortName, 0, 0))
- Result = ModuleBase;
+ Result = ModuleBase;
}
return Result;
}
Modified: trunk/reactos/boot/freeldr/freeldr/include/arch/i386/i386.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/inclu…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/include/arch/i386/i386.h [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/include/arch/i386/i386.h [iso-8859-1] Wed Sep 28
09:54:05 2011
@@ -24,6 +24,32 @@
#undef KIP0PCRADDRESS
#define KIP0PCRADDRESS 0xffdff000
+/* Bits to shift to convert a Virtual Address into an Offset in the Page Table */
+#define PFN_SHIFT 12
+
+/* Bits to shift to convert a Virtual Address into an Offset in the Page Directory */
+#define PDE_SHIFT 22
+#define PDE_SHIFT_PAE 18
+
+/* Converts a Physical Address Pointer into a Page Frame Number */
+#define PaPtrToPfn(p) \
+ (((ULONG_PTR)&p) >> PFN_SHIFT)
+
+/* Converts a Physical Address into a Page Frame Number */
+#define PaToPfn(p) \
+ ((p) >> PFN_SHIFT)
+
+#define STARTUP_BASE 0xC0000000
+
+#define LowMemPageTableIndex 0
+#define StartupPageTableIndex (STARTUP_BASE >> 22)
+#define HalPageTableIndex (HAL_BASE >> 22)
+
+typedef struct _PAGE_DIRECTORY_X86
+{
+ HARDWARE_PTE Pde[1024];
+} PAGE_DIRECTORY_X86, *PPAGE_DIRECTORY_X86;
+
void i386DivideByZero(void);
void i386DebugException(void);
void i386NMIException(void);
Modified: trunk/reactos/boot/freeldr/freeldr/include/freeldr.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/inclu…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/include/freeldr.h [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/include/freeldr.h [iso-8859-1] Wed Sep 28 09:54:05
2011
@@ -45,8 +45,6 @@
#include <stdlib.h>
#include <stdio.h>
#include <ctype.h>
-#include <rosldr.h>
-#include <rtl.h>
#include <ntdddisk.h>
#include <internal/hal.h>
#include <drivers/pci/pci.h>
@@ -55,8 +53,8 @@
/* internal headers */
#include <arcemul.h>
+#include <bget.h>
#include <bytesex.h>
-#include <bget.h>
#include <cache.h>
#include <cmdline.h>
#include <comm.h>
Modified: trunk/reactos/boot/freeldr/freeldr/include/reactos.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/inclu…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/include/reactos.h [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/include/reactos.h [iso-8859-1] Wed Sep 28 09:54:05
2011
@@ -19,53 +19,6 @@
#pragma once
-/* Base Addres of Kernel in Physical Memory */
-#define KERNEL_BASE_PHYS 0x800000
-
-#if defined(_M_IX86)
-
-/* Bits to shift to convert a Virtual Address into an Offset in the Page Table */
-#define PFN_SHIFT 12
-
-/* Bits to shift to convert a Virtual Address into an Offset in the Page Directory */
-#define PDE_SHIFT 22
-#define PDE_SHIFT_PAE 18
-
-/* Converts a Physical Address Pointer into a Page Frame Number */
-#define PaPtrToPfn(p) \
- (((ULONG_PTR)&p) >> PFN_SHIFT)
-
-/* Converts a Physical Address into a Page Frame Number */
-#define PaToPfn(p) \
- ((p) >> PFN_SHIFT)
-
-#define STARTUP_BASE 0xC0000000
-
-#define LowMemPageTableIndex 0
-#define StartupPageTableIndex (STARTUP_BASE >> 22)
-#define HalPageTableIndex (HAL_BASE >> 22)
-
-typedef struct _PAGE_DIRECTORY_X86
-{
- HARDWARE_PTE Pde[1024];
-} PAGE_DIRECTORY_X86, *PPAGE_DIRECTORY_X86;
-
-#endif
-
-///////////////////////////////////////////////////////////////////////////////////////
-//
-// ReactOS Loading Functions
-//
-///////////////////////////////////////////////////////////////////////////////////////
-VOID LoadAndBootReactOS(PCSTR OperatingSystemName);
-
-///////////////////////////////////////////////////////////////////////////////////////
-//
-// ReactOS Setup Loader Functions
-//
-///////////////////////////////////////////////////////////////////////////////////////
-VOID ReactOSRunSetupLoader(VOID);
-
///////////////////////////////////////////////////////////////////////////////////////
//
// ARC Path Functions
@@ -83,53 +36,4 @@
VOID ConstructArcPath(PCHAR ArcPath, PCHAR SystemFolder, UCHAR Disk, ULONG Partition);
UCHAR ConvertArcNameToBiosDriveNumber(PCHAR ArcPath);
-///////////////////////////////////////////////////////////////////////////////////////
-//
-// Loader Functions And Definitions
-//
-///////////////////////////////////////////////////////////////////////////////////////
-extern ROS_LOADER_PARAMETER_BLOCK LoaderBlock; /* Multiboot info structure passed to
kernel */
-extern char reactos_kernel_cmdline[255]; // Command line passed to kernel
-extern LOADER_MODULE reactos_modules[64]; // Array to hold boot module info loaded for
the kernel
-extern char reactos_module_strings[64][256]; // Array to hold module names
-typedef struct _reactos_mem_data {
- unsigned long memory_map_descriptor_size;
- memory_map_t memory_map[32]; // Memory map
-} reactos_mem_data_t;
-extern reactos_mem_data_t reactos_mem_data;
-#define reactos_memory_map_descriptor_size reactos_mem_data.memory_map_descriptor_size
-#define reactos_memory_map reactos_mem_data.memory_map
-
-VOID FASTCALL FrLdrSetupPae(ULONG Magic);
-VOID FASTCALL FrLdrSetupPageDirectory(VOID);
-VOID FASTCALL FrLdrGetPaeMode(VOID);
-BOOLEAN NTAPI FrLdrMapKernel(PFILE KernelImage);
-ULONG_PTR NTAPI FrLdrCreateModule(LPCSTR ModuleName);
-ULONG_PTR NTAPI FrLdrLoadModule(PFILE ModuleImage, LPCSTR ModuleName, PULONG
ModuleSize);
-BOOLEAN NTAPI FrLdrCloseModule(ULONG_PTR ModuleBase, ULONG dwModuleSize);
-VOID NTAPI FrLdrStartup(ULONG Magic);
-typedef VOID (NTAPI *ROS_KERNEL_ENTRY_POINT)(IN PROS_LOADER_PARAMETER_BLOCK
LoaderBlock);
-
-PVOID
-NTAPI
-FrLdrMapImage(
- IN PFILE Image,
- IN PCHAR ShortName,
- IN ULONG ImageType
-);
-
-PVOID
-NTAPI
-FrLdrReadAndMapImage(
- IN PFILE Image,
- IN PCHAR ShortName,
- IN ULONG ImageType
-);
-
-PVOID
-NTAPI
-FrLdrLoadImage(
- IN PCHAR szFileName,
- IN INT nPos,
- IN ULONG ImageType
-);
+void PcBeep(void);
Removed: trunk/reactos/boot/freeldr/freeldr/include/rtl.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/inclu…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/include/rtl.h [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/include/rtl.h (removed)
@@ -1,29 +1,0 @@
-/*
- * FreeLoader
- * Copyright (C) 1998-2003 Brian Palmer <brianp(a)sginet.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-#pragma once
-
-#include <freeldr.h>
-
-char * convert_to_ascii(char *buf, int c, int num);
-char * convert_i64_to_ascii(char *buf, int c, unsigned long long num);
-
-void PcBeep(void);
-void delay(unsigned msec);
-void sound(int freq);