like floppy or CD boot.
This allows it to reduce the number of scans needed to identify the boot
partition - when booted from a real floppy, this speeds up the boot
process by a magnitude.
Also, the loader now has a fall back in case there were no "boot" links
on the disk - the current boot floppy script doesn't create them.
With these changes, I was able to boot into a HD based Haiku installation
from a floppy disk. It's not yet enough to boot from CD (as the boot
device selection is a bit too simplistic right now), but it will eventually
come next. Testing is a lot slower here, though, as neither qemu nor
Bochs support multi-session CDs (at least I have no idea how to get them
to do this).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14380 a95241bf-73f2-0310-859d-f6bbb57e9c96
have an effect on floppies or CD-ROMs, but would have on real hard drives that require
CHS access.
Changed the cylinder-to-regs conversion in BIOSDrive::ReadAt() (that one was actually
correct) to make it look similar to the conversion in the opposite direction in
get_drive_parameters().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14377 a95241bf-73f2-0310-859d-f6bbb57e9c96
Renamed TarFS::Node to TarFS::File to correctly name the class hierarchy.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14376 a95241bf-73f2-0310-859d-f6bbb57e9c96
Implemented CHS support needed for smaller hard drives, CD-ROM, ...
Minor cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14369 a95241bf-73f2-0310-859d-f6bbb57e9c96
Also, freeing regions is now supported (but still only the last allocated region can be
freed, as that's currently good enough).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14366 a95241bf-73f2-0310-859d-f6bbb57e9c96
Note, this value should be patched by the build system to the actual size
of zbeos - but since we don't have this mechanism in place yet, the maximum
value is probably the best default, even if it should slow down a floppy
boot considerably.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14344 a95241bf-73f2-0310-859d-f6bbb57e9c96
It expects the zipped TAR at offset 192 kB on the boot image.
This work was mostly done by Ingo during BeGeistert.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14343 a95241bf-73f2-0310-859d-f6bbb57e9c96
per file descriptor (a descriptor can be shared among several slots). There is now a
second table in the io_context structure that contains that information in a bitmap.
There are now two new (private) functions to control the close-on-exec flag, fd_close_on_exec(),
and fd_set_close_on_exec().
F_DUPFD, dup(), and dup2() are supposed to clear the close-on-exec flag on the duplicated
slot - this fixes bug #57 (no output after a redirect of a shell builtin).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14313 a95241bf-73f2-0310-859d-f6bbb57e9c96
removed it.
Added comment why there is an explicit dup2() at all.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14312 a95241bf-73f2-0310-859d-f6bbb57e9c96
It now also accepts a team ID and will then dump its io_context.
Accidently mixed used/max FD counter.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14310 a95241bf-73f2-0310-859d-f6bbb57e9c96
it will exit directly to have the same behaviour as in user space (where it doesn't
return to the caller, since signals are handled before returning to user space).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14309 a95241bf-73f2-0310-859d-f6bbb57e9c96
will no longer use vm_get_kernel_aspace() (which acquired a semaphore) and it now
accepts decimal team IDs as well.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14307 a95241bf-73f2-0310-859d-f6bbb57e9c96
and exec_team() have an additional "kernel" argument and will copy the arguments
themselves (or rather, delegate that to create_team_arg()).
When team_create_thread_start() is called, it will take over ownership and is
responsible for deleting it - this also fixed a memory leak in case the user
stack area couldn't be created.
Also changed comment after exit_thread(): since this call only delivers a signal, the
code after it will still get executed.
This fixes the crashing symptom of bug #50.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14303 a95241bf-73f2-0310-859d-f6bbb57e9c96
Some fields of fs_mount were not properly initialized when FS's mount function
was called, and therefore, could let get_mount() return a mount structure that
was not yet read for public consumption (this should fix bug #51).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14223 a95241bf-73f2-0310-859d-f6bbb57e9c96
(that's what our headers say).
Some style fixes in signal.c.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14192 a95241bf-73f2-0310-859d-f6bbb57e9c96
moved static inline to extern inline to allow this change
please someone review this (ie are they platform dependent functions ?)
should fix bug #47
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14103 a95241bf-73f2-0310-859d-f6bbb57e9c96
Instead of -1, vnode_path_to_vnode() now returns the ID of the starting vnode when it
doesn't need to traverse the path at all.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14081 a95241bf-73f2-0310-859d-f6bbb57e9c96
longer called - instead, it get its own mini page fault handler: if the thread
has a fault handler, that one will be executed.
Exiting the debugger (with the "continue" command) no longer causes the
vm_page_fault() routine to be called if interrupts were disabled.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14070 a95241bf-73f2-0310-859d-f6bbb57e9c96
the CPU value doesn't get lost when exiting a nested debugger.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14069 a95241bf-73f2-0310-859d-f6bbb57e9c96
and node_refs passed in) they returned an invalid index (larger than range).
Fixed rootfs compilation with tracing turned on.
Minor cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14065 a95241bf-73f2-0310-859d-f6bbb57e9c96
was a race condition between that and the wall checker daemon (if enabled): it could
occasionally report an overwritten wall in that very moment.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14051 a95241bf-73f2-0310-859d-f6bbb57e9c96
removed the locking it did, as that doesn't work anymore in the kernel debugger.
The function was not thought to be used outside the debugger, anyway.
Improved usage message from debugger command "ls".
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14050 a95241bf-73f2-0310-859d-f6bbb57e9c96
There, we need to detect the modified state from the mapping, too - the
vm_page state itself might not be up to date.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14049 a95241bf-73f2-0310-859d-f6bbb57e9c96
to it - if that page was read from disk unmodified before (or written back in
the mean time), the updated contents coult not be detected, and therefore, were
never written back.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14048 a95241bf-73f2-0310-859d-f6bbb57e9c96
is a normal one - maybe someone finds the time to implement them for real before I do :-)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14046 a95241bf-73f2-0310-859d-f6bbb57e9c96
even if "kernel_startup" was "true". Page faults are now no longer allowed
during kernel startup (and could be easily avoided). The only situation where
we accept page faults with interrupts turned off now is during a kernel debugger
session.
Added a command debug_debugger_running() to test for that situation.
kernel_debugger() no longer sets kernel_startup while it's running; there should
be no situation when this could be helpful.
Interrupts are no longer enabled when a page fault happens in the kernel
debugger.
This potentially fixes all sorts of problems, and not only in the kernel debugger,
it could also have affected SMP (will test later).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14045 a95241bf-73f2-0310-859d-f6bbb57e9c96
a page fault during startup, because the chain memory is B_NO_LOCK.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14043 a95241bf-73f2-0310-859d-f6bbb57e9c96
pages, ie. they considered the areas to be B_LAZY_LOCK. But that doesn't really make
sense and potentially cause page faults where you wouldn't expect them (and where
it's not a good idea to trigger them).
Reworked display_mem() (used by the dw/db/ds commands in the kernel debugger) to
be a bit more sane, improved formatting, and allows it to work on non-existing
memory without a panic.
The "area" debugger command now also accepts an address (contained by the area)
as argument - and it will now always print out an error message if no matching
area could be found.
Replaced all dprintf() calls to kprintf() calls for the kernel debugger functions.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14042 a95241bf-73f2-0310-859d-f6bbb57e9c96
Just like on BeOS, the overall maximum is 65536 semaphores for now - the mechanism
tends to make more semaphores available than the one under BeOS, though (which is
intended).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14035 a95241bf-73f2-0310-859d-f6bbb57e9c96
Unfortunately, they are pretty broken, so I added them into floatmath.c
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14019 a95241bf-73f2-0310-859d-f6bbb57e9c96
node: like in BeOS, it *must* own the root node (ie. via publish_vnode()),
unlike in BeOS, it must also drop that reference on unmount (symmetrical
behaviour definitely makes more sense to me than the Be way).
Since all existing file systems for Haiku behaved differently, I brought them
in line (only pipefs already adhered to that new standard for some reason,
rootfs did only released the node, devfs did nothing - despite it's probably
not really useful to be able to unmount them).
fs_mount() will now panic if a file system does not do this correctly (useful
for file system developing).
Unmounting is now theoretically working again: when trying to unmount a BFS
volume, the kernel crashes in the block cache destruction... (but that's work
for tomorrow).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14017 a95241bf-73f2-0310-859d-f6bbb57e9c96
from OS.h, sorry for triggering a complete rebuild.
To avoid doing a syscall for find_thread(0), the assembly
version is now in libroot. For BeOS R5 compatibility,
_kfind_thread_ is retained. This will fix some compile
problems, and provides a cleaner OS.h for future Haiku
versions.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14014 a95241bf-73f2-0310-859d-f6bbb57e9c96
was incorrectly calculated, and could therefore cause all sorts of troubles with
writes over 4 kB.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14011 a95241bf-73f2-0310-859d-f6bbb57e9c96
only a read lock on the inode, or without a lock at all (in case of prefetching) - it
is now using the cache_ref's lock to make sure it's retrieved only once and doesn't
waste/corrupts any memory.
- since that fix made it mandatory to fix write_chunk_into_cache() to not call pages_io()
while holding the cache_ref's lock (was a to-do item before), I changed it to make
that possible.
- It now also supports write-through caches in theory - as there is no way yet to tell
a cache to work this way.
- Optimized for the not so uncommon case of writing the last part of a file that is not
a multiple of the page size - it won't call pages_io() anymore then, but zero the rest
of the page directly.
- vm_page_write_modified() is now calling write_page() without holding the cache_ref's
lock as well.
The updated write_chunk_to_cache() is not so well tested, though, but appears to work
so far.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14006 a95241bf-73f2-0310-859d-f6bbb57e9c96
available.
Broken escape sequences are now properly ignored (read one character too much before).
Since the current line buffer is part of the history, we now delete that buffer when
crossing the current line again while traversing the history (restoring the former
buffer would be the nicest way, but that would require another empty buffer and more
copying).
Cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14005 a95241bf-73f2-0310-859d-f6bbb57e9c96
movement - IOW, the history of kernel debugger calls is now working also from
the on-screen KDL.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14000 a95241bf-73f2-0310-859d-f6bbb57e9c96
in an error message without checking for a NULL pointer (which happens during
early boot, and even though it would be impossible to get there at that time,
it shouldn't be accidently copied to anywhere else this way).
Added a compile time option to monitor the last thread that successfully
acquired a semaphore (disabled, though, only enable it when needed).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13998 a95241bf-73f2-0310-859d-f6bbb57e9c96
and will only list those threads waiting for that one if used that way.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13996 a95241bf-73f2-0310-859d-f6bbb57e9c96
then shows the stack crawl of that stack instead of the current one).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13984 a95241bf-73f2-0310-859d-f6bbb57e9c96
only under certain conditions.
Now also accepts decimal numbers as IDs.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13973 a95241bf-73f2-0310-859d-f6bbb57e9c96
Simplified parsing the ID (no need to differentiate between hex and decimal, if
we do both anyway).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13972 a95241bf-73f2-0310-859d-f6bbb57e9c96
get_file_map() now seems to work correctly in all regular cases.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13947 a95241bf-73f2-0310-859d-f6bbb57e9c96
(memory) holes, but failing to load an add-on should no longer exit your
application. Reported by Korli.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13945 a95241bf-73f2-0310-859d-f6bbb57e9c96
- under certain situations, the wrong extent could be chosen (off-by-one error)
- the resulting length of the first vector was incorrectly calculated for all
extents but the first
Improved error checking a bit.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13941 a95241bf-73f2-0310-859d-f6bbb57e9c96
BeOS behaviour). Maybe we want to have some different values here later on.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13926 a95241bf-73f2-0310-859d-f6bbb57e9c96
working directory (instead of the full path).
Cleanup of some remaining "int" status variables (where it should have
been a "status_t").
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13924 a95241bf-73f2-0310-859d-f6bbb57e9c96
user memory (it got its own fault handler). IOW the stack frame is not changed
in that case anymore.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13921 a95241bf-73f2-0310-859d-f6bbb57e9c96
prevents the system to allocate caches for files that don't use or have
a file cache (ie. only those can be mmap()ed!).
Therefore, cache_prefetch() no longer crashes when trying to prefetch
files without a file cache.
read_into_cache() no longer does anything if the requested size is 0.
Fixed a bug in cache_prefetch_vnode(): if the cache couldn't be retrieved,
it put the vnode, but didn't own it (the caller does).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13904 a95241bf-73f2-0310-859d-f6bbb57e9c96
device becomes available.
Currently, it opens the "launch_speedup" module (if available), later it
should consult a settings file for what to do.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13894 a95241bf-73f2-0310-859d-f6bbb57e9c96
freeing the team - it leaked dead children semaphores and death entries;
waiting for a specific team could not have worked before.
Fixed delete_team_struct(), it did not correctly free the death list (would
have accessed freed memory).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13890 a95241bf-73f2-0310-859d-f6bbb57e9c96
(there might be some more left, but it's not urgent or fatal)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13884 a95241bf-73f2-0310-859d-f6bbb57e9c96
threads which are doing said thing.
Replaced all dprintf() calls from the kernel debugger with kprintf() calls.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13883 a95241bf-73f2-0310-859d-f6bbb57e9c96
(dprintf() locks using acquire_spinlock() which can itself drop into the
kernel debugger, causing an endless loop (until the stack was full).
Removed debug_putchar().
The gdb interface is now calling arch_debug_serial_*() directly.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13882 a95241bf-73f2-0310-859d-f6bbb57e9c96
and ignores keyboard input. Also, it now uses the definitions from the PS/2
HID driver (from ps2.h).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13881 a95241bf-73f2-0310-859d-f6bbb57e9c96
remove it from the hash, and thus, left a dead pointer around.
free_vnode() does now also remove the vnode from the hash - this is done
so that the file system is notified about removal/put of the vnode before
there is a chance that this vnode is recreated/reloaded (could make the
life of file system writers a bit easier).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13877 a95241bf-73f2-0310-859d-f6bbb57e9c96
tested for fragmented files - but it seems to work good enough for now.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13870 a95241bf-73f2-0310-859d-f6bbb57e9c96
Removed vfs_vnode_release_ref(), as vfs_put_vnode() already does the same thing.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13867 a95241bf-73f2-0310-859d-f6bbb57e9c96
the other one with usual device/inode ID pair.
Both versions now accept an offset/size pair to specify the region of the
file to be prefetched - this may be turned into a file_vec_io array later on.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13866 a95241bf-73f2-0310-859d-f6bbb57e9c96
This is currently only used for the file cache module API.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13862 a95241bf-73f2-0310-859d-f6bbb57e9c96
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
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
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
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
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
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
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
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
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
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
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
- 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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
(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
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
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
- 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
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
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
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
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
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
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
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
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
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
(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
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
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
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
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
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
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
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
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