2001-05-15 03:50:25 +00:00
|
|
|
/*
|
|
|
|
* FreeLoader
|
2003-01-19 01:04:01 +00:00
|
|
|
* Copyright (C) 1998-2003 Brian Palmer <brianp@sginet.com>
|
2001-05-15 03:50:25 +00:00
|
|
|
*
|
|
|
|
* 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.
|
|
|
|
*/
|
|
|
|
|
2003-05-25 21:20:43 +00:00
|
|
|
|
2002-06-06 05:58:37 +00:00
|
|
|
#include <freeldr.h>
|
|
|
|
#include <arch.h>
|
|
|
|
#include <miscboot.h>
|
|
|
|
#include <rtl.h>
|
|
|
|
#include <fs.h>
|
|
|
|
#include <ui.h>
|
|
|
|
#include <inifile.h>
|
|
|
|
#include <disk.h>
|
2003-01-19 01:04:01 +00:00
|
|
|
#include <drivemap.h>
|
2001-05-15 03:50:25 +00:00
|
|
|
|
2002-01-24 00:59:16 +00:00
|
|
|
VOID LoadAndBootBootSector(PUCHAR OperatingSystemName)
|
2001-05-15 03:50:25 +00:00
|
|
|
{
|
2002-01-24 00:59:16 +00:00
|
|
|
PFILE FilePointer;
|
|
|
|
UCHAR SettingName[80];
|
|
|
|
UCHAR SettingValue[80];
|
Changes in v1.7 (8/6/2002) (brianp)
- EXT2/EXT3 file system support.
- Does not yet support symbolic links or booting from an EXT2/3 partition.
- Fixed bug in UI code.
- Added '%%' format specifier to printf()-like functions.
- Added functions __udivdi3 & __umoddi3 so that 64-bit division is now supported.
- Changed types BYTE, WORD, DWORD, LONG, ULONG to U8, U16, U32, S32, U32
so that you know the size of the variable across different
architectures with different sized words & dwords, etc.
- Types CHAR, UCHAR, PCHAR, PUCHAR, WCHAR, PWCHAR have not been
changed yet (I haven't decided exactly how I'm going to handle unicode)
(isn't this an awesome commit? ;-) Just look at that list of files)
svn path=/trunk/; revision=3318
2002-08-07 05:13:18 +00:00
|
|
|
U32 SectionId;
|
2002-01-24 00:59:16 +00:00
|
|
|
UCHAR FileName[260];
|
Changes in v1.7 (8/6/2002) (brianp)
- EXT2/EXT3 file system support.
- Does not yet support symbolic links or booting from an EXT2/3 partition.
- Fixed bug in UI code.
- Added '%%' format specifier to printf()-like functions.
- Added functions __udivdi3 & __umoddi3 so that 64-bit division is now supported.
- Changed types BYTE, WORD, DWORD, LONG, ULONG to U8, U16, U32, S32, U32
so that you know the size of the variable across different
architectures with different sized words & dwords, etc.
- Types CHAR, UCHAR, PCHAR, PUCHAR, WCHAR, PWCHAR have not been
changed yet (I haven't decided exactly how I'm going to handle unicode)
(isn't this an awesome commit? ;-) Just look at that list of files)
svn path=/trunk/; revision=3318
2002-08-07 05:13:18 +00:00
|
|
|
U32 BytesRead;
|
2001-05-15 03:50:25 +00:00
|
|
|
|
|
|
|
// Find all the message box settings and run them
|
2002-06-06 05:58:37 +00:00
|
|
|
UiShowMessageBoxesInSection(OperatingSystemName);
|
2002-01-24 00:59:16 +00:00
|
|
|
|
|
|
|
// Try to open the operating system section in the .ini file
|
2002-03-20 00:39:32 +00:00
|
|
|
if (!IniOpenSection(OperatingSystemName, &SectionId))
|
2001-05-15 03:50:25 +00:00
|
|
|
{
|
2002-01-24 00:59:16 +00:00
|
|
|
sprintf(SettingName, "Section [%s] not found in freeldr.ini.\n", OperatingSystemName);
|
2002-06-06 05:58:37 +00:00
|
|
|
UiMessageBox(SettingName);
|
2002-01-24 00:59:16 +00:00
|
|
|
return;
|
2001-05-15 03:50:25 +00:00
|
|
|
}
|
|
|
|
|
2002-03-20 00:39:32 +00:00
|
|
|
if (!IniReadSettingByName(SectionId, "BootDrive", SettingValue, 80))
|
2001-05-15 03:50:25 +00:00
|
|
|
{
|
2002-06-06 05:58:37 +00:00
|
|
|
UiMessageBox("Boot drive not specified for selected OS!");
|
2001-05-15 03:50:25 +00:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2003-01-19 01:04:01 +00:00
|
|
|
BootDrive = DriveMapGetBiosDriveNumber(SettingValue);
|
2001-05-15 03:50:25 +00:00
|
|
|
|
|
|
|
BootPartition = 0;
|
2002-03-20 00:39:32 +00:00
|
|
|
if (IniReadSettingByName(SectionId, "BootPartition", SettingValue, 80))
|
2002-01-24 00:59:16 +00:00
|
|
|
{
|
|
|
|
BootPartition = atoi(SettingValue);
|
|
|
|
}
|
2001-05-15 03:50:25 +00:00
|
|
|
|
2002-03-20 00:39:32 +00:00
|
|
|
if (!IniReadSettingByName(SectionId, "BootSectorFile", FileName, 260))
|
2001-05-15 03:50:25 +00:00
|
|
|
{
|
2002-06-06 05:58:37 +00:00
|
|
|
UiMessageBox("Boot sector file not specified for selected OS!");
|
2001-05-15 03:50:25 +00:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2002-11-24 19:10:06 +00:00
|
|
|
if (!FsOpenVolume(BootDrive, BootPartition))
|
2001-05-15 03:50:25 +00:00
|
|
|
{
|
2002-06-06 05:58:37 +00:00
|
|
|
UiMessageBox("Failed to open boot drive.");
|
2001-05-15 03:50:25 +00:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2002-11-24 19:10:06 +00:00
|
|
|
FilePointer = FsOpenFile(FileName);
|
2001-11-15 07:48:33 +00:00
|
|
|
if (FilePointer == NULL)
|
2001-05-15 03:50:25 +00:00
|
|
|
{
|
2002-01-24 00:59:16 +00:00
|
|
|
strcat(FileName, " not found.");
|
2002-06-06 05:58:37 +00:00
|
|
|
UiMessageBox(FileName);
|
2001-05-15 03:50:25 +00:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Read boot sector
|
2002-11-24 19:10:06 +00:00
|
|
|
if (!FsReadFile(FilePointer, 512, &BytesRead, (void*)0x7c00) || (BytesRead != 512))
|
2001-05-15 03:50:25 +00:00
|
|
|
{
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Check for validity
|
Changes in v1.7 (8/6/2002) (brianp)
- EXT2/EXT3 file system support.
- Does not yet support symbolic links or booting from an EXT2/3 partition.
- Fixed bug in UI code.
- Added '%%' format specifier to printf()-like functions.
- Added functions __udivdi3 & __umoddi3 so that 64-bit division is now supported.
- Changed types BYTE, WORD, DWORD, LONG, ULONG to U8, U16, U32, S32, U32
so that you know the size of the variable across different
architectures with different sized words & dwords, etc.
- Types CHAR, UCHAR, PCHAR, PUCHAR, WCHAR, PWCHAR have not been
changed yet (I haven't decided exactly how I'm going to handle unicode)
(isn't this an awesome commit? ;-) Just look at that list of files)
svn path=/trunk/; revision=3318
2002-08-07 05:13:18 +00:00
|
|
|
if (*((U16*)(0x7c00 + 0x1fe)) != 0xaa55)
|
2001-05-15 03:50:25 +00:00
|
|
|
{
|
2002-06-06 05:58:37 +00:00
|
|
|
UiMessageBox("Invalid boot sector magic (0xaa55)");
|
2001-05-15 03:50:25 +00:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2002-11-24 19:10:06 +00:00
|
|
|
UiUnInitialize("Booting...");
|
2002-06-06 05:58:37 +00:00
|
|
|
// Don't stop the floppy drive motor when we
|
|
|
|
// are just booting a bootsector, or drive, or partition.
|
|
|
|
// If we were to stop the floppy motor then
|
|
|
|
// the BIOS wouldn't be informed and if the
|
|
|
|
// next read is to a floppy then the BIOS will
|
|
|
|
// still think the motor is on and this will
|
|
|
|
// result in a read error.
|
2002-11-24 19:10:06 +00:00
|
|
|
//DiskStopFloppyMotor();
|
Changes in v1.7.4 (8/20/2002) (brianp)
- Boot sector code now reports to freeldr.sys the partition
that it was installed on. This is specified by a byte
value in the boot sector code. By default the boot partition
is set to zero which indicates the active (bootable)
partition, unless the installer sets the value to non-zero.
If FreeLoader is installed on a partition other than
the active (bootable) partition then the installer must
set this byte to that partition number. Otherwise
FreeLoader will not be able to find freeldr.ini.
- i386trap.S: Added debug macros BREAKPOINT(),
INSTRUCTION_BREAKPOINTX(), MEMORY_READWRITE_BREAKPOINTX(), &
MEMORY_WRITE_BREAKPOINTX().
- partition.c (DiskGetPartitionEntry): Add the relative offset
of the extended partition to the partitions start sector.
- ext2.c (Ext2ReadBlockPointerList, Ext2CopyIndirectBlockPointers,
Ext2CopyDoubleIndirectBlockPointers, Ext2CopyTripleIndirectBlockPointers):
Rewrote the block pointer functions so they actually work.
- ini_init.c (IniFileInitialize, IniOpenIniFile): Looks for freeldr.ini
on both the active (bootable) partition and the partition
passed in from the boot sector code.
- meminit.c (MmInitializeMemoryManager, MmFixupSystemMemoryMap,
MmGetEndAddressOfAnyMemory, MmGetAddressablePageCountIncludingHoles,
MmInitPageLookupTable): Fixed bug that would cause FreeLoader to
have an off-by-one error when accessing the last entry in the
page lookup table on systems with 4GB of memory (or memory mapped
at the end of the address space).
svn path=/trunk/; revision=3372
2002-08-21 03:32:49 +00:00
|
|
|
//DisableA20();
|
2002-04-30 06:26:33 +00:00
|
|
|
ChainLoadBiosBootSectorCode();
|
2001-05-15 03:50:25 +00:00
|
|
|
}
|
|
|
|
|
2002-01-24 00:59:16 +00:00
|
|
|
VOID LoadAndBootPartition(PUCHAR OperatingSystemName)
|
2001-05-15 03:50:25 +00:00
|
|
|
{
|
2002-03-11 18:50:17 +00:00
|
|
|
UCHAR SettingName[80];
|
|
|
|
UCHAR SettingValue[80];
|
Changes in v1.7 (8/6/2002) (brianp)
- EXT2/EXT3 file system support.
- Does not yet support symbolic links or booting from an EXT2/3 partition.
- Fixed bug in UI code.
- Added '%%' format specifier to printf()-like functions.
- Added functions __udivdi3 & __umoddi3 so that 64-bit division is now supported.
- Changed types BYTE, WORD, DWORD, LONG, ULONG to U8, U16, U32, S32, U32
so that you know the size of the variable across different
architectures with different sized words & dwords, etc.
- Types CHAR, UCHAR, PCHAR, PUCHAR, WCHAR, PWCHAR have not been
changed yet (I haven't decided exactly how I'm going to handle unicode)
(isn't this an awesome commit? ;-) Just look at that list of files)
svn path=/trunk/; revision=3318
2002-08-07 05:13:18 +00:00
|
|
|
U32 SectionId;
|
2002-03-11 18:50:17 +00:00
|
|
|
PARTITION_TABLE_ENTRY PartitionTableEntry;
|
2001-05-15 03:50:25 +00:00
|
|
|
|
|
|
|
// Find all the message box settings and run them
|
2002-06-06 05:58:37 +00:00
|
|
|
UiShowMessageBoxesInSection(OperatingSystemName);
|
2001-05-15 03:50:25 +00:00
|
|
|
|
2002-03-11 18:50:17 +00:00
|
|
|
// Try to open the operating system section in the .ini file
|
2002-03-20 00:39:32 +00:00
|
|
|
if (!IniOpenSection(OperatingSystemName, &SectionId))
|
2001-05-15 03:50:25 +00:00
|
|
|
{
|
2002-03-11 18:50:17 +00:00
|
|
|
sprintf(SettingName, "Section [%s] not found in freeldr.ini.\n", OperatingSystemName);
|
2002-06-06 05:58:37 +00:00
|
|
|
UiMessageBox(SettingName);
|
2001-05-15 03:50:25 +00:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2002-03-11 18:50:17 +00:00
|
|
|
// Read the boot drive
|
2002-03-20 00:39:32 +00:00
|
|
|
if (!IniReadSettingByName(SectionId, "BootDrive", SettingValue, 80))
|
2001-05-15 03:50:25 +00:00
|
|
|
{
|
2002-06-06 05:58:37 +00:00
|
|
|
UiMessageBox("Boot drive not specified for selected OS!");
|
2001-05-15 03:50:25 +00:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2003-01-19 01:04:01 +00:00
|
|
|
BootDrive = DriveMapGetBiosDriveNumber(SettingValue);
|
2001-05-15 03:50:25 +00:00
|
|
|
|
2002-03-11 18:50:17 +00:00
|
|
|
// Read the boot partition
|
2002-03-20 00:39:32 +00:00
|
|
|
if (!IniReadSettingByName(SectionId, "BootPartition", SettingValue, 80))
|
2001-05-15 03:50:25 +00:00
|
|
|
{
|
2002-06-06 05:58:37 +00:00
|
|
|
UiMessageBox("Boot partition not specified for selected OS!");
|
2001-05-15 03:50:25 +00:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2002-03-11 18:50:17 +00:00
|
|
|
BootPartition = atoi(SettingValue);
|
2001-05-15 03:50:25 +00:00
|
|
|
|
2002-03-11 18:50:17 +00:00
|
|
|
// Get the partition table entry
|
|
|
|
if (!DiskGetPartitionEntry(BootDrive, BootPartition, &PartitionTableEntry))
|
2001-05-15 03:50:25 +00:00
|
|
|
{
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2002-03-11 18:50:17 +00:00
|
|
|
// Now try to read the partition boot sector
|
|
|
|
// If this fails then abort
|
|
|
|
if (!DiskReadLogicalSectors(BootDrive, PartitionTableEntry.SectorCountBeforePartition, 1, (PVOID)0x7C00))
|
2001-05-15 03:50:25 +00:00
|
|
|
{
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Check for validity
|
Changes in v1.7 (8/6/2002) (brianp)
- EXT2/EXT3 file system support.
- Does not yet support symbolic links or booting from an EXT2/3 partition.
- Fixed bug in UI code.
- Added '%%' format specifier to printf()-like functions.
- Added functions __udivdi3 & __umoddi3 so that 64-bit division is now supported.
- Changed types BYTE, WORD, DWORD, LONG, ULONG to U8, U16, U32, S32, U32
so that you know the size of the variable across different
architectures with different sized words & dwords, etc.
- Types CHAR, UCHAR, PCHAR, PUCHAR, WCHAR, PWCHAR have not been
changed yet (I haven't decided exactly how I'm going to handle unicode)
(isn't this an awesome commit? ;-) Just look at that list of files)
svn path=/trunk/; revision=3318
2002-08-07 05:13:18 +00:00
|
|
|
if (*((U16*)(0x7c00 + 0x1fe)) != 0xaa55)
|
2001-05-15 03:50:25 +00:00
|
|
|
{
|
2002-06-06 05:58:37 +00:00
|
|
|
UiMessageBox("Invalid boot sector magic (0xaa55)");
|
2001-05-15 03:50:25 +00:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2002-11-24 19:10:06 +00:00
|
|
|
UiUnInitialize("Booting...");
|
2002-06-06 05:58:37 +00:00
|
|
|
// Don't stop the floppy drive motor when we
|
|
|
|
// are just booting a bootsector, or drive, or partition.
|
|
|
|
// If we were to stop the floppy motor then
|
|
|
|
// the BIOS wouldn't be informed and if the
|
|
|
|
// next read is to a floppy then the BIOS will
|
|
|
|
// still think the motor is on and this will
|
|
|
|
// result in a read error.
|
2002-11-24 19:10:06 +00:00
|
|
|
//DiskStopFloppyMotor();
|
Changes in v1.7.4 (8/20/2002) (brianp)
- Boot sector code now reports to freeldr.sys the partition
that it was installed on. This is specified by a byte
value in the boot sector code. By default the boot partition
is set to zero which indicates the active (bootable)
partition, unless the installer sets the value to non-zero.
If FreeLoader is installed on a partition other than
the active (bootable) partition then the installer must
set this byte to that partition number. Otherwise
FreeLoader will not be able to find freeldr.ini.
- i386trap.S: Added debug macros BREAKPOINT(),
INSTRUCTION_BREAKPOINTX(), MEMORY_READWRITE_BREAKPOINTX(), &
MEMORY_WRITE_BREAKPOINTX().
- partition.c (DiskGetPartitionEntry): Add the relative offset
of the extended partition to the partitions start sector.
- ext2.c (Ext2ReadBlockPointerList, Ext2CopyIndirectBlockPointers,
Ext2CopyDoubleIndirectBlockPointers, Ext2CopyTripleIndirectBlockPointers):
Rewrote the block pointer functions so they actually work.
- ini_init.c (IniFileInitialize, IniOpenIniFile): Looks for freeldr.ini
on both the active (bootable) partition and the partition
passed in from the boot sector code.
- meminit.c (MmInitializeMemoryManager, MmFixupSystemMemoryMap,
MmGetEndAddressOfAnyMemory, MmGetAddressablePageCountIncludingHoles,
MmInitPageLookupTable): Fixed bug that would cause FreeLoader to
have an off-by-one error when accessing the last entry in the
page lookup table on systems with 4GB of memory (or memory mapped
at the end of the address space).
svn path=/trunk/; revision=3372
2002-08-21 03:32:49 +00:00
|
|
|
//DisableA20();
|
2002-04-30 06:26:33 +00:00
|
|
|
ChainLoadBiosBootSectorCode();
|
2001-05-15 03:50:25 +00:00
|
|
|
}
|
|
|
|
|
2002-01-24 00:59:16 +00:00
|
|
|
VOID LoadAndBootDrive(PUCHAR OperatingSystemName)
|
2001-05-15 03:50:25 +00:00
|
|
|
{
|
2002-01-24 00:59:16 +00:00
|
|
|
UCHAR SettingName[80];
|
|
|
|
UCHAR SettingValue[80];
|
Changes in v1.7 (8/6/2002) (brianp)
- EXT2/EXT3 file system support.
- Does not yet support symbolic links or booting from an EXT2/3 partition.
- Fixed bug in UI code.
- Added '%%' format specifier to printf()-like functions.
- Added functions __udivdi3 & __umoddi3 so that 64-bit division is now supported.
- Changed types BYTE, WORD, DWORD, LONG, ULONG to U8, U16, U32, S32, U32
so that you know the size of the variable across different
architectures with different sized words & dwords, etc.
- Types CHAR, UCHAR, PCHAR, PUCHAR, WCHAR, PWCHAR have not been
changed yet (I haven't decided exactly how I'm going to handle unicode)
(isn't this an awesome commit? ;-) Just look at that list of files)
svn path=/trunk/; revision=3318
2002-08-07 05:13:18 +00:00
|
|
|
U32 SectionId;
|
2001-05-15 03:50:25 +00:00
|
|
|
|
|
|
|
// Find all the message box settings and run them
|
2002-06-06 05:58:37 +00:00
|
|
|
UiShowMessageBoxesInSection(OperatingSystemName);
|
2002-01-24 00:59:16 +00:00
|
|
|
|
|
|
|
// Try to open the operating system section in the .ini file
|
2002-03-20 00:39:32 +00:00
|
|
|
if (!IniOpenSection(OperatingSystemName, &SectionId))
|
2001-05-15 03:50:25 +00:00
|
|
|
{
|
2002-01-24 00:59:16 +00:00
|
|
|
sprintf(SettingName, "Section [%s] not found in freeldr.ini.\n", OperatingSystemName);
|
2002-06-06 05:58:37 +00:00
|
|
|
UiMessageBox(SettingName);
|
2002-01-24 00:59:16 +00:00
|
|
|
return;
|
2001-05-15 03:50:25 +00:00
|
|
|
}
|
|
|
|
|
2002-03-20 00:39:32 +00:00
|
|
|
if (!IniReadSettingByName(SectionId, "BootDrive", SettingValue, 80))
|
2001-05-15 03:50:25 +00:00
|
|
|
{
|
2002-06-06 05:58:37 +00:00
|
|
|
UiMessageBox("Boot drive not specified for selected OS!");
|
2001-05-15 03:50:25 +00:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2003-01-19 01:04:01 +00:00
|
|
|
BootDrive = DriveMapGetBiosDriveNumber(SettingValue);
|
2001-05-15 03:50:25 +00:00
|
|
|
|
2002-03-11 18:50:17 +00:00
|
|
|
// Now try to read the boot sector (or mbr)
|
|
|
|
// If this fails then abort
|
|
|
|
if (!DiskReadLogicalSectors(BootDrive, 0, 1, (PVOID)0x7C00))
|
2001-05-15 03:50:25 +00:00
|
|
|
{
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Check for validity
|
Changes in v1.7 (8/6/2002) (brianp)
- EXT2/EXT3 file system support.
- Does not yet support symbolic links or booting from an EXT2/3 partition.
- Fixed bug in UI code.
- Added '%%' format specifier to printf()-like functions.
- Added functions __udivdi3 & __umoddi3 so that 64-bit division is now supported.
- Changed types BYTE, WORD, DWORD, LONG, ULONG to U8, U16, U32, S32, U32
so that you know the size of the variable across different
architectures with different sized words & dwords, etc.
- Types CHAR, UCHAR, PCHAR, PUCHAR, WCHAR, PWCHAR have not been
changed yet (I haven't decided exactly how I'm going to handle unicode)
(isn't this an awesome commit? ;-) Just look at that list of files)
svn path=/trunk/; revision=3318
2002-08-07 05:13:18 +00:00
|
|
|
if (*((U16*)(0x7c00 + 0x1fe)) != 0xaa55)
|
2001-05-15 03:50:25 +00:00
|
|
|
{
|
2002-06-06 05:58:37 +00:00
|
|
|
UiMessageBox("Invalid boot sector magic (0xaa55)");
|
2001-05-15 03:50:25 +00:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2002-11-24 19:10:06 +00:00
|
|
|
UiUnInitialize("Booting...");
|
2002-06-06 05:58:37 +00:00
|
|
|
// Don't stop the floppy drive motor when we
|
|
|
|
// are just booting a bootsector, or drive, or partition.
|
|
|
|
// If we were to stop the floppy motor then
|
|
|
|
// the BIOS wouldn't be informed and if the
|
|
|
|
// next read is to a floppy then the BIOS will
|
|
|
|
// still think the motor is on and this will
|
|
|
|
// result in a read error.
|
2002-11-24 19:10:06 +00:00
|
|
|
//DiskStopFloppyMotor();
|
Changes in v1.7.4 (8/20/2002) (brianp)
- Boot sector code now reports to freeldr.sys the partition
that it was installed on. This is specified by a byte
value in the boot sector code. By default the boot partition
is set to zero which indicates the active (bootable)
partition, unless the installer sets the value to non-zero.
If FreeLoader is installed on a partition other than
the active (bootable) partition then the installer must
set this byte to that partition number. Otherwise
FreeLoader will not be able to find freeldr.ini.
- i386trap.S: Added debug macros BREAKPOINT(),
INSTRUCTION_BREAKPOINTX(), MEMORY_READWRITE_BREAKPOINTX(), &
MEMORY_WRITE_BREAKPOINTX().
- partition.c (DiskGetPartitionEntry): Add the relative offset
of the extended partition to the partitions start sector.
- ext2.c (Ext2ReadBlockPointerList, Ext2CopyIndirectBlockPointers,
Ext2CopyDoubleIndirectBlockPointers, Ext2CopyTripleIndirectBlockPointers):
Rewrote the block pointer functions so they actually work.
- ini_init.c (IniFileInitialize, IniOpenIniFile): Looks for freeldr.ini
on both the active (bootable) partition and the partition
passed in from the boot sector code.
- meminit.c (MmInitializeMemoryManager, MmFixupSystemMemoryMap,
MmGetEndAddressOfAnyMemory, MmGetAddressablePageCountIncludingHoles,
MmInitPageLookupTable): Fixed bug that would cause FreeLoader to
have an off-by-one error when accessing the last entry in the
page lookup table on systems with 4GB of memory (or memory mapped
at the end of the address space).
svn path=/trunk/; revision=3372
2002-08-21 03:32:49 +00:00
|
|
|
//DisableA20();
|
2002-04-30 06:26:33 +00:00
|
|
|
ChainLoadBiosBootSectorCode();
|
2001-05-15 03:50:25 +00:00
|
|
|
}
|