Commit Graph

334 Commits

Author SHA1 Message Date
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
Axel Dörfler
c2cb9079b5 Fixed a warning with debug turned on.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7244 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-04-19 21:58:43 +00:00
Axel Dörfler
acfef65c84 Fixed a bug that would rescan the boot partition in mount_file_systems() in
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
2004-04-19 21:57:50 +00:00
Axel Dörfler
3796dbef26 Added the new files to the build, and implemented a real startup.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7240 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-04-19 01:57:29 +00:00
Axel Dörfler
b2f8da6214 Added prototype for the (currently unused) mmu_init_for_kernel() function.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7239 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-04-19 01:56:36 +00:00
Axel Dörfler
95aa3fbf11 MMU functions and initialization for the boot loader.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7238 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-04-19 01:50:26 +00:00
Axel Dörfler
487cc516ec Register %es was not properly set from the bios_regs structure
(since switch_to_real_mode() overwrites %es).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7237 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-04-19 01:31:19 +00:00
Axel Dörfler
65daec27d1 Added a definition for the carry flag.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7236 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-04-19 01:30:13 +00:00
Axel Dörfler
d2e0469de4 Verified A20 gate BIOS call values with Ralf Brown's interrupt list - 0x2401/2
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
2004-04-19 00:00:53 +00:00
Axel Dörfler
46df41d103 Implemented call_bios() function that is called from protected mode.
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
2004-04-18 23:58:26 +00:00
Axel Dörfler
1e56fb4aeb The "ax" code I was using for the A20 gate stuff was obviously wrong; but
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
2004-04-18 22:07:41 +00:00
Axel Dörfler
7ab45fdea5 Removed unused welcome message print code.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7198 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-04-13 16:54:42 +00:00
Axel Dörfler
b911d01e3d Started the "shell" of the 2nd stage boot loader: it will enable the A20
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
2004-04-13 16:43:12 +00:00
Axel Dörfler
cdae4b7cf1 Added panic()/dprintf() calls to the x86 bootloader bindings.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7057 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-03-23 01:03:24 +00:00
Axel Dörfler
06c0f437a7 Added "\n" -> "\r\n" translation for console output, not yet tested.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7031 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-03-19 18:32:37 +00:00
Axel Dörfler
498a8e8be0 Now uses vsnprintf() instead of vsprintf() which makes the output safe.
Removed "\n" -> "\r\n" translation (it's now done in the platform dependent part).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7030 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-03-19 18:30:31 +00:00
Axel Dörfler
788d2b04ea Implemented console output for x86 boot loader.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7029 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-03-19 18:28:26 +00:00
Axel Dörfler
3bba0ebe0a NewOS revisited, applied patch 1916: now evaluates the extended BIOS
RAM size call.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6984 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-03-15 00:58:49 +00:00
Axel Dörfler
4a2e872cca Applied NewOS change 1914: moved APIC setup into the kernel due to a
problem with the APIC clock speed test.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6980 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-03-14 22:54:00 +00:00
Axel Dörfler
81e08ae466 kernel_cpp.cpp needs direct access to headers/private/kernel/util in order
to not include our current stdio.h.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6598 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-02-15 18:08:15 +00:00
Axel Dörfler
558d32f86a Thanks to Ingo's change in KernelMergeObject, the arch-specific part of
the OpenFirmware platform is now linked in directly.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5246 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-11-03 13:56:13 +00:00
Axel Dörfler
c3efd542cd Now accepts only "block" devices as boot device (we do not support
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
2003-10-28 21:29:59 +00:00
Axel Dörfler
d3b44eeac9 Added definition of a of_arguments structure which is used in all
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
2003-10-28 21:26:08 +00:00
Axel Dörfler
c9593d2253 Now uses the OF root node properties "model" and "device_type" to get
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
2003-10-28 21:24:28 +00:00
Axel Dörfler
6bf336d531 Implemented the OpenFirmware MMU callback hook mechanism.
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
2003-10-28 21:22:21 +00:00
Axel Dörfler
41fc24055a Added more debug output.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5183 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-10-28 02:23:30 +00:00
Axel Dörfler
553e5a0f6f BFS/AmigaFFS directory Open()/Close() methods now correctly call the
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
2003-10-28 02:13:12 +00:00
Axel Dörfler
c5b5378a79 The recently added load_kernel() tried to load the kernel again (there already
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
2003-10-21 05:39:36 +00:00
Axel Dörfler
a721098497 Now prints an error message if the kernel couldn't be loaded.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5111 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-10-21 05:35:57 +00:00
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