mirror of
https://github.com/reactos/reactos.git
synced 2024-09-28 13:34:53 +00:00
- PCHify freeldr and cleanup some headers (just a start).
Freeldr now compiles about 2-4 times faster. svn path=/trunk/; revision=19190
This commit is contained in:
parent
2fda11708c
commit
527ce70dc2
|
@ -17,14 +17,7 @@
|
|||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#include "freeldr.h"
|
||||
#include "mm.h"
|
||||
#include "machine.h"
|
||||
#include "machpc.h"
|
||||
#include "machxbox.h"
|
||||
#include "portio.h"
|
||||
#include "hardware.h"
|
||||
#include "rtl.h"
|
||||
#include <freeldr.h>
|
||||
|
||||
VOID
|
||||
MachInit(const char *CmdLine)
|
||||
|
|
|
@ -19,19 +19,9 @@
|
|||
*/
|
||||
|
||||
#include <freeldr.h>
|
||||
#include <arch.h>
|
||||
#include <rtl.h>
|
||||
|
||||
#define NDEBUG
|
||||
#include <debug.h>
|
||||
#include <disk.h>
|
||||
#include <mm.h>
|
||||
#include <machine.h>
|
||||
#include <portio.h>
|
||||
#include <video.h>
|
||||
|
||||
#include "../../reactos/registry.h"
|
||||
#include "hardware.h"
|
||||
#include "machpc.h"
|
||||
|
||||
|
||||
#define MILLISEC (10)
|
||||
#define PRECISION (8)
|
||||
|
|
|
@ -19,14 +19,9 @@
|
|||
*/
|
||||
|
||||
#include <freeldr.h>
|
||||
#include <arch.h>
|
||||
#include <rtl.h>
|
||||
#include <debug.h>
|
||||
#include <mm.h>
|
||||
#include <portio.h>
|
||||
|
||||
#include "../../reactos/registry.h"
|
||||
#include "hardware.h"
|
||||
#define NDEBUG
|
||||
#include <debug.h>
|
||||
|
||||
BOOLEAN AcpiPresent = FALSE;
|
||||
|
||||
|
|
|
@ -19,15 +19,9 @@
|
|||
*/
|
||||
|
||||
#include <freeldr.h>
|
||||
#include <arch.h>
|
||||
#include <rtl.h>
|
||||
|
||||
#define NDEBUG
|
||||
#include <debug.h>
|
||||
#include <mm.h>
|
||||
#include <portio.h>
|
||||
|
||||
#include "../../reactos/registry.h"
|
||||
#include "hardware.h"
|
||||
|
||||
|
||||
static BOOL
|
||||
FindApmBios(VOID)
|
||||
|
|
|
@ -19,15 +19,9 @@
|
|||
*/
|
||||
|
||||
#include <freeldr.h>
|
||||
#include <arch.h>
|
||||
#include <rtl.h>
|
||||
|
||||
#define NDEBUG
|
||||
#include <debug.h>
|
||||
#include <mm.h>
|
||||
#include <portio.h>
|
||||
|
||||
#include "../../reactos/registry.h"
|
||||
#include "hardware.h"
|
||||
|
||||
|
||||
#define MP_FP_SIGNATURE 0x5F504D5F /* "_MP_" */
|
||||
#define MP_CT_SIGNATURE 0x504D4350 /* "PCMP" */
|
||||
|
|
|
@ -19,14 +19,9 @@
|
|||
*/
|
||||
|
||||
#include <freeldr.h>
|
||||
#include <arch.h>
|
||||
#include <rtl.h>
|
||||
#include <debug.h>
|
||||
#include <mm.h>
|
||||
#include <portio.h>
|
||||
|
||||
#include "../../reactos/registry.h"
|
||||
#include "hardware.h"
|
||||
#define NDEBUG
|
||||
#include <debug.h>
|
||||
|
||||
typedef struct _ROUTING_SLOT
|
||||
{
|
||||
|
|
|
@ -17,10 +17,10 @@
|
|||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#include "freeldr.h"
|
||||
#include "debug.h"
|
||||
#include "i386.h"
|
||||
#include "fsrec.h"
|
||||
#include <freeldr.h>
|
||||
|
||||
#define NDEBUG
|
||||
#include <debug.h>
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// FUNCTIONS
|
||||
|
|
|
@ -20,12 +20,9 @@
|
|||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
|
||||
#include <freeldr.h>
|
||||
#include <arch.h>
|
||||
#include <video.h>
|
||||
#include <portio.h>
|
||||
#include <rtl.h>
|
||||
|
||||
#define NDEBUG
|
||||
#include <debug.h>
|
||||
|
||||
typedef struct
|
||||
|
|
|
@ -17,13 +17,7 @@
|
|||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#include "freeldr.h"
|
||||
#include "mm.h"
|
||||
#include "arch.h"
|
||||
#include "machine.h"
|
||||
#include "machpc.h"
|
||||
#include "rtl.h"
|
||||
#include "i386.h"
|
||||
#include <freeldr.h>
|
||||
|
||||
VOID
|
||||
PcMachInit(const char *CmdLine)
|
||||
|
|
|
@ -17,11 +17,7 @@
|
|||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#include "freeldr.h"
|
||||
#include "mm.h"
|
||||
#include "machine.h"
|
||||
#include "machxbox.h"
|
||||
#include "i386.h"
|
||||
#include <freeldr.h>
|
||||
|
||||
VOID
|
||||
XboxMachInit(const char *CmdLine)
|
||||
|
|
|
@ -17,12 +17,7 @@
|
|||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#include "freeldr.h"
|
||||
#include "machine.h"
|
||||
#include "arch.h"
|
||||
#include "debug.h"
|
||||
#include "machpc.h"
|
||||
#include "rtl.h"
|
||||
#include <freeldr.h>
|
||||
|
||||
#define TEXTMODE_BUFFER 0xb8000
|
||||
#define TEXTMODE_BUFFER_SIZE 0x8000
|
||||
|
|
|
@ -17,15 +17,10 @@
|
|||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#include "freeldr.h"
|
||||
#include "disk.h"
|
||||
#include "rtl.h"
|
||||
#include "arch.h"
|
||||
#include "debug.h"
|
||||
#include "portio.h"
|
||||
#include "machine.h"
|
||||
#include "machpc.h"
|
||||
#include <freeldr.h>
|
||||
|
||||
#define NDEBUG
|
||||
#include <debug.h>
|
||||
|
||||
typedef struct
|
||||
{
|
||||
|
|
|
@ -20,13 +20,10 @@
|
|||
* was Copyright (C) 1998-2003 Brian Palmer <brianp@sginet.com>
|
||||
*/
|
||||
|
||||
#include "freeldr.h"
|
||||
#include "arch.h"
|
||||
#include "debug.h"
|
||||
#include "machine.h"
|
||||
#include "machpc.h"
|
||||
#include "portio.h"
|
||||
#include "rtl.h"
|
||||
#include <freeldr.h>
|
||||
|
||||
#define NDEBUG
|
||||
#include <debug.h>
|
||||
|
||||
static ULONG
|
||||
PcMemGetExtendedMemorySize(VOID)
|
||||
|
|
|
@ -17,10 +17,7 @@
|
|||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#include "freeldr.h"
|
||||
#include "arch.h"
|
||||
#include "machine.h"
|
||||
#include "machpc.h"
|
||||
#include <freeldr.h>
|
||||
|
||||
#define BCD_INT(bcd) (((bcd & 0xf0) >> 4) * 10 + (bcd &0x0f))
|
||||
|
||||
|
|
|
@ -17,13 +17,10 @@
|
|||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#include "freeldr.h"
|
||||
#include "machine.h"
|
||||
#include "arch.h"
|
||||
#include "debug.h"
|
||||
#include "machpc.h"
|
||||
#include "rtl.h"
|
||||
#include "portio.h"
|
||||
#include <freeldr.h>
|
||||
|
||||
#define NDEBUG
|
||||
#include <debug.h>
|
||||
|
||||
#define VIDEOPORT_PALETTE_READ 0x03C7
|
||||
#define VIDEOPORT_PALETTE_WRITE 0x03C8
|
||||
|
|
|
@ -17,9 +17,7 @@
|
|||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#include "freeldr.h"
|
||||
#include "machine.h"
|
||||
#include "machxbox.h"
|
||||
#include <freeldr.h>
|
||||
|
||||
static unsigned CurrentCursorX = 0;
|
||||
static unsigned CurrentCursorY = 0;
|
||||
|
|
|
@ -22,13 +22,10 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#include "freeldr.h"
|
||||
#include "debug.h"
|
||||
#include "hardware.h"
|
||||
#include "machine.h"
|
||||
#include "machxbox.h"
|
||||
#include "portio.h"
|
||||
#include "rtl.h"
|
||||
#include <freeldr.h>
|
||||
|
||||
#define NDEBUG
|
||||
#include <debug.h>
|
||||
|
||||
#define XBOX_IDE_COMMAND_PORT 0x1f0
|
||||
#define XBOX_IDE_CONTROL_PORT 0x170
|
||||
|
|
|
@ -19,9 +19,7 @@
|
|||
* Note: Converted from the XFree vga.bdf font
|
||||
*/
|
||||
|
||||
#include "freeldr.h"
|
||||
#include "machine.h"
|
||||
#include "machxbox.h"
|
||||
#include <freeldr.h>
|
||||
|
||||
UCHAR XboxFont8x16[256 * 16] =
|
||||
{
|
||||
|
|
|
@ -17,9 +17,7 @@
|
|||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#include "freeldr.h"
|
||||
#include "machine.h"
|
||||
#include "machxbox.h"
|
||||
#include <freeldr.h>
|
||||
|
||||
VOID
|
||||
XboxHwDetect(VOID)
|
||||
|
|
|
@ -20,14 +20,7 @@
|
|||
* by the Xbox Linux group: http://www.xbox-linux.org
|
||||
*/
|
||||
|
||||
#include "freeldr.h"
|
||||
#include "debug.h"
|
||||
#include "mm.h"
|
||||
#include "rtl.h"
|
||||
#include "hardware.h"
|
||||
#include "machine.h"
|
||||
#include "machxbox.h"
|
||||
#include "portio.h"
|
||||
#include <freeldr.h>
|
||||
|
||||
static ULONG InstalledMemoryMb = 0;
|
||||
static ULONG AvailableMemoryMb = 0;
|
||||
|
|
|
@ -17,10 +17,7 @@
|
|||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#include "freeldr.h"
|
||||
#include "machine.h"
|
||||
#include "machxbox.h"
|
||||
#include "portio.h"
|
||||
#include <freeldr.h>
|
||||
|
||||
#define RTC_REGISTER_A 0x0A
|
||||
#define RTC_REG_A_UIP 0x80 /* Update In Progress bit */
|
||||
|
|
|
@ -20,12 +20,7 @@
|
|||
* by the Xbox Linux group: http://www.xbox-linux.org
|
||||
*/
|
||||
|
||||
#include "freeldr.h"
|
||||
#include "debug.h"
|
||||
#include "rtl.h"
|
||||
#include "machine.h"
|
||||
#include "machxbox.h"
|
||||
#include "portio.h"
|
||||
#include <freeldr.h>
|
||||
|
||||
#define I2C_IO_BASE 0xc000
|
||||
|
||||
|
|
|
@ -18,24 +18,6 @@
|
|||
*/
|
||||
|
||||
#include <freeldr.h>
|
||||
#include <rtl.h>
|
||||
#include <fs.h>
|
||||
#include <reactos.h>
|
||||
#include <ui.h>
|
||||
#include <arch.h>
|
||||
#include <miscboot.h>
|
||||
#include <linux.h>
|
||||
#include <mm.h>
|
||||
#include <inifile.h>
|
||||
#include <debug.h>
|
||||
#include <options.h>
|
||||
#include <oslist.h>
|
||||
#include <video.h>
|
||||
#include <bootmgr.h>
|
||||
#include <drivemap.h>
|
||||
#include <keycodes.h>
|
||||
#include <cmdline.h>
|
||||
#include <machine.h>
|
||||
|
||||
VOID RunLoader(VOID)
|
||||
{
|
||||
|
|
|
@ -17,15 +17,10 @@
|
|||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
|
||||
#include <freeldr.h>
|
||||
#include "cm.h"
|
||||
#include <mm.h>
|
||||
#include <disk.h>
|
||||
#include <rtl.h>
|
||||
|
||||
#define NDEBUG
|
||||
#include <debug.h>
|
||||
#include <arch.h>
|
||||
#include <machine.h>
|
||||
|
||||
// Returns a pointer to a CACHE_BLOCK structure
|
||||
// Adds the block to the cache manager block list
|
||||
|
|
9
reactos/boot/freeldr/freeldr/cache/cache.c
vendored
9
reactos/boot/freeldr/freeldr/cache/cache.c
vendored
|
@ -17,14 +17,9 @@
|
|||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
|
||||
#include <freeldr.h>
|
||||
#include "cm.h"
|
||||
#include <mm.h>
|
||||
#include <disk.h>
|
||||
#include <machine.h>
|
||||
#include <cache.h>
|
||||
#include <rtl.h>
|
||||
|
||||
#define NDEBUG
|
||||
#include <debug.h>
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
92
reactos/boot/freeldr/freeldr/cache/cm.h
vendored
92
reactos/boot/freeldr/freeldr/cache/cm.h
vendored
|
@ -1,92 +0,0 @@
|
|||
/*
|
||||
* FreeLoader
|
||||
* Copyright (C) 1998-2003 Brian Palmer <brianp@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., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
|
||||
#include <freeldr.h>
|
||||
#include <rtl.h>
|
||||
#include <disk.h>
|
||||
|
||||
#ifndef __CM_H
|
||||
#define __CM_H
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// This structure describes a cached block element. The disk is divided up into
|
||||
// cache blocks. For disks which LBA is not supported each block is the size of
|
||||
// one track. This will force the cache manager to make track sized reads, and
|
||||
// therefore maximizes throughput. For disks which support LBA the block size
|
||||
// is 64k because they have no cylinder, head, or sector boundaries.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////////////
|
||||
typedef struct
|
||||
{
|
||||
LIST_ITEM ListEntry; // Doubly linked list synchronization member
|
||||
|
||||
ULONG BlockNumber; // Track index for CHS, 64k block index for LBA
|
||||
BOOL LockedInCache; // Indicates that this block is locked in cache memory
|
||||
ULONG AccessCount; // Access count for this block
|
||||
|
||||
PVOID BlockData; // Pointer to block data
|
||||
|
||||
} CACHE_BLOCK, *PCACHE_BLOCK;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// This structure describes a cached drive. It contains the BIOS drive number
|
||||
// and indicates whether or not LBA is supported. If LBA is not supported then
|
||||
// the drive's geometry is described here.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////////////
|
||||
typedef struct
|
||||
{
|
||||
ULONG DriveNumber;
|
||||
ULONG BytesPerSector;
|
||||
|
||||
ULONG BlockSize; // Block size (in sectors)
|
||||
PCACHE_BLOCK CacheBlockHead;
|
||||
|
||||
} CACHE_DRIVE, *PCACHE_DRIVE;
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Internal data
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////////////
|
||||
extern CACHE_DRIVE CacheManagerDrive;
|
||||
extern BOOL CacheManagerInitialized;
|
||||
extern ULONG CacheBlockCount;
|
||||
extern ULONG CacheSizeLimit;
|
||||
extern ULONG CacheSizeCurrent;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Internal functions
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////////////
|
||||
PCACHE_BLOCK CacheInternalGetBlockPointer(PCACHE_DRIVE CacheDrive, ULONG BlockNumber); // Returns a pointer to a CACHE_BLOCK structure given a block number
|
||||
PCACHE_BLOCK CacheInternalFindBlock(PCACHE_DRIVE CacheDrive, ULONG BlockNumber); // Searches the block list for a particular block
|
||||
PCACHE_BLOCK CacheInternalAddBlockToCache(PCACHE_DRIVE CacheDrive, ULONG BlockNumber); // Adds a block to the cache's block list
|
||||
BOOL CacheInternalFreeBlock(PCACHE_DRIVE CacheDrive); // Removes a block from the cache's block list & frees the memory
|
||||
VOID CacheInternalCheckCacheSizeLimits(PCACHE_DRIVE CacheDrive); // Checks the cache size limits to see if we can add a new block, if not calls CacheInternalFreeBlock()
|
||||
VOID CacheInternalDumpBlockList(PCACHE_DRIVE CacheDrive); // Dumps the list of cached blocks to the debug output port
|
||||
VOID CacheInternalOptimizeBlockList(PCACHE_DRIVE CacheDrive, PCACHE_BLOCK CacheBlock); // Moves the specified block to the head of the list
|
||||
|
||||
|
||||
#endif // defined __CM_H
|
|
@ -19,8 +19,6 @@
|
|||
*/
|
||||
|
||||
#include <freeldr.h>
|
||||
#include <cmdline.h>
|
||||
#include <rtl.h>
|
||||
|
||||
static CMDLINEINFO CmdLineInfo;
|
||||
|
||||
|
|
|
@ -20,9 +20,6 @@
|
|||
*/
|
||||
|
||||
#include <freeldr.h>
|
||||
#include <comm.h>
|
||||
#include <portio.h>
|
||||
|
||||
|
||||
/* MACROS *******************************************************************/
|
||||
|
||||
|
|
|
@ -18,18 +18,6 @@
|
|||
*/
|
||||
|
||||
#include <freeldr.h>
|
||||
#include <rtl.h>
|
||||
#include <ui.h>
|
||||
#include <options.h>
|
||||
#include <miscboot.h>
|
||||
#include <debug.h>
|
||||
#include <disk.h>
|
||||
#include <arch.h>
|
||||
#include <inifile.h>
|
||||
#include <linux.h>
|
||||
#include <reactos.h>
|
||||
#include <drivemap.h>
|
||||
#include <machine.h>
|
||||
|
||||
|
||||
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";
|
||||
|
|
|
@ -18,11 +18,6 @@
|
|||
*/
|
||||
|
||||
#include <freeldr.h>
|
||||
#include <debug.h>
|
||||
#include <rtl.h>
|
||||
#include <comm.h>
|
||||
#include <portio.h>
|
||||
#include <machine.h>
|
||||
|
||||
#ifdef DEBUG
|
||||
|
||||
|
|
|
@ -18,12 +18,9 @@
|
|||
*/
|
||||
|
||||
#include <freeldr.h>
|
||||
#include <disk.h>
|
||||
#include <arch.h>
|
||||
#include <rtl.h>
|
||||
#include <ui.h>
|
||||
#include <debug.h>
|
||||
|
||||
#define NDEBUG
|
||||
#include <debug.h>
|
||||
|
||||
#undef UNIMPLEMENTED
|
||||
#define UNIMPLEMENTED BugCheck((DPRINT_WARNING, "Unimplemented\n"));
|
||||
|
|
|
@ -18,13 +18,9 @@
|
|||
*/
|
||||
|
||||
#include <freeldr.h>
|
||||
#include <disk.h>
|
||||
#include <rtl.h>
|
||||
#include <mm.h>
|
||||
#include <debug.h>
|
||||
#include <arch.h>
|
||||
#include <machine.h>
|
||||
|
||||
#define NDEBUG
|
||||
#include <debug.h>
|
||||
|
||||
BOOL DiskGetActivePartitionEntry(ULONG DriveNumber,
|
||||
PPARTITION_TABLE_ENTRY PartitionTableEntry,
|
||||
|
|
|
@ -18,11 +18,8 @@
|
|||
*/
|
||||
|
||||
#include <freeldr.h>
|
||||
#include <drivemap.h>
|
||||
#include <rtl.h>
|
||||
#include <inifile.h>
|
||||
#include <cache.h>
|
||||
#include <ui.h>
|
||||
|
||||
#define NDEBUG
|
||||
#include <debug.h>
|
||||
|
||||
BOOL DriveMapInstalled = FALSE; // Tells us if we have already installed our drive map int 13h handler code
|
||||
|
|
|
@ -18,14 +18,9 @@
|
|||
*/
|
||||
|
||||
#include <freeldr.h>
|
||||
#include <rtl.h>
|
||||
#include <arch.h>
|
||||
#include <machine.h>
|
||||
#include <mm.h>
|
||||
|
||||
#define NDEBUG
|
||||
#include <debug.h>
|
||||
#include <bootmgr.h>
|
||||
#include <fs.h>
|
||||
#include <cmdline.h>
|
||||
|
||||
VOID BootMain(LPSTR CmdLine)
|
||||
{
|
||||
|
|
|
@ -106,4 +106,5 @@
|
|||
<file>version.c</file>
|
||||
<file>cmdline.c</file>
|
||||
<file>machine.c</file>
|
||||
<pch>include/freeldr.h</pch>
|
||||
</module>
|
||||
|
|
|
@ -15,4 +15,5 @@
|
|||
<file>linuxboot.c</file>
|
||||
<file>oslist.c</file>
|
||||
<file>custom.c</file>
|
||||
<pch>include/freeldr.h</pch>
|
||||
</module>
|
||||
|
|
|
@ -18,17 +18,9 @@
|
|||
*/
|
||||
|
||||
#include <freeldr.h>
|
||||
#include <fs.h>
|
||||
#include "ext2.h"
|
||||
#include <disk.h>
|
||||
#include <rtl.h>
|
||||
#include <ui.h>
|
||||
#include <arch.h>
|
||||
#include <mm.h>
|
||||
#include <debug.h>
|
||||
#include <cache.h>
|
||||
#include <machine.h>
|
||||
|
||||
#define NDEBUG
|
||||
#include <debug.h>
|
||||
|
||||
GEOMETRY Ext2DiskGeometry; // Ext2 file system disk geometry
|
||||
|
||||
|
|
|
@ -18,16 +18,9 @@
|
|||
*/
|
||||
|
||||
#include <freeldr.h>
|
||||
#include <fs.h>
|
||||
#include "fat.h"
|
||||
#include <disk.h>
|
||||
#include <rtl.h>
|
||||
#include <ui.h>
|
||||
#include <arch.h>
|
||||
#include <mm.h>
|
||||
|
||||
#define NDEBUG
|
||||
#include <debug.h>
|
||||
#include <cache.h>
|
||||
#include <machine.h>
|
||||
|
||||
ULONG BytesPerSector; /* Number of bytes per sector */
|
||||
ULONG SectorsPerCluster; /* Number of sectors per cluster */
|
||||
|
|
|
@ -18,19 +18,9 @@
|
|||
*/
|
||||
|
||||
#include <freeldr.h>
|
||||
#include <fs.h>
|
||||
#include "fat.h"
|
||||
#include "iso.h"
|
||||
#include "ext2.h"
|
||||
#include "ntfs.h"
|
||||
#include "fsrec.h"
|
||||
#include <disk.h>
|
||||
#include <rtl.h>
|
||||
#include <ui.h>
|
||||
#include <arch.h>
|
||||
#include <debug.h>
|
||||
#include <machine.h>
|
||||
|
||||
#define NDEBUG
|
||||
#include <debug.h>
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// DATA
|
||||
|
|
|
@ -18,20 +18,9 @@
|
|||
*/
|
||||
|
||||
#include <freeldr.h>
|
||||
#include <fs.h>
|
||||
#include "fsrec.h"
|
||||
#include "fat.h"
|
||||
#include "iso.h"
|
||||
#include "ext2.h"
|
||||
#include "ntfs.h"
|
||||
#include <disk.h>
|
||||
#include <rtl.h>
|
||||
#include <arch.h>
|
||||
|
||||
#define NDEBUG
|
||||
#include <debug.h>
|
||||
#include <machine.h>
|
||||
|
||||
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// FUNCTIONS
|
||||
|
|
|
@ -18,17 +18,9 @@
|
|||
*/
|
||||
|
||||
#include <freeldr.h>
|
||||
#include <fs.h>
|
||||
#include <disk.h>
|
||||
#include <rtl.h>
|
||||
#include <arch.h>
|
||||
#include <mm.h>
|
||||
|
||||
#define NDEBUG
|
||||
#include <debug.h>
|
||||
#include <cache.h>
|
||||
#include <machine.h>
|
||||
|
||||
#include "iso.h"
|
||||
|
||||
|
||||
#define SECTORSIZE 2048
|
||||
|
||||
|
|
|
@ -25,16 +25,9 @@
|
|||
*/
|
||||
|
||||
#include <freeldr.h>
|
||||
#include <fs.h>
|
||||
#include <disk.h>
|
||||
#include <rtl.h>
|
||||
#include <arch.h>
|
||||
#include <mm.h>
|
||||
#include <debug.h>
|
||||
#include <cache.h>
|
||||
#include <machine.h>
|
||||
|
||||
#include "ntfs.h"
|
||||
#define NDEBUG
|
||||
#include <debug.h>
|
||||
|
||||
PNTFS_BOOTSECTOR NtfsBootSector;
|
||||
ULONG NtfsClusterSize;
|
||||
|
|
|
@ -21,6 +21,70 @@
|
|||
#ifndef __CACHE_H
|
||||
#define __CACHE_H
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// This structure describes a cached block element. The disk is divided up into
|
||||
// cache blocks. For disks which LBA is not supported each block is the size of
|
||||
// one track. This will force the cache manager to make track sized reads, and
|
||||
// therefore maximizes throughput. For disks which support LBA the block size
|
||||
// is 64k because they have no cylinder, head, or sector boundaries.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////////////
|
||||
typedef struct
|
||||
{
|
||||
LIST_ITEM ListEntry; // Doubly linked list synchronization member
|
||||
|
||||
ULONG BlockNumber; // Track index for CHS, 64k block index for LBA
|
||||
BOOL LockedInCache; // Indicates that this block is locked in cache memory
|
||||
ULONG AccessCount; // Access count for this block
|
||||
|
||||
PVOID BlockData; // Pointer to block data
|
||||
|
||||
} CACHE_BLOCK, *PCACHE_BLOCK;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// This structure describes a cached drive. It contains the BIOS drive number
|
||||
// and indicates whether or not LBA is supported. If LBA is not supported then
|
||||
// the drive's geometry is described here.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////////////
|
||||
typedef struct
|
||||
{
|
||||
ULONG DriveNumber;
|
||||
ULONG BytesPerSector;
|
||||
|
||||
ULONG BlockSize; // Block size (in sectors)
|
||||
PCACHE_BLOCK CacheBlockHead;
|
||||
|
||||
} CACHE_DRIVE, *PCACHE_DRIVE;
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Internal data
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////////////
|
||||
extern CACHE_DRIVE CacheManagerDrive;
|
||||
extern BOOL CacheManagerInitialized;
|
||||
extern ULONG CacheBlockCount;
|
||||
extern ULONG CacheSizeLimit;
|
||||
extern ULONG CacheSizeCurrent;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Internal functions
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////////////
|
||||
PCACHE_BLOCK CacheInternalGetBlockPointer(PCACHE_DRIVE CacheDrive, ULONG BlockNumber); // Returns a pointer to a CACHE_BLOCK structure given a block number
|
||||
PCACHE_BLOCK CacheInternalFindBlock(PCACHE_DRIVE CacheDrive, ULONG BlockNumber); // Searches the block list for a particular block
|
||||
PCACHE_BLOCK CacheInternalAddBlockToCache(PCACHE_DRIVE CacheDrive, ULONG BlockNumber); // Adds a block to the cache's block list
|
||||
BOOL CacheInternalFreeBlock(PCACHE_DRIVE CacheDrive); // Removes a block from the cache's block list & frees the memory
|
||||
VOID CacheInternalCheckCacheSizeLimits(PCACHE_DRIVE CacheDrive); // Checks the cache size limits to see if we can add a new block, if not calls CacheInternalFreeBlock()
|
||||
VOID CacheInternalDumpBlockList(PCACHE_DRIVE CacheDrive); // Dumps the list of cached blocks to the debug output port
|
||||
VOID CacheInternalOptimizeBlockList(PCACHE_DRIVE CacheDrive, PCACHE_BLOCK CacheBlock); // Moves the specified block to the head of the list
|
||||
|
||||
|
||||
BOOL CacheInitializeDrive(ULONG DriveNumber);
|
||||
VOID CacheInvalidateCacheData(VOID);
|
||||
BOOL CacheReadDiskSectors(ULONG DiskNumber, ULONG StartSector, ULONG SectorCount, PVOID Buffer);
|
||||
|
|
|
@ -29,11 +29,42 @@
|
|||
#include <ui.h>
|
||||
#include <multiboot.h>
|
||||
#include <mm.h>
|
||||
#include <cache.h>
|
||||
#include <machine.h>
|
||||
#include <inifile.h>
|
||||
#include <video.h>
|
||||
#include <portio.h>
|
||||
#include <reactos.h>
|
||||
#include <registry.h>
|
||||
#include <fsrec.h>
|
||||
/* file system headers */
|
||||
#include <fs\ext2.h>
|
||||
#include <fs\fat.h>
|
||||
#include <fs\ntfs.h>
|
||||
#include <fs\iso.h>
|
||||
/* ui support */
|
||||
#include <ui\tui.h>
|
||||
#include <ui\gui.h>
|
||||
/* arch files */
|
||||
#include <arch\i386\hardware.h>
|
||||
#include <arch\i386\i386.h>
|
||||
#include <arch\i386\machpc.h>
|
||||
#include <arch\i386\machxbox.h>
|
||||
#include <internal/i386/ke.h>
|
||||
/* misc files */
|
||||
#include <keycodes.h>
|
||||
#include <version.h>
|
||||
#include <cmdline.h>
|
||||
/* Needed by boot manager */
|
||||
#include <bootmgr.h>
|
||||
#include <oslist.h>
|
||||
#include <drivemap.h>
|
||||
#include <miscboot.h>
|
||||
#include <options.h>
|
||||
#include <linux.h>
|
||||
/* Externals */
|
||||
#include <reactos/rossym.h>
|
||||
#include <reactos/buildno.h>
|
||||
|
||||
#define Ke386EraseFlags(x) __asm__ __volatile__("pushl $0 ; popfl\n")
|
||||
|
||||
|
|
|
@ -20,6 +20,55 @@
|
|||
#ifndef __PARSEINI_H
|
||||
#define __PARSEINI_H
|
||||
|
||||
#define INI_FILE_COMMENT_CHAR ';'
|
||||
|
||||
|
||||
|
||||
// This structure describes a single .ini file item
|
||||
// The item format in the .ini file is:
|
||||
// Name=Value
|
||||
typedef struct
|
||||
{
|
||||
LIST_ITEM ListEntry;
|
||||
PCHAR ItemName;
|
||||
PCHAR ItemValue;
|
||||
|
||||
} INI_SECTION_ITEM, *PINI_SECTION_ITEM;
|
||||
|
||||
// This structure describes a .ini file section
|
||||
// The section format in the .ini file is:
|
||||
// [Section Name]
|
||||
// This structure has a list of section items with
|
||||
// one INI_SECTION_ITEM for each line in the section
|
||||
typedef struct
|
||||
{
|
||||
LIST_ITEM ListEntry;
|
||||
PCHAR SectionName;
|
||||
ULONG SectionItemCount;
|
||||
PINI_SECTION_ITEM SectionItemList;
|
||||
|
||||
} INI_SECTION, *PINI_SECTION;
|
||||
|
||||
extern PINI_SECTION IniFileSectionListHead;
|
||||
extern ULONG IniFileSectionCount;
|
||||
extern ULONG IniFileSettingCount;
|
||||
|
||||
PFILE IniOpenIniFile();
|
||||
|
||||
BOOL IniParseFile(PCHAR IniFileData, ULONG IniFileSize);
|
||||
ULONG IniGetNextLineSize(PCHAR IniFileData, ULONG IniFileSize, ULONG CurrentOffset);
|
||||
ULONG IniGetNextLine(PCHAR IniFileData, ULONG IniFileSize, PCHAR Buffer, ULONG BufferSize, ULONG CurrentOffset);
|
||||
BOOL IniIsLineEmpty(PCHAR LineOfText, ULONG TextLength);
|
||||
BOOL IniIsCommentLine(PCHAR LineOfText, ULONG TextLength);
|
||||
BOOL IniIsSectionName(PCHAR LineOfText, ULONG TextLength);
|
||||
ULONG IniGetSectionNameSize(PCHAR SectionNameLine, ULONG LineLength);
|
||||
VOID IniExtractSectionName(PCHAR SectionName, PCHAR SectionNameLine, ULONG LineLength);
|
||||
BOOL IniIsSetting(PCHAR LineOfText, ULONG TextLength);
|
||||
ULONG IniGetSettingNameSize(PCHAR SettingNameLine, ULONG LineLength);
|
||||
ULONG IniGetSettingValueSize(PCHAR SettingValueLine, ULONG LineLength);
|
||||
VOID IniExtractSettingName(PCHAR SettingName, PCHAR SettingNameLine, ULONG LineLength);
|
||||
VOID IniExtractSettingValue(PCHAR SettingValue, PCHAR SettingValueLine, ULONG LineLength);
|
||||
|
||||
BOOL IniFileInitialize(VOID);
|
||||
|
||||
BOOL IniOpenSection(PCSTR SectionName, ULONG* SectionId);
|
||||
|
|
|
@ -35,6 +35,50 @@ typedef struct
|
|||
ULONG Reserved;
|
||||
} PACKED BIOS_MEMORY_MAP, *PBIOS_MEMORY_MAP;
|
||||
|
||||
#if defined(__i386__) || defined(_PPC_)
|
||||
|
||||
#define MM_PAGE_SIZE 4096
|
||||
|
||||
#endif // defined __i386__ or _PPC_
|
||||
|
||||
typedef struct
|
||||
{
|
||||
ULONG PageAllocated; // Zero = free, non-zero = allocated
|
||||
ULONG PageAllocationLength; // Number of pages allocated (or zero if this isn't the first page in the chain)
|
||||
} PACKED PAGE_LOOKUP_TABLE_ITEM, *PPAGE_LOOKUP_TABLE_ITEM;
|
||||
|
||||
//
|
||||
// Define this to 1 if you want the entire contents
|
||||
// of the memory allocation bitmap displayed
|
||||
// when a chunk is allocated or freed
|
||||
//
|
||||
#define DUMP_MEM_MAP_ON_VERIFY 0
|
||||
|
||||
|
||||
|
||||
extern PVOID PageLookupTableAddress;
|
||||
extern ULONG TotalPagesInLookupTable;
|
||||
extern ULONG FreePagesInLookupTable;
|
||||
extern ULONG LastFreePageHint;
|
||||
|
||||
#ifdef DEBUG
|
||||
PUCHAR MmGetSystemMemoryMapTypeString(ULONG Type);
|
||||
#endif
|
||||
|
||||
ULONG MmGetPageNumberFromAddress(PVOID Address); // Returns the page number that contains a linear address
|
||||
PVOID MmGetEndAddressOfAnyMemory(PBIOS_MEMORY_MAP BiosMemoryMap, ULONG MapCount); // Returns the last address of memory from the memory map
|
||||
ULONG MmGetAddressablePageCountIncludingHoles(PBIOS_MEMORY_MAP BiosMemoryMap, ULONG MapCount); // Returns the count of addressable pages from address zero including any memory holes and reserved memory regions
|
||||
PVOID MmFindLocationForPageLookupTable(PBIOS_MEMORY_MAP BiosMemoryMap, ULONG MapCount); // Returns the address for a memory chunk big enough to hold the page lookup table (starts search from end of memory)
|
||||
VOID MmSortBiosMemoryMap(PBIOS_MEMORY_MAP BiosMemoryMap, ULONG MapCount); // Sorts the BIOS_MEMORY_MAP array so the first element corresponds to the first address in memory
|
||||
VOID MmInitPageLookupTable(PVOID PageLookupTable, ULONG TotalPageCount, PBIOS_MEMORY_MAP BiosMemoryMap, ULONG MapCount); // Inits the page lookup table according to the memory types in the memory map
|
||||
VOID MmMarkPagesInLookupTable(PVOID PageLookupTable, ULONG StartPage, ULONG PageCount, ULONG PageAllocated); // Marks the specified pages as allocated or free in the lookup table
|
||||
VOID MmAllocatePagesInLookupTable(PVOID PageLookupTable, ULONG StartPage, ULONG PageCount); // Allocates the specified pages in the lookup table
|
||||
ULONG MmCountFreePagesInLookupTable(PVOID PageLookupTable, ULONG TotalPageCount); // Returns the number of free pages in the lookup table
|
||||
ULONG MmFindAvailablePagesFromEnd(PVOID PageLookupTable, ULONG TotalPageCount, ULONG PagesNeeded); // Returns the page number of the first available page range from the end of memory
|
||||
ULONG MmFindAvailablePagesBeforePage(PVOID PageLookupTable, ULONG TotalPageCount, ULONG PagesNeeded, ULONG LastPage); // Returns the page number of the first available page range before the specified page
|
||||
VOID MmFixupSystemMemoryMap(PBIOS_MEMORY_MAP BiosMemoryMap, ULONG* MapCount); // Removes entries in the memory map that describe memory above 4G
|
||||
VOID MmUpdateLastFreePageHint(PVOID PageLookupTable, ULONG TotalPageCount); // Sets the LastFreePageHint to the last usable page of memory
|
||||
BOOL MmAreMemoryPagesAvailable(PVOID PageLookupTable, ULONG TotalPageCount, PVOID PageAddress, ULONG PageCount); // Returns TRUE if the specified pages of memory are available, otherwise FALSE
|
||||
|
||||
ULONG GetSystemMemorySize(VOID); // Returns the amount of total memory in the system
|
||||
|
||||
|
|
|
@ -28,12 +28,6 @@
|
|||
/* INCLUDES *****************************************************************/
|
||||
|
||||
#include <freeldr.h>
|
||||
#include <mm.h>
|
||||
#include <rtl.h>
|
||||
#include <fs.h>
|
||||
|
||||
#include <inffile.h>
|
||||
|
||||
|
||||
#define CONTROL_Z '\x1a'
|
||||
#define MAX_SECTION_NAME_LEN 255
|
||||
|
|
|
@ -1,76 +0,0 @@
|
|||
/*
|
||||
* FreeLoader
|
||||
* Copyright (C) 1998-2003 Brian Palmer <brianp@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., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#ifndef __INI_H
|
||||
#define __INI_H
|
||||
|
||||
#include <rtl.h>
|
||||
#include <fs.h>
|
||||
|
||||
|
||||
#define INI_FILE_COMMENT_CHAR ';'
|
||||
|
||||
|
||||
|
||||
// This structure describes a single .ini file item
|
||||
// The item format in the .ini file is:
|
||||
// Name=Value
|
||||
typedef struct
|
||||
{
|
||||
LIST_ITEM ListEntry;
|
||||
PCHAR ItemName;
|
||||
PCHAR ItemValue;
|
||||
|
||||
} INI_SECTION_ITEM, *PINI_SECTION_ITEM;
|
||||
|
||||
// This structure describes a .ini file section
|
||||
// The section format in the .ini file is:
|
||||
// [Section Name]
|
||||
// This structure has a list of section items with
|
||||
// one INI_SECTION_ITEM for each line in the section
|
||||
typedef struct
|
||||
{
|
||||
LIST_ITEM ListEntry;
|
||||
PCHAR SectionName;
|
||||
ULONG SectionItemCount;
|
||||
PINI_SECTION_ITEM SectionItemList;
|
||||
|
||||
} INI_SECTION, *PINI_SECTION;
|
||||
|
||||
extern PINI_SECTION IniFileSectionListHead;
|
||||
extern ULONG IniFileSectionCount;
|
||||
extern ULONG IniFileSettingCount;
|
||||
|
||||
PFILE IniOpenIniFile();
|
||||
|
||||
BOOL IniParseFile(PCHAR IniFileData, ULONG IniFileSize);
|
||||
ULONG IniGetNextLineSize(PCHAR IniFileData, ULONG IniFileSize, ULONG CurrentOffset);
|
||||
ULONG IniGetNextLine(PCHAR IniFileData, ULONG IniFileSize, PCHAR Buffer, ULONG BufferSize, ULONG CurrentOffset);
|
||||
BOOL IniIsLineEmpty(PCHAR LineOfText, ULONG TextLength);
|
||||
BOOL IniIsCommentLine(PCHAR LineOfText, ULONG TextLength);
|
||||
BOOL IniIsSectionName(PCHAR LineOfText, ULONG TextLength);
|
||||
ULONG IniGetSectionNameSize(PCHAR SectionNameLine, ULONG LineLength);
|
||||
VOID IniExtractSectionName(PCHAR SectionName, PCHAR SectionNameLine, ULONG LineLength);
|
||||
BOOL IniIsSetting(PCHAR LineOfText, ULONG TextLength);
|
||||
ULONG IniGetSettingNameSize(PCHAR SettingNameLine, ULONG LineLength);
|
||||
ULONG IniGetSettingValueSize(PCHAR SettingValueLine, ULONG LineLength);
|
||||
VOID IniExtractSettingName(PCHAR SettingName, PCHAR SettingNameLine, ULONG LineLength);
|
||||
VOID IniExtractSettingValue(PCHAR SettingValue, PCHAR SettingValueLine, ULONG LineLength);
|
||||
|
||||
#endif // defined __INI_H
|
|
@ -18,12 +18,6 @@
|
|||
*/
|
||||
|
||||
#include <freeldr.h>
|
||||
#include "ini.h"
|
||||
#include <fs.h>
|
||||
#include <rtl.h>
|
||||
#include <mm.h>
|
||||
#include <debug.h>
|
||||
|
||||
|
||||
BOOL IniFileInitialize(VOID)
|
||||
{
|
||||
|
|
|
@ -18,11 +18,9 @@
|
|||
*/
|
||||
|
||||
#include <freeldr.h>
|
||||
#include "ini.h"
|
||||
#include <ui.h>
|
||||
#include <rtl.h>
|
||||
|
||||
#define NDEBUG
|
||||
#include <debug.h>
|
||||
#include <mm.h>
|
||||
|
||||
BOOL IniOpenSection(PCSTR SectionName, ULONG* SectionId)
|
||||
{
|
||||
|
|
|
@ -18,12 +18,9 @@
|
|||
*/
|
||||
|
||||
#include <freeldr.h>
|
||||
#include "ini.h"
|
||||
#include <rtl.h>
|
||||
#include <mm.h>
|
||||
#include <debug.h>
|
||||
#include <machine.h>
|
||||
|
||||
#define NDEBUG
|
||||
#include <debug.h>
|
||||
|
||||
PINI_SECTION IniFileSectionListHead = NULL;
|
||||
ULONG IniFileSectionCount = 0;
|
||||
|
|
|
@ -19,21 +19,9 @@
|
|||
|
||||
|
||||
#include <freeldr.h>
|
||||
#include <arch.h>
|
||||
#include <disk.h>
|
||||
#include <miscboot.h>
|
||||
#include <rtl.h>
|
||||
#include <fs.h>
|
||||
#include <ui.h>
|
||||
#include <linux.h>
|
||||
|
||||
#define NDEBUG
|
||||
#include <debug.h>
|
||||
#include <mm.h>
|
||||
#include <inifile.h>
|
||||
#include <oslist.h> // For RemoveQuotes()
|
||||
#include <video.h>
|
||||
#include <drivemap.h>
|
||||
|
||||
|
||||
|
||||
#define LINUX_READ_CHUNK_SIZE 0x20000 // Read 128k at a time
|
||||
|
||||
|
|
|
@ -17,8 +17,7 @@
|
|||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#include "freeldr.h"
|
||||
#include "machine.h"
|
||||
#include <freeldr.h>
|
||||
|
||||
#undef MachConsPutChar
|
||||
#undef MachConsKbHit
|
||||
|
|
|
@ -17,17 +17,7 @@
|
|||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
|
||||
#include <freeldr.h>
|
||||
#include <arch.h>
|
||||
#include <miscboot.h>
|
||||
#include <rtl.h>
|
||||
#include <fs.h>
|
||||
#include <ui.h>
|
||||
#include <inifile.h>
|
||||
#include <disk.h>
|
||||
#include <drivemap.h>
|
||||
#include <machine.h>
|
||||
|
||||
VOID LoadAndBootBootSector(PCSTR OperatingSystemName)
|
||||
{
|
||||
|
|
|
@ -1,70 +0,0 @@
|
|||
/*
|
||||
* FreeLoader
|
||||
* Copyright (C) 1998-2003 Brian Palmer <brianp@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., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __MEM_H
|
||||
#define __MEM_H
|
||||
|
||||
|
||||
#if defined(__i386__) || defined(_PPC_)
|
||||
|
||||
#define MM_PAGE_SIZE 4096
|
||||
|
||||
#endif // defined __i386__ or _PPC_
|
||||
|
||||
typedef struct
|
||||
{
|
||||
ULONG PageAllocated; // Zero = free, non-zero = allocated
|
||||
ULONG PageAllocationLength; // Number of pages allocated (or zero if this isn't the first page in the chain)
|
||||
} PACKED PAGE_LOOKUP_TABLE_ITEM, *PPAGE_LOOKUP_TABLE_ITEM;
|
||||
|
||||
//
|
||||
// Define this to 1 if you want the entire contents
|
||||
// of the memory allocation bitmap displayed
|
||||
// when a chunk is allocated or freed
|
||||
//
|
||||
#define DUMP_MEM_MAP_ON_VERIFY 0
|
||||
|
||||
|
||||
|
||||
extern PVOID PageLookupTableAddress;
|
||||
extern ULONG TotalPagesInLookupTable;
|
||||
extern ULONG FreePagesInLookupTable;
|
||||
extern ULONG LastFreePageHint;
|
||||
|
||||
#ifdef DEBUG
|
||||
PUCHAR MmGetSystemMemoryMapTypeString(ULONG Type);
|
||||
#endif
|
||||
|
||||
ULONG MmGetPageNumberFromAddress(PVOID Address); // Returns the page number that contains a linear address
|
||||
PVOID MmGetEndAddressOfAnyMemory(PBIOS_MEMORY_MAP BiosMemoryMap, ULONG MapCount); // Returns the last address of memory from the memory map
|
||||
ULONG MmGetAddressablePageCountIncludingHoles(PBIOS_MEMORY_MAP BiosMemoryMap, ULONG MapCount); // Returns the count of addressable pages from address zero including any memory holes and reserved memory regions
|
||||
PVOID MmFindLocationForPageLookupTable(PBIOS_MEMORY_MAP BiosMemoryMap, ULONG MapCount); // Returns the address for a memory chunk big enough to hold the page lookup table (starts search from end of memory)
|
||||
VOID MmSortBiosMemoryMap(PBIOS_MEMORY_MAP BiosMemoryMap, ULONG MapCount); // Sorts the BIOS_MEMORY_MAP array so the first element corresponds to the first address in memory
|
||||
VOID MmInitPageLookupTable(PVOID PageLookupTable, ULONG TotalPageCount, PBIOS_MEMORY_MAP BiosMemoryMap, ULONG MapCount); // Inits the page lookup table according to the memory types in the memory map
|
||||
VOID MmMarkPagesInLookupTable(PVOID PageLookupTable, ULONG StartPage, ULONG PageCount, ULONG PageAllocated); // Marks the specified pages as allocated or free in the lookup table
|
||||
VOID MmAllocatePagesInLookupTable(PVOID PageLookupTable, ULONG StartPage, ULONG PageCount); // Allocates the specified pages in the lookup table
|
||||
ULONG MmCountFreePagesInLookupTable(PVOID PageLookupTable, ULONG TotalPageCount); // Returns the number of free pages in the lookup table
|
||||
ULONG MmFindAvailablePagesFromEnd(PVOID PageLookupTable, ULONG TotalPageCount, ULONG PagesNeeded); // Returns the page number of the first available page range from the end of memory
|
||||
ULONG MmFindAvailablePagesBeforePage(PVOID PageLookupTable, ULONG TotalPageCount, ULONG PagesNeeded, ULONG LastPage); // Returns the page number of the first available page range before the specified page
|
||||
VOID MmFixupSystemMemoryMap(PBIOS_MEMORY_MAP BiosMemoryMap, ULONG* MapCount); // Removes entries in the memory map that describe memory above 4G
|
||||
VOID MmUpdateLastFreePageHint(PVOID PageLookupTable, ULONG TotalPageCount); // Sets the LastFreePageHint to the last usable page of memory
|
||||
BOOL MmAreMemoryPagesAvailable(PVOID PageLookupTable, ULONG TotalPageCount, PVOID PageAddress, ULONG PageCount); // Returns TRUE if the specified pages of memory are available, otherwise FALSE
|
||||
|
||||
#endif // defined __MEM_H
|
|
@ -18,14 +18,9 @@
|
|||
*/
|
||||
|
||||
#include <freeldr.h>
|
||||
#include <arch.h>
|
||||
#include <mm.h>
|
||||
#include "mem.h"
|
||||
#include <rtl.h>
|
||||
#include <debug.h>
|
||||
#include <ui.h>
|
||||
#include <machine.h>
|
||||
|
||||
#define NDEBUG
|
||||
#include <debug.h>
|
||||
|
||||
#ifdef DEBUG
|
||||
typedef struct
|
||||
|
|
|
@ -18,13 +18,9 @@
|
|||
*/
|
||||
|
||||
#include <freeldr.h>
|
||||
#include <mm.h>
|
||||
#include "mem.h"
|
||||
#include <rtl.h>
|
||||
#include <debug.h>
|
||||
#include <ui.h>
|
||||
#include <machine.h>
|
||||
|
||||
#define NDEBUG
|
||||
#include <debug.h>
|
||||
|
||||
#ifdef DEBUG
|
||||
ULONG AllocationCount = 0;
|
||||
|
|
|
@ -18,14 +18,6 @@
|
|||
*/
|
||||
|
||||
#include <freeldr.h>
|
||||
#include <rtl.h>
|
||||
#include <ui.h>
|
||||
#include <options.h>
|
||||
#include <miscboot.h>
|
||||
#include <debug.h>
|
||||
#include <disk.h>
|
||||
#include <arch.h>
|
||||
|
||||
|
||||
PCSTR OptionsMenuList[] =
|
||||
{
|
||||
|
|
|
@ -18,11 +18,6 @@
|
|||
*/
|
||||
|
||||
#include <freeldr.h>
|
||||
#include <inifile.h>
|
||||
#include <oslist.h>
|
||||
#include <rtl.h>
|
||||
#include <mm.h>
|
||||
#include <ui.h>
|
||||
|
||||
BOOL InitOperatingSystemList(PCSTR **SectionNamesPointer, PCSTR **DisplayNamesPointer, ULONG* OperatingSystemCountPointer)
|
||||
{
|
||||
|
|
|
@ -20,8 +20,6 @@
|
|||
*/
|
||||
|
||||
#include <freeldr.h>
|
||||
#include <rtl.h>
|
||||
|
||||
|
||||
BOOL DissectArcPath(CHAR *ArcPath, CHAR *BootPath, ULONG* BootDrive, ULONG* BootPartition)
|
||||
{
|
||||
|
|
|
@ -20,13 +20,10 @@
|
|||
*/
|
||||
|
||||
#include <freeldr.h>
|
||||
#include <rtl.h>
|
||||
#include <mm.h>
|
||||
|
||||
#define NDEBUG
|
||||
#include <debug.h>
|
||||
|
||||
#include "registry.h"
|
||||
|
||||
|
||||
#define REG_HIVE_ID 0x66676572 /* "regf" */
|
||||
#define REG_BIN_ID 0x6e696268 /* "hbin" */
|
||||
#define REG_KEY_CELL_ID 0x6b6e
|
||||
|
|
|
@ -20,8 +20,6 @@
|
|||
*/
|
||||
|
||||
#include <freeldr.h>
|
||||
#include <../arch/i386/hardware.h>
|
||||
#include <internal/i386/ke.h>
|
||||
|
||||
#define NDEBUG
|
||||
#include <debug.h>
|
||||
|
|
|
@ -20,9 +20,6 @@
|
|||
*/
|
||||
|
||||
#include <freeldr.h>
|
||||
#include <reactos/rossym.h>
|
||||
|
||||
#include "registry.h"
|
||||
|
||||
#define NDEBUG
|
||||
#include <debug.h>
|
||||
|
|
|
@ -19,12 +19,9 @@
|
|||
*/
|
||||
|
||||
#include <freeldr.h>
|
||||
#include <mm.h>
|
||||
#include <rtl.h>
|
||||
#include <debug.h>
|
||||
#include "registry.h"
|
||||
|
||||
#include <ui.h>
|
||||
#define NDEBUG
|
||||
#include <debug.h>
|
||||
|
||||
static FRLDRHKEY RootKey;
|
||||
|
||||
|
|
|
@ -19,20 +19,6 @@
|
|||
*/
|
||||
|
||||
#include <freeldr.h>
|
||||
#include <reactos/rossym.h>
|
||||
#include <debug.h>
|
||||
#include <arch.h>
|
||||
#include <disk.h>
|
||||
#include <reactos.h>
|
||||
#include <rtl.h>
|
||||
#include <fs.h>
|
||||
#include <multiboot.h>
|
||||
#include <mm.h>
|
||||
#include <machine.h>
|
||||
#include <ui.h>
|
||||
#include <inffile.h>
|
||||
|
||||
#include "registry.h"
|
||||
|
||||
LOADER_PARAMETER_BLOCK LoaderBlock;
|
||||
char reactos_kernel_cmdline[255]; // Command line passed to kernel
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#include <rtl.h>
|
||||
#include <freeldr.h>
|
||||
|
||||
VOID RtlListInitializeHead(PLIST_ITEM ListHead)
|
||||
{
|
||||
|
|
|
@ -18,9 +18,6 @@
|
|||
*/
|
||||
|
||||
#include <freeldr.h>
|
||||
#include <machine.h>
|
||||
#include <rtl.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
/*
|
||||
* print() - prints unformatted text to stdout
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#include <rtl.h>
|
||||
#include <freeldr.h>
|
||||
|
||||
/*
|
||||
* convert_to_ascii() - converts a number to it's ascii equivalent
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#include <rtl.h>
|
||||
#include <freeldr.h>
|
||||
|
||||
size_t strlen(const char *str)
|
||||
{
|
||||
|
|
|
@ -18,13 +18,6 @@
|
|||
*/
|
||||
|
||||
#include <freeldr.h>
|
||||
#include <ui.h>
|
||||
#include "gui.h"
|
||||
#include <rtl.h>
|
||||
#include <mm.h>
|
||||
#include <debug.h>
|
||||
#include <inifile.h>
|
||||
#include <version.h>
|
||||
|
||||
VOID GuiDrawBackdrop(VOID)
|
||||
{
|
||||
|
|
|
@ -18,17 +18,6 @@
|
|||
*/
|
||||
|
||||
#include <freeldr.h>
|
||||
#include <ui.h>
|
||||
#include "tui.h"
|
||||
#include "keycodes.h"
|
||||
#include <rtl.h>
|
||||
#include <mm.h>
|
||||
#include <debug.h>
|
||||
#include <inifile.h>
|
||||
#include <version.h>
|
||||
#include <video.h>
|
||||
#include <machine.h>
|
||||
|
||||
|
||||
PVOID TextVideoBuffer = NULL;
|
||||
|
||||
|
|
|
@ -18,15 +18,6 @@
|
|||
*/
|
||||
|
||||
#include <freeldr.h>
|
||||
#include <rtl.h>
|
||||
#include <ui.h>
|
||||
#include "tui.h"
|
||||
#include "keycodes.h"
|
||||
#include <options.h>
|
||||
#include <mm.h>
|
||||
#include <machine.h>
|
||||
#include <video.h>
|
||||
|
||||
|
||||
BOOL TuiDisplayMenu(PCSTR MenuItemList[], ULONG MenuItemCount, ULONG DefaultMenuItem, LONG MenuTimeOut, ULONG* SelectedMenuItem, BOOL CanEscape, UiMenuKeyPressFilterCallback KeyPressFilter)
|
||||
{
|
||||
|
|
|
@ -18,16 +18,10 @@
|
|||
*/
|
||||
|
||||
#include <freeldr.h>
|
||||
#include <ui.h>
|
||||
#include "tui.h"
|
||||
#include <rtl.h>
|
||||
#include <mm.h>
|
||||
#include <machine.h>
|
||||
|
||||
#define NDEBUG
|
||||
#include <debug.h>
|
||||
#include <inifile.h>
|
||||
#include <version.h>
|
||||
#include <video.h>
|
||||
#include <reactos/buildno.h>
|
||||
|
||||
|
||||
ULONG UiScreenWidth = 80; // Screen Width
|
||||
ULONG UiScreenHeight = 25; // Screen Height
|
||||
|
|
|
@ -18,8 +18,6 @@
|
|||
*/
|
||||
|
||||
#include <freeldr.h>
|
||||
#include <version.h>
|
||||
#include <rtl.h>
|
||||
|
||||
CHAR FreeLoaderVersionString[80];
|
||||
|
||||
|
|
|
@ -18,12 +18,6 @@
|
|||
*/
|
||||
|
||||
#include <freeldr.h>
|
||||
#include <video.h>
|
||||
#include <comm.h>
|
||||
#include <rtl.h>
|
||||
#include <debug.h>
|
||||
#include <machine.h>
|
||||
|
||||
|
||||
#if 0 /* This stuff isn't used and as far as I'm concerned it can go - GvG */
|
||||
U32 CurrentMemoryBank = 0;
|
||||
|
|
|
@ -18,9 +18,6 @@
|
|||
*/
|
||||
|
||||
#include <freeldr.h>
|
||||
#include <video.h>
|
||||
#include <machine.h>
|
||||
|
||||
|
||||
#define RGB_MAX 64
|
||||
#define RGB_MAX_PER_ITERATION 64
|
||||
|
|
|
@ -18,8 +18,6 @@
|
|||
*/
|
||||
|
||||
#include <freeldr.h>
|
||||
#include <video.h>
|
||||
#include <machine.h>
|
||||
|
||||
VOID VideoSavePaletteState(PPALETTE_ENTRY Palette, ULONG ColorCount)
|
||||
{
|
||||
|
|
|
@ -18,12 +18,6 @@
|
|||
*/
|
||||
|
||||
#include <freeldr.h>
|
||||
#include <video.h>
|
||||
#include <portio.h>
|
||||
#include <debug.h>
|
||||
#include <machine.h>
|
||||
|
||||
|
||||
|
||||
#if 0 /* This stuff isn't used and as far as I'm concerned it can go - GvG */
|
||||
//
|
||||
|
|
|
@ -18,11 +18,6 @@
|
|||
*/
|
||||
|
||||
#include <freeldr.h>
|
||||
#include <video.h>
|
||||
#include <portio.h>
|
||||
#include <mm.h>
|
||||
#include <machine.h>
|
||||
|
||||
|
||||
PVOID VideoOffScreenBuffer = NULL;
|
||||
|
||||
|
|
Loading…
Reference in a new issue