Commit Graph

602 Commits

Author SHA1 Message Date
Marcus Overhagen
ec9d1637b5 fixed copy & paste bugs
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19639 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-12-26 20:15:27 +00:00
Marcus Overhagen
db5b50665b Fixed gcc4 "error: cast from 'foobar *' to 'uint16' loses precision" problem by doubly casting.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19638 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-12-26 19:57:21 +00:00
Marcus Overhagen
203cf32414 Disabled debug output, but show errors with dprintf.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19637 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-12-26 19:30:33 +00:00
Marcus Overhagen
99784f5666 reduce debug output and add an additional test
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19636 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-12-26 19:21:31 +00:00
Marcus Overhagen
6d92b426ae Use only the immediate buffer to send data.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19635 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-12-26 19:18:30 +00:00
Marcus Overhagen
c4a05ef079 Determine client IP address and make it known to the ethernet interface.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19634 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-12-26 19:17:28 +00:00
Marcus Overhagen
c828668959 Return -1 when no data is available in receive hook, and 0 to indicate a retry, to make the net stack happy.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19629 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-12-26 16:23:37 +00:00
Marcus Overhagen
57a88e1c79 Implemented UNDI ethernet interface, receiving frames already appears to work.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19628 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-12-26 16:00:35 +00:00
Marcus Overhagen
5fd605e278 prettify formatting
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19623 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-12-25 03:05:00 +00:00
Marcus Overhagen
8456183dfd implemented the first pxe bios call
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19622 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-12-25 02:48:50 +00:00
Marcus Overhagen
578e3c2607 fixed the bugs, calling the pxe bios now works
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19621 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-12-25 02:48:08 +00:00
Marcus Overhagen
f7110a4231 first attempt to call the pxe bios, still untested
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19620 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-12-25 00:47:41 +00:00
Marcus Overhagen
84a31142ed Added some code to call real mode pxe bios functions, based on Axel's bios_ia32/bios.S
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19619 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-12-24 01:21:17 +00:00
Marcus Overhagen
0ecd75e986 Made the idt_descriptor symbol global to share it with pxe_ia32.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19618 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-12-24 01:18:52 +00:00
Marcus Overhagen
fd992230f6 Fixed pxe zbeos build, got broken by recent edid changes.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19617 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-12-24 01:02:24 +00:00
Axel Dörfler
d2de13bdd4 The boot loader (BIOS IA32 only) now chooses the default video mode by looking at the
EDID info from the monitor if available through VESA/DDC.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19588 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-12-21 14:20:17 +00:00
Axel Dörfler
d6edf65b05 Fixed error checks for EDID retrieval.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19582 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-12-20 22:49:53 +00:00
Axel Dörfler
5d7d960fac Added EDID version 1 retrieval from VESA; doesn't do anything yet besides dumping the
info to the serial line - not tested yet (as Qemu doesn't support DDC/EDID).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19580 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-12-20 21:44:03 +00:00
Marcus Overhagen
8d16d3335d added ethernet interface framework, taken from openfirmware boot platform
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19453 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-12-09 22:52:23 +00:00
Marcus Overhagen
dd2413230f started the PXE UNDI network device support
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19127 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-10-25 21:48:08 +00:00
Marcus Overhagen
326862c203 removed usage of the 0x8d000 to 0x9ffff memory range, as its needed by PXE UNDI.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19126 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-10-25 20:27:09 +00:00
Marcus Overhagen
7613b42bcd copy of the original trampoline code, needs to be modified as UNDI needes the used address range
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19125 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-10-25 20:04:46 +00:00
Marcus Overhagen
79372d08b0 Reduced allowed stage 2 size, as PXE and UNDI have memory reserved. Added comment explaining memory map.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19114 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-10-24 22:17:55 +00:00
Marcus Overhagen
a1939ee423 Modified the pxe_ia32 stage 1 loader to load stage 2 at the same address as bios_ia32 stage 1 does.
This allowes to actually execute the boot loader now. 
Need to use Ingo's remote_disk_server now for booting.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19113 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-10-24 20:53:30 +00:00
Axel Dörfler
cf1f73778d Fixed PPC boot loader build.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19061 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-10-13 12:10:55 +00:00
Marcus Overhagen
ffffd44b12 Moved switching to protected mode into stage1 loader, so code above 1MB can be executed in protected mode.
Executing the stage2 loader works now, up to the point where mmu_init() reuses the same address space.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19033 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-10-08 20:17:03 +00:00
Marcus Overhagen
4ba8420ca5 save and restore destination address
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19031 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-10-08 19:10:53 +00:00
Marcus Overhagen
b488dcdbad modified, but still wrong
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18998 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-10-04 23:39:19 +00:00
Marcus Overhagen
5fc3827fb4 removed some unused code. not finished yet
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18997 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-10-04 23:11:30 +00:00
Marcus Overhagen
83bf699b3f some build fixes for pxe_ia32 platform
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18966 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-09-28 12:52:20 +00:00
Jérôme Duval
dc0bf743e1 fix the build for the stage 2 pxe
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18939 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-09-25 22:35:35 +00:00
Marcus Overhagen
c69902c5fc initial attempt to build platform target pxe_ia32
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18926 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-09-25 16:40:38 +00:00
Marcus Overhagen
d68ec99f12 copied from src/system/boot/platform/bios_ia32/Jamfile
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18919 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-09-25 14:28:58 +00:00
Marcus Overhagen
36020a912d copied from src/system/boot/platform/bios_ia32/shell.S
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18917 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-09-25 14:25:58 +00:00
Marcus Overhagen
9993ff374a load stage 2 image at address 1MB and execute it
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18907 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-09-21 15:53:43 +00:00
Marcus Overhagen
46564600a4 Fixed server IP detection. Implemented TFTP file size request and connection setup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18895 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-09-21 02:15:39 +00:00
Marcus Overhagen
b8759025a9 PXE stage 1 bootloader for Haiku
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18884 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-09-18 21:51:07 +00:00
Marcus Overhagen
82029bdae8 added missing nothrow parameter
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18868 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-09-16 23:25:56 +00:00
Axel Dörfler
9046c67753 Fixed PPC build.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17499 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-05-17 18:06:35 +00:00
Axel Dörfler
fabe8c62ff The kernel boot code now supports the unknown bus/device method to identify the
boot volume. The other (better) methods are now disabled in the boot loader.
This fixes bug #241.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16895 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-27 17:01:10 +00:00
Axel Dörfler
855697b122 This should fix the PPC build.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16894 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-27 16:36:53 +00:00
Axel Dörfler
ecdaf9dea8 * The boot loader now adds all block devices in case the BIOS doesn't give enough
information to identify the boot volume - if we want to be able to map all BIOS
  drive IDs to the disks in the system, we need to do this always, though.
* Forgot to commit the updated disk_identifier.h in the last commit...
* Removed the unused dumpBlock() function from devices.cpp.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16892 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-27 14:50:37 +00:00
Axel Dörfler
1bcbbd6a72 The boot loader now does its job and computes drive check sums at arbitrary blocks
in order to differentiate boot disks. The kernel still ignores this wisdom, though,
bug #241 still remains open.
This currently only works correctly if the boot menu is opened, anyway.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16891 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-27 13:56:57 +00:00
Axel Dörfler
c918a987a0 * Removed my old doubly linked list implementation, and stay with Ingo's.
* Adapt other sources where needed (the boot loader's RootFileSystem still
  used the old implementation).
* Implemented RootFileSystem::Rewind().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16889 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-27 10:27:05 +00:00
Axel Dörfler
d5062208bb * Added a new list_insert_item_before() function that inserts a new item
before another one in the list.
* The video modes in the boot loader are now sorted (by resolution, larger
  resolution comes first). Doubled entries are automatically removed; this
  fixes bug #192.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16572 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-02 22:48:47 +00:00
Axel Dörfler
bd610d2fcd * Added kernel settings for APM - defaults to disabled (since it doesn't work
on at least one of my systems, it only works on 3 of them...).
* Added APM safemode setting.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16152 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-30 14:43:38 +00:00
Axel Dörfler
afd6dfc8b4 Implemented first basic APM driver. Only tested with QEMU so far, that's why
it's currently disabled.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16120 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-28 18:11:20 +00:00
Ingo Weinhold
f602da2b72 * Turned the kernel platform support from a library into an object.
* Moved the Open Firmware function platform_get_next_device() from
  the boot loader into the kernel (renamed to of_get_next_device()).



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16101 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-26 15:06:59 +00:00
Axel Dörfler
a268fbfe48 Added some hacks to get the boot loader to work on the Pegasos.
Doesn't come far yet, though.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16091 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-25 20:05:11 +00:00
Axel Dörfler
76c7d59103 Updated copyright message in the boot loader menu.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16082 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-25 16:12:48 +00:00
Axel Dörfler
ba61df6d0b Beginnings of APM support: we now connect to the APM BIOS in 32 bit protected mode.
We don't do anything with it yet, though, so the BIOS will probably ignore us since
we are supposed to poll for events.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15900 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-10 22:54:36 +00:00
Ingo Weinhold
1cf0c3b3f2 Clear the back pointer in the root kernel stack frame, so stack traces
will end there.


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


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15837 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-04 04:55:04 +00:00
Ingo Weinhold
716a16ce61 * Find out a few interesting information about the system (like CPU,
bus, and time base frequency) in the PPC boot loader, and propagate
  them to the kernel via kernel_args.
* Now we use the correct time base frequency for timer calculations.
* Implemented PPC specific system info stuff. Added a few PPC CPU
  types to <OS.h>.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15817 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-03 13:30:23 +00:00
Ingo Weinhold
a1bcf2c880 * The OF memory management callback is now set in arch_mmu_init().
According to the spec we need to set it before taking over the MMU,
  but we can't call it before arch_mmu_init(), since we need the OF
  to allocate the page table. So we do it after we have allocated
  the new page table.
* Added PPC specific kernel_args: The virtual address ranges we want
  to keep in the kernel. We fill that in with the translations we
  find when initializing the MMU stuff. We remove the memory the
  boot loader occupies from those. Besides the stack for the boot
  loader only the OF stuff remains.
* arch_mmu_allocate() now starts to search at KERNEL_BASE for a free
  virtual address when no particular address is requested. This saves
  us further trouble in the kernel, since those allocations would
  need to be remapped otherwise.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15780 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-02 01:56:37 +00:00
Ingo Weinhold
4c1fca768d Maybe I miss something, but I don't see the reason for the PPC
arch_mmu_allocate() to set the "cache inhibited" flag. One negative
effect was that for such memory the lwarx instruction (used by the
atomic_*() functions) does "... cause the system data storage error
handle to be invoked...", as the architecture specification puts it.


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



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

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



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15708 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-29 01:50:23 +00:00
Ingo Weinhold
68d3fc6f8f Don't allow allocation of zero sized area.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15700 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-28 20:02:34 +00:00
Ingo Weinhold
ea5b67a88b Don't allocate the heap with of_claim(), but rather use
platform_allocation_region(). Since the callback stuff doesn't seem to
work, the Open Firmware didn't ask us to allocate memory in turn, and
thus we didn't know about the range that had been mapped and reused it
later.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15699 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-28 19:54:19 +00:00
Ingo Weinhold
22bc93e31c arch_mmu_allocate() translated the protection flags incorrectly
(B_WRITE_AREA to read-only).


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

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



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15689 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-27 22:01:33 +00:00
Ingo Weinhold
6470bb6152 Removed superfluous static variable I accidentially introduced.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15687 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-27 21:34:50 +00:00
Ingo Weinhold
22a6522245 * Renamed of_call_method() to of_call_client_function() and added
of_call_method() which is actually an implementation of the
  "call-method" client function.
* of_interpret() announced one less return value than actually needed.
  Seemed to work anyway, though.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15683 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-27 21:15:56 +00:00
Ingo Weinhold
44c11fdbc1 Added console support functions required for the generic textual boot
menu. The menu basically works, but has a couple of problems. The
harmless ones are graphical: we get cursor artifacts when the colors
are changed, and the item selection doesn't quite look as it should.
More serious is the lack of Home/End, Page Up/Down keys. All I read from
the console is a '\0' byte when such a key is pressed. The cursor keys
work fortunately. I mapped the functionality of Page Up/Down
additionally to the Left/Right cursor keys. So the menu should be usable
at least. I guess, I'll leave it in that state; Axel wants a graphical
menu anyway.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15589 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-19 13:49:45 +00:00
Ingo Weinhold
b821cecc36 Added of_interpret for interpreting arbitrary Forth code.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15588 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-19 13:40:15 +00:00
Ingo Weinhold
4c62b0919f Pulled platform independent part of the BIOS boot menu out into
platform/generic/...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15587 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-19 13:35:01 +00:00
Axel Dörfler
7a3fa7d368 * Followed Ingo's suggestion and removed the now superfluous "length" correction
in ConsoleHandle::WriteAt().
* Updated license.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15581 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-19 09:44:52 +00:00
Ingo Weinhold
8f75497433 Fixed endless loop.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15576 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-18 14:35:31 +00:00
Axel Dörfler
484c80abd0 * Added missing prototypes for get_eflags() and set_eflags() to arch_system_info.h
* The boot loader now checks the CPU for the cpuid and rdtsc features, which we
  currently both rely on.
* Removed old and no longer used stage2_priv.h header


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15534 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-14 10:43:28 +00:00
Ingo Weinhold
758b1d0e05 Fixes that make Haiku build with gcc 4. Mainly out of the following
categories:
* Missing includes (like <stdlib.h> and <string.h>).
* Linking against $(TARGET_LIBSTDC++) instead of libstdc++.r4.so.
* Local variables shadowing parameters.
* Default parameters in function definitions (as opposed to function
  declarations).
* All C++ stuff (nothrow, map, set, vector, min, max,...) must be imported
  explicitly from the std:: namespace now.
* "new (sometype)[...]" must read "new sometype[...]", even if sometype is
  something like "const char *".
* __FUNCTION__ is no longer a string literal (but a string expression), i.e.
  'printf(__FUNCTION__ ": ...\n")' is invalid code.
* A type cast results in a non-lvalue. E.g. "(char *)buffer += bytes"
  is an invalid expression.
* "friend class SomeClass" only works when SomeClass is known before.
  Otherwise the an inner class with that name is considered as friend.
  gcc 4 is much pickier about scopes.
* gcc 4 is generally stricter with respect to type conversions in C.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14878 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-12 23:27:14 +00:00
Axel Dörfler
0752edcf8d The default video mode now prefers to be 800x600x16 - if available.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14620 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-01 18:03:35 +00:00
Ingo Weinhold
338b8dc301 Merged changes from branch build_system_redesign at revision 14573.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14574 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-29 16:27:43 +00:00
Axel Dörfler
8fcd6b8e61 * renamed smp_boot.c to smp.cpp
* there is now a "Disable Hyper-Threading" safemode in the boot loader
* the SMP & HT menu items are now added in smp.cpp - and are only added
  if the system supports one of them.
* more cleanup to smp_apic.h
* removed cpuid() from the boot loader's support.S - instead, it will now
  use the one from the kernel.
* added a very weak HT detection: if the MP config only listed one CPU,
  and this CPU supports HT, we enable the other logic processor manually -
  as this currently doesn't work, it's disabled, though.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14536 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-26 22:57:13 +00:00
Axel Dörfler
9f2dae6a17 For now, always enable serial debug output in the boot loader.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14532 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-26 22:31:27 +00:00
Axel Dörfler
fde12d6407 Some cleanup: renamed the mp_ext_* structures to mp_base_* as they are
part of the base table, not the extended table.
Renamed some structure fields, variables to be clearer and nicer to read.
Removed some unused stuff.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14502 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-24 21:37:40 +00:00
Axel Dörfler
0c67510ae1 Enabled SMP detection again - since it's very likely that it doesn't work on
your system, I've also added a "Disable SMP" safemode option. The NO_SMP
define is still there, and will be removed once SMP works flawlessly.
Prints out infos about the interrupt entries in the MP config.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14499 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-24 19:43:50 +00:00
Axel Dörfler
7a09488d8e Could overwrite the memory that the SMP code is using for the trampoline
code/stack with page tables.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14498 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-24 19:29:59 +00:00
Axel Dörfler
3d5ecf962c Minor cleanup, no functional change.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14472 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-22 16:53:49 +00:00
Axel Dörfler
8c20600d12 Looks like some BIOS don't bother filling in cylinder/head/sectors_per_track information
for extended drive parameters.
This should fix eventual "no boot disk" messages of the boot loader.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14435 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-19 22:43:50 +00:00
Axel Dörfler
5a54b40166 Implemented platform_add_block_devices() - if you have more than one bootable
Haiku disk installed, you can now choose between them in the boot loader.
Also fixed build - obviously forgot to compile before a last minute change...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14404 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-17 14:20:41 +00:00
Axel Dörfler
597416d1dd gKernelArgs.boot_disk.cd is now only set to true, if the selected boot volume
is still the CD-ROM.
BIOSDrive::ReadAt() now tries to read a specific block up to 3 times before
failing - after the second retry, it will also reset the disk system.
get_ext_drive_parameters() will now fail if the BIOS fills in the device_parameters
structure incorrectly (just tested some values against zero, that at least helps
in the case of one of my systems).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14401 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-17 13:45:55 +00:00
Axel Dörfler
e84506daca The home/end keys are no longer able to select disabled entries.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14400 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-17 13:40:57 +00:00
Axel Dörfler
19567a9917 Now makes sure the selected entry is visible upon entry, too.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14398 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-17 10:09:04 +00:00
Axel Dörfler
a51b55c985 "kernel_args.boot_disk.cd" was never set to true...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14397 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-17 10:06:28 +00:00
Axel Dörfler
2e2bd87511 Renamed devices_check_boot_cd() to check_boot_cd() and moved it up to the other BIOS
functions - it no longer terminates the CD-ROM emulation, but only checks the status,
and therefore, it's now called by platform_register_boot_device() instead of from
platform_start_kernel().
This also makes the devices.h header useless.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14390 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-14 21:38:12 +00:00
Axel Dörfler
51e081bade Removed platform_boot_device_is_image() - platform_get_boot_device() now fills
in the adequate field in the kernel_args structure.
Renamed gCDFloppyBoot variable to gBootedFromImage (as network boot should look
similar).
The "kernel_args.boot_disk.cd" field is now maintained as well.
The print_item_at() menu function now prints the Menu::ChoiceText() instead
of that of its marked item.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14389 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-14 21:26:30 +00:00
Axel Dörfler
d32f04d20a Improved comments about the manual symbol relocations.
Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14382 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-14 11:49:35 +00:00
Axel Dörfler
e3fcb58ebb The boot loader now has special support for being booted from a boot image
like floppy or CD boot.
This allows it to reduce the number of scans needed to identify the boot
partition - when booted from a real floppy, this speeds up the boot
process by a magnitude.
Also, the loader now has a fall back in case there were no "boot" links
on the disk - the current boot floppy script doesn't create them.
With these changes, I was able to boot into a HD based Haiku installation
from a floppy disk. It's not yet enough to boot from CD (as the boot
device selection is a bit too simplistic right now), but it will eventually
come next. Testing is a lot slower here, though, as neither qemu nor
Bochs support multi-session CDs (at least I have no idea how to get them
to do this).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14380 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-14 11:34:18 +00:00
Axel Dörfler
ceb769360d Got rid of the now unused sPageTable variable.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14378 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-14 09:26:11 +00:00
Axel Dörfler
7416092b83 Marcus spotted an error in the cylinder calculation in get_drive_parameters() - didn't
have an effect on floppies or CD-ROMs, but would have on real hard drives that require
CHS access.
Changed the cylinder-to-regs conversion in BIOSDrive::ReadAt() (that one was actually
correct) to make it look similar to the conversion in the opposite direction in
get_drive_parameters().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14377 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-14 09:25:45 +00:00
Axel Dörfler
8d156f1c5e Fixed a bug with the offset handling in BIOSDrive::ReadAt().
Implemented CHS support needed for smaller hard drives, CD-ROM, ...
Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14369 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-13 13:45:23 +00:00
Axel Dörfler
e83ba2ee32 Enlarged the boot loader's heap area to 64kB needed for the tarfs.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14368 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-13 13:43:13 +00:00
Axel Dörfler
4cc5dde4a7 Updated memory layout comment.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14367 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-13 13:40:58 +00:00
Axel Dörfler
0eecdd8334 Made the page table allocation/filling mechanism a bit more flexible and less error prone.
Also, freeing regions is now supported (but still only the last allocated region can be
freed, as that's currently good enough).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14366 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-13 13:37:18 +00:00
Axel Dörfler
0428a0ddc4 Now loads the maximum size of zbeos when booted from a floppy or CD.
Note, this value should be patched by the build system to the actual size
of zbeos - but since we don't have this mechanism in place yet, the maximum
value is probably the best default, even if it should slow down a floppy
boot considerably.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14344 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-11 00:21:37 +00:00
Michael Lotz
06500c3e58 The color index is multiplied by 3 because there are R, G and B values for each color in the palette. But uint8 can't hold these for any index above 256/3 obviously. Also fixed the 24-bit display. It works on real hardware but looks broken with bochs. I suppose bochs does not handle 24-bit VESA correctly though.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13359 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-29 23:40:25 +00:00
Axel Dörfler
8cd812c172 Forgot to uncomment this line: the "depth" argument of the vesa file is now also
evaluated, so that you can specify something different than 8 bit in there.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12840 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-26 12:05:31 +00:00
Axel Dörfler
8bd36612dc First try to get the boot logo displayed properly in all color spaces.
For some reason, the colors are wrong for anything but 8bit modes, though.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12823 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-26 07:47:19 +00:00
Axel Dörfler
895e2a0375 Reenabled the Qemu workaround: the frame buffer is now cleared after a mode change.
After all, there might be real graphics card which behave the same??


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12551 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-03 02:06:08 +00:00
Axel Dörfler
718b5114e0 This should fix the build after all the kernel/system renaming.
If anything is still broken (and was not before :)), please shout.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12361 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-04-13 13:59:17 +00:00
Axel Dörfler
5af32e7526 Renamed src/kernel to src/system.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12359 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-04-13 13:06:35 +00:00