Commit Graph

597 Commits

Author SHA1 Message Date
François Revol
e5ea3d8c41 Print the zlib-provided message in case of error.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30483 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-04-29 01:53:58 +00:00
François Revol
ff6382031e Build only the required part of zlib with correct options instead of reusing the userland version. This fixes some weird m68k issue, and still works on x86.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30482 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-04-29 01:52:01 +00:00
François Revol
12442ce54b - add a gBootDriveAPI variable telling which method was used to load,
- move gBoot* out of the boot sector,
- fix the FAT params to actually indicate 1.44kB floppy,
- fix the FloppyDrive class to also use 18 sectors/track, so now tarfs won't get data from start of disk when on the middle.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30481 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-04-29 01:35:37 +00:00
François Revol
f77b0a6b83 Implemented a FloppyDrive class that uses Floprd, this allows the loader to start reading the tgz, but it fails after 2 blocks.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30464 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-04-27 16:18:08 +00:00
François Revol
4fd7901292 Finally managed to get floppy boot working for Atari \o/
- loop on Floprd() alternating sides every sect/track, currently hardcoded from the FAT bootblock as probing like the NetBSD loader asserts ARAnyM,
- print a dot / sector read in the great tradition of bootloaders,
- set gBootedFromImage correctly,
- fix the script, make it jam later on.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30455 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-04-27 02:37:31 +00:00
François Revol
901b8dd28a No reason to keep the .prg startup asm code inside the first 512 bytes, this frees up some space for the floppy code.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30446 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-04-26 21:45:36 +00:00
François Revol
f2cec6b732 Just keep this around before it get lost... Failed attempt at generating a bootable floppy for Atari.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30444 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-04-26 21:17:19 +00:00
Michael Lotz
5c8e597e90 Don't try to use disk extensions for non-disk devices (like actual floppies or
emulated ones on CD-boot). One of my laptops returns bogus drive parameters
and another one silently fails the read, previously preventing CD-boot on both.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30389 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-04-24 23:16:26 +00:00
Axel Dörfler
317bd7dda3 * Changed directory structure as suggested on the mailing list.
* Made the TimeZoneView less error prone, and also actually use Haiku code (the
  previous check didn't work since it used #if, not #ifdef).
* Also took the liberty to rename our boot loader to haiku_loader, since I had
  to update the nasm binary anyway. Updated the assembly sources to nasm 2.0.
* I haven't found where the synth location in the MIDI code is specified,
  though.
* Also, NetBootArchive, and FloppyBootImage haven't been updated yet. Will do
  so next.
* Some optional packages still put their license to beos/etc/licenses. I didn't
  update them yet, as we'll probably do so anyway at some point. Also, I think
  we might want to introduce a common/data/licenses instead for those.
* If you encounter any problems, please tell!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29876 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-04-03 09:02:44 +00:00
Stephan Aßmus
d30acbf30b Patch by maxime.simon: Don't allow to enter sub-menus by the space bar anymore.
This allows to have the first item selected when entering a menu, since still
pressing space would not enter it unintentionally anymore, in case it's a sub-
menu again. Even though it makes some sense to have "Continue booting" selected
by default, it somehow feels more natural to have the first item always selected
instead. Thanks!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29832 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-03-31 16:28:50 +00:00
Philippe Houdoin
532a47a9f0 Fixed broken style I've introduced.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29228 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-02-15 21:56:27 +00:00
Philippe Houdoin
4c0255d795 Refactor the code, computing next entry earlier and use continue as suggested by Jerome.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29225 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-02-15 19:27:36 +00:00
Philippe Houdoin
7f0b01654d Fixed the patch: on disabled processor entry, next entry pointer wasn't computed,
leading to an infinite loop...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29224 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-02-15 18:43:02 +00:00
Philippe Houdoin
63c851a15d Applied patch supplied by jkeeping in #3445: smp_do_mp_config wasn't checking
MPS table CPU entries for the enabled flag.
This caused Haiku to fail to boot under KVM on Linux.

Thanks you, jkeeping.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29222 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-02-15 18:26:13 +00:00
Michael Lotz
d0eaec3086 Fix more operator precedence errors. These do not do what you'd expect at first
sight. The comparison operator takes precedence over the binary ones.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29121 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-02-01 23:24:55 +00:00
François Revol
9b7603b992 This should definitely fix CD booting, it was still looking for the tgz at 192k while zbeos is now almost 300k... Maybe we need something more failproof but it shoudl do for now.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28965 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-01-20 04:40:57 +00:00
François Revol
b641656c2b Make sure the hack-coff tool is built when needed.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28910 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-01-15 16:47:53 +00:00
François Revol
7613c6c7ca Add a boot menu option to disable using the IO APIC for IRQ handling and fallback to PIC.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28686 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-11-18 14:40:40 +00:00
François Revol
1c532eedf1 Make the tgz archive offset in floppy image settable. Set it to 270k for now, until zbeos gets some diet.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28657 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-11-15 03:30:00 +00:00
François Revol
fd19697e68 Make use of hack-coff.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28623 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-11-12 02:36:03 +00:00
François Revol
11a47de374 Support creating a COFF bootloader from the ELF one, at least for ppc.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28611 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-11-11 19:08:51 +00:00
François Revol
3b148e533f This gets the bootloader further on, but it still breaks... OpenHackware seems worse than Pegasos OF :^)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28587 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-11-10 02:03:58 +00:00
François Revol
9da2356857 Work in progress to pass the image extents to the kernel,
- code is disabled yet as the bootloader doesn't have add_boot_item.. will need to pass via kernel args
- add a GetFileMap() method to the vfs, and implement it in FAT code.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28445 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-11-01 20:39:14 +00:00
Axel Dörfler
a8cecea091 * As suggested by Gerald, we now ignore the EDID information on VBE2 graphics
chips due to possible timing issues.
* This means you will now get a 1024x768 boot screen on older hardware instead
  of the one of your native resolution. If that always worked great for you,
  and you want to be able to turn on using EDID information again, please yell.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28399 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-31 13:35:09 +00:00
Axel Dörfler
39c7faa460 * vesa_set_mode() now gets another parameter that specifies whether or not
the mode timing should be used.
* Apparently, some VBE3 implementations don't implement the CRTC support, and
  they seem to fail when the SET_MODE_SPECIFY_CRTC bit is set.
* Therefore, we'll first try with timing, and if that fails, we'll try again
  without it. This should bring back the boot screen for all those who had
  problems with it before.
* Added tracing output of the CRTC to be used.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28398 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-31 13:14:07 +00:00
Axel Dörfler
b4c8ccc372 * The boot loader now creates a CRTCInfoBlock structure when detailed EDID
mode informations are available.
* This is passed to the graphics card when the mode is set in the hopes that it
  will be more conforming.
* Not yet tested on real hardware, though, therefore the VESA driver doesn't
  do anything like this yet. I will test next, but please report any problems
  with this nonetheless.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28390 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-31 09:52:57 +00:00
François Revol
d4dcbf95f6 - Fix build.
- make system_time() return something sensible until platform code works.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28271 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-21 21:23:55 +00:00
François Revol
861fb97cf9 Inline Unset and SetTo correctly. I copied the class from BFS which only uses it in a single file...
Thx for the gcc4 fixes.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28166 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-16 10:05:59 +00:00
Stefano Ceccherini
a96b4beb84 Fix build for gcc4. If you really want to inline these methods, they need to be implemented in the header
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28161 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-16 09:53:06 +00:00
Stefano Ceccherini
b5e67ab6fb Fix build for gcc4
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28160 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-16 09:30:07 +00:00
François Revol
fcbcb00e18 Turn off debug output.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28157 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-16 00:06:42 +00:00
François Revol
2cf4975b4b Add FAT32 support. This allows the bootloader to find a BFS image file (currently named BEOS\IMAGE.BE) and start booting for it, until the kernel tries to mount the boot partition.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28156 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-15 23:54:04 +00:00
François Revol
33fa38c894 Avoid using the first physical page. The first 2kB are supposedly protected by the hardware (though it should be accessible by supervisor...) This fixes an segfault.
Now the kernel panics in M68KAtari::InitTimer()... "WRITEME" :)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28008 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-12 21:34:31 +00:00
Ingo Weinhold
b18c9b97ae * Implemented x86 assembly version of memset().
* memset() is now available through the commpage.
* CPU modules can provide a model-optimized memset().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27952 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-10 18:43:46 +00:00
Ingo Weinhold
379ad6d037 * Moved the arch specific stuff in src/system/kernel/lib into arch/...
subdirectories. Also moved the x86 kernel arch_string.S there.
* Moved memcpy.c from src/system/libroot/posix/string into the
  arch/generic subdirectory.
* Dealt with the consequences of moving things around. Affected are also
  the boot loader and runtime loader builds.

Adjust the m68k and ppc parts, too, but only the x86 build is tested.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27947 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-09 23:47:01 +00:00
François Revol
93861ead3e Better floppy media descriptor for the fake FAT.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27937 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-10-09 09:50:00 +00:00
Ingo Weinhold
9618c0dc63 Panic when trying to access the small data region. It is not loaded from
disk.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27755 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-27 00:35:25 +00:00
Ingo Weinhold
1cd8c4cc08 Let the boot loader set the kernel image's name.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27754 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-27 00:33:20 +00:00
Ingo Weinhold
0dc4d1e5ca Reverted r27685, r27676, r27665, and r27664, the changes related to
letting the boot loader provide full paths for the pre-loaded images.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27753 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-27 00:28:10 +00:00
Axel Dörfler
4a47b14ea4 * Enlarged a single kernel_args chunk to 32 KB (was 16 KB).
* Reduced the kernel_args array size from 32 to 16 (7 are used on a normal
  build).
* Cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27690 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-22 15:36:46 +00:00
Axel Dörfler
18ee966f0a * The boot loader now replaces the first path component of all path names
passed to the kernel with "boot" instead of the volume name; the kernel
  mounts the boot volume always as "/boot".
* This should fix #2757.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27685 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-22 08:58:07 +00:00
Ingo Weinhold
32f1784d37 Doubled heap size to 128 KB. Should hopefully fix bug #2756.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27680 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-21 21:43:12 +00:00
Ingo Weinhold
5a150dfe6d * Added optional tracing for allocations.
* Lifted hard-coded 64 KB heap limit.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27679 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-21 21:42:17 +00:00
Ingo Weinhold
cc3b6f3a05 malloc() now also logs an error when a request could not be served.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27677 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-21 21:25:58 +00:00
Ingo Weinhold
4ed420362a Log an error when there's not enough memory for the inode.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27676 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-21 21:19:25 +00:00
Ingo Weinhold
b34e395eaf The boot loader does now set the names of the images it loads to the
full paths.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27665 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-21 13:00:31 +00:00
Ingo Weinhold
6aa2c9ecf1 * Directory stores its parent directory (if any), now.
* Adjusted used files systems accordingly.
* BFS::Stream::GetName() was broken. It accessed the small data region
  which wasn't loaded, since BFS::Stream derived from bfs_inode, which
  is a variably-sized structure with the small data region at the end.
  Changed that to a ref-counted, shared member instead.
* Implemented RootFileSystem::GetName().
* Added Directory::GetPath() to get a full path of the directory or an
  entry.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27664 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-21 12:55:41 +00:00
Michael Lotz
84cd8e6902 CID 1251: If the NetStack::Init() fails, return the corresponding error instead
of setting the global net stack to a deleted value.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27479 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-13 14:41:42 +00:00
Axel Dörfler
123786187c * acpi_init() could pass a NULL "rsdp" to acpi_check_rsdt() which would happily
dereference it no matter what. This fixes CID 1282.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27392 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-09 21:30:37 +00:00
Axel Dörfler
ca6210d5e9 * closest_video_mode() now only returns modes with a width less or equal than
the one specified. This should fix the "video mode out of range" message of
  your monitor during boot, in case you had that one. Thanks to Hartmut Reh
  for his help to be able to spot this.
* The mode returned by find_edid_mode(..., true) was never used.
* find_edid_mode() did not return any mode if there were no detailed modes
  available.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27390 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-09 15:18:51 +00:00
Stefano Ceccherini
7d2739a00f argument was missing from the TRACE call
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27368 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-09-08 08:31:57 +00:00
Stephan Aßmus
ec56835f51 Patch by David Powell:
* Implement color palette generation for the boot splash images in the
  generate_boot_screen build tool. Only 4-bit screen support is missing now.
* Adopted images.h with the new results from generate_boot_screen.

This should fix black boot screens for graphics cards that don't support
true color modes for the native resolution. I've tried to find the ticket,
#2177 almost looks like the one, but it looks more like the mode is out
of range if I understand the ticket right.

Thanks a lot, David, and sorry it took so very long to apply your patch!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27223 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-28 16:59:34 +00:00
Stefano Ceccherini
17d39c90b1 code for initializing hpet in the bootloader. Moved around some hpet definitions. HPET initialization is commented out, at the moment
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27131 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-22 08:15:14 +00:00
Axel Dörfler
2a1a5a296f * Turned off debug output of the FileMapDisk stuff.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27091 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-20 20:44:29 +00:00
Axel Dörfler
8b7a165ad3 * We still lose information, so I enlarged this buffer a bit more.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27090 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-20 20:43:03 +00:00
Axel Dörfler
60642f8781 * The EDID info is now only dumped if TRACE_VIDEO is defined (currently the
default).
* Enlarged the serial buffer that is handed over to the kernel to 8192 bytes.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27067 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-19 18:37:30 +00:00
François Revol
2a1458104d Avoid mounting images inside images (inside images (inside images...)).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26996 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-16 22:23:10 +00:00
Michael Lotz
ee8d227588 * Update the size of the safemode settings "file" when concatenating it with
the kernel settings. Settings that were checked in the kernel (like on-screen
  debug output) didn't work anymore, because when handing the settings over to
  the kernel it would have copied only the old size part of the safemode file.
* Add a newline when the kernel and safemode settings are combined. Otherwise
  the first safemode and last kernel setting would get lost if the kernel
  settings file didn't end with a newline.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26992 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-16 18:06:52 +00:00
François Revol
6a5919034d This makes the FileMapDisk code work. zbeos can now locate an haiku.image embedded within another one as BEOS/IMAGE.BE (that's just for testing, it will be used with FAT or ISO9660 later on). It starts to boot the kernel but crashes later, it will need an fmap driver anyway.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26970 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-14 02:10:31 +00:00
Rene Gollent
fb6d782320 Fix some style issues pointed out by Axel.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26940 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-12 12:41:10 +00:00
Rene Gollent
3734bee77d When the boot loader goes to load its settings files, it will now also prepend the "kernel" settings file to the safe mode settings if it exists. This allows settings from kernel/drivers/kernel to be respected early in the boot process as well, which allows us to do things like disable_smp permanently instead of having to pick from the safe mode menu every single boot. Review welcome.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26937 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-11 23:03:36 +00:00
François Revol
0bdaf02821 Start of a file map disk driver for the bootloader.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26911 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-10 01:24:01 +00:00
Axel Dörfler
ae9067b364 * Fixed PXE boot loader build.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26878 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-08 15:23:44 +00:00
Ingo Weinhold
57f2b5a013 * Changed the meaning of the {KERNEL,USER}_STACK_SIZE macros to not
include the guard pages. Adjusted the kernel and boot loader code
  accordingly -- the guard pages size is added/not removed respectively.
  The stack size passed to _kern_spawn_thread() is now the actually usable
  size, and it is no longer possible to specify a size smaller than or
  equal to the guard pages size.
* vm_create_anonymous_area(): Precommit two pages maximum -- a stack with
  only one page usable size obviously doesn't need two pages.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26819 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-05 17:19:46 +00:00
François Revol
d06c88d37d Just go for 256MB for transparent translation at boot, 32MB is not enough anyway yet, the kernel wants 16MB just for the heap.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26768 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-03 19:18:56 +00:00
François Revol
e07a1266f0 Start of boot video mode support. Not finished.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26749 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-03 01:40:57 +00:00
Axel Dörfler
c0275e9556 * Minor cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26734 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-02 16:23:22 +00:00
François Revol
64ea0b9f74 - fix early_map
- iospace should now be initialized correctly, at least the kernel goes much further.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26726 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-02 00:39:31 +00:00
François Revol
7a1fd4cbf8 allocate all kernel page directories at boot, this will simplify later code a lot.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26721 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-08-01 16:01:02 +00:00
François Revol
047a9a81c2 force asm() to grock %% for register names. when not specifying constraints it doesn't understand it anymore. How inconsistent...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26635 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-25 15:52:00 +00:00
François Revol
60b11851d4 partial support for 68901 MFP chip as interrupt controller, untested.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26633 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-25 15:05:52 +00:00
François Revol
36ee9f5c62 - use a physical page for natfeat debug output for now
- add 040 cpu and mmu stuff
- use leftover from the page root table to put interrupt vector table to set VBR to


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26627 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-25 00:25:27 +00:00
François Revol
0ae1957465 - Cleanup
- rewrote early_query() to use the TT0 mapping to remove the page_hole stuff.
- fixed natfeat, using a page set up from the bootloader for now as it wants physical address. At least it's enough to see from the debugger:
load kernel...
kernel entry at 8003711a
Welcome to kernel debugger output!
Haiku revision: 26582
PANIC: unknown cpu_type 68040

Welcome to Kernel Debugging Land...
Running on CPU 0
kdebug>


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26599 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-24 02:59:47 +00:00
François Revol
77cbdee787 Add platform specific kernel args, use them to pass nat_feat info so at least the kernel can print something from the emulator...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26596 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-24 01:10:36 +00:00
François Revol
dcd20e9d16 forgotten -fno-pic makes arch_elf.cpp give the correct pointers to dprintf instead of garbage.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26560 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-22 01:56:33 +00:00
François Revol
9a486099e8 better english, tell about rela relocs.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26559 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-22 01:11:45 +00:00
Stefano Ceccherini
85f2668898 Patch by Dustin Howett (GSOC): Move ACPI probing out of the
bootloader's smp init and into its own unit.
ACPI tables can now generally be found with acpi_find_table(signature).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26538 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-21 07:13:51 +00:00
François Revol
3ef0397bc5 - cleanups
- disable tracing mmu
- make scratch buffer 8k as it's declared as such... that makes things much better indeed :)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26537 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-21 02:54:37 +00:00
François Revol
1e5538f5e8 silently skip PT_INTERP and PT_PHDR types as we can ignore them. This should make real unhandled types more obvious.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26535 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-21 00:31:25 +00:00
François Revol
f83297ba2d cleanup
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26533 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-21 00:29:08 +00:00
Ingo Weinhold
2b3c0783a0 mmlr + bonefish + axeld:
* Fixed build: round_up() has been renamed to key_align().
* Whitespace cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26532 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-21 00:27:44 +00:00
François Revol
1b5a395d01 Cleanup and fix 040 definitions.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26529 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-20 22:08:39 +00:00
François Revol
d14351d2c6 - better not check an entry for validity when we want to fill it
- bitfield definitions of page dirs were reversed... 040 is still wrong though.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26528 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-20 21:16:37 +00:00
François Revol
74c5e8bd10 - move VADDR_TO_* to headers
- move part of mmu handling to mmu-dependant files and extend ops
- implemented 040 mmu init. doing so I spotted a bug in ARAnyM which ignored [ID]TT0. Linux likely doesn't use them but I was too lazy touse temporary page tables. I also noticed bitfields were in wrong order, to be fixed.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26527 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-20 20:31:48 +00:00
François Revol
c6d022fab9 Send panic to natfeat output as well.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26525 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-20 17:04:41 +00:00
Michael Lotz
69dddbdea1 Initial work towards supporting IO APICs. This cannot work for PCI interrupts
though until we use ACPI for proper PCI IRQ routing through the IO APIC.
Therefore the IO APIC code path is not yet enabled and the IO APIC isn't used.
ISA interrupts would work though, as would PCI interrupts if you'd hardcode
them for your specific configuration.
Note that this change also modifies some parts in the bootloader and in the PIC
setup to make local APICs available even on non-SMP systems. This causes APIC
timers to be used instead the normal PIT if it is available (also on non-SMP
configurations).
Also fixes some general errors in SMP and PIC code as well as some code cleanup.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26492 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-18 23:19:41 +00:00
François Revol
a440169494 - fix def
- calculate ram ranges, 1 for st ram, one for fast ram if available. The kernel won't differentiate yet though, we'll have problems with DMA later on...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26480 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-18 01:11:59 +00:00
François Revol
36265c4de7 - print vars of interest to help setup mem map
- shuffle memory map
- set up transparent translations: first 32MB of RAM and last 16MB for IO space.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26478 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-17 23:56:22 +00:00
François Revol
87f9eb4682 Make sure debug output will wrap at 80 cols as the atari VT52 emulation doesn't do it.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26472 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-17 02:38:23 +00:00
François Revol
3d5d990815 machine != platform
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26471 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-17 02:14:01 +00:00
François Revol
566ca582ba Fix 030 code. Seems we need to force gas to understand we want 030 code there, -m68030 didn't help.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26470 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-17 01:40:36 +00:00
François Revol
b092ec2850 030 version of transparent translation init.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26459 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-17 00:03:38 +00:00
Axel Dörfler
03fa417b70 * Removed the home-brewn locking classes in BFS besides the read/write lock
(for now).
* Inode::fSmallDataLock is now a recursive_lock, Journal::fLock is now
  a recursive_lock, too, Journal::fEntriesLock is now a mutex, as is
  BPlusTree::fIteratorLock.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26298 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-07 16:21:00 +00:00
Axel Dörfler
119b7dccf0 Patch by David Powell:
* Turn off text cursor when switching to text mode.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26222 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-02 15:04:10 +00:00
Philippe Houdoin
eb0a51d2f2 Applied patch by David Powell: fix missing and existing bootloader options menu items help texts.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26184 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-30 22:25:19 +00:00
François Revol
ff41eb66a3 Fix build.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26171 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-29 21:08:12 +00:00
François Revol
931a9e2b88 Fix build
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26162 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-29 09:35:50 +00:00
François Revol
42d85ff725 Extend copyright years to 2008 for the boot menu.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26118 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-23 23:50:23 +00:00
François Revol
8df3441d64 - Add 040 mmu support
- Set global mmu ops depending on mmu type.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26116 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-23 23:13:07 +00:00
François Revol
ac00c6372d Add mmu-specific code, WIP.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26115 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-23 22:25:43 +00:00
François Revol
b75f915a2e Some fixed...
Stack grows downward on m68k!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26109 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-23 19:43:12 +00:00
François Revol
a474ef4c38 Seems the atari VT52 emulation doesn't wrap lines, so really send a LF before clearing the 2nd help line.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26108 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-23 19:38:24 +00:00
François Revol
753ef08150 Fix menu item help display: it was used as index in the line buffer when it actually is an index into the whole string, so on 2nd line it was outbound... That was segfaulting some items on Atari.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26107 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-23 19:29:30 +00:00
François Revol
b9f1ded35e revert to a simple counter for system_time, using _hz_200 seems to get it stuck.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26100 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-23 13:35:27 +00:00
François Revol
b45b3d7dcb - move prg ldscript where it belongs.
- added rule for boot .prg, no need to do it by hand :)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26099 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-23 13:32:28 +00:00
François Revol
4b8885d500 Missing include.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26087 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-22 21:35:23 +00:00
François Revol
1654ce1468 - Add some useful TOS variables.
- Spice up cpu and machine detection.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26086 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-22 21:23:36 +00:00
Axel Dörfler
d16ddc579c * The boot loader now passes on its EDID info to the kernel, and that will
be put into a boot_item in frame_buffer_console_init().
* The VESA driver now supports gettings the EDID information as well; this
  is necessary now, since the app_server no longer takes over the mode the
  boot loader had chosen.
* Note, we might want to do this via vm86 instead in the future, and remove
  the kernel part again.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25786 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-03 15:17:59 +00:00
Axel Dörfler
9f16184577 Patch by Jan Klötzke with minor changes by myself:
* Use vm86 mode to call the VESA BIOS to do the actual mode switching by
  providing an ioctl in the vesa driver.
* Fix vm86.h.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25680 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-28 10:48:01 +00:00
Jérôme Duval
d68d2bb1da fix ppc boot build
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25591 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-21 20:48:58 +00:00
Ingo Weinhold
6b202f4e3d * Introduced new header directory headers/private/system which is supposed
to contain headers shared by kernel and userland (mainly libroot).
* Moved quite a few private kernel headers to the new location. Split
  several kernel headers into a shared part and one that is still kernel
  private. Adjusted all affected Jamfiles and source in the standard x86
  build accordingly. The build for other architectures and for test code
  may be broken.
* Quite a bit of userland code still includes private kernel headers.
  Mostly those are <util/*> headers. The ones that aren't strictly
  kernel-only should be moved to some other place (maybe
  headers/private/shared/util).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25486 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-14 03:55:16 +00:00
Stephan Aßmus
370fc8c907 Fix the build.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25397 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-09 15:56:37 +00:00
Jérôme Duval
7c8ddc9795 added B_SAFEMODE_DISABLE_APM
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25334 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-06 22:04:25 +00:00
Marcus Overhagen
ca978b6ed8 make memory map printing independant of other mmu debug output
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25306 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-04 01:20:22 +00:00
Stephan Aßmus
636bff2fd2 Patch by Philippe Saint-Pierre:
* Revised the RLE algorithm used for compressing the boot splash artwork to
  handle uncompressed runs.
* Compress the RGB channels separately for improved efficiency.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24844 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-06 20:10:50 +00:00
Stephan Aßmus
d0fc7c65c6 Patch by Philippe Saint-Pierre:
* Implemented RLE compression for the boot splash images, resulting in
  smaller kernel and boot loader.
* Only the boot loader contains the RLE compressed images, the decompressed
  buffer for the icons is passed to  the kernel via kernel args.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24812 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-05 21:15:43 +00:00
Stephan Aßmus
85f0201086 Rene left tracing turned on in his last commit to this file.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24808 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-05 12:07:10 +00:00
Axel Dörfler
355914a2cd * Enlarged maximum kernel size to 2 MB - this is the code the boot loader's
MMU code reserves for the kernel, and we hit that limit recently with the
  addition of the boot splash code.
* This fixes the boot crash as triggered by Stippi's recent changes to the
  splash image.
* Cleanup (doxygen comments, line length).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24805 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-05 10:16:49 +00:00
Stephan Aßmus
75ab36bd50 Refined again the boot splash artwork. Everything is now centered as a whole.
The dividing line is back although with a little more spacing. Also the icon
spacing is a little increased and I added a subtle outline as well as a little
brighter background for the active icon look. The placement logic is now not
independant of each other anymore, otherwise I couldn't center both images
as a unit. But only the vertical placement is affected.
Comments as always on the commit mailing list... :-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24796 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-04 19:13:00 +00:00
Rene Gollent
0d69c8378f On my system's BIOS / monitor there seems to be a race condition between grabbing the EDID info
and setting the video mode. The result of this is a garbage display every other boot. By 
introducing a small wait before doing the mode set, it works every time. Will see if I can
reduce the spin timer though with some more tests.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24794 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-04 15:12:11 +00:00
Stephan Aßmus
64379118a9 * Revised boot splash artwork, the logo is back in the lower right corner,
the icons are centered.
* The boot loader and kernel now use the placement info that
  generate_boot_screen now generates.
* Made the code that draws the images handle the case where any of the images
  is larger than the frame buffer.
* All drawing functions need to know the image width (analogous for bytes per
  row).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24773 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-03 14:24:10 +00:00
Axel Dörfler
6328832fba * Changed get_boot_item() API: it now also can retrieve the size of the boot
item entry.
* The bios_ia32 video platform code now stores the available VESA modes in
  the new vesa_modes kernel_args field.
* When configuring a VESA mode via settings file, it's no longer needed to
  specify the exact mode - the closest available mode is now used. This should
  help with bug #1962.
* frame_buffer_console_init() now also creates a boot_item for the VESA modes
  in the kernel_args.
* The VESA accelerant now filters the mode list to only contain modes that
  are actually supported.
* Moved non-shared vesa driver data into its own file vesa_private.h.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24675 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-30 11:01:41 +00:00
Axel Dörfler
e146dee317 * Enlarged the default resolution to a width of 1024 (ie. usually 1024x768).
* Refined the way how the default resolution is chosen: it now prefers the
  above with hi/true color over a width of 800 in hi/true color over the
  same order including palette modes.
* If no suitable mode could be found, it now chooses the first mode from the
  list, if any, so that a VESA mode is always used when possible.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24648 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-29 12:58:20 +00:00
Axel Dörfler
652c852666 * The previous code to retrieve the standard video mode did rely on the fact
that they are ordered by size.
* This actually doesn't seem to be the case for all cards. Hence, we now
  search for an appropriate mode only after we've collected all modes.
* Extended find_video_mode() to be able to ignore the height of a video mode;
  that way, we can prefer a horizontal resolution of 800 without having to
  care about the aspect ratio.
* This fixes bug #1975.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24619 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-28 09:23:10 +00:00
Axel Dörfler
cedc3f1eb8 * Rearranged EDID mode find process: in a first pass, we only accept hi- or
true color resolutions, the second pass that also takes those into account
  will only be run if no mode could be found before.
* I hope this will improve Urias boot screen experience.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24609 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-27 13:48:39 +00:00
Axel Dörfler
d0c63aafc2 * Fixed warnings due to the NULL change.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24608 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-27 13:46:52 +00:00
Stephan Aßmus
a529aaf3c6 Fixed 32 bit blit modes for real...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24453 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-18 21:41:02 +00:00
Stephan Aßmus
c2de9613a6 Fixed 32 bit versions of blit*.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24450 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-18 20:45:07 +00:00
Stephan Aßmus
55ef60a5ae * Removed the Copyright image/rendering.
* Fixed the icons image, it was upside down.
* Support the new 24 bit boot screen images in the boot_loader and the kernel.
* Prepare the code for future indexed versions of the boot screen images.
  But the generate_boot_screen tool currently does not generate those.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24449 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-18 20:27:47 +00:00
Stephan Aßmus
5973fcdfb2 Fixed initial rendering of the grayed out icons, depends on frame buffer
depth now. Removed now unused blit16_cropped().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24437 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-18 12:14:43 +00:00
Stephan Aßmus
aa727f6643 patch by Artur Wyszynski (aljen):
* Added the feature of an animated boot screen (icons lighting up at
  different boot stages).
* Added first version of new boot splash images, generated by the new
  hsbg tool. (Also finally contains the "new" Haiku logo.)

changes by myself:
* Added Artur to the contributors list in About System.
* Fixed some left overs in the patch, kept tracing turned off.

TODO:
* Remove the need for hard coding the icon positions. (Maybe generate
  those from hsbg and put them into images.h? Have user provide icon
  spacing/offsets at the command line for hsbg?)
* Rename the stages to something meaningful.
* Use hsbg as a build system tool and generate images.h during build
  from PNGs provided in the artwork folder.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24434 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-18 10:25:53 +00:00
François Revol
4715069375 Setting a Bool when you actually Get a Bool might help...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24211 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-02 23:14:54 +00:00
Stephan Aßmus
37950dd1d2 There is no reason to prefer 16 bpp modes anymore. 32 bpp is just as snappy,
maybe users on older hardware prefer 16 bpp, but that should be fixed by
supporting a vesa config file instead.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24167 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-02-28 12:32:10 +00:00
Ingo Weinhold
db52d16ef8 Applied r23800 to the PXE trampoline code, too.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23883 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-02-05 23:59:17 +00:00
Michael Lotz
3fa048c0a6 When starting the other CPUs from the bootloader we did not wait for any
confirmation after sending off the startup IPIs. We simply moved on and setup
the temporary stack address for the next CPU to be started. With this it was
possible that the trampoline code did not manage to load the address before
we overwrote it. So for configurations with more than two CPUs it was possible
that two CPUs were setup to the same kernel stack which could have caused all
sorts of things - most likely a tripple fault and a reboot. On real hardware
this seems very unlikely but it was easily reproducible with QEMU and -smp >2.
We now use the shared trampoline stack to implement a notification mechanism.
The trampoline code will clear the stack location variable once it has loaded
everything it needs from the trampoline stack. On the other side
smp_boot_other_cpus() will wait for this variable to be cleared after it sent
the startup IPIs so that it knows when it can safely move on and overwrite the
area to boot the next CPU.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23800 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-31 22:15:52 +00:00
François Revol
68b5c8de5d * Accept 16 as fpu cookie, CT060 seems to use it.
* map haiku console colors to atari's palette.
* move the stack up for testing.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23769 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-27 18:11:42 +00:00
François Revol
82d4bfa3d7 * better debug output
* tries for real hw.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23744 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-26 02:02:23 +00:00
Jérôme Duval
82bea1a47b fixed ppc build
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23636 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-19 15:42:19 +00:00
François Revol
c4c5cd4d4a use xhdierror() to map xhdi errors.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23616 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-18 19:10:32 +00:00
François Revol
3bf72d1955 Fixed XHDI, call to XHReadWrite() was commented out... now it can read :)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23615 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-18 19:08:28 +00:00
François Revol
b516effeaa Enumerating drives through XHDI seems to work, at least it seems coherent.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23598 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-18 01:50:36 +00:00
François Revol
588b2cd4bf * Fix natfeat debugprintf, it actually works now.
* XHDI fixes, unfinished.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23593 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-17 22:22:29 +00:00
François Revol
d4d032389d * Add natfeat debugprintf support (dumps to the emu's stdout).
* Add XHDI disk support, unfinished.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23592 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-17 21:37:02 +00:00
François Revol
7d59553ec8 * As we use asm macros we don't need the asm stubs now.
* Put cookies and error stuff to toscalls.c.
* dump all cookies instead of fixed list.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23582 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-17 09:00:27 +00:00
François Revol
b70fb738a6 clip cursor position just in case.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23581 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-17 08:46:46 +00:00
François Revol
084b710863 relax fpu detection, and wow, it goes up to the boot menu !
(but there are lots of remaining stubs, like mmu)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23553 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-16 04:28:06 +00:00
François Revol
7ef900d3ef It's working \o/
Now starts doing stuff in the loader when bootstrapping the .prg from ARAnyM.
For now it just dumps the cookies.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23552 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-16 04:12:06 +00:00
François Revol
267428a36a * \r\n on Bconputs()
* natfeat support code


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23550 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-16 03:32:40 +00:00
François Revol
dba557e4e7 Move trapn and calln as last args, as though they are named they are counted with other args numbers.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23537 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-15 16:31:04 +00:00
François Revol
e79fe38f8e Added needed toscallWLWWWL().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23536 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-15 16:18:27 +00:00
François Revol
632082eb7b Use asm macros to call TOS. Missing ones, but existing ones compile.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23535 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-15 16:12:39 +00:00
François Revol
c4bcf3f92c * Fixes
* More test code
* it actually runs now, till _start. 
However, calling TOS from C is broken: we use 32 bit param alignment on funcs, but TOS expects 16 bit... need to use asm macros instead of funcs.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23531 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-15 15:02:26 +00:00
François Revol
aa84dea3fd * Comments on how mmu will be set up in the bootloader
* Add aranym native feature helper funcs.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23526 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-14 23:14:26 +00:00
François Revol
005ff05292 * checksum should be ok now...
* also added fake FAT descriptors to avoid crashing TOS, but it doesn't boot yet as floppy.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23525 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-14 21:59:44 +00:00
François Revol
b79ea67539 * Fixes... it now builds and theorically should work, let's see...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23489 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-13 12:40:49 +00:00
François Revol
2504405008 * jmp is x86...
* make the checksumer build under linux and fix it.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23484 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-13 11:57:11 +00:00
François Revol
551d3012d8 * Moved checksum to where it should be.
* Added tool to calculate the checksum (TOS wants a real one to 1234, not aa55).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23483 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-13 10:53:35 +00:00
François Revol
4982c437ad Forgot a param.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23481 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-13 09:38:56 +00:00
François Revol
286edb37ca 1st try at floppy bootsector.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23480 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-13 09:31:53 +00:00
François Revol
2ac7892801 Fake system_time() for now.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23477 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-13 01:57:31 +00:00
François Revol
c302a6742b Missed this file to the club.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23476 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-13 01:54:11 +00:00
François Revol
86047718fb * shell.S must be first
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23473 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-13 01:45:45 +00:00
François Revol
110abe94eb Make it compile.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23472 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-13 01:41:25 +00:00
François Revol
b1e9164f9c Entry point for .prg / bootfloppy for zbeos.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23471 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-13 01:38:06 +00:00
François Revol
30b14f3c01 More #if 0
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23470 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-13 01:15:46 +00:00
François Revol
6d45e991b5 #if out x86 stuff to try to build zbeos
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23469 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-13 01:12:40 +00:00
François Revol
246ab5c53f * Add atari memory map defs.
* Add osheader defs.
* Check for FPU.
* note on prg vs bootsector.
* mmu stuff.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23468 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-13 01:07:20 +00:00
François Revol
89f97fe903 We shouldn't trust the TOS, but for now use the cookie jar to find the cpu type and if it has lpstop.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23461 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-12 23:56:47 +00:00
François Revol
5694f863c7 better finish stuff before committing.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23454 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-12 23:16:01 +00:00
François Revol
dcf911ef8f * Add function to access the Cookie Jar.
* remove unneeded stuff.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23453 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-12 23:11:03 +00:00
François Revol
3460f75fb9 Comment out x86 asm
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23452 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-12 22:54:40 +00:00
François Revol
c757463c81 lpstop is 060 only so gas complains. comment for now.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23451 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-12 22:51:58 +00:00
François Revol
7ef3cafe20 CPU init stuff. TODO: check for LPSTOP (040), and cpu model (must be >= 020).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23449 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-12 22:12:20 +00:00
François Revol
7f27c6c3c8 * x86 mmu init code, to be changed.
* remove some unneeded stuff in start.
* we just quit the boot prg instead of rebooting (should try Puntaes also)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23440 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-12 16:04:44 +00:00
François Revol
0ade5bd84b Start code I'll work on tomorrow^Wtoday.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23381 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-11 01:48:19 +00:00
François Revol
15297f84d8 Needed header.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23380 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-11 01:46:05 +00:00
François Revol
89ae49c791 Buildable boot drive support, not sure it works.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23379 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-11 01:41:37 +00:00
François Revol
2e99fa6ed4 I need Mediach()
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23378 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-11 01:33:32 +00:00
François Revol
41eebe0564 toscalls.h after other headers.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23375 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-11 01:13:37 +00:00
François Revol
19c9c08e67 Seems the ppc way of reusing arch_string.o doesn't work for me.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23374 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-11 01:13:02 +00:00
François Revol
1906acb2cd More block device stuff.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23372 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-11 00:58:10 +00:00
Ingo Weinhold
34b3b26b3b Merged branch haiku/branches/developer/bonefish/optimization revision
23139 into trunk, with roughly the following changes (for details svn
log the branch):
* The int 99 syscall handler is now fully in assembly.
* Added a sysenter/sysexit handler and use it on Pentiums that support
  it (via commpage).
* Got rid of i386_handle_trap(). A bit of functionality was moved into
  the assembly handler which now uses a jump table to call C functions
  handling the respective interrupt.
* Some optimizations to get user debugger support code out of the
  interrupt handling path.
* Introduced a thread::flags fields which allows to skip handling of
  rare events (signals, user debug enabling/disabling) on the
  common interrupt handling path.
* Got rid of the explicit iframe stack. The iframes can still be
  retrieved by iterating through the stack frames.
* Made the commpage an architecture independent feature. It's used for
  the real time data stuff (instead of creating a separate area).
* The x86 CPU modules can now provide processor optimized versions for
  common functions (currently memcpy() only). They are used in the
  kernel and are provided to the userland via commpage entries.
* Introduced build system feature allowing easy use of C structure
  member offsets in assembly code.

Changes after merging:
* Fixed merge conflict in src/system/kernel/arch/x86/arch_debug.cpp
  (caused by refactoring and introduction of "call" debugger command).



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23370 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-11 00:36:44 +00:00
François Revol
5a69bb2730 Start of BIOS drive support.
Hmmm how will I get the size of physical drives ???


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23369 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-11 00:22:09 +00:00
François Revol
55aba426ed comments on bios drives.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23368 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-11 00:21:48 +00:00
François Revol
ce88dfd27f BlockHandle goes to devices.cpp
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23367 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-10 23:26:04 +00:00
François Revol
6f9e265157 * Get rid of owner, BIOS devices don't need open/close.
* split Handle class to CharHandle and BlockHandle.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23366 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-10 23:16:55 +00:00
François Revol
78843897fc * Comment unneeded files.
* I *do* want PIC code for m68k!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23365 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-10 22:25:10 +00:00
François Revol
94644dfbbc No images yet.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23364 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-10 22:18:38 +00:00
François Revol
81c66ced7d Video mode menu and support stubs.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23363 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-10 22:16:40 +00:00
François Revol
bbe7f995af hey it's only 23:00!
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23362 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-10 22:08:12 +00:00
François Revol
93879b9abf Fix debug output code.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23361 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-10 22:02:03 +00:00
François Revol
4f9d8b0eb9 Fix warning.
helf: if you are bored you can just help coding :P


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23360 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-10 21:43:42 +00:00
François Revol
d86cef8673 shouldn't access FILE as it's not declared.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23359 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-10 21:41:55 +00:00
François Revol
a03f522e5a Fixes.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23358 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-10 21:30:31 +00:00
François Revol
13b1977cd2 Missing include.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23357 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-10 21:27:33 +00:00
François Revol
9d2f3035cd Handle console input.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23355 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-10 21:16:22 +00:00
François Revol
9bc2823955 * Note for stage1
* Fix call to Bconin()
add correct color handling.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23354 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-10 21:15:46 +00:00
François Revol
eb53cd839c generic handle class for the console.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23353 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-10 21:08:08 +00:00
François Revol
c2b8af8b2b Add a console implementation.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23351 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-10 20:54:55 +00:00
François Revol
c99755c092 Note on PIC limitations
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23342 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-10 14:54:20 +00:00
François Revol
9ecdca6ec1 ild script to build a .prg (only works with PC REL code!)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23341 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-10 14:50:03 +00:00
François Revol
cd6103fab1 Some more test code... it runs now as .PRG!
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23340 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-10 14:49:13 +00:00
François Revol
17b30c87ea Notes on prg file format.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23335 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-09 23:41:15 +00:00
François Revol
943cbec3f3 Note on adding stage1 to an image.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23228 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-03 00:44:41 +00:00
François Revol
c9bfddbe98 Fixes.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23227 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-03 00:26:30 +00:00
François Revol
005fb7c998 Allow using defines from .S files
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23226 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-03 00:18:14 +00:00
François Revol
fa9d72b1dd Test code for stage1...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23225 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-03 00:02:54 +00:00
François Revol
5c31e5fa5b Note on compiling stage1
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23224 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-02 23:43:17 +00:00
François Revol
9776e38eb1 smp ? me no know about smp here...
This will be the stage 1 loader...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23222 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-02 22:05:28 +00:00
Michael Lotz
1df628fe2f * Two more uses for the pause instruction I apparently forgot to commit
* Minor style cleanup in the conversion factor calculation

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23217 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-02 02:10:55 +00:00
Michael Lotz
e812c77e4a * Delay initializing SMP stuff like APICs and kstacks of non-boot CPUs until after the boot menu
* When disabling SMP initialization of those parts is avoided so it works more cleanly
* Moved smp_find_mp_config() into smp_init() and moved MPS specific parts into smp_do_mp_config()
* Removed the global floating struct, if found it is now passed into smp_do_mp_config() like it is done for ACPI
* Made the file a bit more C++, applied coding style to some variable names and unified/improved some of the debug output

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23216 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-02 02:07:23 +00:00
François Revol
949958937c stage2_args.h uses #include <platform_stage2_args.h>, had to use UsePrivateHeaders.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23214 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-02 00:38:11 +00:00
François Revol
f59395d5ac Official names
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23213 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-02 00:02:04 +00:00
François Revol
4568301872 Fixes.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23212 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-01 23:57:42 +00:00
François Revol
fa806b5473 This should be enough for keyboard handling.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23211 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-01 23:25:35 +00:00
François Revol
3e4c56176d Hopefully enough relevant TOS hooks.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23210 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-01 22:52:03 +00:00
François Revol
8c27b8623d TOS calls return a negative code on error.
Map those to native errors.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23208 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-01 20:41:19 +00:00
François Revol
a24251b49b A single header should be enough for all TOS calls.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23206 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-01 19:56:53 +00:00
François Revol
6152d8f58b Some atari boot code
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23205 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-01 18:28:26 +00:00
Axel Dörfler
2157e06c63 * Moved code to remove the parent to the Partition destructor - this should fix
the problem that the parent partition was still referenced in some cases.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23172 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-12-27 18:20:33 +00:00
Axel Dörfler
96689a5cb8 * If DEBUG_ALLOCATIONS is defined, freed memory is now filled with 0xcc,
and it's checked if a chunk is already in the free list, and if any chunk
  has an invalid size. It's defined for now.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23171 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-12-27 16:56:28 +00:00
Marcus Overhagen
fc205e9717 added more debug output
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23167 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-12-26 22:35:26 +00:00
Marcus Overhagen
65751aad16 Increased keypress detection time to 750ms. The old 50ms value never worked for me.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23166 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-12-26 22:30:41 +00:00
Marcus Overhagen
882123356b Added more debugging code. The partition code appears to be using objects that have been destroyed.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23165 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-12-26 22:26:08 +00:00
Marcus Overhagen
37502d0f9f added more debug output
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23164 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-12-26 22:24:40 +00:00
Michael Lotz
b938008fe1 * Update the PAUSE macro from "rep; nop;" to "pause;" which is the same bytecode wise but more readable
* Insert the pause op in all spin wait loops (as macro for platform independent sources or as inline assembly on x86 only files)
* Fix some warnings with tracing on and extended some output
* Minor cleanups here and there

The pause instruction is implemented since P4 systems but is fully backwards compatible (it's a no-op prior to P4). According to Intel specs it reduces performance penalties as memory order violations can be avoided. Also power consumption is reduced. Most of all this will be beneficial to hyper-threading systems as it frees resources to the other logical processor when one logical processor executes a fast spinning loop.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23141 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-12-18 19:46:26 +00:00
Michael Lotz
fd0986401e Ignore disabled local APICs.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23118 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-12-12 18:39:41 +00:00
Michael Lotz
d5f56f7d69 Remove 2 CPU limit from ACPI MP detection in the bootloader.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23116 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-12-11 21:57:02 +00:00
Axel Dörfler
9b13056ba2 * Print the resolution the boot loader has chosen.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23114 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-12-11 21:14:26 +00:00
Michael Lotz
f6c512f8e3 Avoid adding more CPUs than the kernel args can hold (and therefore overwriting other kernel args stuff). Doesn't fix my problems though as the current maximum is 4 CPUs.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23105 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-12-10 20:37:20 +00:00
Michael Lotz
d4cecb1787 Removed wrong and now unnecessary condition to add safemode option.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23102 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-12-09 22:21:09 +00:00
Michael Lotz
f108445b5e * Initial support for ACPI tables to detect multiprocessor configurations
* ACPI is evaluated first as it also handles things like multi core or hyper threading setups
* Removed other (disabled) hyper threading code per the notes in the corresponding ToDo
* Limit the detected CPU count to 2 for now as I wasn't able to get it working in either emulation nor real hardware with more than 2 CPUs
* Added a reserved byte to the mp_config_table struct, it worked only by luck as the compiler did padding there to get to the same size

I can now boot my Core 2 Quad with two out of four processors active :-)

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23100 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-12-09 21:01:55 +00:00
Axel Dörfler
5845b6ecc5 * The boot loader now remembers the bytes per row as told by the graphics card, and
passes that information on to the kernel. This should fix wrong bytes per row with
  certain resolutions and graphics cards.
* The boot loader now recognizes 15 bit modes that are advertised as 16 bit modes.
  This should fix wrong colors in 16 bit modes on some cards.
* Reenabled setting MTRR for VESA mode - don't remember why I disabled it, but it
  works fine on my test machines.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23006 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-11-27 16:33:19 +00:00
Axel Dörfler
3ae3b04bce * The boot loader (bios_ia32 only) now duplicates everything that goes to the
serial output, and puts it into the new kernel_args::debug_output field.
* syslog_init() will now check if there is anything in kernel_args::debug_output
  and will put that into the syslog buffer.
* dump_block() now also prints an offset.
* Fixed warning in mmu.cpp.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23003 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-11-27 12:59:34 +00:00
François Revol
7986b7e36d Make use of the kernel's elf loader code instead of duplicating it.
Add placeholder for m68k.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22748 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-27 12:01:52 +00:00
Axel Dörfler
13a81299f1 Cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22516 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-12 15:56:08 +00:00
Jérôme Duval
1ea618c556 added BOOT_MODE define instead of adding dprintf_no_syslog()
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22478 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-07 19:52:24 +00:00
Jérôme Duval
94302e2f82 dprintf_no_syslog is needed for openfirmware platform
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22464 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-06 18:40:32 +00:00
Ingo Weinhold
6748659272 Added an identify_file_system() hook to the FS modules. The boot loader
does no longer give partitioning systems precedence over file systems.
The one with the greater identification priority wins. ATM, if a file
system wins, we still mount the first file system that recognized the
partition at all, though.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22446 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-04 23:16:31 +00:00
Ingo Weinhold
0e69ce7702 Define _BOOT_MODE.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22427 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-03 22:10:06 +00:00
Axel Dörfler
4421183286 * Changed Ld rule to allow adding resource files.
* Changed ResAttr rule to allow not deleting the file before writing the
  attributes.
* Added application signatures for the runtime_loader and zbeos, just so that
  they may have an icon, too (hint, hint) :-)
* As a side effect, this also let's FileTypes handle these two as apps (even
  though they aren't), so that I can close bug #606.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22412 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-02 15:22:13 +00:00
Jérôme Duval
ec9f5ea799 fixed ppc build. It was broken since r21611. Obviously it's not tested.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21626 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-07-16 19:12:37 +00:00
Ingo Weinhold
9e8dc2a9bb [Sorry, couldn't split this one up any further.]
* Images preloaded by the boot loader had to be modules to be of any use
  to the kernel. Extended the mechanism so that any images not accepted
  by the module code would later be tried to be added as drivers by the
  devfs. This is a little hacky ATM, since the devfs manages the drivers
  using a hash map keyed by the drivers inode ID, which those drivers
  obviously don't have.
* The devfs emulates read_pages() using read(), if the device driver
  doesn't implement the former (all old-style drivers), thus making it
  possible to BFS, which uses the file cache which in turn requires
  read_pages(), on the device. write_pages() emulation is still missing.
* Replaced the kernel_args::boot_disk structure by a KMessage, which can
  more flexibly be extended and deals more gracefully with
  arbitrarily-size data. The disk_identifier structure still exists,
  though. It is added as message field in cases where needed (non net
  boot). Moved the boot_drive_number field of the bios_ia32 platform
  specific args into the message.
* Made the stage 1 PXE boot loader superfluous. Moved the relevant
  initialization code into the stage 2 loader, which can now be loaded
  directly via PXE.
* The PXE boot loader does now download a boot tgz archive via TFTP. It
  does no longer use the RemoteDisk protocol (it could actually be
  removed from the boot loader). It also parses the DHCP options in the
  DHCPACK packet provided by PXE and extracts the root path to be
  mounted by the kernel.
* Reorganized the boot volume search in the kernel (vfs_boot.cpp) and
  added support for network boot. In this case the net stack is
  initialized and the network interface the boot loader used is brought
  up and configured. Since NBD and RemoteDisk are our only options for
  net boot (and those aren't really configurable dynamically) ATM, the
  the boot device is found automatically by the disk device manager.

Booting via PXE does work to some degree now. The most grievous problem
is that loading certain drivers or kernel modules (or related activity)
causes a reboot (likely a triple fault, though one wonders where our
double fault handler is on vacation). Namely the keyboard and mouse input
server add-ons need to be deactivated as well as the media server.
A smaller problem is the net server, which apparently tries to
(re-)configure the network interface we're using to boot, which
obviously doesn't work out that well. So, if all this stuff is disabled
Haiku does fully boot, when using the RemoteDisk protocol (not being
able to use keyboard or mouse doesn't make this a particular fascinating
experience, though ;-)). I had no luck with NBD -- it seemed to have
protocol problems with the servers I tried.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21611 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-07-15 02:10:15 +00:00
Ingo Weinhold
018cf36396 Clear out/initialize IDT and GDT using their virtual addresses after
they have been mapped. The previous method relied on their physical
pages living in the identity mapped region, which they wouldn't, when
the boot loader allocated enough memory before.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21610 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-07-15 00:54:16 +00:00
Ingo Weinhold
bf8e5ecab7 * Reduced the region allocated for the uncompressed data to 16 MB. With
32 MB the kernel's VM initialization code would run into trouble.
  Accessing freshly mapped memory in the generic page mapper would
  result in a page fault. To be investigated.
* Apparently in the boot loader the file systems are responsible for
  resolving symbolic links (instead of the VFS). We do that now.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21608 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-07-15 00:45:10 +00:00
Ingo Weinhold
dcb3c6c321 * Added support for symlinks.
* Prepared for other uses than just boot floppies (/CDs). We first try to
  inflate the contents of the given device at offset 0 before using the
  floppy disk offset. This will make it easy to mount tgz files loaded via
  network or built into the boot loader itself.
* Increased the max possible size of inflated data to 32 MB.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21583 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-07-07 01:49:02 +00:00
Ingo Weinhold
4dac6ac8de Allow building the BootLoaderTest (and zlib) for BeOS.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21581 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-07-07 01:28:04 +00:00
Axel Dörfler
eef8417e27 * Added (non-working) EFI module to the boot loader and its test application.
* Fixed a warning in efi_gpt.cpp.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21532 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-30 15:31:01 +00:00
Axel Dörfler
8ba7bc695a * Calms down a superfluous GCC 2 warning.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21468 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-20 00:51:20 +00:00
Axel Dörfler
b2ed0e7acf Implemented "fail_safe_video_mode" boot option; if you're using it, the app_server
will not load any graphics driver (other than VESA).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21310 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-06-03 20:20:19 +00:00