Commit Graph

4857 Commits

Author SHA1 Message Date
Philippe Houdoin
685645f9bc USER == ! _KERNEL_MODE, right (!?).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13845 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-07-28 23:25:41 +00:00
Axel Dörfler
da1f176a9a You can no longer write to O_RDONLY streams, and you can no longer read from O_WRONLY streams (thanks to Ingo for this hint).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13800 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-07-22 06:54:19 +00:00
Ingo Weinhold
7f53c2cc96 We now make sure, that images always have absolute paths, otherwise
their path could be invalid in other contexts (e.g. the debug server might
be unabled to find them). This seems to be what BeOS does, too.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13796 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-07-21 23:51:02 +00:00
Ingo Weinhold
d08379a80b * Now we deal with all x86 exceptions, i.e. we no longer panic() when a
user application performs a division by zero or causes a general
  protection fault. For some exceptions (e.g. machine check) I wasn't
  quite sure whether they can be caused by user apps at all, so we panic()
  in those cases. Wouldn't harm, if someone more knowledgable would check
  this, though.
* Removed the unused fault handling stuff, respectively moved the little
  that was used into x86/arch_int.c.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13795 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-07-21 23:47:08 +00:00
Axel Dörfler
f4a8c33b5c Fixed a bug in put_death_stack_and_reschedule(): release_sem_etc() was called
with the thread lock held, which might have caused a panic later on, if there
was another thread waiting for the death stack semaphore.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13769 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-07-19 18:10:12 +00:00
Axel Dörfler
230a037ed4 Fixed a bad bug in vm_copy_on_write_area(): the area's cache offset was not taken
into account when remapping the pages read-only; it could have overwritten valid
page mappings this way. This was also the reason for the Terminal to crash - it
does now work as it should, although some keys don't work (like tab completion)).
vm_copy_area() no longer always sets B_KERNEL_WRITE_AREA if no kernel protection
was specified, but mirrors the userland protection (for example, the x86 MMU is
not able to have a page writable in kernel but not in userland). This caused
some areas to be read/write when read-only would have been enough.
vm_copy_area() now panics when vm_copy_on_write_area() fails - that's of course
no real solution, but it's bettern than letting it silently fail.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13768 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-07-19 18:00:31 +00:00
Axel Dörfler
a00d33c094 No longer reboots when a shutdown was requested - this gives the registrar
the opportunity to show the "System is now ready to reboot" alert.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13714 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-07-17 13:28:11 +00:00
Axel Dörfler
09105be0f8 Now uses the TO_PAGE_SIZE() macro already defined to round the debug area to a page size multiple.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13713 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-07-17 12:54:41 +00:00
Ingo Weinhold
aeaa4a21a4 It's considered rude to try killing the kernel team.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13705 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-07-16 23:38:07 +00:00
Ingo Weinhold
28e0d4cd19 The runtime loader now creates a debug area through which other teams can
access a team's internal loader data.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13697 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-07-16 21:07:17 +00:00
Ingo Weinhold
d3bdf71ea6 The debug nub port of a debugged team is owned by the debugger. Hence we
need to transfer the ownership, when handing over the team to another
debugger.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13696 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-07-16 21:04:22 +00:00
Ingo Weinhold
7f9c673981 * Introduced a new debugger message B_DEBUGGER_MESSAGE_HANDED_OVER, which
is sent to a debugger when the debugged team has been successfully handed
  over to another debugger.
* Fixed handling of B_DEBUG_MESSAGE_PREPARE_HANDOVER. We don't send a reply.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13683 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-07-15 12:18:33 +00:00
Axel Dörfler
31a5ff5d8e We now have a (private) writev_port_etc() call. This could be used to avoid
allocating a buffer and copying your data into it, when you have data to
send in several chunks (for example, this could be used by BMessage, as
suggested by Ingo Weinhold).
Code is untested, but should work.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13667 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-07-13 23:55:15 +00:00
Axel Dörfler
d7013609a8 Fixed a big memory leak: _user_writev() and _user_readv() allocated
a new iovec array, but only freed them on (early) error.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13666 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-07-13 23:43:05 +00:00
Axel Dörfler
c9955bf00a Added new but empty function file_cache_invalidate_file_map().
This is needed in case the on-disk representation of a file changes (due to reorganization/defragmentation).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13660 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-07-13 16:33:05 +00:00
Axel Dörfler
54476a21b5 file_create() now also supports FD relative path specifications.
This was the cause for some apps to put their settings files to the current
directory, and also that Tracker did not find some icons (from the icons
it installed in the MIME database).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13645 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-07-12 16:33:10 +00:00
Jérôme Duval
b1c123994c Updated to tzcode2005j.tar.gz
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13561 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-07-08 23:49:29 +00:00
Ingo Weinhold
a406236dc2 New error codes:
- B_SHUTDOWN_CANCELLED: The shutdown process was cancelled (most likely by
  the user).
- B_SHUTTING_DOWN: An operation cannot be performed, since the system is
  shutting down (e.g. BApplication creation).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13413 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-07-03 16:50:29 +00:00
Axel Dörfler
0160c6fbda Fixed minor drawing problem of the on-screen KDL: in NO_CLEAN mode, the first two
lines would be left untouched instead of cleared before use.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13375 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-07-01 06:42:07 +00:00
Axel Dörfler
b7a96f02fd Now fills in system_info::cpu_infos[] (ie. CPU activity) by looking at the active
time of the idle thread. IOW Pulse now works :-)
Renamed the idle thread/stack to start with 1 instead of 0 (first idle thread will
be called "idle thread 1").
Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13373 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-07-01 00:31:38 +00:00
Axel Dörfler
e970b839a0 Disabled B_USER_CLONEABLE_AREA for now - maybe this should be handled via kernel settings later.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13372 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-30 23:14:13 +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
Ingo Weinhold
07b6630b86 Made reading and writing memory overflow safe.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13306 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-28 11:19:30 +00:00
Ingo Weinhold
047ab3f955 Be on the safe side when checking the size of data to be written to an area (overflow).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13299 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-28 00:35:28 +00:00
Jérôme Duval
9d69de4c3d inline functions aren't inlined when we have -g / -O0
we filter them for this directory
hopefully this fixes Darkwyrm's build problem


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13152 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-15 15:02:06 +00:00
Axel Dörfler
e7281ecba6 Fixed a bug in next_argument(): it could read after the terminating
null byte, and add junk as arguments. Thanks to Korli for testing.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13134 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-14 23:40:43 +00:00
Axel Dörfler
43ed6aa0db The "shebang" handler is supposed to parse arguments, too - we now do that.
Also, when the line is too long, E2BIG is returned.
Thanks to Korli who pointed me to this: http://homepages.cwi.nl/~aeb/std/shebang/


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13114 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-14 12:39:06 +00:00
Axel Dörfler
be22452f3b Apparently, both load_image() and exec*() support running scripts. We do that
now as well.
Also, both functions will now test if the executable exists and is valid; that
way, load_image()/exec*() can catch many errors without having to create a new
team (or erase the current one - an exec*("my invalid app") might now return
with an error).
The runtime linker now exports a function to test executables that is aware
of the search paths, and will also check user permissions upfront.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13113 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-14 11:23:29 +00:00
Axel Dörfler
229b2db028 cache_node_launched() is now called later, so that the environment will
be the same for both ways (via load_image() and exec*()).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13112 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-14 11:15:05 +00:00
Jérôme Duval
adf47eb76d we mimic R5 : getgroups return 0
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13108 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-14 00:08:21 +00:00
Axel Dörfler
b84688be5f Added a basic low memory handler service.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13090 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-13 13:03:54 +00:00
Axel Dörfler
b1a248305b Minor cleanup, changed return type of page count functions (from addr_t to size_t,
as that's more correct).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13089 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-13 13:02:24 +00:00
Axel Dörfler
a69e0ac327 The boot item list was not initialized; this was no problem, though, as
no items can be removed from that list - nevertheless, it's wrong.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13088 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-13 13:01:13 +00:00
Axel Dörfler
ff9fb62471 Some cleanup (made static variables static).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13087 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-13 12:59:11 +00:00
Axel Dörfler
183dee22cb Unlike R5, receive_data() could return an error code under Haiku - this
can now only happen if the thread is killed.
_user_receive_data() will now longer pass B_CAN_INTERRUPT to receive_data(),
but B_KILL_CAN_INTERRUPT - this should fix the problem Stefano experienced
with this function, even if I couldn't reproduce it.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13075 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-12 11:14:37 +00:00
Axel Dörfler
2a1492f0fa Moved the definition of the BlockAddressPool class into block_allocator.cpp, as it's
not used outside of it.
Added tracking for the last transaction in the block cache; that way it can test
if the last transaction has been closed before opening a new one.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13022 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-09 02:14:28 +00:00
Axel Dörfler
584d673049 Fixed various bugs in the block allocator: new free ranges were never added
to the free list, so a new range was started for every allocation (!).
block_range::Free() did not update the chunk's used_mask correctly.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13021 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-09 02:09:06 +00:00
Axel Dörfler
78d6683c68 Changed the "help" command to be able to only show all commands starting with a certain string.
This helps to reduce the flood of commands for those blue screen "users" :-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13018 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-08 17:16:40 +00:00
Axel Dörfler
68c1f3d2eb Disabled code that could find newly installed drivers - it's not likely we
will do that anytime soon, and it should be done by using node monitoring,
anyway.
devfs_open_dir() now makes sure the directory contents are up-to-date - this
should fix the app_server device lookup.
Disabled debug output in the read/write hooks to improve its usage.
Renamed part_map to partition.
Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12935 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-03 00:51:17 +00:00
Axel Dörfler
80f6ef8bd8 Moved load_driver() and load_driver_symbols() over to devfs.
Added new devfs_add_driver() function that the device manager will now call
to register new drivers.
Devfs will now keep a list of known drivers and remembers, if they have
been initialized already - a driver can now safely scan the directory it's
in while being scanned itself without having its hooks called twice.
Devfs is now using a recursive lock instead of a mutex (that's not really
a requirement right now, but would allow us to keep the fs lock during
scanning).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12933 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-02 18:32:21 +00:00
Axel Dörfler
19b77242ac Some minor cleanup: removed unneeded includes, updated introducing comment.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12932 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-02 18:23:26 +00:00
Michael Lotz
128e8d23fa Add more missing float math (modf and modff).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12923 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-01 20:03:12 +00:00
Axel Dörfler
317121e102 Work in progress of the new block allocator for the block cache. It works, but
currently needs even more memory than the old one 8-)
Not cleaned up at all.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12921 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-01 16:39:38 +00:00
Axel Dörfler
12e1714d54 Fixed stupid bug in copy_environ_to_heap_if_needed(): it copied the
environment, but it didn't set the "environ" to the new array, and
thus throwing away the copy again.
GCC no longer crashes because of this, and runs through without help :)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12914 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-31 01:59:01 +00:00
Axel Dörfler
dde78a340e Fixed off by one error: could call memcpy() with '0' as size argument.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12910 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-31 01:17:25 +00:00
Axel Dörfler
d1407b9d2b The "PANIC" line will now also appear on the blue screen, not only over serial.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12909 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-30 23:09:36 +00:00
Axel Dörfler
f4e5c34143 cache_abort_transaction() freed the wrong block, and thus causing a file system
corruption even better than during its absence.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12903 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-30 16:54:08 +00:00
Axel Dörfler
ac5af8f1b4 The maximum allocation size we've configured our allocator is 1 GB. Instead
of running into an assert() later on, we now back out early in this case.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12902 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-30 14:10:06 +00:00
Axel Dörfler
c88974d026 The app_server now updates the kernel's blue screen frame buffer on mode changes
(only the accelerant HW interface does this for now).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12897 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-29 20:23:00 +00:00
Axel Dörfler
f33c8020e2 Removed debug/console.c, we no longer need it. frame_buffer_console_init() is now
called by debug_init_post_vm().
Since the availability of a blue screen specific getchar() is static anyway, there
is no need for the sBlueScreenGetChar variable (only the message "only serial input
available" gets lost, but since that is platform specific anyway...).
Hello blue screen! We now have an on-screen KDL, to be enabled by the kernel
setting "bluescreen", just like on BeOS.
The blue screen does not yet support any cursor actions or backspace, though (need
to grab some stuff from our console driver).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12896 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-29 16:23:00 +00:00
Axel Dörfler
395c6c62f2 Renamed arch/dbg_console.h to arch/debug_console.h.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12893 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-29 14:34:03 +00:00
Axel Dörfler
45c54054f7 No longer needs to include <arch/dbg_console.h>
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12892 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-29 13:33:30 +00:00
Axel Dörfler
2b8d85854d Renamed arch_dbg_console.c to arch_debug_console.c, dbg_console.h to debug_console.h.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12891 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-29 13:31:15 +00:00
Axel Dörfler
9a63135f7c Cleanup of the debug stuff, prepared for blue screen debugging.
kernel_debugger() didn't do enough before; panic() did all the work - but
since the former is a public function as well, I moved all the functionality
to it. Also fixed a possible buffer overrun in panic().
Renamed dbg_* to debug_*.
"serial_debug_port" setting did not ignore negative values.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12889 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-29 13:01:38 +00:00
Axel Dörfler
24b2daf33d Slightly improved debug output.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12888 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-29 12:53:56 +00:00
Axel Dörfler
1b22c05ae8 Fixed warning I introduced before.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12887 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-29 11:33:45 +00:00
Axel Dörfler
2e95dad4b9 strerror() no longer reports "Unknown Application Error" for positive values,
instead it now says "No Error".


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12885 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-29 10:51:47 +00:00
Axel Dörfler
9620c1d716 rename_thread() was broken for the current thread: updating the name is
hardly atomic, so we need to grab the thread lock after all.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12877 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-29 00:29:45 +00:00
Axel Dörfler
d9152a2dfe We now accept NULL as a thread name (in which case it will get a default name).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12875 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-29 00:20:18 +00:00
Axel Dörfler
1d2f53e0ba Disabled debug output.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12874 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-29 00:17:02 +00:00
Axel Dörfler
b3ef4fb41a Oops, forgot to implement cache_abort_transaction(); every failing transaction
could have destroyed the BFS integrity... (just happened to me, that's how I
noticed it)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12867 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-28 15:11:18 +00:00
Axel Dörfler
9f8298d908 Added empty functions for _k{get|set}_cpu_state_().
That makes Pulse to build and even run (but with no visible output) on Haiku.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12865 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-28 13:57:02 +00:00
Axel Dörfler
140e3bb026 Instead of the ugly and unnecessary cookie union, we now have a cookie for
opened devices, and one for opened directories.
Also adds and removes those directory cookies correctly now.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12855 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-27 00:43:01 +00:00
Axel Dörfler
b716c3307f Removing the cookie must be locked as well, of course.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12854 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-27 00:41:00 +00:00
Axel Dörfler
0f04de87a7 The directory cookies of open directories are now correctly maintained and
removed when no longer used (the same bug is still present in devfs, btw,
and can potentially cause crashes).
Cleanup of the cookie code, it's now using util/list.h.
Now issues B_STAT_CHANGED notifications when directory entries changed.
rootfs_rename() was completely broken for "inter-directory" movements.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12850 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-26 19:56:41 +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
028aae6c9c Another improvement of the debug code - it seems to has a different cause than I thought.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12839 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-26 12:02:29 +00:00
Axel Dörfler
b82b759368 Additional debug stuff in order to have the power to fix an annoying bug
(mostly happens in the kernel debugger). Not tested, though.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12835 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-26 10:39:12 +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
1333009e1c {rootfs|devfs}_read_link() did not report the correct link size on
success (they just kept the passed in buffer size unchanged).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12821 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-26 02:04:00 +00:00
Axel Dörfler
a460a8f084 More or less rewrote the heap wall stuff:
- it's now much cleaner than before
- it now actually works in combination with realloc() (the fix from before didn't work)
- got rid of the WALL_ALIGNMENT definition
- can now handle different WALL_SIZEs


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12820 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-26 01:39:38 +00:00
Axel Dörfler
da8c77faa3 The wall checking code now also works in combination with realloc(), and
it's a tiny bit cleaner, too.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12816 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-25 18:38:36 +00:00
Axel Dörfler
6d352d08b3 Added an arch_get_caller() function that returns the caller of the calling function :-)
Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12810 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-25 13:58:32 +00:00
Axel Dörfler
14a578f640 If compiled with USE_WALL, check_wall() will now be exported, so that
it can be called from the outside.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12809 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-25 13:41:14 +00:00
Axel Dörfler
ff229e1ebb The buffer passed over from the boot loader is now null terminated.
load_driver_settings() now accepts absolute paths as well.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12808 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-25 13:35:46 +00:00
Axel Dörfler
4195ac0c53 The devfs directory entries are now always sorted.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12803 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-25 00:41:32 +00:00
Axel Dörfler
28dd47de9e Fixed the last commit: after we have acknowledged the interrupt, the
interrupt service register bit is never set, anyway...
Thanks to Korli for reporting.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12801 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-24 18:44:39 +00:00
Axel Dörfler
49cb24e833 Added workaround for spurious interrupts on line 7/15 - they are no longer
forwarded to the standard interrupt handler. Untested, though.
For more information on the subject: http://www.ggd.nsu.ru/~serg/bsdfaq/part3.html#316
Some cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12800 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-24 17:05:40 +00:00
Axel Dörfler
ada5975312 fs_mount() and get_file_system() can now both handle file system names
in the form "bfs" and "file_systems/bfs/v1".


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12791 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-23 18:22:04 +00:00
Axel Dörfler
47f39c93cb Merged the disk device manager module interface for file systems with the
VFS's interface, so that a file system only has to implement one interface.
As a side effect, the automatic file system detection may now work (not yet
tested, though).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12786 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-23 17:15:56 +00:00
Axel Dörfler
bad54f6fa4 Added symbol exports for _kset_mon_limit_() and _kset_fd_limit_().
Don't do anything yet, though.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12768 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-22 23:50:01 +00:00
Axel Dörfler
97c5bef4a1 Added missing assembly functions for __swap_float() and __swap_double().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12767 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-22 23:16:55 +00:00
Axel Dörfler
fe9bc5ae27 Added sqrt() and sqrtf() assembly versions.
Still they are not yet really used.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12731 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-19 14:13:22 +00:00
Axel Dörfler
62f9753de5 Added public domain versions of sin() and cos() (taken from glibc).
Not yet used, though - we probably need to rearrange the source files a bit.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12727 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-18 22:19:35 +00:00
Andrew Bachmann
dfdc5e411e use "national" math (fixes copysign/drem)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12720 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-18 20:43:52 +00:00
Axel Dörfler
62d6961672 Renamed vm.c to vm.cpp and made all the changes to let it compile without
errors. Also made the VM headers C++ safe.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12694 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-16 23:17:45 +00:00
Axel Dörfler
8f8d46a3ff vm_put_area() now gives feedback wether it deleted the area or not (it
will return true in the former case).
vm_delete_areas() is now using this information to print out a warning
in this case (so that a missing vm_put_area() can now be found easier).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12693 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-16 22:37:34 +00:00
Axel Dörfler
4393552b4d The heap is now located at 384 MB, and creates a reserved range that spans over the
following 1152 MB - that area only guarantees that the heap can grow this much before
the application need the memory for something else. And even then, the heap range
is reused from top-to-bottom, allowing for maximum heap usage. Of course, if the
memory after the heap range is not claimed yet, it can still be claimed by the heap,
too. Added new syscall to create the reserved range.
Fixed a bug in vm_delete_areas(): when it removed reserved areas, the area list
could get messed up.
Fixed a bug in resize_area(): resized areas could never be deleted (missing vm_put_area())!
resize_area() now supports reserved regions (but not perfectly yet, see ToDo items).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12692 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-16 22:15:13 +00:00
Axel Dörfler
a3e9996e9d Added support for special reserved address ranges: they will be used
only if memory becomes tight, and then the range is used from end to
start.
This is useful to reserve heap address ranges.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12675 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-15 15:56:55 +00:00
Axel Dörfler
20a6e5473b Renamed RESERVED_REGION_ID to RESERVED_AREA_ID.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12674 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-15 15:06:57 +00:00
Axel Dörfler
ccc8865ba2 Added an additional flag B_OVERCOMMITTING_AREA (currently to be specified
along the protection flags).
Changed the handling of B_STACK_AREA types and anonymous vm_areas: now
every area can overcommit if B_OVERCOMMITTING_AREA was specified.
B_STACK_AREA areas are still automatically overcommitting, but
B_KERNEL_STACK_AREA areas no longer.
vm_store_anonymous_noswap.c now only tests for guard pages if there were
any specified which is only done for B_STACK_AREA areas.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12673 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-15 15:03:44 +00:00
Axel Dörfler
d5b04e50f8 First step into a new block allocation strategy for the block_cache
(right now, it's still malloc/free, just encapsulated in an allocator class).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12662 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-13 18:18:28 +00:00
Axel Dörfler
0faec19e8a Cleanup, turned off debug output.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12653 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-12 23:43:39 +00:00
Axel Dörfler
6bdc405f75 Whenever KPath is used, it will now be tested if it could be initialized
(thanks to Ingo for the reminder...).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12652 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-12 23:31:04 +00:00
Axel Dörfler
90a0e0b9d9 Cleanup, turned off debug output.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12651 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-12 23:29:28 +00:00
Axel Dörfler
6094d89f2f Merged branches/developer/axeld/driver_recognition changed r12307:12637 into trunk.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12638 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-12 03:27:44 +00:00
Axel Dörfler
cbd1d9977f Changed all _kern_*() calls to use KPath instead of a path buffer on the stack.
This reduces the stack usage quite a lot, and since file system calls could be
nested (for example, a mounted image on a volume), definitely a must, too.
Might be a good idea for user calls, too, though, although it's not urgent.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12636 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-12 01:14:01 +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
0953c83ebd Fixed another bug: after a partition had been mounted, it was only marked
mounted, but no one told it about its volume ID - that caused "mountvolume"
not to be able to return a valid mount point.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12548 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-03 01:59:17 +00:00
Axel Dörfler
47729f044c Fixed a possible bug in path_to_vnode(): if called before a root
file system has been mounted, it would have crashed (that for example
happened if you deleted the kernel settings file...).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12547 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-05-03 01:05:20 +00:00
Axel Dörfler
b20667b35b {install|remove}_io_interrupt_handler() now correctly handle the B_NO_ENABLE_COUNTER flag.
Lots of cleanup:
- moved B_NO_ENABLE_COUNTER flag definition out of int.h to KernelExport.h, as it's
  described in the BeBook (although it's probably not really used that often :))
- int.c no longer has any platform dependent code (+ 0x20 on interrupt numbers is gone);
  it's now entirely handled in the arch/x86/ section.
- the io_vectors[] is now statically initialized, instead of allocated from the heap
- removed {install|remove}_interrupt_handler(); they weren't that useful, arch_smp_init()
  is now calling install_io_interrupt_handler() correctly instead
- introduced a new arch_int.h header file that currently contains NUM_IO_VECTORS only
  (though on x86, it also has ARCH_INTERRUPT_BASE == 0x20).
- changed the return type from {install|remove}_io_interrupt_handler() from "long" to
  "status_t"
- rearranged and cleaned the PIC initialization code, made the PIC code more prominent
- changed comments that talk about a non existing 8239 (the PIC chip is actually 8259)
- moved arch/x86/interrupts.h to the source directory, as it's not used outside
- added BeOS compatible interrupts_enabled() function, that should replace our
  equivalent (and private) are_interrupts_enabled()


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12477 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-04-27 01:08:35 +00:00
Axel Dörfler
0f757dc5df This fixes the build with GCC 3.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12397 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-04-14 22:15:38 +00:00
Axel Dörfler
b51d2e941a Now uses the ring_buffer implementation instead of cbuf.
Decreased the pipe buffer to 32768 bytes (it's 4096 on BeOS).
pipefs_select/deselect() did no locking.
Switched to using the BenaphoreLocker where possible.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12381 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-04-13 22:43:35 +00:00
Axel Dörfler
900849fa0d Since objects/.../system/kernel is now a directory, the kernel target is now
called kernel_${arch} like on disk. A "jam kernel" will still work, though.
Also updated all those Jamfiles I forgot to update before.
Since makehdimage now runs through (and even builds a working image), I guess
most of the consequences of the "kernel/core" -> "system/kernel" rename task
are solved.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12364 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-04-13 14:49:55 +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
2d690920ac Renamed system/core to system/kernel.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12360 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-04-13 13:22:10 +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