Commit Graph

312 Commits

Author SHA1 Message Date
Axel Dörfler
30f0f48a33 Added platform_exit() function.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8653 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-08-25 15:29:10 +00:00
Axel Dörfler
90b9284ea3 Fixed a warning when compiled with GCC 3.
Added currently non-working version of platform_exit().


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8652 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-08-25 15:27:40 +00:00
Axel Dörfler
31f29a6f7e Added support for disabled menu items.
The target function of an item is now called upon every action, not only
if that item had a sub menu...


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8651 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-08-25 15:26:40 +00:00
Axel Dörfler
f191528003 Added an InitCheck() method; if something goes wrong, the device won't be
added to the boot device list anymore. This is currently used to remove
devices that don't support the LBA access mechanism (since CHS support has
still not been implemented).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8650 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-08-25 15:25:08 +00:00
Axel Dörfler
b430068a23 Implemented the enabling/disabling of menu items.
"Continue boot" will now be disabled if there are no boot volumes.
Also, there will be an additional menu item "Reboot" in that case.
The boot device menu will now show a disabled "No boot devices found" label
then, and will be selected upon entry. Added a help text to "Rescan volumes"
which will also be selected upon entry if there is no boot device.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8649 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-08-25 15:23:28 +00:00
Axel Dörfler
a084c3cd69 No longer panics when it could find any boot volumes, but enters the
user menu in that case, too (to give the user the opportunity to rescan
the available devices).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8648 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-08-25 15:20:09 +00:00
Axel Dörfler
1085f3ae4e Implemented floppy start: the boot loader shell is now able to load the
whole loader from a floppy or CD-ROM and execute it as usual - and it
even seem to work, yaay :)
For now, the length of the boot loader is hard-coded, but it is compatible
with the "makeflop" command, i.e. it stores the length in bytes 3 & 4 in
the file.
Also, the maximum head number is currently hard-coded to floppies - ToDo
comments are in the text which insist on fixing this.
This makes testing the boot loader under Linux much easier, as it isn't
able to write to BFS volumes directly (and the copy_to_bfs_image command
doesn't build under Linux).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8606 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-08-19 06:22:32 +00:00
Axel Dörfler
7312c22b60 Now makes sure that the stack is set up correctly.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8605 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-08-19 06:10:58 +00:00
Axel Dörfler
de28175b45 We need the whole 32 bit of the boot partition offset, not just the lower 16...
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8604 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-08-19 06:05:55 +00:00
Axel Dörfler
a468da6449 Fixed compilation error with GCC 2.95.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8595 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-08-16 16:18:48 +00:00
Axel Dörfler
4db8c66409 Added empty platform_boot_options() function.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8592 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-08-16 15:38:38 +00:00
Axel Dörfler
8dd184dc16 Added (empty) missing video and menu functions to make the boot loader build again.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8591 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-08-16 15:21:23 +00:00
Axel Dörfler
87da2cf3fe Since the conversion factor calculation is now in place, there is no reason
to overwrite this value anymore.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8351 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-07-07 17:03:29 +00:00
Axel Dörfler
a5fb7d4954 call_bios() can now also be called without having paging enabled (it now
recognizes this and doesn't enable paging after entering the protected
mode again).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8135 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-22 23:40:50 +00:00
Axel Dörfler
a7aea4b86d Now shows the help text of a menu item while it's selected (up to two lines of
text, automatically wrapped correctly).
Added print_centered() function.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8119 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-22 02:55:51 +00:00
Axel Dörfler
447564cfea Added some help texts.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8118 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-22 02:53:34 +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
a104674fdf Fixed typo, corrected video mode menu usage.
run_menu() now supports menu_item_hook for CHOICE_MENU submenu items.
Now selects the video mode chosen in the menu - it's broken right now
if you enter the boot menu without asking for it (i.e. when there is
no boot volume found).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8116 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-22 01:19:53 +00:00
Axel Dörfler
bc8add5da8 Now the menu items that can't be chosen are of type MENU_ITEM_NO_CHOICE.
Fixed a typo.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8114 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-22 01:14:45 +00:00
Axel Dörfler
c668dff52c A MenuItem now maintains a "user data" pointer.
Menu::Run() now calls platform_run_menu().


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8113 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-22 00:39:40 +00:00
Axel Dörfler
81f569510c Now only switches to the boot logo if no boot menu was requested.
Calls platform_init_video() directly after the heap initialization - the
logo will now be shown before the VFS is initialized.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8112 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-22 00:37:46 +00:00
Axel Dörfler
f42302bcc8 Now maintains a list of possible video modes, and creates a real video
mode menu that even works.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8111 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-22 00:35:19 +00:00
Axel Dörfler
3be048bd11 Support for menus with more items than fit on screen; there will be a
scroll bar at the right side that shows you where you are.
"Page Up/Down" now jump one visible page up and down.
Support for MENU_ITEM_NO_CHOICE type.
Constants are now real constants :)


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8110 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-22 00:32:48 +00:00
Axel Dörfler
0ac3f5399f No longer initializes video - it will now be done by the platform independent
part of the boot loader (because then the heap is already working).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8107 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-22 00:26:33 +00:00
Axel Dörfler
ef9cf5ac1b platform_add_block_devices() no returns B_OK, but still does nothing.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8106 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-22 00:23:15 +00:00
Axel Dörfler
3cdfe493ba What a great idea to remove the boot partition from the partition list...
It's fixed now; mount_file_systems() will just ignore the boot partition.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8105 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-21 22:11:32 +00:00
Axel Dörfler
c54d49c275 Work in progress of the boot loader menu.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8095 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-21 15:57:56 +00:00
Axel Dörfler
689c94c815 Work in progress of the boot loader menu.
You can already use the menu, but your options currently don't have any effect.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8094 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-21 15:57:03 +00:00
Philippe Houdoin
ac9005b4bb s/OpenBeOS/Haiku/
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8073 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-20 15:47:22 +00:00
Axel Dörfler
d31902e857 The new logo for the boot loader.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8072 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-20 00:49:23 +00:00
Axel Dörfler
5b82deb912 Now checks for boot options; if you press space, it will enter the boot menu
(when there is one), if you press escape, it will boot in console mode.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8052 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-18 15:32:49 +00:00
Axel Dörfler
c89be553a6 Added keyboard.cpp to the build.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8051 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-18 15:30:39 +00:00
Axel Dörfler
d0c5d9f9a8 Removed some debug output, no longer panics to be able to read the output :)
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8050 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-18 15:29:31 +00:00
Axel Dörfler
c28f7b9932 Removed platform_user_menu_requested() call.
Replaced its functionality by a new platform_boot_options() call.
The switch to the logo screen now comes a little later.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8049 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-18 15:26:53 +00:00
Axel Dörfler
2ac69a4d66 Activated CPU speed conversion factor calculation again.
Added a spin() function.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8046 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-18 15:23:18 +00:00
Axel Dörfler
baf3145769 Fixed a big bug in the ELF loader: it didn't clear out the loaded segment
above p_filesz - that means it didn't clear BSS etc. - this was not noticeable
from Bochs, though.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8045 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-18 15:20:47 +00:00
Axel Dörfler
4c179368aa vesa_get_mode_info() no longer copies the buffer as well; it will now
write the contents directly into the buffer. If we'll ever intend to
store mode infos in kernel memory, this should be changed back.
vesa_set_mode() now sets the correct flags to get a linear frame buffer;
graphical boot now works in Bochs 2.1.1 as well.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8044 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-18 13:47:00 +00:00
Axel Dörfler
e70d4cb70e Added some VBE set mode definitions.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8043 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-18 13:41:38 +00:00
Axel Dörfler
ce5cf7b312 Simplified the VBE info block retrieval: we now use the intended target
address directly, and therefore, we don't have to copy the structure
and eventually relocate the pointers.
Made the boot logo location dependent on its size.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8042 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-18 13:29:32 +00:00
Axel Dörfler
7fe1bdeec9 Added some handy address conversion macros.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8041 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-18 13:23:34 +00:00
Axel Dörfler
fc17fe17eb Implemented the BIOS functions to access the keyboard buffer.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8035 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-18 02:48:53 +00:00
Axel Dörfler
3ae898da8b Fixed the PPC boot loader build and added empty stub routines.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8022 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-17 12:22:10 +00:00
Axel Dörfler
c8079ef9c9 Now switched to the boot logo and back when necessary.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8017 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-17 01:03:36 +00:00
Axel Dörfler
eefe4b1d21 Work in progress:
- began to integrate the SMP/CPU stuff from the old boot loader; currently
  disabled, though
- began VESA/VGA support
- added temporary boot splash screen; it's a bit of a hack and only seem
  to work in Bochs 2.0.2 for now... (but hey, it looks good ;-))


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8016 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-17 01:02:40 +00:00
Axel Dörfler
754fdef3d7 panic() now calls hlt instead of spinning forever.
Added a ToDo comment.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8015 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-17 00:59:02 +00:00
Axel Dörfler
842a265376 mmu_map_physical_memory() now accepts physical memory addresses that are not aligned to a page.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8014 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-17 00:56:45 +00:00
Axel Dörfler
1273cbedfc Added new function to map physical memory.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8013 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-17 00:53:00 +00:00
Axel Dörfler
faad86a4aa Some more debug output.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8012 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-17 00:49:34 +00:00
Axel Dörfler
0e3f14ee1d Now return useful inode numbers. The BFS inode numbers match the ones from
the real kernel file system (as there is no amiga_ffs add-on yet).
The file systems now also return the module name of their kernel counterparts.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7995 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-15 17:05:34 +00:00
Axel Dörfler
50ef9ecfb6 Now stores the module name of the modules handling the partition.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7994 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-15 17:04:05 +00:00
Axel Dörfler
082a2195f0 fstat() now fills in the inode number as well.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7993 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-15 17:01:45 +00:00
Axel Dörfler
a1b4720e1a load_modules() will now also load all modules that are needed to identify
the partitioning and file system of the boot volume.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7992 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-15 17:00:52 +00:00
Axel Dörfler
d88c45c6f2 Now maintains the inode field in the preloaded_image structure.
It will now load all modules only once by identifying them using their inode number.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7991 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-15 16:59:59 +00:00
Axel Dörfler
4807cd86ea Now stores a link to the partition of a volume, and adds a new method
GetPartitionFor() to retrieve that information again.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7990 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-15 16:58:50 +00:00
Axel Dörfler
201b3e6fd1 Now maintains the kernel_args size and version fields.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7988 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-15 16:55:45 +00:00
Axel Dörfler
0e67fb5a42 Now maintains the kernel_args size and version fields.
Removed unused code.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7987 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-15 16:55:27 +00:00
Axel Dörfler
995a393e12 Unfortunately, -fno-pic must be set manually, even for kernel rules.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7982 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-15 16:49:36 +00:00
Axel Dörfler
8b33111039 Updated ELF loader to use preloaded_image struct for the kernel.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7712 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-31 23:52:01 +00:00
Axel Dörfler
b1b1136ca3 No longer uses gKernelEntry.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7710 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-31 23:15:37 +00:00
Axel Dörfler
2f42f1cf3a gKernelEntry is no longer needed.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7709 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-31 23:12:15 +00:00
Axel Dörfler
cbb2b6c19f The kernel image data is now maintained in a preloaded_image as well.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7707 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-31 22:54:43 +00:00
Axel Dörfler
fa1ddc4f0e For debugging purposes, the boot loader is now able to load an additional
symbol table into memory and hand it over to the kernel.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7695 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-31 20:30:20 +00:00
Axel Dörfler
88cfa4fb99 Applied Jack Burton's patch to fix the boot problems on many systems:
find_real_mem_size must not be called with interrupts turned off.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7609 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-18 10:27:28 +00:00
Axel Dörfler
dc4eb9db8d Removed unneeded code, updated comment.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7519 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-11 14:20:14 +00:00
Axel Dörfler
ff76eb5cde Boot loader BFS now has symbolic link support.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7516 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-11 12:16:26 +00:00
Axel Dörfler
73b10c8f1e Adapted the fstat/_fstat work-around to like the user boot loader build as well.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7514 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-11 01:07:54 +00:00
Axel Dörfler
259fd3cdfb open_from() now also supports absolute paths, in which case it will ignore
the passed in directory.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7513 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-11 00:26:22 +00:00
Axel Dörfler
429fb127d3 Fixes the build until we have this _fstat()/fstat() thing worked out.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7512 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-10 23:04:52 +00:00
Axel Dörfler
d15df01c72 load_modules() now actually load modules; it doesn't just print out their name any longer.
Now scans "/boot/home/config/add-ons/kernel/boot" as well as "/boot/beos/system/add-ons/kernel/boot".


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7506 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-10 19:00:05 +00:00
Axel Dörfler
38f5c6bbc4 Corrected elf_load_image() prototype; it requires an object of the Directory
class as first argument.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7505 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-10 18:57:58 +00:00
Axel Dörfler
cdacbf022a elf_load_image() always returned B_OK instead of the real status.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7504 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-10 18:57:12 +00:00
Axel Dörfler
bf67cc9591 Now uses the correct heap to allocate the image path name (kernel_args).
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7502 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-10 16:49:23 +00:00
Axel Dörfler
e883af3cda Since we use the same includes as the real system, we now export _fstat()
with 3 arguments instead of fstat().


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7501 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-10 16:48:33 +00:00
Axel Dörfler
007c81ec98 Added kernel_args_strdup() function as a strdup() replacement.
Added a ToDo comment.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7500 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-10 16:47:06 +00:00
Axel Dörfler
dc8585a402 Worked around a strange bug that happened without an additional printf in between...
Somehow that reminds of BASIC.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7420 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-06 00:39:01 +00:00
Axel Dörfler
511252a157 AddLink() added the link to the list of mounted volumes instead of the list
of links - that could have possibly hidden the boot volume under certain
circumstances. Thanks to Sean O'Brien for pointing this out.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7343 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-04-28 23:57:47 +00:00
Axel Dörfler
3a4a20a09e Updated to match general boot loader changes.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7294 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-04-22 01:13:20 +00:00
Axel Dörfler
3004a40b85 address_range is now called addr_range (again, to let the structure and the
typedef name match).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7293 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-04-22 01:06:01 +00:00
Axel Dörfler
bbf495f47d map_page() will now be a bit more specific when it complains about an
invalid page.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7286 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-04-21 18:45:21 +00:00
Axel Dörfler
8d35b1a200 platform_start_kernel() now prints out the kernel entry point instead of
the address of the kernel_args structure.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7285 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-04-21 11:11:45 +00:00
Axel Dörfler
4eedc697c3 platform_get_boot_partition() will now also get the boot device as parameter.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7284 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-04-21 11:10:32 +00:00
Axel Dörfler
4c03f90f63 Now correctly translates the partition block offset into a byte offset.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7283 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-04-21 11:09:33 +00:00
Axel Dörfler
fbe5e77d0b Added a simple second heap that will survive the switch to the kernel.
elf_load_image() now uses this heap for the preloaded_image structures.
Moved gKernelArgs and gKernelEntry to different files.
Improved enabling debug output (it can now be activated by a makefile, too)


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7281 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-04-21 02:32:36 +00:00
Axel Dörfler
d8023a2fc5 Fills in the required kernel args for the loaded kernel image.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7280 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-04-21 01:34:47 +00:00
Axel Dörfler
6ef64f7451 elf_load_image() now also saves the size of the dynamic section.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7279 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-04-21 01:33:44 +00:00
Axel Dörfler
822757438d No longer uses the local ka at 0x100000 but the global gKernelArgs structure.
The virtual/physical allocated ranges are now correctly filled in mmu_init_for_kernel(),
and no longer too early.
Now allocates a kernel stack of 8192 bytes.
Added some temporary fillers for the kernel args.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7270 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-04-21 00:04:37 +00:00
Axel Dörfler
ffcff6e28c Added platform_start_kernel() function.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7268 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-04-20 23:52:17 +00:00
Axel Dörfler
50f3983035 Added gKernelEntry variable; it's now set in load_kernel().
Removed start_kernel() function - it's now replaced by the platform_start_kernel()
call.
Fixed the kernel add-on boot module search path.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7265 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-04-20 23:45:32 +00:00
Axel Dörfler
730036e22e Improved debug output.
start_kernel() now panics, so that we don't run through (since it doesn't
actually jump to the kernel yet).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7256 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-04-20 01:36:12 +00:00
Axel Dörfler
f7fced6cf5 Slightly improved debug output.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7255 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-04-20 01:34:21 +00:00
Axel Dörfler
276c009500 Moved the platform region and heap functions to mmu.cpp.
The heap will now no longer be mapped in kernel space, but will be placed
at a fixed address (0x110000 - former start of free physical memory).
platform_allocate_region() is now implemented and calls mmu_allocate().
mmu_allocate() now supports mapping to a predefined virtual address
to be able to load the kernel correctly (and only for that).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7254 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-04-20 01:31:20 +00:00
Axel Dörfler
0f87a64b54 Add support for the boot partition offset as provided by the BFS boot block.
Now, platform_get_boot_partition() will work correctly.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7253 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-04-20 01:26:56 +00:00
Axel Dörfler
cdc8d6b6f5 The source files may now include the boot/partitions.h header.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7252 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-04-20 01:21:42 +00:00
Axel Dörfler
c8baeaf6cf Added support for the boot partition offset as provided by the BFS boot block.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7251 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-04-20 01:20:43 +00:00
Axel Dörfler
9fd7586724 gBootDriveID is now uint8, no longer uint16.
Now prints out a comment if LBA access doesn't work (since CHS access is not yet implemented).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7250 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-04-19 23:33:23 +00:00
Axel Dörfler
f52302c408 Actually, one byte is enough for gBIOSDriveID - it only has to store %dl, not %dx.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7249 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-04-19 23:31:53 +00:00
Axel Dörfler
502a70f884 Implemented LBA drive access using the BIOS. The boot device is correctly
published, and can be accessed as needed.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7248 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-04-19 23:14:05 +00:00
Axel Dörfler
7ca2763dc3 Now uses the kExtraSegmentScratch constant rather than a direct address.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7247 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-04-19 22:43:04 +00:00
Axel Dörfler
cc551468f8 Added some constants that define scratch buffers in the data and extra
segment that can be used for BIOS calls.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7246 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-04-19 22:38:30 +00:00
Axel Dörfler
6ed14d8c59 Added a global variable gBootDriveID where %dl is stored to.
Moved the data section closer to the end of the 1024 bytes of the boot
block - the region before is reused as scratch buffer in the real mode
data segment.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7245 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-04-19 22:36:13 +00:00