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
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
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
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
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
Now, platform_get_boot_partition() will work correctly.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7253 a95241bf-73f2-0310-859d-f6bbb57e9c96
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
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
case it couldn't be used for booting (lack of a kernel or whatever).
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7243 a95241bf-73f2-0310-859d-f6bbb57e9c96
was already correct, and my other source was wrong about it.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7234 a95241bf-73f2-0310-859d-f6bbb57e9c96
It switches to real mode for execution of the BIOS interrupt; it's really
only intended for the boot loader.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7233 a95241bf-73f2-0310-859d-f6bbb57e9c96
both Bochs and my real computer seem to know it anyway, so it's untested.
The real mode segment descriptors now start at 0x10000, because the code
is loaded there. Added an additional stack segment descriptor to be able
to use a stack below 0x10000.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7232 a95241bf-73f2-0310-859d-f6bbb57e9c96
gate, switch to protected mode, and will then jump to the platform dependent
loader initialization.
This is the start of the zbeos equivalent. It can already be executed
using the BFS boot block, but it cannot yet load itself from a floppy
like the original does.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7197 a95241bf-73f2-0310-859d-f6bbb57e9c96
network booting (for R1), and if we will, it will be done using another
mechanism anyway).
If it runs under Apple's OF implementation, it now adds ":0" as parameter
to the opened block device to bypass the disk-label package - that part
is obviously implementation specific (and took me some time to figure
out, even if it's just two characters ;-).
Added a commented block of code that could be used in combination with
MOL and it's (in the meantime fixed) broken device access via OF.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5206 a95241bf-73f2-0310-859d-f6bbb57e9c96
OpenFirmware client service calls (and callbacks).
Has nice inline argument getter methods If compiled under C++.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5205 a95241bf-73f2-0310-859d-f6bbb57e9c96
and idea about the underlying hardware (needed at other places).
Calls arch_set_callback() right after MMU takeover.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5204 a95241bf-73f2-0310-859d-f6bbb57e9c96
Added empty callbacks for "alloc-real-mem" and "unmap".
Implemented "map" and "translate" - the latter is not yet tested, though.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5203 a95241bf-73f2-0310-859d-f6bbb57e9c96
respective methods of their parent (one possible crash less, as the
nodes could get deleted accidently).
The AmigaFFS is now silent if it just don't know the signature.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5182 a95241bf-73f2-0310-859d-f6bbb57e9c96
was a load_kernel() call above). Added a comment that might prevent me from
doing that again...
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5113 a95241bf-73f2-0310-859d-f6bbb57e9c96
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
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
- 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
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
/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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
"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
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