Commit Graph

343 Commits

Author SHA1 Message Date
Axel Dörfler
bb674499f8 * Finally implemented B_WATCH_MOUNT, ie. Tracker now shows newly mounted volumes
(mounting still only works from the Terminal).
* Shuffled functions in node_monitor.cpp around to clearly differentiate between
  private, private kernel, and public kernel functions.


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


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16572 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-02 22:48:47 +00:00
Axel Dörfler
f94b06f992 Implemented SSE2/3 support (tested with VLC).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16569 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-03-02 17:12:56 +00:00
Ingo Weinhold
e68c6184ca user_debug_exception_occurred() now checks whether a non-default signal
action has been set for the signal. If so, it doesn't try to install a
debugger, but simply lets the caller deliver the signal.
Fixes bug #237 (VLC entering the debugger when checking for processor
extensions).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16556 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-28 23:03:06 +00:00
Marcus Overhagen
89d76e508d changed get_cached_block() to no longer use a reference argument
modified to panic when an invalid block is requested (to find fs errors)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16537 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-27 18:03:42 +00:00
Axel Dörfler
3ea7d1fcbe Minor cleanup, now returns B_NAME_TOO_LONG if the query string or mount parameters were
longer than 64k.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16527 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-27 13:23:29 +00:00
Stephan Aßmus
fb39ecb534 * Added an "iospace" debugger command.
* Fixed broken "full sem" mechanism.
* Fixed recycling of previously mapped IO space chunks. Should avoid the
  panic() call earlier introduced by Marcus.

(tracked down by axeld and bonefish over the course of three days
(in between skiing) and finally nailed on the bus back home)



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16511 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-26 17:44:27 +00:00
Stephan Aßmus
b270799715 * read_chunk_into_cache() might not have put back physical pages
in case of a read error.

(coded by axeld)



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16510 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-26 17:41:38 +00:00
Jérôme Duval
5a2ad00cab fix a TODO in _user_mount : added an argsLength parameter
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16480 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-20 18:04:27 +00:00
Axel Dörfler
333dcda418 The kernel debugger now only puts printable characters into the input buffer.
This should eliminate the cases where commands doesn't seem to be accepted (but look fine on screen).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16453 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-17 12:21:28 +00:00
Axel Dörfler
1be006f2cf No longer says "unknown command" to an empty input string in the debugger.
This fixes bug #189.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16452 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-17 11:43:47 +00:00
Marcus Overhagen
e87d23b1a7 added a panic into a loop that often causes a deadlock here
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16381 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-13 17:52:35 +00:00
Axel Dörfler
3cd6e76965 /dev/dprintf and _kern_debug_output() weren't dumped to the syslog before, even
if "syslog_debug_output" was set to "true". Reported by Jerome!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16290 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-07 23:45:44 +00:00
Axel Dörfler
d31d9974ba Slightly improved debug output.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16288 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-07 16:55:06 +00:00
Ingo Weinhold
f4b0f67cf6 Added [arch_]int_post_device_manager() which is invoked after
the device manager is initialized. For x86 it does nothing, but
for PPC it searches for a supported interrupt controller and
remembers it for later use.
arch_int_{enable,disable}_io_interrupt() are implemented as
well as handling of external exceptions (aka as I/O interrupts).
We'll see later how well that works.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16271 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-07 02:50:32 +00:00
Ingo Weinhold
3277aade49 * Added get_root() to device_manager_info. Surprisingly enough, it
returns the root device node. Now its actually possible to
  traverse the device node tree without a node to start with.
* Fixed execution order problem in dm_get_next_child_node(). The
  supplied node was put first (which could cause its immediate
  deletion), but was still accessed thereafter.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16268 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-07 02:29:14 +00:00
Axel Dörfler
811ada6cae Fixed wait_for_resources() locking, reported by Ingo.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16218 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-03 17:12:34 +00:00
Axel Dörfler
d14aab0dca Changed the way how CPU activity is monitored: instead of taking the active
time of the idle thread as a measure, we now compute the CPU activity on
each thread switch - the time the CPU worked is the total of user and kernel
time a thread spent during its quantum.
Unlike before, this mechanism works correctly on SMP machines. I hope this
works as expected :)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16193 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-01 20:03:55 +00:00
Axel Dörfler
df213cedbc * CPUs can now be disabled - that is, they will keep idling.
* Added syscalls _kern_set_cpu_enabled() and _kern_cpu_enabled().
* scheduler.c::sRunQueue::tail was not maintained at all; changed sRunQueue to
  be a simple thread pointer instead of a struct thread_queue.
* Turns out we're monitoring CPU activity incorrectly when we've got more
  than one CPU.
* Renamed the global CPU array from "cpu" to gCPU.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16186 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-01 16:09:05 +00:00
Axel Dörfler
99085d6771 Added an extra debug function that dumps all iframes in case the stack crawl
doesn't work correctly for some reason.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16180 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-01 12:35:10 +00:00
Axel Dörfler
562c5a27d9 Make sure the compiler knows what we want.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16179 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-02-01 12:34:03 +00:00
Axel Dörfler
f1d806fe5d Fixed call_all_cpus(): it shouldn't call the function synchronously; inter-CPU
synchronization as done in init_mtrrs() failed because of that (let the system
hang).
Unfortunately, MTRR still doesn't work on my dual PIII with SMP enabled; that
was just one reason it didn't work.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16173 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-31 18:30:34 +00:00
Axel Dörfler
204131dc97 Added a real yield function to the kernel (using the next_priority approach).
The test application lets run a thread at the highest priority that calls
yield all the time - the system stays responsible when it runs, so it seems
to work fine :)
Changed the malloc implementation to use _kern_thread_yield() instead of
snoozing.
We should think about making this call public, too.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16166 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-31 02:29:02 +00:00
Axel Dörfler
d14af9fde6 Introduced a next_priority field to struct thread that will be used when
enqueueing a thread to the run queue.
This mechanism is now used for the thread priority boost on semaphore
release. Also, those threads are no longer made real time threads, they
now get a temporary priority of B_FIRST_REAL_TIME_PRIORITY - 1.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16165 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-31 01:58:49 +00:00
Axel Dörfler
5d16441307 Now usually ignores the length of the data segment as well.
It now works fine on my P4 system as well :-)
But since the BIOS area is not identity mapped, it might work on fewer systems
than it does in BeOS R5.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16154 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-30 16:32:47 +00:00
Axel Dörfler
afef4f3fff The syslog_daemon now ignores zero length messages, and the kernel's syslog
mechanism doesn't send them out any longer.


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


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16152 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-30 14:43:38 +00:00
Axel Dörfler
8a1f6775b9 * You can now specify a thread when using the "unreal" debugger command.
* Added a thread priority column to the thread list.
* Added "realtime" command that lists all real-time threads.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16141 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-29 19:50:00 +00:00
Axel Dörfler
5da68569d0 The APM now successfully shuts down my IBM ThinkPad T40. It's still disabled
for more testing on other machines.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16136 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-29 15:51:33 +00:00
Axel Dörfler
036b999b54 Unbroke the build (ps2.h was suddenly missing.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16121 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-28 18:48:50 +00:00
Axel Dörfler
afd6dfc8b4 Implemented first basic APM driver. Only tested with QEMU so far, that's why
it's currently disabled.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16120 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-28 18:11:20 +00:00
Axel Dörfler
1bb74eb185 This fixes the work-around made in r16105, and some more:
* cached_block::parent_data can be NULL in a sub transaction in case the
  block wasn't part of the parent transaction (but not in low memory
  situations). cache_abort_sub_transaction() and cache_detach_sub_transaction()
  didn't account for this, though, ie. the block data could end up
  corrupted.
* Renamed cached_block::original in original_data.
* Renamed cached_block::data in current_data.
* Added some comments.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16108 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-26 21:02:53 +00:00
Jérôme Duval
2e5ac35292 fixed some traces
cache_abort_sub_transaction now doesn't crash if parent_cache is NULL (happens in low memory situations)
Axel, please review and fix if needed


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



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16101 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-26 15:06:59 +00:00
Ingo Weinhold
6cdd45a94b Added enum to PPCPlatform to identify the platform.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16099 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-26 14:59:16 +00:00
Axel Dörfler
924479179b Implemented on screen debug output during boot - to be enabled in the boot loader
safemode menu.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16081 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-25 16:12:10 +00:00
Axel Dörfler
979aeaf71c Fixed bug #97:
* BEntry::Remove() now uses _kern_remove_dir() for directories.
* Added fd parameter to _kern_remove_dir().
* Fixed LibBeAdapter's _kern_unlink() to only work on files, and
  added _kern_remove_dir() for directories.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16078 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-25 11:12:21 +00:00
Axel Dörfler
7f370a1f89 * Fixed settings evaluation.
* exchanged sBlueScreenEnabled and sBlueScreenOutput (so that they better
  match the sSerialDebugEnabled and sSyslogDebugEnabled variables).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16077 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-24 21:52:53 +00:00
Axel Dörfler
ad4afa7409 Added unused ring_buffer_write_to_port() implementation - we might never use it,
but it shouldn't hurt to have it in SVN.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16076 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-24 21:50:41 +00:00
Axel Dörfler
eb2fc29abd Implemented syslog support for the kernel debug output. Not fancy at all yet, but
it seems to be working fine.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16073 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-24 20:28:52 +00:00
Axel Dörfler
d97476d155 The userland stack trace no longer accesses the stack of the crashed application unsafe.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16071 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-24 17:22:50 +00:00
Jérôme Duval
e947a6d02f improbed tabbing
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16057 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-24 10:56:10 +00:00
Axel Dörfler
627e4043a8 Improved debug output.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16042 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-23 11:41:07 +00:00
Axel Dörfler
7817211a38 Allow only root to look at other team's file descriptors.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15992 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-17 01:44:18 +00:00
Axel Dörfler
0e382a4667 Implemented a syscall to get information about the open file descriptors of all teams.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15991 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-17 01:29:18 +00:00
Axel Dörfler
ddb7d0b6a6 Implemented force unmounting - by passing the "-f" option to "unmount" you
can now safely unmount volumes that are still in use by some applications.
Minor fixes to the FD disconnection implementation:
* put_fd() checked the condition for being able to disconnect a descriptor
  incorrectly (causing the FD to never be disconnected).
* remove_fd() would hand out disconnected descriptors (but should have
  returned NULL for them).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15952 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-15 19:26:42 +00:00
Axel Dörfler
60e5ea42e0 Quick fix for a crashing bug I just introduced.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15951 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-15 18:30:07 +00:00
Axel Dörfler
128165101a Implemented disconnecting file descriptors: this will be used by the
force unmounting code.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15949 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-15 17:11:48 +00:00
Marcus Overhagen
7c446ef048 In wait_for_thread allow userReturnCode to be NULL regardless whether NULL is a valid IS_USER_ADDRESS
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15946 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-15 13:26:18 +00:00
Ingo Weinhold
7afc16f059 * Fixed a bug regarding storing/restoring FPSCR in the interrupt
code. The stack pointer was not adjusted, hence we were
  overwriting the previous register value. But it looks like I
  missed to check in the arch_cpu.h with the iframe structure
  including the floating point registers anyway.
* Backported the ELF PPC relocation code from the boot loader to
  the kernel.
* Fixed the PPC version of arch_thread_switch_kstack_and_call().
  Apparently the signature had changed, but the assembly
  implementation was not adjusted accordingly.
* sc prints more registers now (LR, CR, CTR, XER,...).
* Fixed several occurences of not-working fault handlers.
  Apparently the compiler realized, that the "error" label was
  never jumped to (by the code it knew), and optimized the
  respective code away. Now we use a trick to make it think the
  error label might actually be jumped to. I wonder whether the
  x86 version has the same problem when being compiled with GCC4.
* Adopted the x86 page fault handling interrupt code.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15933 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-13 00:49:13 +00:00