History log of /haiku/src/system/boot/platform/bios_ia32/devices.cpp
Revision Date Author Comments
# 425ac1b6 20-Jun-2023 Alexander von Gluck IV <kallisti5@unixzen.com>

refactor: Swap %Ld for %lld in all format usages

* %Ld is an undocumented alias for %lld in glibc.
* muslc doesn't implement it for this reason.
* While we will likely never drop %Ld support,
lets clean house and set a better example.

Change-Id: Id46dad3104abae483e80cc5c05d1464d3ecd8030
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6636
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>


# 62f80a2a 04-Jul-2021 Jessica Hamilton <jessica.l.hamilton@gmail.com>

loader: fetch all potential boot partitions for device

This also keeps the functionality of hrev53848, which simplifies the
list of disks searched for bootable partitions; however, it maintains
the previous behaviour of platform_get_boot_partitions that continues
to iterate over a list of possible boot partitions, which should
allow finding a bootable BFS partition better in more circumstances.

Particularly, there are numerous reports of the UEFI loader entering
the boot menu despite it finding a bootable partition, which this
should address.

EFI's device_contains_partition is also structured such that it
compares the disk GPT table of the partition the loader is
querying of the EFI disk's GPT table, in the case that there are
multiple disks, as the most reliable method of comparison, with
a generic fallback for non-GPT disks, which will be less reliable.

This reverts commit 0d932a49ada8af6314cd3f20c3f597143f1f555d.

Change-Id: I5fac8608035d56b8bb4dc6c3d495ec6db42fa9b7
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4149
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>


# 0d932a49 08-Feb-2020 Fredrik Holmqvist <fredrik.holmqvist@gmail.com>

Revert "loader: fetch all potential boot partitions for boot device."

This reverts commit e888217124fa9fb214ffa790e6a66dca3917f25e.

Change-Id: I06be82ac863f615796d9edc86f5ef903b8123a9d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2231
Reviewed-by: waddlesplash <waddlesplash@gmail.com>


# e1b41d44 13-Jun-2010 Andreas Faerber <andreas.faerber@web.de>

boot loader: Wire up net_stack_cleanup()

Add a platform cleanup hook before starting the kernel. The openfirmware
and PXE loaders clean up their network stack there, while the other
loaders currently do nothing.

This closes ticket #6166

Change-Id: I34765892dfd9b2310c6af97c9ff7d414afae49e5
Reviewed-on: https://review.haiku-os.org/c/50
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>


# 8aa8345a 03-Mar-2019 Augustin Cavalier <waddlesplash@gmail.com>

boot/bios_ia32: Remove the unused flat_buffer field.

Suggested by korli in #11019. We pass this struct directly to the
BIOS, so pack it while we are here.

Checked against GRUB (it also does not have this field.)

Change-Id: I9a2708c44ff48fd702175053f2889443d6f7a003
Reviewed-on: https://review.haiku-os.org/c/1145
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>


# e8882171 13-May-2017 Jessica Hamilton <jessica.l.hamilton@gmail.com>

loader: fetch all potential boot partitions for boot device.

This allows the loader to skip BFS partitions that don't contain
a bootable system. Useful when you have a BFS data partition that
comes before the system partition when iterated over.

Currently, only the UEFI loader actually returns more than one
possible partition.


# 679ad262 29-May-2014 Michał Siejak <michal@siejak.pl>

haiku_loader now ignores unusable drives reported by BIOS.

This fixes the problem with find_unique_check_sums() taking a very long
time to complete when one or more drives report read errors.

Fixes #10880.

[Paweł: minor style issue]
Signed-off-by: Paweł Dziepak <pdziepak@quarnos.org>


# 7b1dee39 25-Oct-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

boot loader: Fix find_unique_check_sums()

Comparing the complete disk_identifer structure isn't helpful as long as
we don't (can't) compare it in the kernel as well. ATM we only check the
check sums there, so that's what we need to do here as well. This fixes
potential mix-ups when booting off one of multiple equally sized disks.


# 46cf7a5a 14-Nov-2012 Przemysław Buczkowski <przemub@yahoo.pl>

Fix typos: super block -> superblock (#8974)

Signed-off-by: Przemysław Buczkowski <przemub@yahoo.pl>
Signed-off-by: Matt Madia <mattmadia@gmail.com>


# 93cb9538 20-Jun-2012 Alex Smith <alex@alex-smith.me.uk>

Don't store a KMessage in kernel_args for the boot volume, only the buffer address/size.

Pointers in kernel_args are going to be changed to unconditionally use 64-bit
storage (to make kernel_args compatible with both the x86 and x86_64 kernels).
KMessage stores a pointer to its buffer, however since KMessage is used
outside of the boot code it is undesirable to change it to use 64-bit storage
for the pointer as it may add additional overhead on 32-bit builds. Therefore,
only store the buffer address and size and then construct a KMessage from
those in the kernel.


# 447e6190 02-Jan-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Always initialize fSize in the BIOSDrive constructor -- InitCheck() uses it
(CID 10272).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40077 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d1367a37 16-Mar-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

Implemented BIOSDrive::WriteAt(). Currently it supports only LBA addressing
and requires position and size to be block-aligned.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35881 a95241bf-73f2-0310-859d-f6bbb57e9c96


# cee04e80 08-Feb-2010 Artur Wyszynski <aljen-mlists@o2.pl>

Fixed various errors/warnings reported by cppcheck:
* memory leaks
* resource leaks
* added const's to getters
* removed a few reundant conditions


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35433 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 03a574d8 06-May-2009 Michael Lotz <mmlr@mlotz.ch>

* Check for disk extensions before using them (mostly for good practice reasons)
* A CHS read error would previously be hidden by a successful disk system reset.
Not that it matters much because it'd have resulted in a non-booting system
anyway.
* Add some more debug output, minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30643 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5c8e597e 24-Apr-2009 Michael Lotz <mmlr@mlotz.ch>

Don't try to use disk extensions for non-disk devices (like actual floppies or
emulated ones on CD-boot). One of my laptops returns bogus drive parameters
and another one silently fails the read, previously preventing CD-boot on both.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30389 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 47150693 02-Mar-2008 François Revol <revol@free.fr>

Setting a Bool when you actually Get a Bool might help...

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24211 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 9e8dc2a9 14-Jul-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

[Sorry, couldn't split this one up any further.]
* Images preloaded by the boot loader had to be modules to be of any use
to the kernel. Extended the mechanism so that any images not accepted
by the module code would later be tried to be added as drivers by the
devfs. This is a little hacky ATM, since the devfs manages the drivers
using a hash map keyed by the drivers inode ID, which those drivers
obviously don't have.
* The devfs emulates read_pages() using read(), if the device driver
doesn't implement the former (all old-style drivers), thus making it
possible to BFS, which uses the file cache which in turn requires
read_pages(), on the device. write_pages() emulation is still missing.
* Replaced the kernel_args::boot_disk structure by a KMessage, which can
more flexibly be extended and deals more gracefully with
arbitrarily-size data. The disk_identifier structure still exists,
though. It is added as message field in cases where needed (non net
boot). Moved the boot_drive_number field of the bios_ia32 platform
specific args into the message.
* Made the stage 1 PXE boot loader superfluous. Moved the relevant
initialization code into the stage 2 loader, which can now be loaded
directly via PXE.
* The PXE boot loader does now download a boot tgz archive via TFTP. It
does no longer use the RemoteDisk protocol (it could actually be
removed from the boot loader). It also parses the DHCP options in the
DHCPACK packet provided by PXE and extracts the root path to be
mounted by the kernel.
* Reorganized the boot volume search in the kernel (vfs_boot.cpp) and
added support for network boot. In this case the net stack is
initialized and the network interface the boot loader used is brought
up and configured. Since NBD and RemoteDisk are our only options for
net boot (and those aren't really configurable dynamically) ATM, the
the boot device is found automatically by the disk device manager.

Booting via PXE does work to some degree now. The most grievous problem
is that loading certain drivers or kernel modules (or related activity)
causes a reboot (likely a triple fault, though one wonders where our
double fault handler is on vacation). Namely the keyboard and mouse input
server add-ons need to be deactivated as well as the media server.
A smaller problem is the net server, which apparently tries to
(re-)configure the network interface we're using to boot, which
obviously doesn't work out that well. So, if all this stuff is disabled
Haiku does fully boot, when using the RemoteDisk protocol (not being
able to use keyboard or mouse doesn't make this a particular fascinating
experience, though ;-)). I had no luck with NBD -- it seemed to have
protocol problems with the servers I tried.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21611 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 43792b9e 12-Jan-2007 Marcus Overhagen <marcusoverhagen@gmail.com>

propagate required settings for the remote disk from boot loader to kernel (client-ip, server-ip, server-port)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19780 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 82029bda 16-Sep-2006 Marcus Overhagen <marcusoverhagen@gmail.com>

added missing nothrow parameter


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18868 a95241bf-73f2-0310-859d-f6bbb57e9c96


# fabe8c62 27-Mar-2006 Axel Dörfler <axeld@pinc-software.de>

The kernel boot code now supports the unknown bus/device method to identify the
boot volume. The other (better) methods are now disabled in the boot loader.
This fixes bug #241.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16895 a95241bf-73f2-0310-859d-f6bbb57e9c96


# ecdaf9de 27-Mar-2006 Axel Dörfler <axeld@pinc-software.de>

* The boot loader now adds all block devices in case the BIOS doesn't give enough
information to identify the boot volume - if we want to be able to map all BIOS
drive IDs to the disks in the system, we need to do this always, though.
* Forgot to commit the updated disk_identifier.h in the last commit...
* Removed the unused dumpBlock() function from devices.cpp.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16892 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 1bcbbd6a 27-Mar-2006 Axel Dörfler <axeld@pinc-software.de>

The boot loader now does its job and computes drive check sums at arbitrary blocks
in order to differentiate boot disks. The kernel still ignores this wisdom, though,
bug #241 still remains open.
This currently only works correctly if the boot menu is opened, anyway.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16891 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 8c20600d 19-Oct-2005 Axel Dörfler <axeld@pinc-software.de>

Looks like some BIOS don't bother filling in cylinder/head/sectors_per_track information
for extended drive parameters.
This should fix eventual "no boot disk" messages of the boot loader.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14435 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5a54b401 17-Oct-2005 Axel Dörfler <axeld@pinc-software.de>

Implemented platform_add_block_devices() - if you have more than one bootable
Haiku disk installed, you can now choose between them in the boot loader.
Also fixed build - obviously forgot to compile before a last minute change...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14404 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 597416d1 17-Oct-2005 Axel Dörfler <axeld@pinc-software.de>

gKernelArgs.boot_disk.cd is now only set to true, if the selected boot volume
is still the CD-ROM.
BIOSDrive::ReadAt() now tries to read a specific block up to 3 times before
failing - after the second retry, it will also reset the disk system.
get_ext_drive_parameters() will now fail if the BIOS fills in the device_parameters
structure incorrectly (just tested some values against zero, that at least helps
in the case of one of my systems).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14401 a95241bf-73f2-0310-859d-f6bbb57e9c96


# a51b55c9 17-Oct-2005 Axel Dörfler <axeld@pinc-software.de>

"kernel_args.boot_disk.cd" was never set to true...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14397 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 2e2bd875 14-Oct-2005 Axel Dörfler <axeld@pinc-software.de>

Renamed devices_check_boot_cd() to check_boot_cd() and moved it up to the other BIOS
functions - it no longer terminates the CD-ROM emulation, but only checks the status,
and therefore, it's now called by platform_register_boot_device() instead of from
platform_start_kernel().
This also makes the devices.h header useless.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14390 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 51e081ba 14-Oct-2005 Axel Dörfler <axeld@pinc-software.de>

Removed platform_boot_device_is_image() - platform_get_boot_device() now fills
in the adequate field in the kernel_args structure.
Renamed gCDFloppyBoot variable to gBootedFromImage (as network boot should look
similar).
The "kernel_args.boot_disk.cd" field is now maintained as well.
The print_item_at() menu function now prints the Menu::ChoiceText() instead
of that of its marked item.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14389 a95241bf-73f2-0310-859d-f6bbb57e9c96


# e3fcb58e 14-Oct-2005 Axel Dörfler <axeld@pinc-software.de>

The boot loader now has special support for being booted from a boot image
like floppy or CD boot.
This allows it to reduce the number of scans needed to identify the boot
partition - when booted from a real floppy, this speeds up the boot
process by a magnitude.
Also, the loader now has a fall back in case there were no "boot" links
on the disk - the current boot floppy script doesn't create them.
With these changes, I was able to boot into a HD based Haiku installation
from a floppy disk. It's not yet enough to boot from CD (as the boot
device selection is a bit too simplistic right now), but it will eventually
come next. Testing is a lot slower here, though, as neither qemu nor
Bochs support multi-session CDs (at least I have no idea how to get them
to do this).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14380 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 7416092b 14-Oct-2005 Axel Dörfler <axeld@pinc-software.de>

Marcus spotted an error in the cylinder calculation in get_drive_parameters() - didn't
have an effect on floppies or CD-ROMs, but would have on real hard drives that require
CHS access.
Changed the cylinder-to-regs conversion in BIOSDrive::ReadAt() (that one was actually
correct) to make it look similar to the conversion in the opposite direction in
get_drive_parameters().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14377 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 8d156f1c 13-Oct-2005 Axel Dörfler <axeld@pinc-software.de>

Fixed a bug with the offset handling in BIOSDrive::ReadAt().
Implemented CHS support needed for smaller hard drives, CD-ROM, ...
Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14369 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5af32e75 13-Apr-2005 Axel Dörfler <axeld@pinc-software.de>

Renamed src/kernel to src/system.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12359 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 679ad262e91e4e88e7a87943dd94fef6c57094be 29-May-2014 Michał Siejak <michal@siejak.pl>

haiku_loader now ignores unusable drives reported by BIOS.

This fixes the problem with find_unique_check_sums() taking a very long
time to complete when one or more drives report read errors.

Fixes #10880.

[Paweł: minor style issue]
Signed-off-by: Paweł Dziepak <pdziepak@quarnos.org>


# 7b1dee3929445395f029da22c4a692534b52d629 25-Oct-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

boot loader: Fix find_unique_check_sums()

Comparing the complete disk_identifer structure isn't helpful as long as
we don't (can't) compare it in the kernel as well. ATM we only check the
check sums there, so that's what we need to do here as well. This fixes
potential mix-ups when booting off one of multiple equally sized disks.


# 46cf7a5a73679c6e4fde91710e4a4885242e49d1 14-Nov-2012 Przemysław Buczkowski <przemub@yahoo.pl>

Fix typos: super block -> superblock (#8974)

Signed-off-by: Przemysław Buczkowski <przemub@yahoo.pl>
Signed-off-by: Matt Madia <mattmadia@gmail.com>


# 93cb9538be54a2dd4ab6097453ac7d521a9a0b6c 20-Jun-2012 Alex Smith <alex@alex-smith.me.uk>

Don't store a KMessage in kernel_args for the boot volume, only the buffer address/size.

Pointers in kernel_args are going to be changed to unconditionally use 64-bit
storage (to make kernel_args compatible with both the x86 and x86_64 kernels).
KMessage stores a pointer to its buffer, however since KMessage is used
outside of the boot code it is undesirable to change it to use 64-bit storage
for the pointer as it may add additional overhead on 32-bit builds. Therefore,
only store the buffer address and size and then construct a KMessage from
those in the kernel.


# 447e61909ffbeb68750e50f8f581e4ffe59c94b1 02-Jan-2011 Ingo Weinhold <ingo_weinhold@gmx.de>

Always initialize fSize in the BIOSDrive constructor -- InitCheck() uses it
(CID 10272).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40077 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d1367a37ccfb79ad8c49a3ead8509aabad1e2ffc 16-Mar-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

Implemented BIOSDrive::WriteAt(). Currently it supports only LBA addressing
and requires position and size to be block-aligned.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35881 a95241bf-73f2-0310-859d-f6bbb57e9c96


# cee04e8074ec61fd8c6dac3539c5b821c3618888 08-Feb-2010 Artur Wyszynski <aljen-mlists@o2.pl>

Fixed various errors/warnings reported by cppcheck:
* memory leaks
* resource leaks
* added const's to getters
* removed a few reundant conditions


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35433 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 03a574d8cdc3613afe81d8c0125e18c1a6e4f64e 06-May-2009 Michael Lotz <mmlr@mlotz.ch>

* Check for disk extensions before using them (mostly for good practice reasons)
* A CHS read error would previously be hidden by a successful disk system reset.
Not that it matters much because it'd have resulted in a non-booting system
anyway.
* Add some more debug output, minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30643 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5c8e597e90e96bb6e9fcaeaf729fa81de1003d97 24-Apr-2009 Michael Lotz <mmlr@mlotz.ch>

Don't try to use disk extensions for non-disk devices (like actual floppies or
emulated ones on CD-boot). One of my laptops returns bogus drive parameters
and another one silently fails the read, previously preventing CD-boot on both.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30389 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 4715069375f0dbb2b4239de428ff9630df6877ca 02-Mar-2008 François Revol <revol@free.fr>

Setting a Bool when you actually Get a Bool might help...

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24211 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 9e8dc2a9bbbe768acdfd224a6a4af01918bb4ce0 14-Jul-2007 Ingo Weinhold <ingo_weinhold@gmx.de>

[Sorry, couldn't split this one up any further.]
* Images preloaded by the boot loader had to be modules to be of any use
to the kernel. Extended the mechanism so that any images not accepted
by the module code would later be tried to be added as drivers by the
devfs. This is a little hacky ATM, since the devfs manages the drivers
using a hash map keyed by the drivers inode ID, which those drivers
obviously don't have.
* The devfs emulates read_pages() using read(), if the device driver
doesn't implement the former (all old-style drivers), thus making it
possible to BFS, which uses the file cache which in turn requires
read_pages(), on the device. write_pages() emulation is still missing.
* Replaced the kernel_args::boot_disk structure by a KMessage, which can
more flexibly be extended and deals more gracefully with
arbitrarily-size data. The disk_identifier structure still exists,
though. It is added as message field in cases where needed (non net
boot). Moved the boot_drive_number field of the bios_ia32 platform
specific args into the message.
* Made the stage 1 PXE boot loader superfluous. Moved the relevant
initialization code into the stage 2 loader, which can now be loaded
directly via PXE.
* The PXE boot loader does now download a boot tgz archive via TFTP. It
does no longer use the RemoteDisk protocol (it could actually be
removed from the boot loader). It also parses the DHCP options in the
DHCPACK packet provided by PXE and extracts the root path to be
mounted by the kernel.
* Reorganized the boot volume search in the kernel (vfs_boot.cpp) and
added support for network boot. In this case the net stack is
initialized and the network interface the boot loader used is brought
up and configured. Since NBD and RemoteDisk are our only options for
net boot (and those aren't really configurable dynamically) ATM, the
the boot device is found automatically by the disk device manager.

Booting via PXE does work to some degree now. The most grievous problem
is that loading certain drivers or kernel modules (or related activity)
causes a reboot (likely a triple fault, though one wonders where our
double fault handler is on vacation). Namely the keyboard and mouse input
server add-ons need to be deactivated as well as the media server.
A smaller problem is the net server, which apparently tries to
(re-)configure the network interface we're using to boot, which
obviously doesn't work out that well. So, if all this stuff is disabled
Haiku does fully boot, when using the RemoteDisk protocol (not being
able to use keyboard or mouse doesn't make this a particular fascinating
experience, though ;-)). I had no luck with NBD -- it seemed to have
protocol problems with the servers I tried.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21611 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 43792b9eeda5ba6d5fc57b0779537681a022cfeb 12-Jan-2007 Marcus Overhagen <marcusoverhagen@gmail.com>

propagate required settings for the remote disk from boot loader to kernel (client-ip, server-ip, server-port)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19780 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 82029bdae870b0e257a54929116ddfb6da9efdca 16-Sep-2006 Marcus Overhagen <marcusoverhagen@gmail.com>

added missing nothrow parameter


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18868 a95241bf-73f2-0310-859d-f6bbb57e9c96


# fabe8c62ff591d112290ac797243751693981bab 27-Mar-2006 Axel Dörfler <axeld@pinc-software.de>

The kernel boot code now supports the unknown bus/device method to identify the
boot volume. The other (better) methods are now disabled in the boot loader.
This fixes bug #241.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16895 a95241bf-73f2-0310-859d-f6bbb57e9c96


# ecdaf9dea851ba14d3d282656258949f7c90dc96 27-Mar-2006 Axel Dörfler <axeld@pinc-software.de>

* The boot loader now adds all block devices in case the BIOS doesn't give enough
information to identify the boot volume - if we want to be able to map all BIOS
drive IDs to the disks in the system, we need to do this always, though.
* Forgot to commit the updated disk_identifier.h in the last commit...
* Removed the unused dumpBlock() function from devices.cpp.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16892 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 1bcbbd6a721ddc0c32460a1eee64a81c975cece8 27-Mar-2006 Axel Dörfler <axeld@pinc-software.de>

The boot loader now does its job and computes drive check sums at arbitrary blocks
in order to differentiate boot disks. The kernel still ignores this wisdom, though,
bug #241 still remains open.
This currently only works correctly if the boot menu is opened, anyway.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16891 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 8c20600d1248129ba781cdede16d7cf8c01cee2c 19-Oct-2005 Axel Dörfler <axeld@pinc-software.de>

Looks like some BIOS don't bother filling in cylinder/head/sectors_per_track information
for extended drive parameters.
This should fix eventual "no boot disk" messages of the boot loader.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14435 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5a54b4016673b3222a819bb90cc1bf3e69827bfe 17-Oct-2005 Axel Dörfler <axeld@pinc-software.de>

Implemented platform_add_block_devices() - if you have more than one bootable
Haiku disk installed, you can now choose between them in the boot loader.
Also fixed build - obviously forgot to compile before a last minute change...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14404 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 597416d1ddc52791e0e38cfc5a623cef71661208 17-Oct-2005 Axel Dörfler <axeld@pinc-software.de>

gKernelArgs.boot_disk.cd is now only set to true, if the selected boot volume
is still the CD-ROM.
BIOSDrive::ReadAt() now tries to read a specific block up to 3 times before
failing - after the second retry, it will also reset the disk system.
get_ext_drive_parameters() will now fail if the BIOS fills in the device_parameters
structure incorrectly (just tested some values against zero, that at least helps
in the case of one of my systems).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14401 a95241bf-73f2-0310-859d-f6bbb57e9c96


# a51b55c985fbf52058a1e63839c5b78a017150a5 17-Oct-2005 Axel Dörfler <axeld@pinc-software.de>

"kernel_args.boot_disk.cd" was never set to true...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14397 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 2e2bd87511c172ce68b226c4e46aaa04f75ebce9 14-Oct-2005 Axel Dörfler <axeld@pinc-software.de>

Renamed devices_check_boot_cd() to check_boot_cd() and moved it up to the other BIOS
functions - it no longer terminates the CD-ROM emulation, but only checks the status,
and therefore, it's now called by platform_register_boot_device() instead of from
platform_start_kernel().
This also makes the devices.h header useless.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14390 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 51e081bade5f62f3db7458f7b53d9af2cc96d277 14-Oct-2005 Axel Dörfler <axeld@pinc-software.de>

Removed platform_boot_device_is_image() - platform_get_boot_device() now fills
in the adequate field in the kernel_args structure.
Renamed gCDFloppyBoot variable to gBootedFromImage (as network boot should look
similar).
The "kernel_args.boot_disk.cd" field is now maintained as well.
The print_item_at() menu function now prints the Menu::ChoiceText() instead
of that of its marked item.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14389 a95241bf-73f2-0310-859d-f6bbb57e9c96


# e3fcb58ebb7497340ed016d1a5ac4d4f13564d90 14-Oct-2005 Axel Dörfler <axeld@pinc-software.de>

The boot loader now has special support for being booted from a boot image
like floppy or CD boot.
This allows it to reduce the number of scans needed to identify the boot
partition - when booted from a real floppy, this speeds up the boot
process by a magnitude.
Also, the loader now has a fall back in case there were no "boot" links
on the disk - the current boot floppy script doesn't create them.
With these changes, I was able to boot into a HD based Haiku installation
from a floppy disk. It's not yet enough to boot from CD (as the boot
device selection is a bit too simplistic right now), but it will eventually
come next. Testing is a lot slower here, though, as neither qemu nor
Bochs support multi-session CDs (at least I have no idea how to get them
to do this).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14380 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 7416092b83d73da5e46628355f424a0a449e29d6 14-Oct-2005 Axel Dörfler <axeld@pinc-software.de>

Marcus spotted an error in the cylinder calculation in get_drive_parameters() - didn't
have an effect on floppies or CD-ROMs, but would have on real hard drives that require
CHS access.
Changed the cylinder-to-regs conversion in BIOSDrive::ReadAt() (that one was actually
correct) to make it look similar to the conversion in the opposite direction in
get_drive_parameters().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14377 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 8d156f1c5e4f66b8d9743cb7058acf6241cd1cd1 13-Oct-2005 Axel Dörfler <axeld@pinc-software.de>

Fixed a bug with the offset handling in BIOSDrive::ReadAt().
Implemented CHS support needed for smaller hard drives, CD-ROM, ...
Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14369 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5af32e752606778be5dd7379f319fe43cb3f6b8c 13-Apr-2005 Axel Dörfler <axeld@pinc-software.de>

Renamed src/kernel to src/system.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12359 a95241bf-73f2-0310-859d-f6bbb57e9c96