Commit Graph

106 Commits

Author SHA1 Message Date
Axel Dörfler 6328832fba * Changed get_boot_item() API: it now also can retrieve the size of the boot
item entry.
* The bios_ia32 video platform code now stores the available VESA modes in
  the new vesa_modes kernel_args field.
* When configuring a VESA mode via settings file, it's no longer needed to
  specify the exact mode - the closest available mode is now used. This should
  help with bug #1962.
* frame_buffer_console_init() now also creates a boot_item for the VESA modes
  in the kernel_args.
* The VESA accelerant now filters the mode list to only contain modes that
  are actually supported.
* Moved non-shared vesa driver data into its own file vesa_private.h.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24675 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-30 11:01:41 +00:00
Axel Dörfler a886f802fc * Added debug_screen_output_enabled() function.
* The boot splash code now checks wether debug screen output is enabled or not
  using the above function.
* The boot splash code no longer maps it's own copy of the frame buffer, instead,
  it will use the boot item feature as the VESA driver does. Also removed the
  lock, as that's not needed at all.
* Renamed splash.cpp to boot_splash.cpp, and boot/splash.h to boot_splash.h
  (it's not part of the boot loader, but the kernel).
* Removed dead code from boot_splash.cpp, added license. Replaced license
  header in boot_splash.h to a style guide conforming one.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24489 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-20 11:10:17 +00:00
Stephan Aßmus 55ef60a5ae * Removed the Copyright image/rendering.
* Fixed the icons image, it was upside down.
* Support the new 24 bit boot screen images in the boot_loader and the kernel.
* Prepare the code for future indexed versions of the boot screen images.
  But the generate_boot_screen tool currently does not generate those.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24449 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-18 20:27:47 +00:00
Stephan Aßmus 7d85665d0f * Give boot stages a more meaningful name, make the max stage count known.
* Calculate icon offset from stage in splash.cpp, remove hard coded placement
  values. Draw only icon, not the whole image from top/left to right of
  icon.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24439 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-18 13:14:18 +00:00
Stephan Aßmus aa727f6643 patch by Artur Wyszynski (aljen):
* Added the feature of an animated boot screen (icons lighting up at
  different boot stages).
* Added first version of new boot splash images, generated by the new
  hsbg tool. (Also finally contains the "new" Haiku logo.)

changes by myself:
* Added Artur to the contributors list in About System.
* Fixed some left overs in the patch, kept tracing turned off.

TODO:
* Remove the need for hard coding the icon positions. (Maybe generate
  those from hsbg and put them into images.h? Have user provide icon
  spacing/offsets at the command line for hsbg?)
* Rename the stages to something meaningful.
* Use hsbg as a build system tool and generate images.h during build
  from PNGs provided in the artwork folder.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24434 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-18 10:25:53 +00:00
François Revol 1dc0bb774c Avoid empty struct
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23263 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-06 00:40:17 +00:00
François Revol 5eeaf46777 Minimal headers for atari_m68k
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23186 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-12-29 12:58:32 +00:00
Marcus Overhagen 882123356b Added more debugging code. The partition code appears to be using objects that have been destroyed.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23165 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-12-26 22:26:08 +00:00
Axel Dörfler 5845b6ecc5 * The boot loader now remembers the bytes per row as told by the graphics card, and
passes that information on to the kernel. This should fix wrong bytes per row with
  certain resolutions and graphics cards.
* The boot loader now recognizes 15 bit modes that are advertised as 16 bit modes.
  This should fix wrong colors in 16 bit modes on some cards.
* Reenabled setting MTRR for VESA mode - don't remember why I disabled it, but it
  works fine on my test machines.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23006 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-11-27 16:33:19 +00:00
Axel Dörfler 3ae3b04bce * The boot loader (bios_ia32 only) now duplicates everything that goes to the
serial output, and puts it into the new kernel_args::debug_output field.
* syslog_init() will now check if there is anything in kernel_args::debug_output
  and will put that into the syslog buffer.
* dump_block() now also prints an offset.
* Fixed warning in mmu.cpp.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23003 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-11-27 12:59:34 +00:00
Ingo Weinhold 6748659272 Added an identify_file_system() hook to the FS modules. The boot loader
does no longer give partitioning systems precedence over file systems.
The one with the greater identification priority wins. ATM, if a file
system wins, we still mount the first file system that recognized the
partition at all, though.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22446 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-04 23:16:31 +00:00
Ingo Weinhold 2a39e9e44e Made the remote_disk_server build under R5.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21945 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-08-14 14:54:09 +00:00
Ingo Weinhold 9e8dc2a9bb [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
2007-07-15 02:10:15 +00:00
Axel Dörfler eef8417e27 * Added (non-working) EFI module to the boot loader and its test application.
* Fixed a warning in efi_gpt.cpp.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21532 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-30 15:31:01 +00:00
Marcus Overhagen 43792b9eed 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
2007-01-12 22:27:48 +00:00
Axel Dörfler 86e355a227 Enlarged all memory range arrays to 6, just in case.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19740 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-01-08 12:14:58 +00:00
Axel Dörfler 3e161fb661 * Instead of its home-brewn solution, mmu_init() now uses the functions declared
in addr_range.h to add ranges to the arrays. This fixes the crashing bug reported
  by Larry Baydak.
* Added some more exported functions to kernel_args.cpp (prototypes are in addr_range.h).
* TODO: let the PPC/OpenFirmware implementation use those as well.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19739 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-01-08 12:14:06 +00:00
Marcus Overhagen 2f9a049400 add array indexed access to mac_addr_t
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19627 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-12-26 14:57:21 +00:00
Axel Dörfler 35d3421dc5 Greatly enlarged the number of possible kernel_arg ranges as we were already
pretty close, and the number of loaded modules have a direct influence on
this (even though we're currently loading the symbols by default).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19320 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-11-17 15:42:42 +00:00
Marcus Overhagen a1939ee423 Modified the pxe_ia32 stage 1 loader to load stage 2 at the same address as bios_ia32 stage 1 does.
This allowes to actually execute the boot loader now. 
Need to use Ingo's remote_disk_server now for booting.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19113 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-10-24 20:53:30 +00:00
Axel Dörfler ecdaf9dea8 * 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
2006-03-27 14:50:37 +00:00
Axel Dörfler ba61df6d0b Beginnings of APM support: we now connect to the APM BIOS in 32 bit protected mode.
We don't do anything with it yet, though, so the BIOS will probably ignore us since
we are supposed to poll for events.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15900 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-10 22:54:36 +00:00
Ingo Weinhold e55e1a0e66 Implemented the PPC specific RTC support. We search for an "rtc"
device in the Open Firmware implementation of boot loader and
pass its path to the kernel, where it's opened and used for
getting/setting the real time. The expensive atomic_*64() on PPC
32-bit make things a bit more complicated. Moreover, missing
64 bit multiplication and division instructions won't really
allow system_time() to be anywhere near as fast as on x86. :-/


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15837 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-04 04:55:04 +00:00
Ingo Weinhold 957a1b17eb * Introduced new build system variables
{HAIKU,HOST,TARGET}_KERNEL_PIC_{CC,LINK}FLAGS which define the
  compiler/linker flags specifying the kind of position independence
  the kernel shall have. For x86 we had and still have -fno-pic, but the
  PPC kernel has -fPIE (position independent executable) now, as we
  need to relocate it.
* The boot loader relocates the kernel now. Mostly copied the relocation
  code from the kernel ELF loader. Almost completely rewrote the PPC
  specific relocation code, though. It's more correct and more complete now
  (some things are still missing though).
* Added boot platform awareness to the kernel. Moved the generic
  Open Firmware code (openfirmware.c/h) from the boot loader to the kernel.
* The kernel PPC serial debug output is sent to the console for the time
  being.
* The PPC boot loader counts the CPUs now and allocates the kernel stacks
  (made OF device iteration a bit more flexible on the way -- the search
  can be restricted to subtree). Furthermore we really enter the kernel...
  (Yay! :-) ... and crash in the first dprintf() (in the atomic_set()
  called by acquire_spinlock()). kprintf() works, though.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15756 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-30 21:20:07 +00:00
Ingo Weinhold be950af4df Removed unused kernel_args fields.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15746 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-30 17:56:52 +00:00
Ingo Weinhold c83d9dad1c * platform_allocate_region() has a new boolean parameter "exactAddress"
specifying whether only the exact supplied address is acceptable. If
  false, the address is considered a hint only. It will be picked, if
  available, otherwise a greater address is tried to be acquired, and
  as last resort any address. This feature is only implemented for PPC.
  It is needed since the preferred kernel text base address 0x80000000
  might not be available (and actually isn't on my Mac mini).
* Fixed a bug in the PPC memory management code:
  is_{virtual,physical}_allocated() were checking whether the given
  range was completely contained by an existing range instead of
  checking for intersection. As a consequence we could (and did) allocate
  a range intersecting with already allocated ranges. The kernel segment
  thus overwrote OF memory for instance.
* The ELF loader makes sure that it got both text and data segment of
  the image to be loaded.

The PPC boot loader successfully loads kernel and modules now. Next
comes the hard part, I'm afraid.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15708 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-29 01:50:23 +00:00
Ingo Weinhold d561d0ad68 Added a mini networking stack to the boot loader. It speaks basic ARP,
IP, and UDP, as well as a home brewn UDP based protocol, "remote disk",
which provides random access to a single remote file/device. The Open
Firmware flavored boot loader automatically initializes the net stack,
searches for a remote disk, and tries to boot from it, if the boot
device is a network device (e.g. when loading the boot loader via
TFTP).

This is quite nice for developing with a two-machine setup, since one
doesn't even need to install Haiku on the test machine anymore, but can
serve it directly from the development machine. When the networking
support in the kernel is working, this method could even be used to
fully boot, not just for loading kernel and initial modules.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15689 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-27 22:01:33 +00:00
Ingo Weinhold 4c62b0919f Pulled platform independent part of the BIOS boot menu out into
platform/generic/...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15587 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-19 13:35:01 +00:00
Ingo Weinhold 338b8dc301 Merged changes from branch build_system_redesign at revision 14573.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14574 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-29 16:27:43 +00:00
Axel Dörfler 5ea23bb0a3 Removed platform_boot_device_is_image() again; it's now replaced by a field
"booted_from_image" in the kernel_args' boot_disk structure.
Also, added fields "cd" and "user_selected".
A CHOICE_MENU menu can now have a choice text - this is automatically updated
as entries in the menu get selected.
The boot volume menu now has the initial choice text "CD-ROM or hard drive"
in case the boot loader was loaded from an image. The "Rescan volumes" item
is no longer selected by default (only if there was no boot volume found) - but
it's still functionless anyway.
The TAR fs will now appear as "Boot from CD-ROM" in the boot volume menu.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14388 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-14 21:22:19 +00:00
Axel Dörfler e3fcb58ebb 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
2005-10-14 11:34:18 +00:00
Axel Dörfler 83333bf237 Missed those with the previous commit: added tarfs to the boot loader build.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14345 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-11 01:17:48 +00:00
Axel Dörfler 2d7ad656ec Added "Disable IDE DMA" safemode option.
MenuItem::SetData() now asks for a const parameter.
The safemode menu options now set their MenuItem::Data() to the safemode option string.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12191 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-03-31 15:16:09 +00:00
Ingo Weinhold d832aa7efc We must just the same naming as in DiskDeviceTypes.cpp for the intel partition types, since the implementation relies on it.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12186 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-03-31 11:22:02 +00:00
Axel Dörfler 74b043d98d Removed execute property that was set accidently (since CVS days).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@11896 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-03-18 01:50:45 +00:00
Axel Dörfler ab78c7cbc5 Added partition type constants for HFS/HFS+ file systems.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11332 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-02-11 03:11:19 +00:00
Ingo Weinhold 164d84bb10 Switched to new DoublyLinkedList class.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11193 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-02-02 02:35:16 +00:00
Ingo Weinhold b0f7c84522 Switched to new DoublyLinkedList class.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11191 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-02-02 02:19:23 +00:00
Axel Dörfler 0d4ea07bd7 Added driver_settings support to the kernel_args structure.
The driver settings are put into the kernel_args memory section and
copied on kernel startup.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10635 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-01-10 07:36:08 +00:00
Axel Dörfler b193fcc716 Some work on the boot disk identification: the kernel_args structure has
now fields that carry information about the boot disk and partition.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9956 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-15 17:59:15 +00:00
Axel Dörfler 0c3888b965 Add a method to get the partition's file descriptor.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9955 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-15 17:56:55 +00:00
Axel Dörfler ec5d706492 SetParent() is now a public function (could be made private again and friend of
add_partitions_for(), though).
The partition now also tracks if it refers to a partitioning system or not.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9745 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-03 02:10:10 +00:00
Axel Dörfler f2ea9af307 The boot loader now can tell the x86 serial driver the serial port base
addresses as reported by the BIOS.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9526 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-10-27 01:02:05 +00:00
Axel Dörfler e76877adae Added a function to find a menu item by label.
Added super item/menu getters, and a new fSuperItem field.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9524 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-10-27 00:56:46 +00:00
Axel Dörfler 107f1a6a3f Added an addr_range array for kernel_args.
Removed the "str" field I have no idea what it could have been useful for.
Changed the frame buffer part of the kernel args - "already_mapped" is
no longer there, as it doesn't make a lot of sense.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9413 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-10-19 17:02:11 +00:00
Axel Dörfler 53ac60d4ea Added the prototype for insert_address_range() that can be used for the
various addr_range arrays in the kernel_args structure.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9412 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-10-19 16:57:19 +00:00
Axel Dörfler 364b28a12a Added a call that should exit the boot loader in some way; usually that
would be by rebooting the computer.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8647 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-08-25 15:18:33 +00:00
Axel Dörfler a1b7427b0a A menu item can now be enabled and disabled.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8646 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-08-25 15:17:38 +00:00
Axel Dörfler 649f65cc3a Added help text functionality.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8117 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-22 02:52:38 +00:00
Axel Dörfler 3b5e4b4978 New method Target() that returns the previously chosen target.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8115 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-22 01:16:43 +00:00