[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:
Hermès Bélusca-Maïto 2015-02-01 17:49:11 +00:00
parent 42ef1d09a7
commit 2682e03820
10 changed files with 43 additions and 25 deletions

View file

@ -34,8 +34,10 @@ endif()
list(APPEND FREELDR_COMMON_SOURCE
include/freeldr.h
cmdline.c
custom.c
debug.c
linuxboot.c
miscboot.c
machine.c
options.c
oslist.c
@ -87,7 +89,6 @@ if(ARCH STREQUAL "i386")
list(APPEND FREELDR_COMMON_SOURCE
fs/pxe.c
arch/i386/archmach.c
arch/i386/custom.c
arch/i386/drivemap.c
arch/i386/halstub.c
arch/i386/hardware.c
@ -101,7 +102,6 @@ if(ARCH STREQUAL "i386")
arch/i386/i386rtl.c
arch/i386/i386vid.c
arch/i386/machpc.c
arch/i386/miscboot.c
arch/i386/ntoskrnl.c
arch/i386/pccons.c
arch/i386/pcdisk.c
@ -130,7 +130,6 @@ elseif(ARCH STREQUAL "amd64")
arch/amd64/pnpbios.S)
list(APPEND FREELDR_COMMON_SOURCE
fs/pxe.c
arch/i386/custom.c
arch/i386/drivemap.c
arch/i386/hardware.c
arch/i386/hwacpi.c

View file

@ -19,6 +19,7 @@
#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 BootPartitionPrompt[] = "Enter the boot partition.\n\nEnter 0 for the active (bootable) partition.";
@ -448,3 +449,5 @@ VOID OptionMenuReboot(VOID)
DiskStopFloppyMotor();
Reboot();
}
#endif // _M_IX86

View file

@ -23,6 +23,8 @@
#define CONFIG_CMD(bus, dev_fn, where) \
(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

View file

@ -19,8 +19,7 @@
#pragma once
#define TAG_HW_RESOURCE_LIST 'lRwH'
#define TAG_HW_DISK_CONTEXT 'cDwH'
#ifdef _M_IX86
#define HAS_OPTION_MENU_CUSTOM_BOOT
#define HAS_OPTION_MENU_REBOOT
@ -33,3 +32,5 @@ VOID OptionMenuCustomBootPartition(VOID);
VOID OptionMenuCustomBootBootSectorFile(VOID);
VOID OptionMenuCustomBootReactOS(VOID);
VOID OptionMenuCustomBootLinux(VOID);
#endif // _M_IX86

View file

@ -66,6 +66,8 @@
#include <inifile.h>
#include <keycodes.h>
#include <linux.h>
#include <custom.h>
#include <miscboot.h>
#include <machine.h>
#include <mm.h>
#include <multiboot.h>
@ -99,13 +101,11 @@
#include <arch/pc/machpc.h>
#include <arch/pc/x86common.h>
#include <arch/pc/pxe.h>
#include <arch/i386/custom.h>
#include <arch/i386/drivemap.h>
#endif
#if defined(_M_IX86)
#include <arch/i386/i386.h>
#include <arch/i386/machxbox.h>
#include <arch/i386/miscboot.h>
#include <internal/i386/intrin_i.h>
#elif defined(_M_AMD64)
#include <arch/amd64/amd64.h>

View file

@ -23,24 +23,25 @@
#ifndef __LINUX_H
#define __LINUX_H
#ifdef __i386__
#define LINUX_LOADER_TYPE_LILO 0x01
#define LINUX_LOADER_TYPE_LOADLIN 0x11
#define LINUX_LOADER_TYPE_BOOTSECT 0x21
#define LINUX_LOADER_TYPE_SYSLINUX 0x31
#define LINUX_LOADER_TYPE_ETHERBOOT 0x41
#ifdef _M_IX86
#define LINUX_LOADER_TYPE_LILO 0x01
#define LINUX_LOADER_TYPE_LOADLIN 0x11
#define LINUX_LOADER_TYPE_BOOTSECT 0x21
#define LINUX_LOADER_TYPE_SYSLINUX 0x31
#define LINUX_LOADER_TYPE_ETHERBOOT 0x41
#define LINUX_LOADER_TYPE_FREELOADER 0x81
#define LINUX_COMMAND_LINE_MAGIC 0xA33F
#define LINUX_SETUP_HEADER_ID 0x53726448 // 'HdrS'
#define LINUX_SETUP_HEADER_ID 0x53726448 // 'HdrS'
#define LINUX_BOOT_SECTOR_MAGIC 0xAA55
#define LINUX_BOOT_SECTOR_MAGIC 0xAA55
#define LINUX_KERNEL_LOAD_ADDRESS 0x100000
#define LINUX_KERNEL_LOAD_ADDRESS 0x100000
#define LINUX_FLAG_LOAD_HIGH 0x01
#define LINUX_FLAG_CAN_USE_HEAP 0x80
#define LINUX_FLAG_CAN_USE_HEAP 0x80
#define LINUX_MAX_INITRD_ADDRESS 0x38000000
@ -140,6 +141,7 @@ BOOLEAN LinuxReadSetupSector(PFILE LinuxKernelFile);
BOOLEAN LinuxReadKernel(PFILE LinuxKernelFile);
BOOLEAN LinuxCheckKernelVersion(VOID);
BOOLEAN LinuxReadInitrd(PFILE LinuxInitrdFile);
#endif /* __i386__ */
#endif // _M_IX86
#endif // defined __LINUX_H

View file

@ -19,6 +19,8 @@
#pragma once
#ifdef _M_IX86
VOID
LoadAndBootBootSector(IN OperatingSystemItem* OperatingSystem,
IN USHORT OperatingSystemVersion);
@ -28,3 +30,5 @@ LoadAndBootPartition(IN OperatingSystemItem* OperatingSystem,
VOID
LoadAndBootDrive(IN OperatingSystemItem* OperatingSystem,
IN USHORT OperatingSystemVersion);
#endif // _M_IX86

View file

@ -21,8 +21,10 @@
#include <freeldr.h>
#include <debug.h>
#ifdef __i386__
#define LINUX_READ_CHUNK_SIZE 0x20000 // Read 128k at a time
#ifdef _M_IX86
#define LINUX_READ_CHUNK_SIZE 0x20000 // Read 128k at a time
DBG_DEFAULT_CHANNEL(LINUX);
@ -307,7 +309,7 @@ BOOLEAN LinuxReadBootSector(PFILE LinuxKernelFile)
return FALSE;
}
DbgDumpBuffer(DPRINT_LINUX, LinuxBootSector, 512);
// DbgDumpBuffer(DPRINT_LINUX, LinuxBootSector, 512);
TRACE("SetupSectors: %d\n", LinuxBootSector->SetupSectors);
TRACE("RootFlags: 0x%x\n", LinuxBootSector->RootFlags);
@ -366,7 +368,7 @@ BOOLEAN LinuxReadSetupSector(PFILE LinuxKernelFile)
return FALSE;
}
DbgDumpBuffer(DPRINT_LINUX, LinuxSetupSector, SetupSectorSize);
// DbgDumpBuffer(DPRINT_LINUX, LinuxSetupSector, SetupSectorSize);
TRACE("SetupHeaderSignature: 0x%x (HdrS)\n", LinuxSetupSector->SetupHeaderSignature);
TRACE("Version: 0x%x\n", LinuxSetupSector->Version);
@ -513,5 +515,7 @@ BOOLEAN LinuxReadInitrd(PFILE LinuxInitrdFile)
return TRUE;
}
#endif /* __i386__ */
#endif // _M_IX86
#endif

View file

@ -19,6 +19,8 @@
#include <freeldr.h>
#ifdef _M_IX86
VOID
LoadAndBootBootSector(IN OperatingSystemItem* OperatingSystem,
IN USHORT OperatingSystemVersion)
@ -215,3 +217,5 @@ LoadAndBootDrive(IN OperatingSystemItem* OperatingSystem,
FrldrBootDrive = DriveNumber;
ChainLoadBiosBootSectorCode();
}
#endif // _M_IX86

View file

@ -21,8 +21,7 @@
#include <debug.h>
#if DBG
VOID DumpMemoryAllocMap(VOID);
VOID MemAllocTest(VOID);
VOID DumpMemoryAllocMap(VOID);
#endif // DBG
DBG_DEFAULT_CHANNEL(MEMORY);