mirror of
https://github.com/reactos/reactos.git
synced 2024-06-28 17:01:28 +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.
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "freeldr.h"
|
#include <freeldr.h>
|
||||||
#include "mm.h"
|
|
||||||
#include "machine.h"
|
|
||||||
#include "machpc.h"
|
|
||||||
#include "machxbox.h"
|
|
||||||
#include "portio.h"
|
|
||||||
#include "hardware.h"
|
|
||||||
#include "rtl.h"
|
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
MachInit(const char *CmdLine)
|
MachInit(const char *CmdLine)
|
||||||
|
|
|
@ -19,19 +19,9 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <freeldr.h>
|
#include <freeldr.h>
|
||||||
#include <arch.h>
|
|
||||||
#include <rtl.h>
|
#define NDEBUG
|
||||||
#include <debug.h>
|
#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 MILLISEC (10)
|
||||||
#define PRECISION (8)
|
#define PRECISION (8)
|
||||||
|
|
|
@ -19,14 +19,9 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <freeldr.h>
|
#include <freeldr.h>
|
||||||
#include <arch.h>
|
|
||||||
#include <rtl.h>
|
|
||||||
#include <debug.h>
|
|
||||||
#include <mm.h>
|
|
||||||
#include <portio.h>
|
|
||||||
|
|
||||||
#include "../../reactos/registry.h"
|
#define NDEBUG
|
||||||
#include "hardware.h"
|
#include <debug.h>
|
||||||
|
|
||||||
BOOLEAN AcpiPresent = FALSE;
|
BOOLEAN AcpiPresent = FALSE;
|
||||||
|
|
||||||
|
|
|
@ -19,15 +19,9 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <freeldr.h>
|
#include <freeldr.h>
|
||||||
#include <arch.h>
|
|
||||||
#include <rtl.h>
|
#define NDEBUG
|
||||||
#include <debug.h>
|
#include <debug.h>
|
||||||
#include <mm.h>
|
|
||||||
#include <portio.h>
|
|
||||||
|
|
||||||
#include "../../reactos/registry.h"
|
|
||||||
#include "hardware.h"
|
|
||||||
|
|
||||||
|
|
||||||
static BOOL
|
static BOOL
|
||||||
FindApmBios(VOID)
|
FindApmBios(VOID)
|
||||||
|
|
|
@ -19,15 +19,9 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <freeldr.h>
|
#include <freeldr.h>
|
||||||
#include <arch.h>
|
|
||||||
#include <rtl.h>
|
#define NDEBUG
|
||||||
#include <debug.h>
|
#include <debug.h>
|
||||||
#include <mm.h>
|
|
||||||
#include <portio.h>
|
|
||||||
|
|
||||||
#include "../../reactos/registry.h"
|
|
||||||
#include "hardware.h"
|
|
||||||
|
|
||||||
|
|
||||||
#define MP_FP_SIGNATURE 0x5F504D5F /* "_MP_" */
|
#define MP_FP_SIGNATURE 0x5F504D5F /* "_MP_" */
|
||||||
#define MP_CT_SIGNATURE 0x504D4350 /* "PCMP" */
|
#define MP_CT_SIGNATURE 0x504D4350 /* "PCMP" */
|
||||||
|
|
|
@ -19,14 +19,9 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <freeldr.h>
|
#include <freeldr.h>
|
||||||
#include <arch.h>
|
|
||||||
#include <rtl.h>
|
|
||||||
#include <debug.h>
|
|
||||||
#include <mm.h>
|
|
||||||
#include <portio.h>
|
|
||||||
|
|
||||||
#include "../../reactos/registry.h"
|
#define NDEBUG
|
||||||
#include "hardware.h"
|
#include <debug.h>
|
||||||
|
|
||||||
typedef struct _ROUTING_SLOT
|
typedef struct _ROUTING_SLOT
|
||||||
{
|
{
|
||||||
|
|
|
@ -17,10 +17,10 @@
|
||||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "freeldr.h"
|
#include <freeldr.h>
|
||||||
#include "debug.h"
|
|
||||||
#include "i386.h"
|
#define NDEBUG
|
||||||
#include "fsrec.h"
|
#include <debug.h>
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
// FUNCTIONS
|
// FUNCTIONS
|
||||||
|
|
|
@ -20,12 +20,9 @@
|
||||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include <freeldr.h>
|
#include <freeldr.h>
|
||||||
#include <arch.h>
|
|
||||||
#include <video.h>
|
#define NDEBUG
|
||||||
#include <portio.h>
|
|
||||||
#include <rtl.h>
|
|
||||||
#include <debug.h>
|
#include <debug.h>
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
|
|
|
@ -17,13 +17,7 @@
|
||||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "freeldr.h"
|
#include <freeldr.h>
|
||||||
#include "mm.h"
|
|
||||||
#include "arch.h"
|
|
||||||
#include "machine.h"
|
|
||||||
#include "machpc.h"
|
|
||||||
#include "rtl.h"
|
|
||||||
#include "i386.h"
|
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
PcMachInit(const char *CmdLine)
|
PcMachInit(const char *CmdLine)
|
||||||
|
|
|
@ -17,11 +17,7 @@
|
||||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "freeldr.h"
|
#include <freeldr.h>
|
||||||
#include "mm.h"
|
|
||||||
#include "machine.h"
|
|
||||||
#include "machxbox.h"
|
|
||||||
#include "i386.h"
|
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
XboxMachInit(const char *CmdLine)
|
XboxMachInit(const char *CmdLine)
|
||||||
|
|
|
@ -17,12 +17,7 @@
|
||||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "freeldr.h"
|
#include <freeldr.h>
|
||||||
#include "machine.h"
|
|
||||||
#include "arch.h"
|
|
||||||
#include "debug.h"
|
|
||||||
#include "machpc.h"
|
|
||||||
#include "rtl.h"
|
|
||||||
|
|
||||||
#define TEXTMODE_BUFFER 0xb8000
|
#define TEXTMODE_BUFFER 0xb8000
|
||||||
#define TEXTMODE_BUFFER_SIZE 0x8000
|
#define TEXTMODE_BUFFER_SIZE 0x8000
|
||||||
|
|
|
@ -17,15 +17,10 @@
|
||||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "freeldr.h"
|
#include <freeldr.h>
|
||||||
#include "disk.h"
|
|
||||||
#include "rtl.h"
|
|
||||||
#include "arch.h"
|
|
||||||
#include "debug.h"
|
|
||||||
#include "portio.h"
|
|
||||||
#include "machine.h"
|
|
||||||
#include "machpc.h"
|
|
||||||
|
|
||||||
|
#define NDEBUG
|
||||||
|
#include <debug.h>
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
|
|
|
@ -20,13 +20,10 @@
|
||||||
* was Copyright (C) 1998-2003 Brian Palmer <brianp@sginet.com>
|
* was Copyright (C) 1998-2003 Brian Palmer <brianp@sginet.com>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "freeldr.h"
|
#include <freeldr.h>
|
||||||
#include "arch.h"
|
|
||||||
#include "debug.h"
|
#define NDEBUG
|
||||||
#include "machine.h"
|
#include <debug.h>
|
||||||
#include "machpc.h"
|
|
||||||
#include "portio.h"
|
|
||||||
#include "rtl.h"
|
|
||||||
|
|
||||||
static ULONG
|
static ULONG
|
||||||
PcMemGetExtendedMemorySize(VOID)
|
PcMemGetExtendedMemorySize(VOID)
|
||||||
|
|
|
@ -17,10 +17,7 @@
|
||||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "freeldr.h"
|
#include <freeldr.h>
|
||||||
#include "arch.h"
|
|
||||||
#include "machine.h"
|
|
||||||
#include "machpc.h"
|
|
||||||
|
|
||||||
#define BCD_INT(bcd) (((bcd & 0xf0) >> 4) * 10 + (bcd &0x0f))
|
#define BCD_INT(bcd) (((bcd & 0xf0) >> 4) * 10 + (bcd &0x0f))
|
||||||
|
|
||||||
|
|
|
@ -17,13 +17,10 @@
|
||||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "freeldr.h"
|
#include <freeldr.h>
|
||||||
#include "machine.h"
|
|
||||||
#include "arch.h"
|
#define NDEBUG
|
||||||
#include "debug.h"
|
#include <debug.h>
|
||||||
#include "machpc.h"
|
|
||||||
#include "rtl.h"
|
|
||||||
#include "portio.h"
|
|
||||||
|
|
||||||
#define VIDEOPORT_PALETTE_READ 0x03C7
|
#define VIDEOPORT_PALETTE_READ 0x03C7
|
||||||
#define VIDEOPORT_PALETTE_WRITE 0x03C8
|
#define VIDEOPORT_PALETTE_WRITE 0x03C8
|
||||||
|
|
|
@ -17,9 +17,7 @@
|
||||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "freeldr.h"
|
#include <freeldr.h>
|
||||||
#include "machine.h"
|
|
||||||
#include "machxbox.h"
|
|
||||||
|
|
||||||
static unsigned CurrentCursorX = 0;
|
static unsigned CurrentCursorX = 0;
|
||||||
static unsigned CurrentCursorY = 0;
|
static unsigned CurrentCursorY = 0;
|
||||||
|
|
|
@ -22,13 +22,10 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "freeldr.h"
|
#include <freeldr.h>
|
||||||
#include "debug.h"
|
|
||||||
#include "hardware.h"
|
#define NDEBUG
|
||||||
#include "machine.h"
|
#include <debug.h>
|
||||||
#include "machxbox.h"
|
|
||||||
#include "portio.h"
|
|
||||||
#include "rtl.h"
|
|
||||||
|
|
||||||
#define XBOX_IDE_COMMAND_PORT 0x1f0
|
#define XBOX_IDE_COMMAND_PORT 0x1f0
|
||||||
#define XBOX_IDE_CONTROL_PORT 0x170
|
#define XBOX_IDE_CONTROL_PORT 0x170
|
||||||
|
|
|
@ -19,9 +19,7 @@
|
||||||
* Note: Converted from the XFree vga.bdf font
|
* Note: Converted from the XFree vga.bdf font
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "freeldr.h"
|
#include <freeldr.h>
|
||||||
#include "machine.h"
|
|
||||||
#include "machxbox.h"
|
|
||||||
|
|
||||||
UCHAR XboxFont8x16[256 * 16] =
|
UCHAR XboxFont8x16[256 * 16] =
|
||||||
{
|
{
|
||||||
|
|
|
@ -17,9 +17,7 @@
|
||||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "freeldr.h"
|
#include <freeldr.h>
|
||||||
#include "machine.h"
|
|
||||||
#include "machxbox.h"
|
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
XboxHwDetect(VOID)
|
XboxHwDetect(VOID)
|
||||||
|
|
|
@ -20,14 +20,7 @@
|
||||||
* by the Xbox Linux group: http://www.xbox-linux.org
|
* by the Xbox Linux group: http://www.xbox-linux.org
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "freeldr.h"
|
#include <freeldr.h>
|
||||||
#include "debug.h"
|
|
||||||
#include "mm.h"
|
|
||||||
#include "rtl.h"
|
|
||||||
#include "hardware.h"
|
|
||||||
#include "machine.h"
|
|
||||||
#include "machxbox.h"
|
|
||||||
#include "portio.h"
|
|
||||||
|
|
||||||
static ULONG InstalledMemoryMb = 0;
|
static ULONG InstalledMemoryMb = 0;
|
||||||
static ULONG AvailableMemoryMb = 0;
|
static ULONG AvailableMemoryMb = 0;
|
||||||
|
|
|
@ -17,10 +17,7 @@
|
||||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "freeldr.h"
|
#include <freeldr.h>
|
||||||
#include "machine.h"
|
|
||||||
#include "machxbox.h"
|
|
||||||
#include "portio.h"
|
|
||||||
|
|
||||||
#define RTC_REGISTER_A 0x0A
|
#define RTC_REGISTER_A 0x0A
|
||||||
#define RTC_REG_A_UIP 0x80 /* Update In Progress bit */
|
#define RTC_REG_A_UIP 0x80 /* Update In Progress bit */
|
||||||
|
|
|
@ -20,12 +20,7 @@
|
||||||
* by the Xbox Linux group: http://www.xbox-linux.org
|
* by the Xbox Linux group: http://www.xbox-linux.org
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "freeldr.h"
|
#include <freeldr.h>
|
||||||
#include "debug.h"
|
|
||||||
#include "rtl.h"
|
|
||||||
#include "machine.h"
|
|
||||||
#include "machxbox.h"
|
|
||||||
#include "portio.h"
|
|
||||||
|
|
||||||
#define I2C_IO_BASE 0xc000
|
#define I2C_IO_BASE 0xc000
|
||||||
|
|
||||||
|
|
|
@ -18,24 +18,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <freeldr.h>
|
#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)
|
VOID RunLoader(VOID)
|
||||||
{
|
{
|
||||||
|
|
|
@ -17,15 +17,10 @@
|
||||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include <freeldr.h>
|
#include <freeldr.h>
|
||||||
#include "cm.h"
|
|
||||||
#include <mm.h>
|
#define NDEBUG
|
||||||
#include <disk.h>
|
|
||||||
#include <rtl.h>
|
|
||||||
#include <debug.h>
|
#include <debug.h>
|
||||||
#include <arch.h>
|
|
||||||
#include <machine.h>
|
|
||||||
|
|
||||||
// Returns a pointer to a CACHE_BLOCK structure
|
// Returns a pointer to a CACHE_BLOCK structure
|
||||||
// Adds the block to the cache manager block list
|
// 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.
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include <freeldr.h>
|
#include <freeldr.h>
|
||||||
#include "cm.h"
|
|
||||||
#include <mm.h>
|
#define NDEBUG
|
||||||
#include <disk.h>
|
|
||||||
#include <machine.h>
|
|
||||||
#include <cache.h>
|
|
||||||
#include <rtl.h>
|
|
||||||
#include <debug.h>
|
#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 <freeldr.h>
|
||||||
#include <cmdline.h>
|
|
||||||
#include <rtl.h>
|
|
||||||
|
|
||||||
static CMDLINEINFO CmdLineInfo;
|
static CMDLINEINFO CmdLineInfo;
|
||||||
|
|
||||||
|
|
|
@ -20,9 +20,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <freeldr.h>
|
#include <freeldr.h>
|
||||||
#include <comm.h>
|
|
||||||
#include <portio.h>
|
|
||||||
|
|
||||||
|
|
||||||
/* MACROS *******************************************************************/
|
/* MACROS *******************************************************************/
|
||||||
|
|
||||||
|
|
|
@ -18,18 +18,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <freeldr.h>
|
#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";
|
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 <freeldr.h>
|
||||||
#include <debug.h>
|
|
||||||
#include <rtl.h>
|
|
||||||
#include <comm.h>
|
|
||||||
#include <portio.h>
|
|
||||||
#include <machine.h>
|
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
|
|
||||||
|
|
|
@ -18,12 +18,9 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <freeldr.h>
|
#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
|
#undef UNIMPLEMENTED
|
||||||
#define UNIMPLEMENTED BugCheck((DPRINT_WARNING, "Unimplemented\n"));
|
#define UNIMPLEMENTED BugCheck((DPRINT_WARNING, "Unimplemented\n"));
|
||||||
|
|
|
@ -18,13 +18,9 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <freeldr.h>
|
#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,
|
BOOL DiskGetActivePartitionEntry(ULONG DriveNumber,
|
||||||
PPARTITION_TABLE_ENTRY PartitionTableEntry,
|
PPARTITION_TABLE_ENTRY PartitionTableEntry,
|
||||||
|
|
|
@ -18,11 +18,8 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <freeldr.h>
|
#include <freeldr.h>
|
||||||
#include <drivemap.h>
|
|
||||||
#include <rtl.h>
|
#define NDEBUG
|
||||||
#include <inifile.h>
|
|
||||||
#include <cache.h>
|
|
||||||
#include <ui.h>
|
|
||||||
#include <debug.h>
|
#include <debug.h>
|
||||||
|
|
||||||
BOOL DriveMapInstalled = FALSE; // Tells us if we have already installed our drive map int 13h handler code
|
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 <freeldr.h>
|
||||||
#include <rtl.h>
|
|
||||||
#include <arch.h>
|
#define NDEBUG
|
||||||
#include <machine.h>
|
|
||||||
#include <mm.h>
|
|
||||||
#include <debug.h>
|
#include <debug.h>
|
||||||
#include <bootmgr.h>
|
|
||||||
#include <fs.h>
|
|
||||||
#include <cmdline.h>
|
|
||||||
|
|
||||||
VOID BootMain(LPSTR CmdLine)
|
VOID BootMain(LPSTR CmdLine)
|
||||||
{
|
{
|
||||||
|
|
|
@ -106,4 +106,5 @@
|
||||||
<file>version.c</file>
|
<file>version.c</file>
|
||||||
<file>cmdline.c</file>
|
<file>cmdline.c</file>
|
||||||
<file>machine.c</file>
|
<file>machine.c</file>
|
||||||
|
<pch>include/freeldr.h</pch>
|
||||||
</module>
|
</module>
|
||||||
|
|
|
@ -15,4 +15,5 @@
|
||||||
<file>linuxboot.c</file>
|
<file>linuxboot.c</file>
|
||||||
<file>oslist.c</file>
|
<file>oslist.c</file>
|
||||||
<file>custom.c</file>
|
<file>custom.c</file>
|
||||||
|
<pch>include/freeldr.h</pch>
|
||||||
</module>
|
</module>
|
||||||
|
|
|
@ -18,17 +18,9 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <freeldr.h>
|
#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
|
GEOMETRY Ext2DiskGeometry; // Ext2 file system disk geometry
|
||||||
|
|
||||||
|
|
|
@ -18,16 +18,9 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <freeldr.h>
|
#include <freeldr.h>
|
||||||
#include <fs.h>
|
|
||||||
#include "fat.h"
|
#define NDEBUG
|
||||||
#include <disk.h>
|
|
||||||
#include <rtl.h>
|
|
||||||
#include <ui.h>
|
|
||||||
#include <arch.h>
|
|
||||||
#include <mm.h>
|
|
||||||
#include <debug.h>
|
#include <debug.h>
|
||||||
#include <cache.h>
|
|
||||||
#include <machine.h>
|
|
||||||
|
|
||||||
ULONG BytesPerSector; /* Number of bytes per sector */
|
ULONG BytesPerSector; /* Number of bytes per sector */
|
||||||
ULONG SectorsPerCluster; /* Number of sectors per cluster */
|
ULONG SectorsPerCluster; /* Number of sectors per cluster */
|
||||||
|
|
|
@ -18,19 +18,9 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <freeldr.h>
|
#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
|
// DATA
|
||||||
|
|
|
@ -18,20 +18,9 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <freeldr.h>
|
#include <freeldr.h>
|
||||||
#include <fs.h>
|
|
||||||
#include "fsrec.h"
|
#define NDEBUG
|
||||||
#include "fat.h"
|
|
||||||
#include "iso.h"
|
|
||||||
#include "ext2.h"
|
|
||||||
#include "ntfs.h"
|
|
||||||
#include <disk.h>
|
|
||||||
#include <rtl.h>
|
|
||||||
#include <arch.h>
|
|
||||||
#include <debug.h>
|
#include <debug.h>
|
||||||
#include <machine.h>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
// FUNCTIONS
|
// FUNCTIONS
|
||||||
|
|
|
@ -18,17 +18,9 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <freeldr.h>
|
#include <freeldr.h>
|
||||||
#include <fs.h>
|
|
||||||
#include <disk.h>
|
#define NDEBUG
|
||||||
#include <rtl.h>
|
|
||||||
#include <arch.h>
|
|
||||||
#include <mm.h>
|
|
||||||
#include <debug.h>
|
#include <debug.h>
|
||||||
#include <cache.h>
|
|
||||||
#include <machine.h>
|
|
||||||
|
|
||||||
#include "iso.h"
|
|
||||||
|
|
||||||
|
|
||||||
#define SECTORSIZE 2048
|
#define SECTORSIZE 2048
|
||||||
|
|
||||||
|
|
|
@ -25,16 +25,9 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <freeldr.h>
|
#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;
|
PNTFS_BOOTSECTOR NtfsBootSector;
|
||||||
ULONG NtfsClusterSize;
|
ULONG NtfsClusterSize;
|
||||||
|
|
|
@ -21,6 +21,70 @@
|
||||||
#ifndef __CACHE_H
|
#ifndef __CACHE_H
|
||||||
#define __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);
|
BOOL CacheInitializeDrive(ULONG DriveNumber);
|
||||||
VOID CacheInvalidateCacheData(VOID);
|
VOID CacheInvalidateCacheData(VOID);
|
||||||
BOOL CacheReadDiskSectors(ULONG DiskNumber, ULONG StartSector, ULONG SectorCount, PVOID Buffer);
|
BOOL CacheReadDiskSectors(ULONG DiskNumber, ULONG StartSector, ULONG SectorCount, PVOID Buffer);
|
||||||
|
|
|
@ -29,11 +29,42 @@
|
||||||
#include <ui.h>
|
#include <ui.h>
|
||||||
#include <multiboot.h>
|
#include <multiboot.h>
|
||||||
#include <mm.h>
|
#include <mm.h>
|
||||||
|
#include <cache.h>
|
||||||
#include <machine.h>
|
#include <machine.h>
|
||||||
#include <inifile.h>
|
#include <inifile.h>
|
||||||
#include <video.h>
|
#include <video.h>
|
||||||
#include <portio.h>
|
#include <portio.h>
|
||||||
#include <reactos.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")
|
#define Ke386EraseFlags(x) __asm__ __volatile__("pushl $0 ; popfl\n")
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,55 @@
|
||||||
#ifndef __PARSEINI_H
|
#ifndef __PARSEINI_H
|
||||||
#define __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 IniFileInitialize(VOID);
|
||||||
|
|
||||||
BOOL IniOpenSection(PCSTR SectionName, ULONG* SectionId);
|
BOOL IniOpenSection(PCSTR SectionName, ULONG* SectionId);
|
||||||
|
|
|
@ -35,6 +35,50 @@ typedef struct
|
||||||
ULONG Reserved;
|
ULONG Reserved;
|
||||||
} PACKED BIOS_MEMORY_MAP, *PBIOS_MEMORY_MAP;
|
} 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
|
ULONG GetSystemMemorySize(VOID); // Returns the amount of total memory in the system
|
||||||
|
|
||||||
|
|
|
@ -1,56 +1,56 @@
|
||||||
/*
|
/*
|
||||||
* FreeLoader
|
* FreeLoader
|
||||||
* Copyright (C) 1998-2003 Brian Palmer <brianp@sginet.com>
|
* Copyright (C) 1998-2003 Brian Palmer <brianp@sginet.com>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation; either version 2 of the License, or
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
* (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __GUI_H
|
#ifndef __GUI_H
|
||||||
#define __GUI_H
|
#define __GUI_H
|
||||||
|
|
||||||
#define TUI_SCREEN_MEM 0xB8000
|
#define TUI_SCREEN_MEM 0xB8000
|
||||||
#define TITLE_BOX_CHAR_HEIGHT 5
|
#define TITLE_BOX_CHAR_HEIGHT 5
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////
|
||||||
//
|
//
|
||||||
// Graphical User Interface Functions
|
// Graphical User Interface Functions
|
||||||
//
|
//
|
||||||
///////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////
|
||||||
VOID GuiDrawBackdrop(VOID); // Fills the entire screen with a backdrop
|
VOID GuiDrawBackdrop(VOID); // Fills the entire screen with a backdrop
|
||||||
VOID GuiFillArea(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom, UCHAR FillChar, UCHAR Attr /* Color Attributes */); // Fills the area specified with FillChar and Attr
|
VOID GuiFillArea(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom, UCHAR FillChar, UCHAR Attr /* Color Attributes */); // Fills the area specified with FillChar and Attr
|
||||||
VOID GuiDrawShadow(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom); // Draws a shadow on the bottom and right sides of the area specified
|
VOID GuiDrawShadow(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom); // Draws a shadow on the bottom and right sides of the area specified
|
||||||
VOID GuiDrawBox(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom, UCHAR VertStyle, UCHAR HorzStyle, BOOL Fill, BOOL Shadow, UCHAR Attr); // Draws a box around the area specified
|
VOID GuiDrawBox(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom, UCHAR VertStyle, UCHAR HorzStyle, BOOL Fill, BOOL Shadow, UCHAR Attr); // Draws a box around the area specified
|
||||||
VOID GuiDrawText(ULONG X, ULONG Y, PUCHAR Text, UCHAR Attr); // Draws text at coordinates specified
|
VOID GuiDrawText(ULONG X, ULONG Y, PUCHAR Text, UCHAR Attr); // Draws text at coordinates specified
|
||||||
VOID GuiDrawStatusText(PCSTR StatusText); // Draws text at the very bottom line on the screen
|
VOID GuiDrawStatusText(PCSTR StatusText); // Draws text at the very bottom line on the screen
|
||||||
VOID GuiUpdateDateTime(VOID); // Updates the date and time
|
VOID GuiUpdateDateTime(VOID); // Updates the date and time
|
||||||
VOID GuiSaveScreen(PUCHAR Buffer); // Saves the screen so that it can be restored later
|
VOID GuiSaveScreen(PUCHAR Buffer); // Saves the screen so that it can be restored later
|
||||||
VOID GuiRestoreScreen(PUCHAR Buffer); // Restores the screen from a previous save
|
VOID GuiRestoreScreen(PUCHAR Buffer); // Restores the screen from a previous save
|
||||||
VOID GuiMessageBox(PCSTR MessageText); // Displays a message box on the screen with an ok button
|
VOID GuiMessageBox(PCSTR MessageText); // Displays a message box on the screen with an ok button
|
||||||
VOID GuiMessageBoxCritical(PCSTR MessageText); // Displays a message box on the screen with an ok button using no system resources
|
VOID GuiMessageBoxCritical(PCSTR MessageText); // Displays a message box on the screen with an ok button using no system resources
|
||||||
VOID GuiDrawProgressBar(ULONG Position, ULONG Range); // Draws the progress bar showing nPos percent filled
|
VOID GuiDrawProgressBar(ULONG Position, ULONG Range); // Draws the progress bar showing nPos percent filled
|
||||||
|
|
||||||
UCHAR GuiTextToColor(PCSTR ColorText); // Converts the text color into it's equivalent color value
|
UCHAR GuiTextToColor(PCSTR ColorText); // Converts the text color into it's equivalent color value
|
||||||
UCHAR GuiTextToFillStyle(PCSTR FillStyleText); // Converts the text fill into it's equivalent fill value
|
UCHAR GuiTextToFillStyle(PCSTR FillStyleText); // Converts the text fill into it's equivalent fill value
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////
|
||||||
//
|
//
|
||||||
// Menu Functions
|
// Menu Functions
|
||||||
//
|
//
|
||||||
///////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////
|
||||||
BOOL GuiDisplayMenu(PCSTR MenuItemList[], ULONG MenuItemCount, ULONG DefaultMenuItem, LONG MenuTimeOut, ULONG* SelectedMenuItem);
|
BOOL GuiDisplayMenu(PCSTR MenuItemList[], ULONG MenuItemCount, ULONG DefaultMenuItem, LONG MenuTimeOut, ULONG* SelectedMenuItem);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#endif // #defined __GUI_H
|
#endif // #defined __GUI_H
|
|
@ -1,150 +1,150 @@
|
||||||
/*
|
/*
|
||||||
* FreeLoader
|
* FreeLoader
|
||||||
* Copyright (C) 1998-2003 Brian Palmer <brianp@sginet.com>
|
* Copyright (C) 1998-2003 Brian Palmer <brianp@sginet.com>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
* the Free Software Foundation; either version 2 of the License, or
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
* (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __TUI_H
|
#ifndef __TUI_H
|
||||||
#define __TUI_H
|
#define __TUI_H
|
||||||
|
|
||||||
#define TUI_SCREEN_MEM 0xB8000
|
#define TUI_SCREEN_MEM 0xB8000
|
||||||
#define TUI_TITLE_BOX_CHAR_HEIGHT 5
|
#define TUI_TITLE_BOX_CHAR_HEIGHT 5
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////
|
||||||
//
|
//
|
||||||
// Textual User Interface Functions
|
// Textual User Interface Functions
|
||||||
//
|
//
|
||||||
///////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////
|
||||||
BOOL TuiInitialize(VOID); // Initialize User-Interface
|
BOOL TuiInitialize(VOID); // Initialize User-Interface
|
||||||
VOID TuiUnInitialize(VOID); // Un-initialize User-Interface
|
VOID TuiUnInitialize(VOID); // Un-initialize User-Interface
|
||||||
|
|
||||||
VOID TuiDrawBackdrop(VOID); // Fills the entire screen with a backdrop
|
VOID TuiDrawBackdrop(VOID); // Fills the entire screen with a backdrop
|
||||||
VOID TuiFillArea(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom, CHAR FillChar, UCHAR Attr /* Color Attributes */); // Fills the area specified with FillChar and Attr
|
VOID TuiFillArea(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom, CHAR FillChar, UCHAR Attr /* Color Attributes */); // Fills the area specified with FillChar and Attr
|
||||||
VOID TuiDrawShadow(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom); // Draws a shadow on the bottom and right sides of the area specified
|
VOID TuiDrawShadow(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom); // Draws a shadow on the bottom and right sides of the area specified
|
||||||
VOID TuiDrawBox(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom, UCHAR VertStyle, UCHAR HorzStyle, BOOL Fill, BOOL Shadow, UCHAR Attr); // Draws a box around the area specified
|
VOID TuiDrawBox(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom, UCHAR VertStyle, UCHAR HorzStyle, BOOL Fill, BOOL Shadow, UCHAR Attr); // Draws a box around the area specified
|
||||||
VOID TuiDrawText(ULONG X, ULONG Y, PCSTR Text, UCHAR Attr); // Draws text at coordinates specified
|
VOID TuiDrawText(ULONG X, ULONG Y, PCSTR Text, UCHAR Attr); // Draws text at coordinates specified
|
||||||
VOID TuiDrawCenteredText(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom, PCSTR TextString, UCHAR Attr); // Draws centered text at the coordinates specified and clips the edges
|
VOID TuiDrawCenteredText(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom, PCSTR TextString, UCHAR Attr); // Draws centered text at the coordinates specified and clips the edges
|
||||||
VOID TuiDrawStatusText(PCSTR StatusText); // Draws text at the very bottom line on the screen
|
VOID TuiDrawStatusText(PCSTR StatusText); // Draws text at the very bottom line on the screen
|
||||||
VOID TuiUpdateDateTime(VOID); // Updates the date and time
|
VOID TuiUpdateDateTime(VOID); // Updates the date and time
|
||||||
VOID TuiSaveScreen(PUCHAR Buffer); // Saves the screen so that it can be restored later
|
VOID TuiSaveScreen(PUCHAR Buffer); // Saves the screen so that it can be restored later
|
||||||
VOID TuiRestoreScreen(PUCHAR Buffer); // Restores the screen from a previous save
|
VOID TuiRestoreScreen(PUCHAR Buffer); // Restores the screen from a previous save
|
||||||
VOID TuiMessageBox(PCSTR MessageText); // Displays a message box on the screen with an ok button
|
VOID TuiMessageBox(PCSTR MessageText); // Displays a message box on the screen with an ok button
|
||||||
VOID TuiMessageBoxCritical(PCSTR MessageText); // Displays a message box on the screen with an ok button using no system resources
|
VOID TuiMessageBoxCritical(PCSTR MessageText); // Displays a message box on the screen with an ok button using no system resources
|
||||||
VOID TuiDrawProgressBarCenter(ULONG Position, ULONG Range, PCHAR ProgressText); // Draws the progress bar showing nPos percent filled
|
VOID TuiDrawProgressBarCenter(ULONG Position, ULONG Range, PCHAR ProgressText); // Draws the progress bar showing nPos percent filled
|
||||||
VOID TuiDrawProgressBar(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom, ULONG Position, ULONG Range, PCHAR ProgressText); // Draws the progress bar showing nPos percent filled
|
VOID TuiDrawProgressBar(ULONG Left, ULONG Top, ULONG Right, ULONG Bottom, ULONG Position, ULONG Range, PCHAR ProgressText); // Draws the progress bar showing nPos percent filled
|
||||||
BOOL TuiEditBox(PCSTR MessageText, PCHAR EditTextBuffer, ULONG Length);
|
BOOL TuiEditBox(PCSTR MessageText, PCHAR EditTextBuffer, ULONG Length);
|
||||||
|
|
||||||
UCHAR TuiTextToColor(PCSTR ColorText); // Converts the text color into it's equivalent color value
|
UCHAR TuiTextToColor(PCSTR ColorText); // Converts the text color into it's equivalent color value
|
||||||
UCHAR TuiTextToFillStyle(PCSTR FillStyleText); // Converts the text fill into it's equivalent fill value
|
UCHAR TuiTextToFillStyle(PCSTR FillStyleText); // Converts the text fill into it's equivalent fill value
|
||||||
|
|
||||||
VOID TuiFadeInBackdrop(VOID); // Draws the backdrop and fades the screen in
|
VOID TuiFadeInBackdrop(VOID); // Draws the backdrop and fades the screen in
|
||||||
VOID TuiFadeOut(VOID); // Fades the screen out
|
VOID TuiFadeOut(VOID); // Fades the screen out
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////
|
||||||
//
|
//
|
||||||
// Menu Functions
|
// Menu Functions
|
||||||
//
|
//
|
||||||
///////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
PCSTR *MenuItemList;
|
PCSTR *MenuItemList;
|
||||||
ULONG MenuItemCount;
|
ULONG MenuItemCount;
|
||||||
LONG MenuTimeRemaining;
|
LONG MenuTimeRemaining;
|
||||||
ULONG SelectedMenuItem;
|
ULONG SelectedMenuItem;
|
||||||
|
|
||||||
ULONG Left;
|
ULONG Left;
|
||||||
ULONG Top;
|
ULONG Top;
|
||||||
ULONG Right;
|
ULONG Right;
|
||||||
ULONG Bottom;
|
ULONG Bottom;
|
||||||
|
|
||||||
} TUI_MENU_INFO, *PTUI_MENU_INFO;
|
} TUI_MENU_INFO, *PTUI_MENU_INFO;
|
||||||
|
|
||||||
VOID TuiCalcMenuBoxSize(PTUI_MENU_INFO MenuInfo);
|
VOID TuiCalcMenuBoxSize(PTUI_MENU_INFO MenuInfo);
|
||||||
VOID TuiDrawMenu(PTUI_MENU_INFO MenuInfo);
|
VOID TuiDrawMenu(PTUI_MENU_INFO MenuInfo);
|
||||||
VOID TuiDrawMenuBox(PTUI_MENU_INFO MenuInfo);
|
VOID TuiDrawMenuBox(PTUI_MENU_INFO MenuInfo);
|
||||||
VOID TuiDrawMenuItem(PTUI_MENU_INFO MenuInfo, ULONG MenuItemNumber);
|
VOID TuiDrawMenuItem(PTUI_MENU_INFO MenuInfo, ULONG MenuItemNumber);
|
||||||
ULONG TuiProcessMenuKeyboardEvent(PTUI_MENU_INFO MenuInfo, UiMenuKeyPressFilterCallback KeyPressFilter);
|
ULONG TuiProcessMenuKeyboardEvent(PTUI_MENU_INFO MenuInfo, UiMenuKeyPressFilterCallback KeyPressFilter);
|
||||||
BOOL TuiDisplayMenu(PCSTR MenuItemList[], ULONG MenuItemCount, ULONG DefaultMenuItem, LONG MenuTimeOut, ULONG* SelectedMenuItem, BOOL CanEscape, UiMenuKeyPressFilterCallback KeyPressFilter);
|
BOOL TuiDisplayMenu(PCSTR MenuItemList[], ULONG MenuItemCount, ULONG DefaultMenuItem, LONG MenuTimeOut, ULONG* SelectedMenuItem, BOOL CanEscape, UiMenuKeyPressFilterCallback KeyPressFilter);
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Combines the foreground and background colors into a single attribute byte
|
* Combines the foreground and background colors into a single attribute byte
|
||||||
*/
|
*/
|
||||||
#define ATTR(cFore, cBack) ((cBack << 4)|cFore)
|
#define ATTR(cFore, cBack) ((cBack << 4)|cFore)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Fill styles for DrawBackdrop()
|
* Fill styles for DrawBackdrop()
|
||||||
*/
|
*/
|
||||||
#define LIGHT_FILL 0xB0
|
#define LIGHT_FILL 0xB0
|
||||||
#define MEDIUM_FILL 0xB1
|
#define MEDIUM_FILL 0xB1
|
||||||
#define DARK_FILL 0xB2
|
#define DARK_FILL 0xB2
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Screen colors
|
* Screen colors
|
||||||
*/
|
*/
|
||||||
#define COLOR_BLACK 0
|
#define COLOR_BLACK 0
|
||||||
#define COLOR_BLUE 1
|
#define COLOR_BLUE 1
|
||||||
#define COLOR_GREEN 2
|
#define COLOR_GREEN 2
|
||||||
#define COLOR_CYAN 3
|
#define COLOR_CYAN 3
|
||||||
#define COLOR_RED 4
|
#define COLOR_RED 4
|
||||||
#define COLOR_MAGENTA 5
|
#define COLOR_MAGENTA 5
|
||||||
#define COLOR_BROWN 6
|
#define COLOR_BROWN 6
|
||||||
#define COLOR_GRAY 7
|
#define COLOR_GRAY 7
|
||||||
|
|
||||||
#define COLOR_DARKGRAY 8
|
#define COLOR_DARKGRAY 8
|
||||||
#define COLOR_LIGHTBLUE 9
|
#define COLOR_LIGHTBLUE 9
|
||||||
#define COLOR_LIGHTGREEN 10
|
#define COLOR_LIGHTGREEN 10
|
||||||
#define COLOR_LIGHTCYAN 11
|
#define COLOR_LIGHTCYAN 11
|
||||||
#define COLOR_LIGHTRED 12
|
#define COLOR_LIGHTRED 12
|
||||||
#define COLOR_LIGHTMAGENTA 13
|
#define COLOR_LIGHTMAGENTA 13
|
||||||
#define COLOR_YELLOW 14
|
#define COLOR_YELLOW 14
|
||||||
#define COLOR_WHITE 15
|
#define COLOR_WHITE 15
|
||||||
|
|
||||||
/* Add COLOR_BLINK to a background to cause blinking */
|
/* Add COLOR_BLINK to a background to cause blinking */
|
||||||
#define COLOR_BLINK 8
|
#define COLOR_BLINK 8
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Defines for IBM box drawing characters
|
* Defines for IBM box drawing characters
|
||||||
*/
|
*/
|
||||||
#define HORZ (0xc4) /* Single horizontal line */
|
#define HORZ (0xc4) /* Single horizontal line */
|
||||||
#define D_HORZ (0xcd) /* Double horizontal line.*/
|
#define D_HORZ (0xcd) /* Double horizontal line.*/
|
||||||
#define VERT (0xb3) /* Single vertical line */
|
#define VERT (0xb3) /* Single vertical line */
|
||||||
#define D_VERT (0xba) /* Double vertical line. */
|
#define D_VERT (0xba) /* Double vertical line. */
|
||||||
|
|
||||||
/* Definitions for corners, depending on HORIZ and VERT */
|
/* Definitions for corners, depending on HORIZ and VERT */
|
||||||
#define UL (0xda)
|
#define UL (0xda)
|
||||||
#define UR (0xbf) /* HORZ and VERT */
|
#define UR (0xbf) /* HORZ and VERT */
|
||||||
#define LL (0xc0)
|
#define LL (0xc0)
|
||||||
#define LR (0xd9)
|
#define LR (0xd9)
|
||||||
|
|
||||||
#define D_UL (0xc9)
|
#define D_UL (0xc9)
|
||||||
#define D_UR (0xbb) /* D_HORZ and D_VERT */
|
#define D_UR (0xbb) /* D_HORZ and D_VERT */
|
||||||
#define D_LL (0xc8)
|
#define D_LL (0xc8)
|
||||||
#define D_LR (0xbc)
|
#define D_LR (0xbc)
|
||||||
|
|
||||||
#define HD_UL (0xd5)
|
#define HD_UL (0xd5)
|
||||||
#define HD_UR (0xb8) /* D_HORZ and VERT */
|
#define HD_UR (0xb8) /* D_HORZ and VERT */
|
||||||
#define HD_LL (0xd4)
|
#define HD_LL (0xd4)
|
||||||
#define HD_LR (0xbe)
|
#define HD_LR (0xbe)
|
||||||
|
|
||||||
#define VD_UL (0xd6)
|
#define VD_UL (0xd6)
|
||||||
#define VD_UR (0xb7) /* HORZ and D_VERT */
|
#define VD_UR (0xb7) /* HORZ and D_VERT */
|
||||||
#define VD_LL (0xd3)
|
#define VD_LL (0xd3)
|
||||||
#define VD_LR (0xbd)
|
#define VD_LR (0xbd)
|
||||||
|
|
||||||
|
|
||||||
#endif // #defined __TUI_H
|
#endif // #defined __TUI_H
|
|
@ -28,12 +28,6 @@
|
||||||
/* INCLUDES *****************************************************************/
|
/* INCLUDES *****************************************************************/
|
||||||
|
|
||||||
#include <freeldr.h>
|
#include <freeldr.h>
|
||||||
#include <mm.h>
|
|
||||||
#include <rtl.h>
|
|
||||||
#include <fs.h>
|
|
||||||
|
|
||||||
#include <inffile.h>
|
|
||||||
|
|
||||||
|
|
||||||
#define CONTROL_Z '\x1a'
|
#define CONTROL_Z '\x1a'
|
||||||
#define MAX_SECTION_NAME_LEN 255
|
#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 <freeldr.h>
|
||||||
#include "ini.h"
|
|
||||||
#include <fs.h>
|
|
||||||
#include <rtl.h>
|
|
||||||
#include <mm.h>
|
|
||||||
#include <debug.h>
|
|
||||||
|
|
||||||
|
|
||||||
BOOL IniFileInitialize(VOID)
|
BOOL IniFileInitialize(VOID)
|
||||||
{
|
{
|
||||||
|
|
|
@ -18,11 +18,9 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <freeldr.h>
|
#include <freeldr.h>
|
||||||
#include "ini.h"
|
|
||||||
#include <ui.h>
|
#define NDEBUG
|
||||||
#include <rtl.h>
|
|
||||||
#include <debug.h>
|
#include <debug.h>
|
||||||
#include <mm.h>
|
|
||||||
|
|
||||||
BOOL IniOpenSection(PCSTR SectionName, ULONG* SectionId)
|
BOOL IniOpenSection(PCSTR SectionName, ULONG* SectionId)
|
||||||
{
|
{
|
||||||
|
|
|
@ -18,12 +18,9 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <freeldr.h>
|
#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;
|
PINI_SECTION IniFileSectionListHead = NULL;
|
||||||
ULONG IniFileSectionCount = 0;
|
ULONG IniFileSectionCount = 0;
|
||||||
|
|
|
@ -19,21 +19,9 @@
|
||||||
|
|
||||||
|
|
||||||
#include <freeldr.h>
|
#include <freeldr.h>
|
||||||
#include <arch.h>
|
|
||||||
#include <disk.h>
|
#define NDEBUG
|
||||||
#include <miscboot.h>
|
|
||||||
#include <rtl.h>
|
|
||||||
#include <fs.h>
|
|
||||||
#include <ui.h>
|
|
||||||
#include <linux.h>
|
|
||||||
#include <debug.h>
|
#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
|
#define LINUX_READ_CHUNK_SIZE 0x20000 // Read 128k at a time
|
||||||
|
|
||||||
|
|
|
@ -17,8 +17,7 @@
|
||||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "freeldr.h"
|
#include <freeldr.h>
|
||||||
#include "machine.h"
|
|
||||||
|
|
||||||
#undef MachConsPutChar
|
#undef MachConsPutChar
|
||||||
#undef MachConsKbHit
|
#undef MachConsKbHit
|
||||||
|
|
|
@ -17,17 +17,7 @@
|
||||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include <freeldr.h>
|
#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)
|
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 <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
|
#ifdef DEBUG
|
||||||
typedef struct
|
typedef struct
|
||||||
|
|
|
@ -18,13 +18,9 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <freeldr.h>
|
#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
|
#ifdef DEBUG
|
||||||
ULONG AllocationCount = 0;
|
ULONG AllocationCount = 0;
|
||||||
|
|
|
@ -18,14 +18,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <freeldr.h>
|
#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[] =
|
PCSTR OptionsMenuList[] =
|
||||||
{
|
{
|
||||||
|
|
|
@ -18,11 +18,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <freeldr.h>
|
#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)
|
BOOL InitOperatingSystemList(PCSTR **SectionNamesPointer, PCSTR **DisplayNamesPointer, ULONG* OperatingSystemCountPointer)
|
||||||
{
|
{
|
||||||
|
|
|
@ -20,8 +20,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <freeldr.h>
|
#include <freeldr.h>
|
||||||
#include <rtl.h>
|
|
||||||
|
|
||||||
|
|
||||||
BOOL DissectArcPath(CHAR *ArcPath, CHAR *BootPath, ULONG* BootDrive, ULONG* BootPartition)
|
BOOL DissectArcPath(CHAR *ArcPath, CHAR *BootPath, ULONG* BootDrive, ULONG* BootPartition)
|
||||||
{
|
{
|
||||||
|
|
|
@ -20,13 +20,10 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <freeldr.h>
|
#include <freeldr.h>
|
||||||
#include <rtl.h>
|
|
||||||
#include <mm.h>
|
#define NDEBUG
|
||||||
#include <debug.h>
|
#include <debug.h>
|
||||||
|
|
||||||
#include "registry.h"
|
|
||||||
|
|
||||||
|
|
||||||
#define REG_HIVE_ID 0x66676572 /* "regf" */
|
#define REG_HIVE_ID 0x66676572 /* "regf" */
|
||||||
#define REG_BIN_ID 0x6e696268 /* "hbin" */
|
#define REG_BIN_ID 0x6e696268 /* "hbin" */
|
||||||
#define REG_KEY_CELL_ID 0x6b6e
|
#define REG_KEY_CELL_ID 0x6b6e
|
||||||
|
|
|
@ -20,8 +20,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <freeldr.h>
|
#include <freeldr.h>
|
||||||
#include <../arch/i386/hardware.h>
|
|
||||||
#include <internal/i386/ke.h>
|
|
||||||
|
|
||||||
#define NDEBUG
|
#define NDEBUG
|
||||||
#include <debug.h>
|
#include <debug.h>
|
||||||
|
|
|
@ -20,9 +20,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <freeldr.h>
|
#include <freeldr.h>
|
||||||
#include <reactos/rossym.h>
|
|
||||||
|
|
||||||
#include "registry.h"
|
|
||||||
|
|
||||||
#define NDEBUG
|
#define NDEBUG
|
||||||
#include <debug.h>
|
#include <debug.h>
|
||||||
|
|
|
@ -19,12 +19,9 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <freeldr.h>
|
#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;
|
static FRLDRHKEY RootKey;
|
||||||
|
|
||||||
|
|
|
@ -19,20 +19,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <freeldr.h>
|
#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;
|
LOADER_PARAMETER_BLOCK LoaderBlock;
|
||||||
char reactos_kernel_cmdline[255]; // Command line passed to kernel
|
char reactos_kernel_cmdline[255]; // Command line passed to kernel
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <rtl.h>
|
#include <freeldr.h>
|
||||||
|
|
||||||
VOID RtlListInitializeHead(PLIST_ITEM ListHead)
|
VOID RtlListInitializeHead(PLIST_ITEM ListHead)
|
||||||
{
|
{
|
||||||
|
|
|
@ -18,9 +18,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <freeldr.h>
|
#include <freeldr.h>
|
||||||
#include <machine.h>
|
|
||||||
#include <rtl.h>
|
|
||||||
#include <stdarg.h>
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* print() - prints unformatted text to stdout
|
* print() - prints unformatted text to stdout
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
* 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
|
* convert_to_ascii() - converts a number to it's ascii equivalent
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <rtl.h>
|
#include <freeldr.h>
|
||||||
|
|
||||||
size_t strlen(const char *str)
|
size_t strlen(const char *str)
|
||||||
{
|
{
|
||||||
|
|
|
@ -18,13 +18,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <freeldr.h>
|
#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)
|
VOID GuiDrawBackdrop(VOID)
|
||||||
{
|
{
|
||||||
|
|
|
@ -18,17 +18,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <freeldr.h>
|
#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;
|
PVOID TextVideoBuffer = NULL;
|
||||||
|
|
||||||
|
|
|
@ -18,15 +18,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <freeldr.h>
|
#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)
|
BOOL TuiDisplayMenu(PCSTR MenuItemList[], ULONG MenuItemCount, ULONG DefaultMenuItem, LONG MenuTimeOut, ULONG* SelectedMenuItem, BOOL CanEscape, UiMenuKeyPressFilterCallback KeyPressFilter)
|
||||||
{
|
{
|
||||||
|
|
|
@ -18,16 +18,10 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <freeldr.h>
|
#include <freeldr.h>
|
||||||
#include <ui.h>
|
|
||||||
#include "tui.h"
|
#define NDEBUG
|
||||||
#include <rtl.h>
|
|
||||||
#include <mm.h>
|
|
||||||
#include <machine.h>
|
|
||||||
#include <debug.h>
|
#include <debug.h>
|
||||||
#include <inifile.h>
|
|
||||||
#include <version.h>
|
|
||||||
#include <video.h>
|
|
||||||
#include <reactos/buildno.h>
|
|
||||||
|
|
||||||
ULONG UiScreenWidth = 80; // Screen Width
|
ULONG UiScreenWidth = 80; // Screen Width
|
||||||
ULONG UiScreenHeight = 25; // Screen Height
|
ULONG UiScreenHeight = 25; // Screen Height
|
||||||
|
|
|
@ -18,8 +18,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <freeldr.h>
|
#include <freeldr.h>
|
||||||
#include <version.h>
|
|
||||||
#include <rtl.h>
|
|
||||||
|
|
||||||
CHAR FreeLoaderVersionString[80];
|
CHAR FreeLoaderVersionString[80];
|
||||||
|
|
||||||
|
|
|
@ -18,12 +18,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <freeldr.h>
|
#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 */
|
#if 0 /* This stuff isn't used and as far as I'm concerned it can go - GvG */
|
||||||
U32 CurrentMemoryBank = 0;
|
U32 CurrentMemoryBank = 0;
|
||||||
|
|
|
@ -18,9 +18,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <freeldr.h>
|
#include <freeldr.h>
|
||||||
#include <video.h>
|
|
||||||
#include <machine.h>
|
|
||||||
|
|
||||||
|
|
||||||
#define RGB_MAX 64
|
#define RGB_MAX 64
|
||||||
#define RGB_MAX_PER_ITERATION 64
|
#define RGB_MAX_PER_ITERATION 64
|
||||||
|
|
|
@ -18,8 +18,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <freeldr.h>
|
#include <freeldr.h>
|
||||||
#include <video.h>
|
|
||||||
#include <machine.h>
|
|
||||||
|
|
||||||
VOID VideoSavePaletteState(PPALETTE_ENTRY Palette, ULONG ColorCount)
|
VOID VideoSavePaletteState(PPALETTE_ENTRY Palette, ULONG ColorCount)
|
||||||
{
|
{
|
||||||
|
|
|
@ -18,12 +18,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <freeldr.h>
|
#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 */
|
#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 <freeldr.h>
|
||||||
#include <video.h>
|
|
||||||
#include <portio.h>
|
|
||||||
#include <mm.h>
|
|
||||||
#include <machine.h>
|
|
||||||
|
|
||||||
|
|
||||||
PVOID VideoOffScreenBuffer = NULL;
|
PVOID VideoOffScreenBuffer = NULL;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue