Commit Graph

334 Commits

Author SHA1 Message Date
Axel Dörfler
4f364c85af Enabled and added some more debug output.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5110 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-10-21 05:35:32 +00:00
Axel Dörfler
a47544320d Fixed File::ReadAt() (it didn't return the actual length read, just B_OK).
Visually simplified Volume::ToBlock().


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5109 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-10-21 05:27:24 +00:00
Axel Dörfler
caac43e662 Fixed missing initialization of fBlock in one of the constructors of CachedBlock.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5107 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-10-21 04:25:20 +00:00
Axel Dörfler
bc0096be96 Compiles again.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5105 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-10-21 04:16:06 +00:00
Axel Dörfler
d69f033efd Fixed a warning.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5104 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-10-21 04:08:04 +00:00
Axel Dörfler
1aa6a4ca46 Added link handling to the RootFileSystem (for the "boot" link).
Renamed AddNode() to AddVolume() - it's no longer virtual but private to
the root file system.
Added new method AddLink() to add a link to a volume.
The link handling is separate from the other volumes (to be able to iterate
only over real volumes). Added a name field to the inner entry class which
is used for links.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5103 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-10-21 04:05:34 +00:00
Axel Dörfler
9bf99ee93b Now registers the boot device and loads the kernel.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5102 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-10-21 04:01:09 +00:00
Axel Dörfler
18562ebdd8 gRoot is now defined in RootFileSystem.h.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5101 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-10-21 04:00:12 +00:00
Axel Dörfler
77cfe0902a gRoot is now defined in RootFileSystem.h, AddNode() is now called AddVolume().
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5100 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-10-21 03:59:39 +00:00
Axel Dörfler
6822f1482e gRoot is now a RootFileSystem, not just a Directory anymore.
register_boot_file_system() adds the "boot" link to the root fs.
mount_all_file_systems() now prints out the root directory of the
mounted volumes just for fun (to be removed later).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5099 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-10-21 03:58:40 +00:00
Axel Dörfler
7fc11e15bb Some work-in-progress on the MMU functions:
- it will now successfully take over the MMU, but it doesn't tell OF
  yet about it.
- map_page() will now fill in the page table relative to sSegments[], and
  no longer to the segment registers directly (as they might be different
  at that time, depending on the OF).
- map_page() will panic if it couldn't find a free slot in the page table
  (that's enough for the boot loader)
- finds the exception handlers mapping and sets the kernel args
- rewrote insert_memory_range(); it now actually works in all cases (no
  matter if the ranges overlap or not, and it will also join ranges if
  possible). The start address will now be round down to page aligment.
- some other small fixes
- the page table is now cleared before use (as of_claim() obviously doesn't
  return cleared memory).
- replaced some uint32 with addr_t where it made sense (there are probably
  even more places).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5093 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-10-21 03:19:01 +00:00
Axel Dörfler
4790079584 Renamed arch_mmu_alloc_at() to arch_mmu_allocate(), removed arch_mmu_alloc().
Added new arch_mmu_free() function (not yet implemented).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5057 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-10-16 18:44:18 +00:00
Axel Dörfler
73ebb119f3 Forgot to check the endian of the ELF header.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5053 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-10-16 18:08:04 +00:00
Axel Dörfler
f44f6a045e Removed test MMU allocation.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5052 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-10-16 18:07:21 +00:00
Axel Dörfler
2ea8f7d444 Added mmu.cpp to the build.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5051 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-10-16 18:06:25 +00:00
Axel Dörfler
b6384820ac Implemented the platform MMU functions.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5050 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-10-16 18:05:37 +00:00
Axel Dörfler
384be72972 Implemented load_kernel(), load_modules() now traverses the
/boot/beos/system/add-ons/boot directory for boot modules (it
currently only prints out all the modules found).
Not yet tested!


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5049 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-10-16 18:02:36 +00:00
Axel Dörfler
21a3fff594 Added the ELF loader to the build.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5048 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-10-16 18:01:24 +00:00
Axel Dörfler
8fbf1c6169 Since there currently are no directory traversing functions, I've
added a temporary get_node_from() function which returns the Node
assigned to the file descriptor.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5047 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-10-16 18:00:28 +00:00
Axel Dörfler
af0e9e9d12 Implemented the boot loader's ELF loader (untested).
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5046 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-10-16 17:58:55 +00:00
Axel Dörfler
962c1957d8 Minor fixes.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5020 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-10-14 00:34:08 +00:00
Axel Dörfler
2664bace2e Changed to use the DoublyLinked::List implementation.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5019 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-10-14 00:33:11 +00:00
Axel Dörfler
603d81b967 Some more debug output.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5018 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-10-14 00:31:12 +00:00
Axel Dörfler
53bc5ce937 Switched to use the DoublyLinked::List implemenatition.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5017 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-10-14 00:29:47 +00:00
Axel Dörfler
2d6751a062 Switched to the new DoublyLinkedList implementation.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5008 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-10-13 03:38:05 +00:00
Axel Dörfler
f981a55840 Fixed GCC 3 warnings.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4994 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-10-12 00:47:28 +00:00
Axel Dörfler
748d45313d Two more #include <util/kernel_cpp.h> for consistency's sake.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4992 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-10-12 00:45:38 +00:00
Axel Dörfler
df46e9e59f OpenFirmware now has its own arch subtree. Added most of the code needed
to take over the PPC MMU (and let OF still operate) - there is basically
everything to implement a proper ELF loader now.
Unlike BIOS/IA-32, OpenFirmware is available on a lot of architectures.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4991 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-10-11 19:06:28 +00:00
Axel Dörfler
10fc9d123f Updated renamed kernel_args fields.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4975 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-10-07 23:50:15 +00:00
Axel Dörfler
9e88f0cfd2 Now declares the gKernelArgs variable to pass to the kernel.
Calls heap_release() with stage2_args.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4967 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-10-07 22:49:49 +00:00
Axel Dörfler
a4fab93eee heap_release() now gets the stage2_args as well, to pass them to
platform_release_heap().


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4966 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-10-07 22:48:46 +00:00
Axel Dörfler
d1ae059dec Now sets the heap_size field of stage2_args to a default value.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4965 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-10-07 22:47:00 +00:00
Axel Dörfler
02ec644ad8 Removed declaration and initialization of gChosen; it's not done in openfirmware.c.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4964 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-10-07 22:45:38 +00:00
Axel Dörfler
67e8a1390b Added an "align" parameter to of_claim().
Added prototype for of_call_method().
gChosen is now declared and initialized in this file, therefore, of_init()
can now fail (in case gChosen cannot be set).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4963 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-10-07 22:44:34 +00:00
Axel Dörfler
bc09bddb53 The heap size is now part of the stage2_args.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4962 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-10-07 22:41:44 +00:00
Axel Dörfler
8fb9411174 Added support for the Amiga FFS to the standard bootloader build.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4926 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-10-02 01:17:37 +00:00
Axel Dörfler
291a681b35 Forgot to include <util/kernel_cpp.h>.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4925 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-10-02 01:16:57 +00:00
Axel Dörfler
1e038a1ca5 Added a ToDo comment so that I won't forget to check if there is only one
bootable device if the platform didn't provide a boot device.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4908 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-10-01 02:29:34 +00:00
Axel Dörfler
44df371a46 Updated to match the new boot loader platform API (boot() was renamed to main()).
platform_user_menu_requested() always returns "false" for now.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4890 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-10-01 01:29:42 +00:00
Axel Dörfler
d76300d0d8 Now has (initial) support to select a boot device if the OpenFirmware
provided one - will always select the first partition on that device,
though.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4889 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-10-01 01:28:34 +00:00
Axel Dörfler
621540d112 Updated the dummy implementation to match the changed platform API.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4888 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-10-01 01:26:54 +00:00
Axel Dörfler
d178a0d7e4 Implemented new Directory::IsEmpty() method.
Amiga-FFS Directory::Lookup() now only creates a HashIterator if needed.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4887 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-10-01 01:25:06 +00:00
Axel Dörfler
3c3cc60956 Now has support to load the kernel from the boot device, and to open the
user menu if requested (even if there is none yet). It will also mount
all file systems before the user menu is shown in order to get the right
boot volume - it should probably only call user_menu() if there is more
than one possible boot device.
Removed unused parts that won't be needed anymore.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4886 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-10-01 01:23:25 +00:00
Axel Dörfler
6072286af6 Dunno why, but CVS didn't pick that up (see CVS comment in loader.h).
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4885 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-10-01 01:20:21 +00:00
Axel Dörfler
c948f27797 New BOOT_ARCH definition - this is used to create the kernel name (for
looking it up on the disks); it's set to OBOS_ARCH.
Added the new files menu.cpp and loader.cpp to the build.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4884 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-10-01 01:19:16 +00:00
Axel Dörfler
7c198b5d2b Made gDescriptors static, and renamed it to sDescriptors (it's private).
vfs_init() now correctly initializes the gPartitions list, and also creates
the root file system (mount_boot_file_systems() did this before). It now
no longer scans the platform for boot devices.
New function get_boot_file_system() which returns the boot file system as
chosen by the platform code.
mount_file_systems() (former mount_boot_file_systems()) now supports the
boot device; it will not scan all partitions again, but only those different
from the boot file system (if any).
get_node_for_path() did not Acquire() the start directory, but released it
(and its callers didn't acquire it, too).
Removed the commented mount() function, since it won't be needed.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4883 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-10-01 01:17:15 +00:00
Axel Dörfler
221807be72 Added a new variant of add_partitions_for() which takes a device instead
of a file descriptor as first argument.
add_partitions_for() is now able to only mount file systems if requested;
partitions with unknown contents will not be removed from the list if it
doesn't try to mount them.
Moved the file system mounting code to the new Partition::Mount() method.
Partition::Scan() now only mounts file systems if requested.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4882 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-10-01 01:10:56 +00:00
Axel Dörfler
8df661e6f8 Some new "barebones" for enhanced boot loader functions for the user menu
and the kernel/module loading.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4881 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-10-01 01:06:52 +00:00
Axel Dörfler
1f0aeec0f0 Implemented the new IsEmpty() method.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4880 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-10-01 01:05:27 +00:00
Axel Dörfler
c5ccd40caa It's now silent or more verbose depending on how TRACE_BFS is defined.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4720 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-17 01:06:43 +00:00
Axel Dörfler
fd5b021f86 Fixed endian issues - it now does work with big endian BFS disks as well.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4714 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-16 14:36:40 +00:00
Axel Dörfler
434eb84378 Implemented the missing Directory::Lookup() method, since it's now needed
during path parsing.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4708 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-16 02:34:55 +00:00
Axel Dörfler
09fb7d4bbc Implemented hash functions for DirectoryBlock.
Added HashIterator::InitCheck() method (as the allocation of the buffer
might fail).
Added a HashIterator::Goto() method to jump to the specified index in
the hash (handy for hash lookup).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4707 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-16 02:33:48 +00:00
Axel Dörfler
479e4ab5cf The Volume now stores the type of the file system (as Type()).
Improved constructor.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4706 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-16 02:31:06 +00:00
Axel Dörfler
101bb5d182 Implemented path parsing, open(), and the new open_from().
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4705 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-16 02:29:33 +00:00
Axel Dörfler
36c5179a74 Implemented file reading (only slightly tested, but it should be enough
for our purposes [just copied some files in 1024 byte blocks to the Desktop]).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4701 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-16 00:58:04 +00:00
Axel Dörfler
0f8efd8af0 Removed the ExtensionBlock class - it's now completely managed by the
FileBlock class itself.
Added some data related getter methods.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4699 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-16 00:56:01 +00:00
Axel Dörfler
50d9710f0d Implemented an Amiga FFS reader for the boot loader. Can only traverse
directories right now, reading from files is not yet implemented.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4695 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-15 22:10:10 +00:00
Axel Dörfler
86f2640947 get_descriptor() can now also safely be called with a descriptor less
than zero.
Supports now up to 64 file descriptors (just in case).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4694 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-15 21:58:03 +00:00
Axel Dörfler
3ad474d024 The main partition can now contain file systems as well (it's no longer
created on the stack, and added to the gPartitions list in that case).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4693 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-15 21:55:45 +00:00
Axel Dörfler
25a5c7d03d Moved the class definition back to <boot/partitions.h>, since it's now public
again.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4678 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-14 16:41:19 +00:00
Axel Dörfler
5d2ca15280 Class Partition is now part of <boot/partitions.h>.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4677 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-14 16:40:35 +00:00
Axel Dörfler
1cd06a2273 Partition class is now part of <boot/partitions.h>.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4676 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-14 16:39:57 +00:00
Axel Dörfler
1b9d001b66 Changed the get_file_system() call to accept a Partition instead of a Node.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4675 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-14 16:39:03 +00:00
Axel Dörfler
6151971100 Implemented scanning the whole device tree for bootable devices (that are
understood by the OpenFirmware).
That makes it work on both, the Pegasos and the PowerMac G4 (any Mac with
OpenFirmware v3 should do, though).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4671 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-13 15:48:46 +00:00
Axel Dörfler
2f85616f33 Removed strerror(); it's not available in the boot loader.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4668 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-13 00:59:34 +00:00
Axel Dörfler
687cfec3a8 Forgot to include util/kernel_cpp.h in order to not use exceptions.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4667 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-13 00:39:14 +00:00
Axel Dörfler
52d257607f Added a very simple realloc() implementation.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4666 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-13 00:38:45 +00:00
Axel Dörfler
e3505b15f4 Fully implemented Directory including directory traversing and file lookup.
Also implemented the new GetNextEntry() method.
Added some more constructors for convenience.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4657 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-12 07:39:09 +00:00
Axel Dörfler
0cc97dd615 Implemented File::GetName() using Stream::GetName().
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4656 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-12 07:37:22 +00:00
Axel Dörfler
c9fad12dca Added the new BPlusTree.cpp and File.cpp to the build.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4655 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-12 07:36:36 +00:00
Axel Dörfler
8efb3a26d2 Add a simple Node implementation for BFS files (and everything else that
needs access to the stream directly).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4654 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-12 07:33:42 +00:00
Axel Dörfler
8565a87552 Added some convenience functions, a method to get the node's name, and
a node factory to get the correct type of node (Directory/File).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4653 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-12 07:32:21 +00:00
Axel Dörfler
a421161e94 Added another ToOffset() convenience method.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4652 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-12 07:28:53 +00:00
Axel Dörfler
1e7e9b1284 Cut down the original BFS BPlusTree implementation to the bare minimum
required to have read-only, single-threaded access to a B+tree.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4651 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-12 07:28:12 +00:00
Axel Dörfler
8d86e5a30d Now prints out all devices found, and shows their root directory.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4648 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-12 07:17:45 +00:00
Axel Dörfler
1a5a709876 Implemented the new GetNextEntry() method in the root file system.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4647 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-12 07:16:39 +00:00
Axel Dörfler
3f2188ad1a Partition::AddChild() created its child with the wrong file descriptor; i.e.
it passed partition_data::volume which used to be the correct descriptor
earlier, but is now unused in the boot loader partition support.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4643 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-12 07:10:45 +00:00
Axel Dörfler
50ab1fac08 Somehow forgot to actually include the Stream class in the last commit...
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4640 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-12 02:29:01 +00:00
Axel Dörfler
aec0abfd56 Add a new Stream class that handles reading bytes from an inode (retrieved
from the BFS Stream.h file) - it supports all data stream ranges (direct,
indirect, & double indirect).
Moved bfs_inode::InitCheck() to the new Stream class.
The Directory class now has a Stream object instead of a bfs_inode directly.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4639 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-12 02:28:14 +00:00
Axel Dörfler
c966bfdab7 Started to implement the real BFS module for the boot loader.
Currently, it only recognizes a BFS disk, and will print out its name
(and that code is now endian-aware as well).
More to come, though :-)


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4637 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-12 01:22:40 +00:00
Axel Dörfler
e9117d1507 Put Partition and the new (private) NodeOpener class into the "boot" namespace.
Implemented Partition::Size() and Type() to stat its device.
Partition::ReadAt() and WriteAt() now return B_BAD_VALUE if a position smaller
than zero is provided (as Posix actually states).
Partition::Scan() now provides the partitioning system modules with the correct
file descriptor; it now opens itself (using the NodeOpener class) and no longer
the descriptor of its device directly (resulting in wrong positioning).
Debug output can be turned off now.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4632 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-12 01:12:53 +00:00
Axel Dörfler
f150614a3b Node::fRefCount is now 1 after creation, so that a following Acquire()/Release()
pair doesn't delete the object anymore (creation is regarded as an Acquire()
equivalent now).
Moved mount_boot_partitions() and vfs_init().
Debug output can be turned off now.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4631 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-12 01:09:22 +00:00
Axel Dörfler
21d6803233 The class partition is now in the namespace "boot". Now overloads Size()
and Type() as well.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4630 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-12 01:07:03 +00:00
Axel Dörfler
0ccfc3ca29 Added TRACE() macro to be able to make the loader more silent.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4624 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-11 18:58:37 +00:00
Axel Dörfler
9225f27c04 Class Node already had a list_link field, so Partition::fNext was not only
wrong, but also completely senseless :-)
Renamed Partition::NextOffset() to LinkOffset() to honour that change.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4623 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-11 18:58:05 +00:00
Axel Dörfler
81b8b661c1 dump_chunk() is now only exported when HEAP_TEST is defined.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4618 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-11 17:30:12 +00:00
Axel Dörfler
bd75d5b8cf OpenFirmware handles now report a size of 1024 GB for now - so that the
partition modules won't complain about a disk too small to hold a partition.
Should be fixed, though.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4614 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-11 00:31:21 +00:00
Axel Dörfler
b5711c8173 An empty BFS file system for the boot loader for testing purposes.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4592 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-09 02:22:37 +00:00
Axel Dörfler
16885aac6f Made the Node base class better to use with files and directories, added
Acquire()/Release() support as well.
New Directory base class.
Added basic support for file systems and the root file system, not yet
fully working (no path parsing yet), and not yet tested.
Implemented fstat().


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4591 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-09 02:21:58 +00:00
Axel Dörfler
6d43a73b2e The very basic root file system for the boot loader, but should be enough.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4590 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-09 02:19:08 +00:00
Axel Dörfler
795b832490 Moved the definition of the Partition class in a separate private header file.
Implemented recursive child content scanning.
Added support for file systems, and the root file system.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4589 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-09 02:18:26 +00:00
Axel Dörfler
c55a2656e5 Partition modules are now built in their own static library file. Since
only the ones actually used are linked in, the local variable is no longer
used.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4588 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-09 02:16:40 +00:00
Axel Dörfler
8de63d24da Renamed the Descriptor::Read()/Write() methods with position to ReadAt()
and WriteAt().


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4584 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-08 22:50:50 +00:00
Axel Dörfler
eced90ea7a Moved the definition of the Descriptor class to vfs.cpp.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4563 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-08 12:32:33 +00:00
Axel Dörfler
c754274e3a Added some more dummy stuff, so that the whole thing is linked correctly.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4554 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-08 02:42:49 +00:00
Axel Dörfler
3a48e17b83 Added the intel partition module to the boot loader build.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4553 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-08 02:41:57 +00:00
Axel Dörfler
6eae77e068 Moved the Partition class declaration to the source file.
Refactored the code a bit (moved the scan algorithm to the Partition class, ...).
Implemented get_parent_partition() and added a stub for get_child_partition()
as needed by the intel partition module.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4550 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-08 02:38:45 +00:00
Axel Dörfler
58ff5e1763 Added dummy bios_ia32 boot loader bindings to be able to build the loader
under x86 as well.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4483 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-03 20:11:48 +00:00
Axel Dörfler
8e31b79dc8 Implemented dprintf() - output goes to OF's stdout.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4482 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-03 17:08:45 +00:00
Axel Dörfler
93773b0125 Added the new 2nd stage boot loader to the build.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4480 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-03 16:43:01 +00:00
Axel Dörfler
317de76810 Added an empty Jamfile for the bios_ia32 dependent 2nd stage boot loader.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4479 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-03 16:42:25 +00:00
Axel Dörfler
6e886cc40e Removed now unused code.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4478 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-03 16:39:02 +00:00
Axel Dörfler
01d8a1cdc0 Added the apple style partitioning support to the boot loader.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4477 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-03 16:38:31 +00:00
Axel Dörfler
cd67111575 Commented the "#pragma mark -" (for the text editor) so that gcc doesn't
warn.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4476 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-03 16:38:04 +00:00
Axel Dörfler
8abaaaf7e5 OpenFirmware bindings for the stage2 boot loader.
Not yet complete.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4465 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-03 02:03:28 +00:00
Axel Dörfler
e601a11b67 Added missing vprintf() function.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4463 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-03 01:55:20 +00:00
Axel Dörfler
f659db057c Initial commit of the platform independent part of the new stage2 boot loader.
Not yet complete, of course, but already scans amiga partitions :-)


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4461 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-03 01:31:49 +00:00
Axel Dörfler
9b890bf17f Now includes the util/kernel_cpp.h header.
Fixed some warnings (unused variables).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4460 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-09-03 01:29:37 +00:00
Axel Dörfler
1b4a09278b A simple heap implementation for the boot loader - already tested, and working well.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3641 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-06-24 18:05:54 +00:00
Axel Dörfler
e02284d547 Are now located in src/kernel/ldscripts.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3214 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-05-12 00:51:11 +00:00
Axel Dörfler
87ea713dec This file isn't used anymore (the config will be created by the build process).
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3213 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-05-12 00:46:39 +00:00
Ingo Weinhold
7f879cccff Rename SystemMain to BuildPlatformMain.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3209 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-05-11 17:29:06 +00:00
Axel Dörfler
f45e90df37 Now accepts more PowerPC "standard" defines, which allows it to build here.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3201 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-05-11 03:15:41 +00:00
Axel Dörfler
060ea25f57 Fixed makeflop on PPC (applied NewOS change 1778).
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3169 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-05-03 17:24:23 +00:00
Axel Dörfler
7cbca7f74c boot headers have been moved.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3166 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-05-03 16:33:09 +00:00
Axel Dörfler
75d416a23e Fixed Jamfile - it doesn't try to build all architectures anymore, but only
the one it can.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3164 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-05-03 16:29:04 +00:00
Axel Dörfler
d0c59e6faf boot headers have been moved.
Now builds a boot_arch_stage2.o object file that can be used by the architecture
independent Jamfile.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3163 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-05-03 16:28:05 +00:00
Axel Dörfler
81afd95226 Cleanups (mainly variable types).
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2607 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-30 21:25:53 +00:00
Axel Dörfler
f9d7cb3acc Now uses the arch/x86/smp_apic.h header; changed apic_read/write() to accept
offsets as parameter to specify the APIC register.
Added an obviously missing apic_write() call.
Code cleanup.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2606 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-30 21:24:50 +00:00
Axel Dörfler
2dc97fdf08 The dprintf() function scrolled one line too late.
Also fixed a comment and the processor warning text.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2603 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-30 19:52:49 +00:00
Axel Dörfler
1ff1332c77 The bootmaker now defaults to the endian of the host platform.
Fixed style issues.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2402 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-10 11:48:38 +00:00
Axel Dörfler
f143877df9 _start() now uses set_segment_descriptor() to initialize the GDT instead of
the direct values.
Some cleanups.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2369 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-01-06 08:33:59 +00:00
beveloper
8bcfda04d9 might work better
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1777 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-10-30 02:10:06 +00:00
beveloper
9fc7164698 allow building everything without local(tree external) header files beeing
used for kernel or kit components


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1630 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-10-23 20:13:17 +00:00
notion
719e338bae Refined cv_factor calculation.
Also set TIMER_CLKNUM_HZ to its correct value.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@418 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-07-24 12:39:31 +00:00
Axel Dörfler
a4f9f99fb0 Incorporated freston's changes to the stage 2 boot process which mainly
"fixes" (at least changes :-)) the calculation of the processor speed.

Also included some of geist's earlier changes.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@303 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-07-18 13:53:46 +00:00
Axel Dörfler
8bcee3b317 Added another subtle change from geist.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@302 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-07-18 13:31:55 +00:00
Axel Dörfler
16ba498087 Applied change 1505 of the NewOS repository: added the -p option to makeflop
to be able to pad to the floppy block size.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@285 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-07-17 19:42:44 +00:00
David Reid
19111f404e Use the defined values from bootdir.h. This was part of an experiment to
increase the length of names we can use for adding things to the floopy,
but it didn't work. Still, these changes seem to make sense.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@284 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-07-17 19:37:28 +00:00
Ingo Weinhold
4573543ca8 Removed third argument for SystemMain. Not longer needed.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@229 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-07-14 22:11:47 +00:00
Ingo Weinhold
54f76689cb Adjusted the SubDir and SubInclude parameters.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@15 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-07-09 20:15:44 +00:00
Ingo Weinhold
8b3bd88c41 I don't know why the path to this header is hard-coded. However, adjusted to the new structure.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@14 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-07-09 20:14:09 +00:00
ejakowatz
52a3801208 It is accomplished ...
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-07-09 12:24:59 +00:00