mirror of
https://github.com/reactos/reactos.git
synced 2025-02-25 01:39:30 +00:00
[FREELDR]
- Remove an unexisting function declaration. - Move some boot methods back to suitable place. - Whitespace fixes. svn path=/trunk/; revision=66143
This commit is contained in:
parent
42ef1d09a7
commit
2682e03820
10 changed files with 43 additions and 25 deletions
|
@ -34,8 +34,10 @@ endif()
|
||||||
list(APPEND FREELDR_COMMON_SOURCE
|
list(APPEND FREELDR_COMMON_SOURCE
|
||||||
include/freeldr.h
|
include/freeldr.h
|
||||||
cmdline.c
|
cmdline.c
|
||||||
|
custom.c
|
||||||
debug.c
|
debug.c
|
||||||
linuxboot.c
|
linuxboot.c
|
||||||
|
miscboot.c
|
||||||
machine.c
|
machine.c
|
||||||
options.c
|
options.c
|
||||||
oslist.c
|
oslist.c
|
||||||
|
@ -87,7 +89,6 @@ if(ARCH STREQUAL "i386")
|
||||||
list(APPEND FREELDR_COMMON_SOURCE
|
list(APPEND FREELDR_COMMON_SOURCE
|
||||||
fs/pxe.c
|
fs/pxe.c
|
||||||
arch/i386/archmach.c
|
arch/i386/archmach.c
|
||||||
arch/i386/custom.c
|
|
||||||
arch/i386/drivemap.c
|
arch/i386/drivemap.c
|
||||||
arch/i386/halstub.c
|
arch/i386/halstub.c
|
||||||
arch/i386/hardware.c
|
arch/i386/hardware.c
|
||||||
|
@ -101,7 +102,6 @@ if(ARCH STREQUAL "i386")
|
||||||
arch/i386/i386rtl.c
|
arch/i386/i386rtl.c
|
||||||
arch/i386/i386vid.c
|
arch/i386/i386vid.c
|
||||||
arch/i386/machpc.c
|
arch/i386/machpc.c
|
||||||
arch/i386/miscboot.c
|
|
||||||
arch/i386/ntoskrnl.c
|
arch/i386/ntoskrnl.c
|
||||||
arch/i386/pccons.c
|
arch/i386/pccons.c
|
||||||
arch/i386/pcdisk.c
|
arch/i386/pcdisk.c
|
||||||
|
@ -130,7 +130,6 @@ elseif(ARCH STREQUAL "amd64")
|
||||||
arch/amd64/pnpbios.S)
|
arch/amd64/pnpbios.S)
|
||||||
list(APPEND FREELDR_COMMON_SOURCE
|
list(APPEND FREELDR_COMMON_SOURCE
|
||||||
fs/pxe.c
|
fs/pxe.c
|
||||||
arch/i386/custom.c
|
|
||||||
arch/i386/drivemap.c
|
arch/i386/drivemap.c
|
||||||
arch/i386/hardware.c
|
arch/i386/hardware.c
|
||||||
arch/i386/hwacpi.c
|
arch/i386/hwacpi.c
|
||||||
|
|
|
@ -19,6 +19,7 @@
|
||||||
|
|
||||||
#include <freeldr.h>
|
#include <freeldr.h>
|
||||||
|
|
||||||
|
#ifdef _M_IX86
|
||||||
|
|
||||||
const CHAR BootDrivePrompt[] = "Enter the boot drive.\n\nExamples:\nfd0 - first floppy drive\nhd0 - first hard drive\nhd1 - second hard drive\ncd0 - first CD-ROM drive.\n\nBIOS drive numbers may also be used:\n0 - first floppy drive\n0x80 - first hard drive\n0x81 - second hard drive";
|
const CHAR BootDrivePrompt[] = "Enter the boot drive.\n\nExamples:\nfd0 - first floppy drive\nhd0 - first hard drive\nhd1 - second hard drive\ncd0 - first CD-ROM drive.\n\nBIOS drive numbers may also be used:\n0 - first floppy drive\n0x80 - first hard drive\n0x81 - second hard drive";
|
||||||
const CHAR BootPartitionPrompt[] = "Enter the boot partition.\n\nEnter 0 for the active (bootable) partition.";
|
const CHAR BootPartitionPrompt[] = "Enter the boot partition.\n\nEnter 0 for the active (bootable) partition.";
|
||||||
|
@ -448,3 +449,5 @@ VOID OptionMenuReboot(VOID)
|
||||||
DiskStopFloppyMotor();
|
DiskStopFloppyMotor();
|
||||||
Reboot();
|
Reboot();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif // _M_IX86
|
|
@ -23,6 +23,8 @@
|
||||||
#define CONFIG_CMD(bus, dev_fn, where) \
|
#define CONFIG_CMD(bus, dev_fn, where) \
|
||||||
(0x80000000 | (((ULONG)(bus)) << 16) | (((dev_fn) & 0x1F) << 11) | (((dev_fn) & 0xE0) << 3) | ((where) & ~3))
|
(0x80000000 | (((ULONG)(bus)) << 16) | (((dev_fn) & 0x1F) << 11) | (((dev_fn) & 0xE0) << 3) | ((where) & ~3))
|
||||||
|
|
||||||
|
#define TAG_HW_RESOURCE_LIST 'lRwH'
|
||||||
|
#define TAG_HW_DISK_CONTEXT 'cDwH'
|
||||||
|
|
||||||
//
|
//
|
||||||
// ARC Component Configuration Routines
|
// ARC Component Configuration Routines
|
||||||
|
|
|
@ -19,8 +19,7 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#define TAG_HW_RESOURCE_LIST 'lRwH'
|
#ifdef _M_IX86
|
||||||
#define TAG_HW_DISK_CONTEXT 'cDwH'
|
|
||||||
|
|
||||||
#define HAS_OPTION_MENU_CUSTOM_BOOT
|
#define HAS_OPTION_MENU_CUSTOM_BOOT
|
||||||
#define HAS_OPTION_MENU_REBOOT
|
#define HAS_OPTION_MENU_REBOOT
|
||||||
|
@ -33,3 +32,5 @@ VOID OptionMenuCustomBootPartition(VOID);
|
||||||
VOID OptionMenuCustomBootBootSectorFile(VOID);
|
VOID OptionMenuCustomBootBootSectorFile(VOID);
|
||||||
VOID OptionMenuCustomBootReactOS(VOID);
|
VOID OptionMenuCustomBootReactOS(VOID);
|
||||||
VOID OptionMenuCustomBootLinux(VOID);
|
VOID OptionMenuCustomBootLinux(VOID);
|
||||||
|
|
||||||
|
#endif // _M_IX86
|
|
@ -66,6 +66,8 @@
|
||||||
#include <inifile.h>
|
#include <inifile.h>
|
||||||
#include <keycodes.h>
|
#include <keycodes.h>
|
||||||
#include <linux.h>
|
#include <linux.h>
|
||||||
|
#include <custom.h>
|
||||||
|
#include <miscboot.h>
|
||||||
#include <machine.h>
|
#include <machine.h>
|
||||||
#include <mm.h>
|
#include <mm.h>
|
||||||
#include <multiboot.h>
|
#include <multiboot.h>
|
||||||
|
@ -99,13 +101,11 @@
|
||||||
#include <arch/pc/machpc.h>
|
#include <arch/pc/machpc.h>
|
||||||
#include <arch/pc/x86common.h>
|
#include <arch/pc/x86common.h>
|
||||||
#include <arch/pc/pxe.h>
|
#include <arch/pc/pxe.h>
|
||||||
#include <arch/i386/custom.h>
|
|
||||||
#include <arch/i386/drivemap.h>
|
#include <arch/i386/drivemap.h>
|
||||||
#endif
|
#endif
|
||||||
#if defined(_M_IX86)
|
#if defined(_M_IX86)
|
||||||
#include <arch/i386/i386.h>
|
#include <arch/i386/i386.h>
|
||||||
#include <arch/i386/machxbox.h>
|
#include <arch/i386/machxbox.h>
|
||||||
#include <arch/i386/miscboot.h>
|
|
||||||
#include <internal/i386/intrin_i.h>
|
#include <internal/i386/intrin_i.h>
|
||||||
#elif defined(_M_AMD64)
|
#elif defined(_M_AMD64)
|
||||||
#include <arch/amd64/amd64.h>
|
#include <arch/amd64/amd64.h>
|
||||||
|
|
|
@ -23,7 +23,8 @@
|
||||||
#ifndef __LINUX_H
|
#ifndef __LINUX_H
|
||||||
#define __LINUX_H
|
#define __LINUX_H
|
||||||
|
|
||||||
#ifdef __i386__
|
#ifdef _M_IX86
|
||||||
|
|
||||||
#define LINUX_LOADER_TYPE_LILO 0x01
|
#define LINUX_LOADER_TYPE_LILO 0x01
|
||||||
#define LINUX_LOADER_TYPE_LOADLIN 0x11
|
#define LINUX_LOADER_TYPE_LOADLIN 0x11
|
||||||
#define LINUX_LOADER_TYPE_BOOTSECT 0x21
|
#define LINUX_LOADER_TYPE_BOOTSECT 0x21
|
||||||
|
@ -140,6 +141,7 @@ BOOLEAN LinuxReadSetupSector(PFILE LinuxKernelFile);
|
||||||
BOOLEAN LinuxReadKernel(PFILE LinuxKernelFile);
|
BOOLEAN LinuxReadKernel(PFILE LinuxKernelFile);
|
||||||
BOOLEAN LinuxCheckKernelVersion(VOID);
|
BOOLEAN LinuxCheckKernelVersion(VOID);
|
||||||
BOOLEAN LinuxReadInitrd(PFILE LinuxInitrdFile);
|
BOOLEAN LinuxReadInitrd(PFILE LinuxInitrdFile);
|
||||||
#endif /* __i386__ */
|
|
||||||
|
#endif // _M_IX86
|
||||||
|
|
||||||
#endif // defined __LINUX_H
|
#endif // defined __LINUX_H
|
||||||
|
|
|
@ -19,6 +19,8 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#ifdef _M_IX86
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
LoadAndBootBootSector(IN OperatingSystemItem* OperatingSystem,
|
LoadAndBootBootSector(IN OperatingSystemItem* OperatingSystem,
|
||||||
IN USHORT OperatingSystemVersion);
|
IN USHORT OperatingSystemVersion);
|
||||||
|
@ -28,3 +30,5 @@ LoadAndBootPartition(IN OperatingSystemItem* OperatingSystem,
|
||||||
VOID
|
VOID
|
||||||
LoadAndBootDrive(IN OperatingSystemItem* OperatingSystem,
|
LoadAndBootDrive(IN OperatingSystemItem* OperatingSystem,
|
||||||
IN USHORT OperatingSystemVersion);
|
IN USHORT OperatingSystemVersion);
|
||||||
|
|
||||||
|
#endif // _M_IX86
|
|
@ -21,7 +21,9 @@
|
||||||
|
|
||||||
#include <freeldr.h>
|
#include <freeldr.h>
|
||||||
#include <debug.h>
|
#include <debug.h>
|
||||||
#ifdef __i386__
|
|
||||||
|
#ifdef _M_IX86
|
||||||
|
|
||||||
#define LINUX_READ_CHUNK_SIZE 0x20000 // Read 128k at a time
|
#define LINUX_READ_CHUNK_SIZE 0x20000 // Read 128k at a time
|
||||||
|
|
||||||
DBG_DEFAULT_CHANNEL(LINUX);
|
DBG_DEFAULT_CHANNEL(LINUX);
|
||||||
|
@ -307,7 +309,7 @@ BOOLEAN LinuxReadBootSector(PFILE LinuxKernelFile)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
DbgDumpBuffer(DPRINT_LINUX, LinuxBootSector, 512);
|
// DbgDumpBuffer(DPRINT_LINUX, LinuxBootSector, 512);
|
||||||
|
|
||||||
TRACE("SetupSectors: %d\n", LinuxBootSector->SetupSectors);
|
TRACE("SetupSectors: %d\n", LinuxBootSector->SetupSectors);
|
||||||
TRACE("RootFlags: 0x%x\n", LinuxBootSector->RootFlags);
|
TRACE("RootFlags: 0x%x\n", LinuxBootSector->RootFlags);
|
||||||
|
@ -366,7 +368,7 @@ BOOLEAN LinuxReadSetupSector(PFILE LinuxKernelFile)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
DbgDumpBuffer(DPRINT_LINUX, LinuxSetupSector, SetupSectorSize);
|
// DbgDumpBuffer(DPRINT_LINUX, LinuxSetupSector, SetupSectorSize);
|
||||||
|
|
||||||
TRACE("SetupHeaderSignature: 0x%x (HdrS)\n", LinuxSetupSector->SetupHeaderSignature);
|
TRACE("SetupHeaderSignature: 0x%x (HdrS)\n", LinuxSetupSector->SetupHeaderSignature);
|
||||||
TRACE("Version: 0x%x\n", LinuxSetupSector->Version);
|
TRACE("Version: 0x%x\n", LinuxSetupSector->Version);
|
||||||
|
@ -513,5 +515,7 @@ BOOLEAN LinuxReadInitrd(PFILE LinuxInitrdFile)
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
#endif /* __i386__ */
|
|
||||||
|
#endif // _M_IX86
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -19,6 +19,8 @@
|
||||||
|
|
||||||
#include <freeldr.h>
|
#include <freeldr.h>
|
||||||
|
|
||||||
|
#ifdef _M_IX86
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
LoadAndBootBootSector(IN OperatingSystemItem* OperatingSystem,
|
LoadAndBootBootSector(IN OperatingSystemItem* OperatingSystem,
|
||||||
IN USHORT OperatingSystemVersion)
|
IN USHORT OperatingSystemVersion)
|
||||||
|
@ -215,3 +217,5 @@ LoadAndBootDrive(IN OperatingSystemItem* OperatingSystem,
|
||||||
FrldrBootDrive = DriveNumber;
|
FrldrBootDrive = DriveNumber;
|
||||||
ChainLoadBiosBootSectorCode();
|
ChainLoadBiosBootSectorCode();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif // _M_IX86
|
|
@ -22,7 +22,6 @@
|
||||||
|
|
||||||
#if DBG
|
#if DBG
|
||||||
VOID DumpMemoryAllocMap(VOID);
|
VOID DumpMemoryAllocMap(VOID);
|
||||||
VOID MemAllocTest(VOID);
|
|
||||||
#endif // DBG
|
#endif // DBG
|
||||||
|
|
||||||
DBG_DEFAULT_CHANNEL(MEMORY);
|
DBG_DEFAULT_CHANNEL(MEMORY);
|
||||||
|
|
Loading…
Reference in a new issue