* Made GetMediaStatus() a bit more robust. If the ioctl fails (e.g. if it
is not implemented as in Thomas' drivers), it gets the device geometry
and does not fail, if the device is not removable.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9546 a95241bf-73f2-0310-859d-f6bbb57e9c96
to be able to have more than 1280x1024x8 resolutions. The best solution, however,
would be to map the graphics memory outside of the kernel space, anyway.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9537 a95241bf-73f2-0310-859d-f6bbb57e9c96
it switched to the logo mode afterwards).
Improved and broke the second call of platform_switch_to_logo() with a
different video mode: it now at least works when switching to a lower
resolution.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9535 a95241bf-73f2-0310-859d-f6bbb57e9c96
and that main2() cannot therefore just wait until interrupts become
enabled.
Now, the main2() thread is resumed after interrupts are turned on.
I am not yet sure if this is really necessary, but I have the feeling that it is.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9531 a95241bf-73f2-0310-859d-f6bbb57e9c96
Improved the threads list: despite looking much better, it now also prints
out the semaphore number a thread is waiting on.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9530 a95241bf-73f2-0310-859d-f6bbb57e9c96
the "cursor".
Now disables serial output when the boot menu is shown.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9528 a95241bf-73f2-0310-859d-f6bbb57e9c96
When the debug boot option is set, or ENABLE_SERIAL defined on compile time,
the serial port 1 is activated.
It will also read the serial base port info from the BIOS data and use
that if any ports are reported (will fall back to 0x3f8 if not).
Right now, a fixed baud rate of 115200 and 8n1 is used.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9527 a95241bf-73f2-0310-859d-f6bbb57e9c96
Menu::Supermenu() now work.
Added function to find an item by label.
The boot volume menu now actually lets you choose a different boot volume.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9525 a95241bf-73f2-0310-859d-f6bbb57e9c96
Added the new arch_dbg_con_early_boot_message() function.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9518 a95241bf-73f2-0310-859d-f6bbb57e9c96
change the flow of things, it now has its own buffer, and fills it with
interrupts disabled (everything comes at a price).
Now uses the safe vsnprintf() instead of vsprintf() which could crash
the kernel.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9510 a95241bf-73f2-0310-859d-f6bbb57e9c96
thread. That also allows kernel threads to use the FPU as well.
arch_thread_enter_uspace() no longer needs to initialize the FPU.
i386_stack_init() is now only called once, in arch_thread_init(), as
thought.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9508 a95241bf-73f2-0310-859d-f6bbb57e9c96
want it to find; therefore, we're now using get_next_loaded_module_name().
Added a temporary suffix to the FS DDM modules (disk_device/v1) - they
might get merged with the standard FS interface modules.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9503 a95241bf-73f2-0310-859d-f6bbb57e9c96
eventual user stack regions of the thread.
The registers are no longer jumping around depending on the length of their values.
Removed some unused or doubly included headers.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9479 a95241bf-73f2-0310-859d-f6bbb57e9c96
We now have a working periodic wall checker, enabled by USE_CHECKING_WALL.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9459 a95241bf-73f2-0310-859d-f6bbb57e9c96
list (but not the structure itself).
Now calls heap_init_post_thread(), heap_init_post_sem() was called ..._postsem() before.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9457 a95241bf-73f2-0310-859d-f6bbb57e9c96
arch_cpu.h no longer includes kernel.h, so we have to do this for the
ROUNDUP()/ROUNDOWN() macros.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9441 a95241bf-73f2-0310-859d-f6bbb57e9c96
they are called.
Fixed some return types (mostly from int to status_t).
Some minor other cleanup.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9440 a95241bf-73f2-0310-859d-f6bbb57e9c96
they are called.
Introduced a cpu_init_post_vm() that will now call arch_init_post_vm() instead
of letting main() doing it.
Fixed some return types (mostly from int to status_t).
Some minor other cleanup.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9439 a95241bf-73f2-0310-859d-f6bbb57e9c96
three code locations that didn't handle them properly (when iterating over all
areas).
That and the fact that unmap_and_free_physical_pages() is no longer broken now
leads to the boot region being unmapped and freed properly as intended before.
That revealed another bug: the boot loader region was disposed too early, we
need a few other components pick up boot loader resources first; it now happens
in vm_init_post_sem().
allocate_kernel_args() was also broken, and actually didn't try to allocate
kernel args areas, but tried to reallocate all the virtual allocated ranges
of the boot loader...
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9437 a95241bf-73f2-0310-859d-f6bbb57e9c96
boot loaders passed in memory completely wrong (for example, the premapped
graphics buffer could be mapped to the same region as some thread stacks,
just because the VM did not use its knowledge about that mapping): the boot
loader regions are now reserved so that they cannot be overwritten
with other regions anymore. The kernel_args arguments are now tracked, and
areas are created for them (they are not yet freed, though). arch_vm_init_end()
must now call the new vm_free_unused_boot_loader_range() to free any remaining
parts of the memory not yet mapped in by any areas.
Renamed a lot of init functions (ie. postsem to post_sem, init2 to post_area),
also updated because of the vm_translation_map*() arch_vm_translation_map*() move.
B_ALREADY_WIRED can now only be used during kernel startup (it's a private flag).
Replaced PAGE_SIZE with B_PAGE_SIZE.
Some minor cleanups.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9429 a95241bf-73f2-0310-859d-f6bbb57e9c96
correctly by calling arch_vm_translation_map_init_kernel_map_post_sem().
dump_aspace() now behaves like all debugging functions should behave: it
now accepts decimal numbers as well as hexadecimal numbers as IDs.
vm_translation_map_create() was renamed to arch_translation_map_init_map().
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9427 a95241bf-73f2-0310-859d-f6bbb57e9c96
Moved some functions around, so that the public functions come last.
Renamed the internal vm_translation_map_quick_query() to early_query(),
renamed vm_translation_map_quick_map() to arch_vm_translation_map_early_map().
Removed the _module part of the initialization functions.
Added a function that completes the initialization of the kernel map (it
creates the map's lock, which was just not done before).
arch_vm_translation_map_init_map() will now fail with an appropriate
error code if the map's lock couldn't be created for anything that
is not the kernel map.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9426 a95241bf-73f2-0310-859d-f6bbb57e9c96
loader preallocated, arch_vm_init_end() (formerly called _endvm())
now calls the new vm_free_unused_boot_loader_range() with the correct
parameters.
Moved the creation of the DMA area from 0-0xa0000 into arch_vm_init_post_area().
Changed return types to status_t rather than just having "int" stand
for a status code.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9425 a95241bf-73f2-0310-859d-f6bbb57e9c96
Most importantly, it now always uses map_physical_memory(), and no longer
relies on eventually mapped data by the boot loader (that the VM didn't
know about).
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9418 a95241bf-73f2-0310-859d-f6bbb57e9c96
Exports the new insert_address_range() function as declared in boot/addr_range.h.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9416 a95241bf-73f2-0310-859d-f6bbb57e9c96
Added a kMaxKernelSize constant to be able to change that limit a bit
easier.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9415 a95241bf-73f2-0310-859d-f6bbb57e9c96
USE_WALL feature can now be used.
Started implementing a USE_CHECKING_WALLS feature, that has a kernel
daemon running that periodically checks the walls of *all* memory
allocations - does not work yet (because of some initialization order
problems).
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9396 a95241bf-73f2-0310-859d-f6bbb57e9c96
team and process group IDs as well.
Added a ToDo item that process groups do only work well as long as
their group leader is still active.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9394 a95241bf-73f2-0310-859d-f6bbb57e9c96
ignored completely (so that zero and below become valid).
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9393 a95241bf-73f2-0310-859d-f6bbb57e9c96
Now uses waitpid() instead of wait_for_thread() - and surprise, it doesn't
work yet :)
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9372 a95241bf-73f2-0310-859d-f6bbb57e9c96
no longer pop %fs from the iframe in that case, too.
When we restore a custom stack, however, we'll now pop %fs from the iframe
as such strange threads may even do their own business with it.
Added some comments.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9369 a95241bf-73f2-0310-859d-f6bbb57e9c96
We also should disable interrupts in arch_restore_fork_frame().
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9368 a95241bf-73f2-0310-859d-f6bbb57e9c96
always copies the arguments and environment arrays.
No need for the "owns_arrays" in team_arg anymore - it now always owns
them.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9363 a95241bf-73f2-0310-859d-f6bbb57e9c96
Switched to load_image() instad of using the old team_create_team() to start "init".
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9361 a95241bf-73f2-0310-859d-f6bbb57e9c96
The path name is now always taken from the provided argument list (except for
_user_exec() which now replaces args[0] with the path argument).
The team_arg structure know nows if it must delete its arguments or not - this
also fixes a memory leak in case team_create_team() failed when invoked from
userland.
load_image() is now also exported for the kernel.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9360 a95241bf-73f2-0310-859d-f6bbb57e9c96
Enhanced exec_test.c to use some process functions as well.
Switched to load_image() instead of using the old _kern_create_team() syscall.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9359 a95241bf-73f2-0310-859d-f6bbb57e9c96
process ID (in the current session).
get_death_entry() could call free() with interrupts disabled; now follows
the same mechanism as chosen with the groups (ie. it returns a pointer
to a death_entry to be freed by the calling function).
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9354 a95241bf-73f2-0310-859d-f6bbb57e9c96
the specified process group (by passing in a negative pid, as in BeOS).
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9351 a95241bf-73f2-0310-859d-f6bbb57e9c96
- we now have a working process group/session model. Implemented related syscalls
and the kernel backend, some POSIX process functions are now available in the
kernel as well.
- dying teams now monitor their exitus by leaving death_entry structures in
their parent team.
- Implemented wait_for_child() for pid == -1 and pid > 0; IOW waiting for process
groups is missing yet. Hasn't yet been tested intensively.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9350 a95241bf-73f2-0310-859d-f6bbb57e9c96
may be renamed):
- B_RELEASE_ALL: the semaphore count is set to 0, all waiting threads are released
(the "count" argument of release_etc_sem() is ignored then)
- B_RELEASE_IF_WAITING_ONLY: the semaphore count is only decreased if there
are any waiting threads; ie. the semaphore is signaled
Together, they will make the pthread_cond_*() functions easy to implement, and
they come in handy at other places, too.
Removed release_threads variable in release_sem_etc(), as it was useless.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9330 a95241bf-73f2-0310-859d-f6bbb57e9c96
Also removed syscall for that function (shouldn't have been there in the
first place, anyway).
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9325 a95241bf-73f2-0310-859d-f6bbb57e9c96
no longer abuse the semaphore mechanism to carry an extra status value,
instead, wait_for_thread() registers a death_entry with the thread that
will be filled upon exit.
Removed delete_sem_etc() as it's no longer of use or available.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9323 a95241bf-73f2-0310-859d-f6bbb57e9c96
flag set.
Fixes _user_wait_for_thread() which returned an invalid return code in case
of error.
Some minor cosmetics.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9321 a95241bf-73f2-0310-859d-f6bbb57e9c96
not be restored from the iframe; it will be set by the scheduling code.
This is only of concern on SMP machines and could prevent TLS from working.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9310 a95241bf-73f2-0310-859d-f6bbb57e9c96
Made it less vulnerable to thread-safety issues; it could occassionally return an
error when there was an error in a concurrent dlfcn function.
Renamed global static variables to have the "s" prefix.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9305 a95241bf-73f2-0310-859d-f6bbb57e9c96
same mechanism as NewOS, ie. using the iframe "stack" pointer (using the
new i386_get_current_iframe() function).
Implemented fork() support functions arch_{store|restore}_fork_frame().
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9292 a95241bf-73f2-0310-859d-f6bbb57e9c96
know about this specifier, it has to be replaced by B_EXACT_ADDRESS).
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9281 a95241bf-73f2-0310-859d-f6bbb57e9c96
team's address space - for internal use, anyway.
Added a ToDo: item to exec_team() to remind me of alarms and signals.
Started implementing fork_team() based on team_create_team() - it's not
completed (or even works), though.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9279 a95241bf-73f2-0310-859d-f6bbb57e9c96
must not be accessed without it.
Implemented _get_next_area_info() and _user_get_next_area_info().
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9277 a95241bf-73f2-0310-859d-f6bbb57e9c96
reference to the address space, so that the calling team deletion function
doesn't have to do this.
delete_address_space() doesn't have to delete any areas anymore, since
at the point it's called, there is no area anymore, anyway: each area
holds a reference to the address space.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9276 a95241bf-73f2-0310-859d-f6bbb57e9c96
This actually reflects the only usage of this function anyway, and thus,
fixes the resize_area() function.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9265 a95241bf-73f2-0310-859d-f6bbb57e9c96
vm_page no longer keeps a pointer to the vm_cache_ref but to the vm_cache.
This cleans the page handling when having to make an area copy-on-write;
regions belong to vm_cache_ref, pages to vm_cache.
Fixed some return types.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9264 a95241bf-73f2-0310-859d-f6bbb57e9c96
It currently checks for temporary caches, but it should really only be used
with regions for anonymous memory.
Fixed some return types.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9259 a95241bf-73f2-0310-859d-f6bbb57e9c96
Changed the way a vm_address_space is deleted: instead of having to explicitly
call vm_delete_aspace(), the last vm_put_aspace() will remove it.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9255 a95241bf-73f2-0310-859d-f6bbb57e9c96
Changed the way a vm_address_space is deleted: instead of having to explicitly
call vm_delete_aspace(), the last vm_put_aspace() will remove it.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9254 a95241bf-73f2-0310-859d-f6bbb57e9c96
Should be tested and verified more intensively, though.
Moved the creation, initialization, and deletion of the team_arg structure out of
team_create_team(); it's now also used by exec_team().
Renamed kfree_strings_array() to free_strings_array().
Renamed the fields of the team_arg structure to be more in sync with the names used
at other places.
Fixed the routine that copied the environment/arguments into the userland space.
Improved and fixed the user_copy_strings_array() function.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9250 a95241bf-73f2-0310-859d-f6bbb57e9c96
of vm_delete_aspace() (which now calls it).
Fixed some return types.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9248 a95241bf-73f2-0310-859d-f6bbb57e9c96
file descriptors that have O_CLOEXEC set.
Minor cleanup.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9242 a95241bf-73f2-0310-859d-f6bbb57e9c96
shouldn't be used in anything that we control (like strncpy()).
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9223 a95241bf-73f2-0310-859d-f6bbb57e9c96
back to load_container() so that map_image() has the chance to succeed.
The FATAL() macro now uses dprintf() instead of printf() when TRACE_RLD is defined.
Minor cleanup.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9218 a95241bf-73f2-0310-859d-f6bbb57e9c96
in dir_vnode_to_path() which does now continue until hitting "/".
* Refactored common volume root to mount point resolution code into a
separate function.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9210 a95241bf-73f2-0310-859d-f6bbb57e9c96
As we currently don't have these environment variables set at init time, their values
are hardcoded for the moment.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9207 a95241bf-73f2-0310-859d-f6bbb57e9c96
via B_SET_(NON)BLOCKING_IO to notify the device about any access mode changes.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9199 a95241bf-73f2-0310-859d-f6bbb57e9c96
and will check against those. This fixes the rare case an interrupt frame
could cause before.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9191 a95241bf-73f2-0310-859d-f6bbb57e9c96
potential bug if MAIN_STACK_SIZE and STACK_SIZE would have been different.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9190 a95241bf-73f2-0310-859d-f6bbb57e9c96
read over two blocks, some memory behind that memory could be trashed.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9188 a95241bf-73f2-0310-859d-f6bbb57e9c96
waiting on the write semaphore).
The write functions didn't change the buffer address on a partial write
which could lead to corruption in the pipe data.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9111 a95241bf-73f2-0310-859d-f6bbb57e9c96
Fixed a warning that popped up if TRACE_VM was defined.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9110 a95241bf-73f2-0310-859d-f6bbb57e9c96
This fixes the build as unistd.h defined sleep() as well.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9108 a95241bf-73f2-0310-859d-f6bbb57e9c96
It now prints a warning if the device driver doesn't handle iovecs correctly.
Again, this could lead to very strange behaviour.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9092 a95241bf-73f2-0310-859d-f6bbb57e9c96
name of the node.
devfs_read_stat() now (presumably temporary) sets the size of the device
for partitions and reports a block device rather than a character device
if the size unequals zero.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9085 a95241bf-73f2-0310-859d-f6bbb57e9c96
* Turned sMountOpMutex into a recursive lock.
* Re-inserted sMountOpLock locking in vnode_path_to_vnode(). It doesn't
deadlock on mounting anymore. :-P
* Added a check in fs_mount(), whether the mount point is a directory. If
it wasn't, in general it wouldn't be possible to get its parent
directory.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8993 a95241bf-73f2-0310-859d-f6bbb57e9c96
why that was there before. Thanks to Ingo for pointing this out.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8981 a95241bf-73f2-0310-859d-f6bbb57e9c96
extensions/ directory - which will contain glibc specific additions
to the POSIX standard (getopt() is here because of getopt_long() etc.).
Also added obstack functions.
Added wcsmbs to the build.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8969 a95241bf-73f2-0310-859d-f6bbb57e9c96
Now maintains uid/gid/mode, modification and creation time for all nodes.
Implemented rootfs_write_stat() completely. rootfs_read_stat() now fills
in all required values.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8962 a95241bf-73f2-0310-859d-f6bbb57e9c96
time in st_mtime.
rootfs_write_stat() now properly locks the node access.
Minor cleanup.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8960 a95241bf-73f2-0310-859d-f6bbb57e9c96
permissions are not tested, though.
Removed the STREAM_TYPE_ constants.
Now maintains a modification and creation time for all nodes.
Implemented rootfs_write_stat() completely. rootfs_read_stat() now fills
in all required values.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8959 a95241bf-73f2-0310-859d-f6bbb57e9c96
Added note to dirfd() that it should be excluded from the kernel build
once the build system allows this.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8958 a95241bf-73f2-0310-859d-f6bbb57e9c96
This normally resides in the posix/ directory in the glibc source repository.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8944 a95241bf-73f2-0310-859d-f6bbb57e9c96
console driver now clears the screen when it's initialized.
This improves the first impression of the standard boot process when
booting in text mode (which currently happens when you press "escape"
in the early boot stage).
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8939 a95241bf-73f2-0310-859d-f6bbb57e9c96
IDE drivers :-)) don't respect the total amount of bytes to be read in the
former readv() (now read_pages()) call. This can potentially fix all sorts
of strange errors in userland :)
Fixed the debug build.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8938 a95241bf-73f2-0310-859d-f6bbb57e9c96
recreates a race condition, having it here breaks the kernel as fs_mount()
calls this function and already holds the mutex.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8936 a95241bf-73f2-0310-859d-f6bbb57e9c96
Now panics if devfs_publish_device() fails.
Tracing can now be turned on and off (it's now completely silent in normal operation).
Some cleanups.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8932 a95241bf-73f2-0310-859d-f6bbb57e9c96
unmounted.
* Clarified a comment in fs_mount().
* Added a bit of documentation regarding the mutexes and the basic vnode
functions.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8930 a95241bf-73f2-0310-859d-f6bbb57e9c96
available at /bin/sh (a symlink will do). Unfortunately there's some
problem with our shell that causes it to crash in most cases. :-(
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8925 a95241bf-73f2-0310-859d-f6bbb57e9c96
always do. More often than not one gets page faults. As it happens
sometimes even before anything meaty has been done at all
(e.g. in main()->init_statements()->shell_var_set_text()->
shell_value_init_text()->malloc()), I believe that's a problem not caused
by me. And I wasn't able to track it down.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8924 a95241bf-73f2-0310-859d-f6bbb57e9c96
Userland. It must always set the d_pdev and d_pino fields and, if the
Entry refers to a mount point even replace d_dev and d_ino.
* Added a TODO comment to entry_ref_to_vnode(). It should take care of
mount points, as vnode_path_to_vnode() does, I believe. Will verify
and fix that next.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8921 a95241bf-73f2-0310-859d-f6bbb57e9c96
this is the one thing most likely to fail - it now also handles this case
gracefully instead of dying.
Small cleanup, cleared some other ToDos: some user functions now delete
the area when they could not copy the target address.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8911 a95241bf-73f2-0310-859d-f6bbb57e9c96
leaving the tags Qt style though. That's a bit weird, but that's the
way Axel likes it, and we want to keep him happy, don't we? ;-P
* The common_[path_]read_stat() now fills in st_dev and st_ino in the
result stat structure after the FS had its go. The information is
readily available in the VFS, so why bother the FSs. In fact devfs
didn't (and still doesn't) fill in st_dev which gave dev_for_path()
some head ache.
* Modified _user_open_parent_dir() to accept a NULL buffer for the
entry name and added a doxygen comment for it.
df now works properly on Haiku (save that printf() doesn't support
floating point numbers at the moment).
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8898 a95241bf-73f2-0310-859d-f6bbb57e9c96
always also access it through the devfs_vnode. This also solves an issue
in devfs_read() where an access of a cookie->stream would crash the
kernel, since cookie->stream was not set in devfs_open().
* devfs_open() now doesn't fail for directories and symlinks anymore.
That prevented BNode to work for devfs dirs and symlinks.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8897 a95241bf-73f2-0310-859d-f6bbb57e9c96
`.'. This fixes the _kern_open_parent_dir() syscall for the root directory.
I realized, that rootfs_read_dir() doesn't return the entries `.' and `..',
unlike Be's rootfs. Shall I add those, Axel?
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8895 a95241bf-73f2-0310-859d-f6bbb57e9c96
This has the advantage that the device can now be access in the right context.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8876 a95241bf-73f2-0310-859d-f6bbb57e9c96
Fixed the calculation of the amount of bytes read in bootfs_read_pages().
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8874 a95241bf-73f2-0310-859d-f6bbb57e9c96
Added an vfs_get_cookie_from_fd() call to at least temporarily support the
cookie as in the original devfs (not sure yet how this changes).
Implemented vfs_get_file_map() which calls the corresponding FS function.
Moved vfs_get_vnode_cache() around.
vfs_get_vnode() temporarily does its job unlocked - its only to be used (safely)
from within the file cache, but this should definitely be done better.
Fixed a bug in get_vnode_name() - it did not support getting the name of
a root directory; it didn't pass the call through to the parent file system.
Fixed a bug in _user_entry_ref_to_path() which would add another "/" for
files immediately under the root (ie. "df" showed "//boot" as mount point
for the boot partition).
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8873 a95241bf-73f2-0310-859d-f6bbb57e9c96
_KERNEL_MODE is already defined when using kernel build rules, no need
to do it here manually.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8872 a95241bf-73f2-0310-859d-f6bbb57e9c96
couldn't be satisfied completely (ie. because the file size is not a
multiple of the page size).
It's no longer necessary to implement this functionality in the file systems.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8858 a95241bf-73f2-0310-859d-f6bbb57e9c96
node and its interface directly. It will also convert the old interface into
the new one to simplify the implementation.
devfs_open() now contains the former pnp_devfs_open() as well.
devfs_publish_device() no longer passes the "ident" parameter to its lower
layers - it will be removed.
The VM fs interface has changed to better match the one of the device interface.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8849 a95241bf-73f2-0310-859d-f6bbb57e9c96
addresses.
Not yet used - might be used instead of the vm_cache page caching for the file cache.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8819 a95241bf-73f2-0310-859d-f6bbb57e9c96
It still contains a very dump version of a BeOS compatible block cache.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8818 a95241bf-73f2-0310-859d-f6bbb57e9c96
allocate a cache twice.
The VFS is now responsible for allocating the cache object - it will call
the VM to do that if necessary.
Added another accessor call to a pointer to the VFS private vnode object.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8817 a95241bf-73f2-0310-859d-f6bbb57e9c96
allocate a cache twice. Now handles resource shortages gracefully.
Added small description to _vm_map_file().
Minor other cleanup.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8816 a95241bf-73f2-0310-859d-f6bbb57e9c96
Implemented and added functions from inttypes.h (not everything is working correctly, though).
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8787 a95241bf-73f2-0310-859d-f6bbb57e9c96
Renamed syscalls to the new scheme.
Some minor cleanup.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8770 a95241bf-73f2-0310-859d-f6bbb57e9c96
are currently disabled.
Removed unnecessary grist from source files.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8769 a95241bf-73f2-0310-859d-f6bbb57e9c96
work yet correctly).
Added empty sbrk() for now - not sure what to do with this. Maybe we should remove
it completely (but BeOS bash needs it).
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8767 a95241bf-73f2-0310-859d-f6bbb57e9c96
Added new "arch" subdirectory to the build.
Removed unnecessary grist from source files.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8760 a95241bf-73f2-0310-859d-f6bbb57e9c96
The kernel no longer trashes memory when you delete a port without any
messages in its queue (i.e. you can now safely link against libbe.so :)).
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8736 a95241bf-73f2-0310-859d-f6bbb57e9c96
not support the read_fs_info() function - only the values that the VFS
does know about are filled in, then.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8735 a95241bf-73f2-0310-859d-f6bbb57e9c96
have a smaller window in Bochs :)
Debugging output only if TRACE_VIDEO was defined.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8733 a95241bf-73f2-0310-859d-f6bbb57e9c96
* null-terminated the result of common_read_link().
* Fixed return value of _user_read_link().
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8705 a95241bf-73f2-0310-859d-f6bbb57e9c96
syscalls or to the syscall mechanism (which exposed naming and parameter
inconsistencies).
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8704 a95241bf-73f2-0310-859d-f6bbb57e9c96
syscalls or to the syscall mechanism (which exposed naming and parameter
inconsistencies).
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8703 a95241bf-73f2-0310-859d-f6bbb57e9c96
which from now on relieves us from the duty to maintain syscalls.S and
syscalls.c manually. Either includes a generated file.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8699 a95241bf-73f2-0310-859d-f6bbb57e9c96
yet, though (instead, it directly performs all requests, so there is no
functional difference to the previous mechanism).
devfs and the file cache will directly access the I/O scheduler. There is
one scheduler per raw disk device; devfs detects that automatically, and
all I/O will go through the scheduler, then.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8683 a95241bf-73f2-0310-859d-f6bbb57e9c96
somehow doesn't seem to work right with Bochs; after a reboot, the floppy
is not accessible (we might just need to turn the motor on again).
Not checked if this also happens on a real machine.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8655 a95241bf-73f2-0310-859d-f6bbb57e9c96
Added currently non-working version of platform_exit().
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8652 a95241bf-73f2-0310-859d-f6bbb57e9c96
The target function of an item is now called upon every action, not only
if that item had a sub menu...
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8651 a95241bf-73f2-0310-859d-f6bbb57e9c96
added to the boot device list anymore. This is currently used to remove
devices that don't support the LBA access mechanism (since CHS support has
still not been implemented).
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8650 a95241bf-73f2-0310-859d-f6bbb57e9c96
"Continue boot" will now be disabled if there are no boot volumes.
Also, there will be an additional menu item "Reboot" in that case.
The boot device menu will now show a disabled "No boot devices found" label
then, and will be selected upon entry. Added a help text to "Rescan volumes"
which will also be selected upon entry if there is no boot device.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8649 a95241bf-73f2-0310-859d-f6bbb57e9c96
user menu in that case, too (to give the user the opportunity to rescan
the available devices).
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8648 a95241bf-73f2-0310-859d-f6bbb57e9c96
whole loader from a floppy or CD-ROM and execute it as usual - and it
even seem to work, yaay :)
For now, the length of the boot loader is hard-coded, but it is compatible
with the "makeflop" command, i.e. it stores the length in bytes 3 & 4 in
the file.
Also, the maximum head number is currently hard-coded to floppies - ToDo
comments are in the text which insist on fixing this.
This makes testing the boot loader under Linux much easier, as it isn't
able to write to BFS volumes directly (and the copy_to_bfs_image command
doesn't build under Linux).
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8606 a95241bf-73f2-0310-859d-f6bbb57e9c96
It now accepts strings of any size, reduced the stack consumption.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8559 a95241bf-73f2-0310-859d-f6bbb57e9c96
addresses and their sizes are now set correctly in image_info as well, as
well as the device/node fields.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8556 a95241bf-73f2-0310-859d-f6bbb57e9c96
reusing the standard libroot objects, but build them all again to make
sure they are compiled with the proper flags (i.e. -fno-pic).
That saves a lot of headaches: as a side effect, the kernel runs fine
again, and even the node monitor test works nicely now. Go figure.
Only the string functions remain separate, but that should be changed
as well one day (it's not problematic, right now).
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8545 a95241bf-73f2-0310-859d-f6bbb57e9c96
Added empty implementations of fork() and all the exec*() variants; the
latter currently all call execve() and may pass the correct parameters
(not tested).
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8339 a95241bf-73f2-0310-859d-f6bbb57e9c96
is not in a good shape, Linux code is pretty ugly - we'll see which one
we'll choose :)
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8324 a95241bf-73f2-0310-859d-f6bbb57e9c96
Added more global variables that are maintained by the BeOS startup code.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8314 a95241bf-73f2-0310-859d-f6bbb57e9c96
apps are using those.
Their implementation is currently not complete; they just call the
public functions, the group argument is ignored.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8277 a95241bf-73f2-0310-859d-f6bbb57e9c96
Added comments from storage/NodeMonitor.cpp to the syscalls here (they
will be removed from NodeMonitor.cpp), and adapted them where necessary.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8237 a95241bf-73f2-0310-859d-f6bbb57e9c96
that you can now also look up symbols in there.
load_kernel_add_on() now sets the text section read-only & execute after
having loaded the area - note, it currently doesn't have any effect anyway :)
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8173 a95241bf-73f2-0310-859d-f6bbb57e9c96
there is no boot device available - this will prevent modules from getting
lost.
Added a comment to open_module_list() about its limitations while booting.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8170 a95241bf-73f2-0310-859d-f6bbb57e9c96
recognizes this and doesn't enable paging after entering the protected
mode again).
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8135 a95241bf-73f2-0310-859d-f6bbb57e9c96
run_menu() now supports menu_item_hook for CHOICE_MENU submenu items.
Now selects the video mode chosen in the menu - it's broken right now
if you enter the boot menu without asking for it (i.e. when there is
no boot volume found).
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8116 a95241bf-73f2-0310-859d-f6bbb57e9c96
Calls platform_init_video() directly after the heap initialization - the
logo will now be shown before the VFS is initialized.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8112 a95241bf-73f2-0310-859d-f6bbb57e9c96
scroll bar at the right side that shows you where you are.
"Page Up/Down" now jump one visible page up and down.
Support for MENU_ITEM_NO_CHOICE type.
Constants are now real constants :)
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8110 a95241bf-73f2-0310-859d-f6bbb57e9c96
part of the boot loader (because then the heap is already working).
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8107 a95241bf-73f2-0310-859d-f6bbb57e9c96
It's fixed now; mount_file_systems() will just ignore the boot partition.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8105 a95241bf-73f2-0310-859d-f6bbb57e9c96
You can already use the menu, but your options currently don't have any effect.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8094 a95241bf-73f2-0310-859d-f6bbb57e9c96
(when there is one), if you press escape, it will boot in console mode.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8052 a95241bf-73f2-0310-859d-f6bbb57e9c96
Replaced its functionality by a new platform_boot_options() call.
The switch to the logo screen now comes a little later.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8049 a95241bf-73f2-0310-859d-f6bbb57e9c96
above p_filesz - that means it didn't clear BSS etc. - this was not noticeable
from Bochs, though.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8045 a95241bf-73f2-0310-859d-f6bbb57e9c96
write the contents directly into the buffer. If we'll ever intend to
store mode infos in kernel memory, this should be changed back.
vesa_set_mode() now sets the correct flags to get a linear frame buffer;
graphical boot now works in Bochs 2.1.1 as well.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8044 a95241bf-73f2-0310-859d-f6bbb57e9c96
address directly, and therefore, we don't have to copy the structure
and eventually relocate the pointers.
Made the boot logo location dependent on its size.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8042 a95241bf-73f2-0310-859d-f6bbb57e9c96
- began to integrate the SMP/CPU stuff from the old boot loader; currently
disabled, though
- began VESA/VGA support
- added temporary boot splash screen; it's a bit of a hack and only seem
to work in Bochs 2.0.2 for now... (but hey, it looks good ;-))
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8016 a95241bf-73f2-0310-859d-f6bbb57e9c96
the real kernel file system (as there is no amiga_ffs add-on yet).
The file systems now also return the module name of their kernel counterparts.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7995 a95241bf-73f2-0310-859d-f6bbb57e9c96
It will now load all modules only once by identifying them using their inode number.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7991 a95241bf-73f2-0310-859d-f6bbb57e9c96
it's not known (it currently only support the current version, of course :-).
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7989 a95241bf-73f2-0310-859d-f6bbb57e9c96
Relocated the fortunes file to better match the usual Be locations.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7980 a95241bf-73f2-0310-859d-f6bbb57e9c96
It now sets the background color correctly in all modes (in hi/true color
currently only if its a gray/black/white color).
Renamed VFS syscalls to the new style.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7978 a95241bf-73f2-0310-859d-f6bbb57e9c96
Improved returned types.
Added and initializes Disk Device Manager.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7972 a95241bf-73f2-0310-859d-f6bbb57e9c96
Fixed read/write calls to use and update the descriptor position.
Removed the CHECK_USER_ADDR() macro; it's now using the usual (more readable) check.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7967 a95241bf-73f2-0310-859d-f6bbb57e9c96
Removed KFileDiskDevice functionality for now (since it would have required more changes).
Also disabled actual partition publishing/unpublishing, because this will
be done differently.
This change will temporarily break the DiskDeviceManagerTest build.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7914 a95241bf-73f2-0310-859d-f6bbb57e9c96
Changed thread_atkernel_exit() to look less broken - the way and when it's
called should still be investigated: NewOS looks a lot cleaner here.
create_thread() now creates the kernel stack upfront, so that it can easily
bail out of that fails. The user stack creation now makes use of B_BASE_ADDRESS
and is therefore a lot better and simpler. In case user stack creation failed,
it should now be able to handle that a lot more gracefully - but that hasn't
been tested yet...
Some cleanup.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7897 a95241bf-73f2-0310-859d-f6bbb57e9c96
Now correctly ignores "." and ".." in a directory.
Minor cleanup.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7895 a95241bf-73f2-0310-859d-f6bbb57e9c96
Introduced RESERVED_REGION_ID definition.
Some minor cleanups.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7886 a95241bf-73f2-0310-859d-f6bbb57e9c96
stack - it just fails now (since create_area() currently panics when it
fails, this is a cosmetic change anyway :-)).
Now correctly cleans up in case elf_load_user_image() fails.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7883 a95241bf-73f2-0310-859d-f6bbb57e9c96
Replaced "addr" with "addr_t".
Header cleanups.
There is no need to call set_tls_context() in arch_thread_init_tls().
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7880 a95241bf-73f2-0310-859d-f6bbb57e9c96
load_kernel_add_on() now protects the text area read-only (theoretically,
as set_area_protection() has not yet been implemented).
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7879 a95241bf-73f2-0310-859d-f6bbb57e9c96