Commit Graph

1848 Commits

Author SHA1 Message Date
Axel Dörfler
7b89ff958c Now uses kernel exported POSIX functions instead of their internal counterparts.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8269 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-07-02 02:55:24 +00:00
Axel Dörfler
9835b64792 Now use kernel exported POSIX functions instead of their internal counterparts.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8268 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-07-02 02:54:52 +00:00
Axel Dörfler
54f1ea35c7 Moved VFS syscall prototypes from vfs.h to syscalls.h.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8267 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-07-02 02:47:43 +00:00
Axel Dörfler
cfa218268b Moved VFS syscall prototypes from vfs.h to syscalls.h.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8266 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-07-02 02:38:03 +00:00
Axel Dörfler
f88314cbfc syscalls.h includes a little less than before...
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8265 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-07-02 02:36:09 +00:00
Axel Dörfler
20e40af982 syscalls.h now includes less than before.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8264 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-07-02 02:34:36 +00:00
Axel Dörfler
477bb27551 Renamed node monitor syscalls to the new scheme.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8263 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-07-02 02:32:00 +00:00
Axel Dörfler
5ace7ebc02 Now uses the B_PATH_NAME_LENGTH constant.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8262 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-07-02 02:30:36 +00:00
Axel Dörfler
5f6aed4937 syscalls.h now includes a little less than before.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8261 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-07-02 02:29:11 +00:00
Axel Dörfler
26afb01fec Renamed image syscalls.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8260 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-07-02 02:27:53 +00:00
Axel Dörfler
0f579f8c6d Improved debug output when tracing is enabled.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8259 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-07-02 01:57:52 +00:00
Axel Dörfler
806586a704 Fixed compilation due to recent header changes.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8258 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-07-02 01:55:04 +00:00
Axel Dörfler
1084b3fc17 It's now _kern_null(), not sys_null() anymore.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8257 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-07-02 01:53:36 +00:00
Axel Dörfler
e54c578346 Made the debugger() call a bit more useful - this is still no real implementation, of course.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8243 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-30 02:59:44 +00:00
Axel Dörfler
176a4ebc28 Added a proper assert() implementation, removed the old one.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8242 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-30 02:39:29 +00:00
Axel Dörfler
50dbc6bcbd Renamed node monitor syscalls to the new scheme.
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
2004-06-29 20:25:21 +00:00
Axel Dörfler
f004b0c15e Renamed image and node monitor syscalls to the new scheme.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8236 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-29 20:19:48 +00:00
Axel Dörfler
92726d601a Added the "other" stdio stuff to the build (stuff that's not from glibc).
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8228 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-29 00:05:08 +00:00
Axel Dörfler
5ab2a9e4b4 Added missing functions from fs_query.h and fs_info.h, both not yet implemented.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8217 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-28 12:36:13 +00:00
Axel Dörfler
e5948ee29a Resurrected posix_stdio.o: it now contains additional stdio functions not
covered by glibc's libio/stdio.
Added rename() and remove().


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8216 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-28 12:27:39 +00:00
Axel Dörfler
e4901b9f4b "ls" now also prints the offset to the function.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8174 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-26 03:08:36 +00:00
Axel Dörfler
5a23dcc80b find_image_at_address() now also takes the data section into account, so
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
2004-06-26 02:15:48 +00:00
Axel Dörfler
a8441c4fd2 During early boot, put_module_image() will no longer unload anything when
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
2004-06-26 01:40:46 +00:00
Axel Dörfler
00641fbdd8 Now maintains and exports a variable that points to the boot device.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8169 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-26 01:38:20 +00:00
Axel Dörfler
24e8f2c929 Fixed debugger command "dw" address translation, added better help output.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8150 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-25 00:44:54 +00:00
Axel Dörfler
8ed11b38dc Fixed a stupid bug; malloc() was called with the wrong size - always use the "struct"
keyword in sizeof().


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8148 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-24 23:48:44 +00:00
Axel Dörfler
a5fb7d4954 call_bios() can now also be called without having paging enabled (it now
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
2004-06-22 23:40:50 +00:00
Axel Dörfler
407c481dd1 Added strchr() to the boot loader.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8120 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-22 04:13:27 +00:00
Axel Dörfler
a7aea4b86d Now shows the help text of a menu item while it's selected (up to two lines of
text, automatically wrapped correctly).
Added print_centered() function.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8119 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-22 02:55:51 +00:00
Axel Dörfler
447564cfea Added some help texts.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8118 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-22 02:53:34 +00:00
Axel Dörfler
649f65cc3a Added help text functionality.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8117 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-22 02:52:38 +00:00
Axel Dörfler
a104674fdf Fixed typo, corrected video mode menu usage.
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
2004-06-22 01:19:53 +00:00
Axel Dörfler
bc8add5da8 Now the menu items that can't be chosen are of type MENU_ITEM_NO_CHOICE.
Fixed a typo.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8114 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-22 01:14:45 +00:00
Axel Dörfler
c668dff52c A MenuItem now maintains a "user data" pointer.
Menu::Run() now calls platform_run_menu().


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8113 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-22 00:39:40 +00:00
Axel Dörfler
81f569510c Now only switches to the boot logo if no boot menu was requested.
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
2004-06-22 00:37:46 +00:00
Axel Dörfler
f42302bcc8 Now maintains a list of possible video modes, and creates a real video
mode menu that even works.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8111 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-22 00:35:19 +00:00
Axel Dörfler
3be048bd11 Support for menus with more items than fit on screen; there will be a
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
2004-06-22 00:32:48 +00:00
Axel Dörfler
0ac3f5399f No longer initializes video - it will now be done by the platform independent
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
2004-06-22 00:26:33 +00:00
Axel Dörfler
ef9cf5ac1b platform_add_block_devices() no returns B_OK, but still does nothing.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8106 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-22 00:23:15 +00:00
Axel Dörfler
3cdfe493ba What a great idea to remove the boot partition from the partition list...
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
2004-06-21 22:11:32 +00:00
Axel Dörfler
c54d49c275 Work in progress of the boot loader menu.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8095 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-21 15:57:56 +00:00
Axel Dörfler
689c94c815 Work in progress of the boot loader menu.
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
2004-06-21 15:57:03 +00:00
Axel Dörfler
b045bd49f4 Kernel add-ons were not correctly registered (image_info was initialized
after the registration...).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8087 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-21 00:10:55 +00:00
Philippe Houdoin
ac9005b4bb s/OpenBeOS/Haiku/
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8073 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-20 15:47:22 +00:00
Axel Dörfler
d31902e857 The new logo for the boot loader.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8072 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-20 00:49:23 +00:00
Axel Dörfler
5b82deb912 Now checks for boot options; if you press space, it will enter the boot menu
(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
2004-06-18 15:32:49 +00:00
Axel Dörfler
c89be553a6 Added keyboard.cpp to the build.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8051 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-18 15:30:39 +00:00
Axel Dörfler
d0c5d9f9a8 Removed some debug output, no longer panics to be able to read the output :)
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8050 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-18 15:29:31 +00:00
Axel Dörfler
c28f7b9932 Removed platform_user_menu_requested() call.
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
2004-06-18 15:26:53 +00:00
Axel Dörfler
2ac69a4d66 Activated CPU speed conversion factor calculation again.
Added a spin() function.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8046 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-18 15:23:18 +00:00
Axel Dörfler
baf3145769 Fixed a big bug in the ELF loader: it didn't clear out the loaded segment
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
2004-06-18 15:20:47 +00:00
Axel Dörfler
4c179368aa vesa_get_mode_info() no longer copies the buffer as well; it will now
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
2004-06-18 13:47:00 +00:00
Axel Dörfler
e70d4cb70e Added some VBE set mode definitions.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8043 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-18 13:41:38 +00:00
Axel Dörfler
ce5cf7b312 Simplified the VBE info block retrieval: we now use the intended target
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
2004-06-18 13:29:32 +00:00
Axel Dörfler
7fe1bdeec9 Added some handy address conversion macros.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8041 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-18 13:23:34 +00:00
Axel Dörfler
fc17fe17eb Implemented the BIOS functions to access the keyboard buffer.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8035 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-18 02:48:53 +00:00
Axel Dörfler
80180472db This fixes the PPC kernel build.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8031 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-17 13:33:36 +00:00
Axel Dörfler
5829c4a2db Fixed warnings due to the changes in vm_translation_map.h.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8030 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-17 13:27:53 +00:00
Axel Dörfler
ae4a9c5f25 Fixed warnings due to the type changes in vm_translation_map.h.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8029 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-17 13:23:30 +00:00
Axel Dörfler
3ae898da8b Fixed the PPC boot loader build and added empty stub routines.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8022 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-17 12:22:10 +00:00
Axel Dörfler
4adfc8f463 kernel.so and kernel targets now contain the same and correct objects.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8021 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-17 11:08:34 +00:00
Axel Dörfler
c8079ef9c9 Now switched to the boot logo and back when necessary.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8017 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-17 01:03:36 +00:00
Axel Dörfler
eefe4b1d21 Work in progress:
- 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
2004-06-17 01:02:40 +00:00
Axel Dörfler
754fdef3d7 panic() now calls hlt instead of spinning forever.
Added a ToDo comment.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8015 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-17 00:59:02 +00:00
Axel Dörfler
842a265376 mmu_map_physical_memory() now accepts physical memory addresses that are not aligned to a page.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8014 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-17 00:56:45 +00:00
Axel Dörfler
1273cbedfc Added new function to map physical memory.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8013 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-17 00:53:00 +00:00
Axel Dörfler
faad86a4aa Some more debug output.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8012 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-17 00:49:34 +00:00
Axel Dörfler
d001f09162 Removed the directory contents dump in vfs_mount_boot_file_system().
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8004 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-16 13:26:39 +00:00
Axel Dörfler
578257f77e Fixed read/write fd functions return type.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8002 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-16 10:32:26 +00:00
Axel Dörfler
0e3f14ee1d Now return useful inode numbers. The BFS inode numbers match the ones from
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
2004-06-15 17:05:34 +00:00
Axel Dörfler
50ef9ecfb6 Now stores the module name of the modules handling the partition.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7994 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-15 17:04:05 +00:00
Axel Dörfler
082a2195f0 fstat() now fills in the inode number as well.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7993 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-15 17:01:45 +00:00
Axel Dörfler
a1b4720e1a load_modules() will now also load all modules that are needed to identify
the partitioning and file system of the boot volume.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7992 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-15 17:00:52 +00:00
Axel Dörfler
d88c45c6f2 Now maintains the inode field in the preloaded_image structure.
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
2004-06-15 16:59:59 +00:00
Axel Dörfler
4807cd86ea Now stores a link to the partition of a volume, and adds a new method
GetPartitionFor() to retrieve that information again.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7990 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-15 16:58:50 +00:00
Axel Dörfler
f24066f694 Now checks the kernel args structure size and version, and bails out if
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
2004-06-15 16:57:13 +00:00
Axel Dörfler
201b3e6fd1 Now maintains the kernel_args size and version fields.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7988 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-15 16:55:45 +00:00
Axel Dörfler
0e67fb5a42 Now maintains the kernel_args size and version fields.
Removed unused code.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7987 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-15 16:55:27 +00:00
Axel Dörfler
995a393e12 Unfortunately, -fno-pic must be set manually, even for kernel rules.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7982 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-15 16:49:36 +00:00
Axel Dörfler
262923839e Made strrchr() available in the boot loader.
Relocated fortunes to the standard /etc.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7981 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-15 16:03:35 +00:00
Axel Dörfler
67d9fe3273 Fixes fortune; it no longer crashes when there are no fortunes in the file.
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
2004-06-15 16:02:45 +00:00
Axel Dörfler
6f4ae5140d Renamed VFS syscalls to the new scheme.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7979 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-15 16:00:53 +00:00
Axel Dörfler
fc44d00f56 Added 8-bit palette mode.
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
2004-06-15 15:51:41 +00:00
Axel Dörfler
b640ca789b Renamed VFS syscalls to the new style.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7977 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-15 15:49:34 +00:00
Axel Dörfler
b1753651c6 Renamed VFS syscalls to the new style.
Improved returned types.
Removed dup2.c.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7976 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-15 15:42:17 +00:00
Axel Dörfler
b8599dec8e Added needed header when tracing is enabled.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7975 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-15 15:40:21 +00:00
Axel Dörfler
5d5716e614 Now calls the new devfs partition (un)publishing calls.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7974 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-15 15:38:55 +00:00
Axel Dörfler
0d961b9fbc The KPartition base class does not know anything about publishing.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7973 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-15 15:37:46 +00:00
Axel Dörfler
affbc7ade7 Renamed VFS syscalls to the new style.
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
2004-06-15 15:35:10 +00:00
Axel Dörfler
bd2d09ddc3 Added empty implementations of the new partition publish/unpublish calls.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7970 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-15 15:32:22 +00:00
Axel Dörfler
9a0de43e56 Added private storage headers to be able to use disk device manager headers.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7969 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-15 15:30:59 +00:00
Axel Dörfler
c8a8e52f79 Renamed VFS syscalls to the new style.
Improved returned types.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7968 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-15 15:29:37 +00:00
Axel Dörfler
244272ccb4 Renamed VFS syscalls to the new style.
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
2004-06-15 15:28:33 +00:00
Axel Dörfler
32dc7b6393 Renamed VFS syscalls to the new style.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7966 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-15 15:26:22 +00:00
Axel Dörfler
e878738efd Fixed compilation with tracing turned on.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7965 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-15 15:25:25 +00:00
Axel Dörfler
143691ef36 New dup.c - it now contains dup() and dup2() which makes dup2.c legacy.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7964 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-15 15:20:38 +00:00
Stefano Ceccherini
6ed18b369b Fixes the build with gcc 3.2.2 (still has many warnings, though)
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7950 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-14 08:46:38 +00:00
beveloper
20c1edc7d0 fixed warnings
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7936 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-12 21:53:07 +00:00
Axel Dörfler
e44da8eb5c Build was broken due to missing -fno-pic (have I mentioned that we need
a new build system? :-))


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7933 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-12 20:58:30 +00:00
Axel Dörfler
f6fed308e3 Rewrote KDiskDeviceManager::CreateDefault() to be easier to read and actually
return the correct error code in case there is one.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7932 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-12 20:57:11 +00:00
Axel Dörfler
1314df1a0f Added disk device manager to the build.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7917 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-11 21:31:55 +00:00
Axel Dörfler
c9690ffdd8 Changed the build so that all symbols are exported.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7916 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-11 21:25:23 +00:00
Axel Dörfler
499b29e3ea Made all necessary changes to build the DiskDeviceManager as part of the kernel.
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
2004-06-11 21:03:31 +00:00
Axel Dörfler
e27f9449fe Now uses spawn_kernel_thread() instead of spawn_thread().
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7911 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-11 15:47:19 +00:00
Axel Dörfler
4a847f30c5 Added exit_thread().
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
2004-06-11 01:45:33 +00:00
Axel Dörfler
6e0526544a Now cuts off the path when it gives a team's main thread its name.
Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7896 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-11 01:36:29 +00:00
Axel Dörfler
80c27b7a53 Switched to opendir() and friends instead of directly calling VFS functions.
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
2004-06-11 00:56:26 +00:00
Axel Dörfler
7bdd1a7874 user_vm_map_file() was broken after recent changes; it didn't allow the
kernel to write to read-only userland areas.
Cleanup.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7893 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-11 00:39:40 +00:00
Axel Dörfler
9b1718cc6c Fixed number()/snprintf(): the buffer length was completely ignored when
printing numbers.
Removed unused code.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7887 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-10 05:27:48 +00:00
Axel Dörfler
fab1cad1b8 Now other code accounts for reserved regions in the standard region_list as well.
Introduced RESERVED_REGION_ID definition.
Some minor cleanups.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7886 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-10 02:03:55 +00:00
Axel Dörfler
edfcb58323 Tuned message in case debug command "ls" fails.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7884 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-10 01:47:44 +00:00
Axel Dörfler
6f09e38dea team_create_team2() no longer panics if it couldn't create the userland
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
2004-06-10 01:43:16 +00:00
Axel Dörfler
abd212c06a Minor cleanup.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7882 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-10 01:39:17 +00:00
Axel Dörfler
6ee4a2f161 Removed B_EXACT_KERNEL_ADDRESS again.
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
2004-06-09 18:10:45 +00:00
Axel Dörfler
577402ea7e We now have text_region and data_region instead of the unclear array.
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
2004-06-09 02:55:54 +00:00
Axel Dörfler
9d256ebb6e We now have text_region and data_region instead of the unclear array.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7878 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-09 02:52:17 +00:00
Axel Dörfler
c9a96524d2 Modified load_kernel_add_on() to use the new address range reservation functions.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7876 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-09 02:24:51 +00:00
Axel Dörfler
500e879b20 Implemented vm_unreserve_address_range().
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7875 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-09 02:18:18 +00:00
Axel Dörfler
76377cf3f5 - Removed B_EXACT_KERNEL_ADDRESS - doesn't make that much sense (it was a private
and (very) temporary extension, anyway).
- Fixed _user_create_area() - it will now also recognize B_ANY_KERNEL_BLOCK_AREA,
  and it will not access a kernel address for B_EXACT_ADDRESS.
- create_area() will now handle B_EXACT_ADDRESS correctly as well.
- get_memory_map() will now silently ignore the missing final entry if the map
  contains only one entry.
- The check for user memory was wrong in get_memory_map(); it worked, but it
  was not necessarily portable.
- vm_reserve_address_range() was not correctly initializing the region.
- find_and_insert_region_slot() will now search for reserved regions when
  B_EXACT_ADDRESS is used - not yet tested, though.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7871 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-09 01:04:51 +00:00
Axel Dörfler
98b3dfb3e1 Extracted the address specification stuff out of map_backing_store() and
created a call around find_and_insert_region_slot() that takes care of
everything. Fixed B_BASE_ADDRESS support (it now really works).
First shot at a new VM function vm_reserve_address_range() that will be
used to fix our ELF loader issues (which needs to create adjacent regions
which the VM cannot guaranty at this point).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7870 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-09 00:05:02 +00:00
Axel Dörfler
e243c52503 Now correctly handles B_BASE_ADDRESS, and probably B_ANY_KERNEL_BLOCK_ADDRESS,
too.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7866 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-08 22:55:39 +00:00
Axel Dörfler
706d99ca73 This patch from Jack Burton should finally fix the interrupt problems on
thread exit - get_death_stack() now returns the interrupt state so that
it can be restored correctly later.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7865 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-08 22:07:08 +00:00
Axel Dörfler
1d67f5a556 Fixed executable paths.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7864 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-08 22:02:44 +00:00
Axel Dörfler
9c642b6454 Adjusted paths.
The stack of the main thread is now called "{team name}_main_stack" instead
of primary stack.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7863 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-08 21:35:14 +00:00
Axel Dörfler
0b57ed842f Adjusted paths to new locations.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7862 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-08 21:15:16 +00:00
Axel Dörfler
5fce212779 Adjusted the default library path to the standard Be location - added
a note that we should evaluate the LIBRARY_PATH env variable.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7861 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-08 21:08:08 +00:00
Axel Dörfler
d26f311066 Moved the executable files to locations that better match the Be directory
hierarchy.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7860 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-08 21:01:02 +00:00
Stefano Ceccherini
f59a054710 Should always count to 10 before committing. Another comment
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7856 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-08 14:26:22 +00:00
Stefano Ceccherini
741f96a162 Added a comment
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7855 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-08 14:03:38 +00:00
Axel Dörfler
e2df52b7da The symlink traversion didn't balance the ref_count of the starting vnode
correctly when it entered the next recursion of vnode_path_to_vnode().


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7854 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-08 11:34:49 +00:00
Axel Dörfler
c26e46469e Fixed warning I just introduced.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7853 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-08 10:17:32 +00:00
Axel Dörfler
618253640c Userland segments are now called _seg0rw/_seg0ro.
Replaced "addr" with "addr_t".
Made segment naming safe (could the buffer could overflow).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7852 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-08 10:01:24 +00:00
Axel Dörfler
3c20ebe8d7 Unified kernel loader area names (they now use "_text", and "_data" suffixes
only).
Userland segments are now called _seg0rw/_seg0ro.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7851 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-08 09:56:51 +00:00
Axel Dörfler
dc991aec9e Removed REGION_WIRING_* and REGION_ADDR_* and replaced them by their
BeOS counterparts.
Improved output of dump_region_list().
Cleanup.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7850 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-08 09:45:50 +00:00
Axel Dörfler
ee7e4109ad Removed REGION_WIRING_* and REGION_ADDR_* and replaced them by their
BeOS counterparts.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7849 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-08 09:33:51 +00:00
Axel Dörfler
3c9e531071 Removed NewOS LOCK_KERNEL and LOCK_RW - replaced by B_READ_AREA, and friends.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7846 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-08 08:24:53 +00:00
Axel Dörfler
1adfa388af Hardcoded vfs_mount_boot_file_system() to try to mount the first raw SCSI
device with BFS - if it succeeds, it will print out the contents of the
volume's root directory.
fs_mount() now makes the mount structure available when mount() from the
FS is called - so that new_vnode() and get_vnode() can work.
fs_mount() did not correctly clean up when something went wrong; it also
didn't notice if the mount's recursive lock couldn't be created.
Some minor debug output improvements.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7845 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-08 06:43:46 +00:00
Axel Dörfler
e08f7c4e6f Added stupid version of parse_expression() for the kernel debugger.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7839 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-08 06:24:35 +00:00
Axel Dörfler
f1613a0b1f Replaced libvm.a with kernel_vm.o.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7833 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-08 06:05:46 +00:00
Axel Dörfler
bd383ca361 Added simple and dumb BeOS compatible cache implementation - at this point
it's (almost) read only.
Added it to the build - libvm.a is now build as merged object file, since
the cache functions didn't get exported else.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7831 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-08 06:02:43 +00:00
Axel Dörfler
69debf9e84 get_module() didn't correctly maintain the module ref_count (in case
something went wrong) - this would have hidden circular dependencies
as well.
Recursive directory scan was broken, it didn't filter "." and ".." out.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7829 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-08 05:58:23 +00:00
Axel Dörfler
39f34cf425 Fixed the broken ioctl() function. Unlike BeOS, it also passes the
eventually specified length parameter.
The IOCPARM_LEN() macro should be used by the device/file system
implementation only if applicable.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7828 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-08 05:53:35 +00:00
Axel Dörfler
baae156b90 Added built-in file system modules.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7812 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-07 17:33:18 +00:00
Axel Dörfler
6fdd106e9a File systems are modules now, so the module initialization must come before
bootstrapping the initial file systems.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7811 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-07 17:32:16 +00:00
Axel Dörfler
730f5a50cc No longer needed.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7810 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-07 17:29:43 +00:00
Axel Dörfler
f8edd5ecee File systems are modules now; removed all those no longer file system add-on
things.
Added unremove_vnode().


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7808 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-07 17:25:55 +00:00
Axel Dörfler
bc1f913e8b File systems are modules now.
Renamed gDeviceFileSystem to sDeviceFileSystem.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7807 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-07 17:22:32 +00:00
Axel Dörfler
093015033f File systems are modules now.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7806 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-07 17:20:59 +00:00
Axel Dörfler
287704526b Don't panic for now if the PnP-root node cannot be registered; it doesn't
harm in case bootfs is used for now.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7804 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-07 15:17:02 +00:00
Axel Dörfler
a0c7420724 Changes due to renaming the public fs functions.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7803 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-07 14:30:56 +00:00
Axel Dörfler
a540a3f904 Renamed the public fs functions (removed the vfs_ prefix), and separated
them from other functions.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7802 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-07 14:25:22 +00:00
Axel Dörfler
47197929ca Temporarily disabled bus manager iteration - this might be done differently
anyway when it's all done.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7788 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-07 01:45:16 +00:00
Axel Dörfler
12373950ab Added header guards, cleanup.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7787 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-07 01:40:08 +00:00
Axel Dörfler
a6426a42d7 Better debug output.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7786 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-07 01:35:53 +00:00
Axel Dörfler
8a0d571192 That word might even exist, who knows?
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7785 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-07 01:33:39 +00:00
Axel Dörfler
c8d5cf78c9 Improved debug output.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7784 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-07 01:28:51 +00:00
Axel Dörfler
d9918aa7e8 Added temporary hack to load the ISA bus manager.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7783 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-07 01:25:45 +00:00
Axel Dörfler
97dfc072d7 Added devfs module to the built-in modules.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7782 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-07 01:21:08 +00:00
Axel Dörfler
c920230fed Added device manager support - work in progress.
Updated debugging macros.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7781 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-07 01:18:56 +00:00
Axel Dörfler
2fa2a91f08 Fixed build conflict with new ISA bus manager.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7780 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-07 01:13:49 +00:00
Axel Dörfler
7c3d0ba1f5 get_memory_map() didn't take page offsets into account (i.e. didn't work correctly).
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7762 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-06 16:39:03 +00:00
Axel Dörfler
2195a2522a Implemented get_memory_map().
lock_memory() and unlock_memory() will now silently fail and return success -
that's only to get things working.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7754 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-06 01:14:18 +00:00
Axel Dörfler
755b059fc1 Doh, Elf32_Word is unsigned, so st_size cannot go below zero.
Also made elf_lookup_symbol_address() less restrictive with respect to the
ELF symbol found (it now accepts all types, not only functions).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7714 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-01 00:35:55 +00:00
Axel Dörfler
6444e8f7bf Copied boot loader code to load symbol table into kernel as well - not yet
tested, though.
No longer copies the elf_header in insert_preloaded_image(); it's not used
at runtime (should be superfluous to keep in other kernel images, too).
dump_symbols() now ignores entries with invalid values - don't know exactly
what makes a good entry, but that should look okay.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7713 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-06-01 00:27:15 +00:00
Axel Dörfler
8b33111039 Updated ELF loader to use preloaded_image struct for the kernel.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7712 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-31 23:52:01 +00:00
Axel Dörfler
b1b1136ca3 No longer uses gKernelEntry.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7710 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-31 23:15:37 +00:00
Axel Dörfler
2f42f1cf3a gKernelEntry is no longer needed.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7709 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-31 23:12:15 +00:00
Axel Dörfler
cbb2b6c19f The kernel image data is now maintained in a preloaded_image as well.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7707 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-31 22:54:43 +00:00
Axel Dörfler
bc6ab31951 (Almost) removed special handling of the kernel image, as it's now
maintained in a preloaded_image as well.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7706 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-31 22:51:01 +00:00
Axel Dörfler
38e937ca8e Removed superfluous htons()/htonl() functions (we already have the
standard byte order functions in the kernel).
Small cleanup.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7705 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-31 22:49:06 +00:00
Axel Dörfler
5cc177f4d6 Replaced all "addr" with "addr_t".
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7702 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-31 21:58:18 +00:00
Axel Dörfler
52823d0c3d Added debugger command for dumping all symbols of the specified kernel image.
Fixed warnings when compiled with TRACE_ELF.
Changed elf_lookup_symbol_address() to returning more useful information.
It now also scans the extended debug symbol table if present - for now, this
only works with preloaded images except the kernel.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7701 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-31 21:47:34 +00:00
Axel Dörfler
73e40f2d6e Small hack to get create_area() to create valid r/w areas in the kernel
(in BeOS, all kernel areas are r/w).
If you use B_READ_AREA/B_WRITE_AREA flags, you make the area readable
or even writeable from userland!


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7700 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-31 21:43:57 +00:00
Axel Dörfler
9d9a07acd8 Minor cleanup.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7699 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-31 21:41:39 +00:00
Axel Dörfler
4a88dcb2cd Changed the "sc" output to be more useful.
Now uses the extended possibilities of the elf_lookup_symbol_address() call.
Fixed a bug in dbg_stack_trace(); it could crash at the top most stack frame.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7698 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-31 21:40:43 +00:00
Axel Dörfler
fa1ddc4f0e For debugging purposes, the boot loader is now able to load an additional
symbol table into memory and hand it over to the kernel.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7695 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-31 20:30:20 +00:00
Stefano Ceccherini
0bedbce52c Fixes the build when TRACE_SCHEDULER is defined
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7663 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-27 14:46:10 +00:00
Axel Dörfler
6d7ccae449 Separated exported from private functions.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7654 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-26 15:11:39 +00:00
Axel Dörfler
5aacd7f134 Fixed the PPC kernel build; now in sync again with the changes made
to arch/thread.h and arch/smp.h.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7641 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-25 16:33:47 +00:00
Axel Dörfler
0865e4b204 Added syscall for rename_thread(), courtesy of Jack Burton.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7631 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-24 12:12:58 +00:00
Stefano Ceccherini
9b167d37f1 Added a TODO item
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7630 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-24 09:06:20 +00:00
Stefano Ceccherini
389b7216d6 Fixed "team" debugger command (should be the last one)
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7625 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-21 10:17:08 +00:00
Axel Dörfler
ce986d0759 Renamed the build target of the kernel's test "ls" app (to separate it from
coreutil's ls).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7619 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-19 15:21:29 +00:00
Axel Dörfler
88cfa4fb99 Applied Jack Burton's patch to fix the boot problems on many systems:
find_real_mem_size must not be called with interrupts turned off.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7609 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-18 10:27:28 +00:00
Axel Dörfler
adbaa7817e It's now B_MAX_CPU_COUNT rather than SMP_MAX_CPUS.
Removed unused headers.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7608 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-18 09:42:13 +00:00
Axel Dörfler
f9ba8a1b61 Last patch was broken, thanks to Jack Burton for notifying me.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7606 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-17 10:01:17 +00:00
Axel Dörfler
70cdc7af60 If you call get_fd_and_vnode() you need to free it with put_fd(), not
put_vnode() - thanks to Ingo for pointing this out.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7597 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-16 11:55:42 +00:00
Axel Dörfler
20b8926754 The -imacro header inclusion is no longer necessary, and also seems to have
been removed in more current GCC releases; thanks to Jack Burton for pointing
this out.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7580 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-14 15:28:49 +00:00
Axel Dörfler
0b8a2c94ce Introduced sUsedPorts/sUsedSems variables that can make it more efficient
to deny further port/sem allocation (and also simplifies port/sem stats).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7570 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-13 19:35:49 +00:00
Axel Dörfler
78ab9987c3 Modules out of preloaded images will now be registered and can be used
like any other module (yeeha!).
You can even unload preloaded images later on (to replace them with a
more up-to-date on disk version).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7532 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-11 23:44:58 +00:00
Axel Dörfler
8590e919fc Now maintains the new preloaded_image::id field.
If an image cannot be created out of a preloaded_image, its resources
are freed now.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7531 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-11 23:43:30 +00:00
Axel Dörfler
d00edc2f92 Bye, bye elf_lookup_symbol(), hello get_image_symbol().
Also renamed elf_load_kspace() to load_kernel_add_on(), and friends.
The new unload_kernel_add_on() now has an image_id as parameter, no longer
a path (like the former elf_unload_kspace()).
Now requires a driver to export the api_version symbol.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7528 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-11 19:53:37 +00:00
Axel Dörfler
b918b5035f Bye, bye elf_lookup_symbol(), hello get_image_symbol().
Also renamed elf_load_kspace() to load_kernel_add_on(), and friends.
The new unload_kernel_add_on() now has an image_id as parameter, no longer
a path (like the former elf_unload_kspace()).
Fixed missign file system unload.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7527 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-11 19:52:38 +00:00
Axel Dörfler
81c323a767 unregister_elf_image() didn't call unregister_image(), so images never got
unregistered.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7526 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-11 17:30:18 +00:00
Axel Dörfler
d14f9aac93 Cleanup to better match our coding style guide; renamed variables, etc..
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7525 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-11 17:29:19 +00:00
Axel Dörfler
7e323e80d6 Kernel images are now registered, so the ToDo item is fulfilled.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7524 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-11 17:27:59 +00:00
Axel Dörfler
a364fba7d4 Is now using a hash for the images instead of a singly linked list.
Now registers its images as it should do (so you can use commands like
listimage in userland).
Added new debugger command "image".


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7522 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-11 17:18:02 +00:00
Axel Dörfler
11a5baaf67 Updated the private kernel image API to be more efficient (no longer needs
to acquire the team spinlock).
Renamed the user syscalls to the new style.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7521 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-11 15:04:36 +00:00
Axel Dörfler
fd1f6b7f01 Fixed a bug in elf_load_kspace(): the image structure and the pheaders were
freed in the wrong order in case of an error (could have crashed the kernel).
Implemented insert_preloaded_images() which prepares the preloaded images
for later use in the kernel.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7520 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-11 14:22:00 +00:00
Axel Dörfler
dc4eb9db8d Removed unneeded code, updated comment.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7519 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-11 14:20:14 +00:00
Axel Dörfler
797647691a elf_region already had a field to store an area_id; we now use this one.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7518 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-11 13:54:13 +00:00
Axel Dörfler
ff76eb5cde Boot loader BFS now has symbolic link support.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7516 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-11 12:16:26 +00:00
Axel Dörfler
73b10c8f1e Adapted the fstat/_fstat work-around to like the user boot loader build as well.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7514 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-11 01:07:54 +00:00
Axel Dörfler
259fd3cdfb open_from() now also supports absolute paths, in which case it will ignore
the passed in directory.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7513 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-11 00:26:22 +00:00
Axel Dörfler
429fb127d3 Fixes the build until we have this _fstat()/fstat() thing worked out.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7512 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-10 23:04:52 +00:00
Axel Dörfler
1f4fa35b00 Now creates text/data areas for all preloaded images.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7507 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-10 19:02:41 +00:00
Axel Dörfler
d15df01c72 load_modules() now actually load modules; it doesn't just print out their name any longer.
Now scans "/boot/home/config/add-ons/kernel/boot" as well as "/boot/beos/system/add-ons/kernel/boot".


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7506 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-10 19:00:05 +00:00
Axel Dörfler
38f5c6bbc4 Corrected elf_load_image() prototype; it requires an object of the Directory
class as first argument.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7505 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-10 18:57:58 +00:00
Axel Dörfler
cdacbf022a elf_load_image() always returned B_OK instead of the real status.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7504 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-10 18:57:12 +00:00
Axel Dörfler
bf67cc9591 Now uses the correct heap to allocate the image path name (kernel_args).
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7502 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-10 16:49:23 +00:00
Axel Dörfler
e883af3cda Since we use the same includes as the real system, we now export _fstat()
with 3 arguments instead of fstat().


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7501 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-10 16:48:33 +00:00
Axel Dörfler
007c81ec98 Added kernel_args_strdup() function as a strdup() replacement.
Added a ToDo comment.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7500 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-10 16:47:06 +00:00
Axel Dörfler
f4c303c472 Fixed some warnings.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7498 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-10 14:56:48 +00:00
Axel Dörfler
0204c9a360 Added device manager to the kernel.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7497 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-10 14:49:38 +00:00
Axel Dörfler
d93e356b51 Changed the "stat" related syscalls to have an additional parameter that specified
the size of the stat structure to allow extensions of that structure.
Renamed those syscalls to the new naming scheme.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7496 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-10 14:36:05 +00:00
Axel Dörfler
c396c39fc5 Changed the "stat" related syscalls to have an additional parameter that specified
the size of the stat structure to allow extensions of that structure.
Renamed those syscalls to the new naming scheme.
Updated the syscalls to support stat extensions.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7494 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-10 14:33:17 +00:00
Axel Dörfler
7a7c7d9c2f Added current device manager built-in modules - the device manager itself will
probably be available as public kernel API as well (or rather, only).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7492 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-10 13:29:47 +00:00
Axel Dörfler
9bd10a87c7 The device manager is now initialized as well.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7491 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-10 13:28:21 +00:00
Axel Dörfler
8d1b721ad5 Added device_manager to the build.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7490 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-10 13:27:20 +00:00
Axel Dörfler
6aed83b39c Removed all references of pnp_bus.h (its contents are now temporarily included
in device_manager.h).
Fixed some comments.
Removed realpath() from probe.c for now - mechanism will be changed, and that
prevented it from being built as part of the kernel; it's currently not functional.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7489 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-10 13:26:42 +00:00
Axel Dörfler
38fdd0ca47 node_lock variable was replaced by gNodeLock (in nodes.c).
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7485 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-10 00:25:43 +00:00
Axel Dörfler
b36321870c Renamed some global static variables to match our style guide.
Changed some comments.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7484 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-10 00:09:21 +00:00
Axel Dörfler
1792829685 Fixed prefix handling; previous version was broken. It now allows the prefix to
be any size, not just full path names (even without the file name...). Optimized
it to only traverse paths that match the prefix.
The built-in modules now honor the prefix as well.
Renamed module_iterator::path_stack to stack.
The system add-on path was even wrong (but that didn't matter yet, as we're
still do a recursive search for modules).
The user add-on path now matches the real one - but that should probably be
retrieved from calling find_directory(), anyway...


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7483 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-10 00:02:20 +00:00
Axel Dörfler
0a4a7dee30 open_module_list()/read_next_module_name() now take built-in modules into account as well.
The prefix will obviously ignored currently!
Fixed get_next_loaded_module_name(); it will now work correctly (doesn't check, though,
if the module is currently loaded...).
Removed the module_test() function - doesn't belong here.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7465 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-09 00:41:19 +00:00
Axel Dörfler
3ad71e9d7e Rearranged the device_manager init/module stuff; it's now initialized from
main, not by getting the module any longer.
It now also creates the root node directly.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7438 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-07 00:34:00 +00:00
Axel Dörfler
637f662399 The node lock was missing in action.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7437 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-07 00:32:45 +00:00
Axel Dörfler
e5d9d14f90 Added the root node of the device tree to the build.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7436 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-07 00:16:46 +00:00
Axel Dörfler
df0dd8a5dd Removed test code.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7426 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-06 01:44:14 +00:00
Axel Dörfler
f7e706a409 Separated initialization of standard file systems from boot file system.
team_create_team() now uses the B_NORMAL_PRIORITY constant instead of the number directly.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7425 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-06 01:27:34 +00:00
Axel Dörfler
7f79432203 Separated the bootstrapping of the standard file systems from the boot file
system - it's now mounted a bit later.
Renamed vfs_register_filesystem() to vfs_register_file_system().
Changed return codes to status_t where appropriate.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7424 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-06 01:25:36 +00:00
Axel Dörfler
b14f8b5746 Removed some debug output (it's not only dumped if TRACE_ROOTFS is defined).
Updated the debug stuff a bit, fixed debug build.
Renamed vfs_register_filesystem() to vfs_register_file_system().


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7423 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-06 01:23:58 +00:00
Axel Dörfler
c947b674ee Renamed vfs_register_filesystem() to vfs_register_file_system().
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7422 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-06 01:22:33 +00:00
Axel Dörfler
dc8585a402 Worked around a strange bug that happened without an additional printf in between...
Somehow that reminds of BASIC.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7420 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-06 00:39:01 +00:00
Axel Dörfler
91d62d9f6a Removed stuff that's no longer necessary due to the stdio.h switch.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7418 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-05 16:38:32 +00:00
Axel Dörfler
5685273f87 Now maintains the private libroot variable "_single_threaded".
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7372 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-03 12:44:12 +00:00
Axel Dörfler
e304a7fd39 Minor cleanup, no longer includes BSD's stdio/local.h
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7370 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-03 12:32:12 +00:00
Axel Dörfler
f1e764a7e7 No longer uses fgetln() - that call is not part of the POSIX specs, and is
not supported by the GLIBC stdio that we now have.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7369 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-03 12:28:48 +00:00
Axel Dörfler
ee70fb4fed Added glibc stuff to the build.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7368 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-03 12:27:14 +00:00
Axel Dörfler
e7620319a4 Now links against GNU's stdio/libio instead of BSD's for binary compatibility with BeOS.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7365 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-03 12:19:01 +00:00
Axel Dörfler
0490efc6ff No longer compiles the BSD stdio files (we're using GNU's stdio now for compatibility).
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7364 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-03 12:18:05 +00:00
Axel Dörfler
003be99349 Added missing header.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7361 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-03 09:21:58 +00:00
Axel Dörfler
cda9457af2 Enable the stdio-common path.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7360 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-03 08:54:27 +00:00
Axel Dörfler
b166160684 Our BSD stdio now has snprintf(), too, sorry for the inconvenience.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7355 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-02 23:36:03 +00:00
Axel Dörfler
1bf27bb166 Removed no longer needed files from the Jamfile (they've never been part of the repository anyway).
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7352 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-02 17:05:51 +00:00
Axel Dörfler
b80d229ec2 Managed to compile all other needed files from the main device manager.
Added all of them - module_loader.c and boot_hack.c won't be needed anymore.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7351 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-05-02 17:04:25 +00:00
Axel Dörfler
fe01b8fa14 Start of the integration of Thomas' pnp_manager (which is now called device_manager).
Nothing is tested right now, and it's not yet complete, but it's changed so that
it does compile in our tree (and looks a bit more like the other files, too).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7345 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-04-30 16:42:58 +00:00
Axel Dörfler
511252a157 AddLink() added the link to the list of mounted volumes instead of the list
of links - that could have possibly hidden the boot volume under certain
circumstances. Thanks to Sean O'Brien for pointing this out.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7343 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-04-28 23:57:47 +00:00
Axel Dörfler
a44e28cc02 Fixed a possible buffer overflow condition in vfs_get_module_path().
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7342 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-04-28 11:20:19 +00:00
Axel Dörfler
1802569c68 Removed the amount of warnings we get.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7341 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-04-27 23:53:59 +00:00
Axel Dörfler
9e2f757a6b Unbuffered stdin/stdout the hard way - I'd guess this should be set to
buffered and determined at runtime if not (i.e. via isatty()) - but that
doesn't seem work at this time.
Must revisit later on!


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7340 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-04-27 23:52:55 +00:00
Axel Dörfler
d68b82804a Removed definition of internal_function - unfortunately, I don't remember why I did that, but lets hope for the best.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7339 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-04-27 23:51:09 +00:00
Axel Dörfler
0bc86489bb Separated removed (via preprocessor) sections.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7338 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-04-27 23:49:46 +00:00
Axel Dörfler
3e9b495a0d Added the real stdio_lim.h contents.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7337 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-04-27 23:48:29 +00:00
Axel Dörfler
bb72477637 Sure it can be compiled without optimizations...
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7336 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-04-27 23:47:22 +00:00
Axel Dörfler
83375f1002 Removed unneeded exports.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7335 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-04-27 23:46:14 +00:00
Axel Dörfler
86f34490f8 Simple R5 style pwd function implementation, courtesy of Eli Green.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7332 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-04-27 18:08:20 +00:00
Axel Dörfler
caa910df64 Changed some function return codes to return a status_t where appropriate.
Removed all old NewOS error codes.
Cleaned up the includes a bit.
Now prints out a list of preloaded images.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7331 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-04-27 11:55:31 +00:00
Axel Dörfler
192f207c78 Absolutely didn't like negative values for tm_wday and tm_mon before.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7327 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-04-27 00:50:01 +00:00
Axel Dörfler
50b3e5d4ce Implemented asctime() and asctime_r().
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7326 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-04-27 00:42:05 +00:00
Axel Dörfler
374d175555 Don't hide a possibly buggy caller.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7325 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-04-27 00:12:08 +00:00
Axel Dörfler
ef44862bfd Now creates the usual links /bin, /tmp, /var, /system, ...
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7321 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-04-26 21:46:01 +00:00
Axel Dörfler
52b6744e8d bootfs now implements the read_fs_info() hook - it mostly reports a volume
name ("OpenBeOS").


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7320 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-04-26 21:43:12 +00:00
Axel Dörfler
179fd09879 Removed the unused argument from module_init().
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7319 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-04-26 21:04:06 +00:00
Axel Dörfler
4b5782942c Removed the unused argument from module_init().
Implemented the possibility for built-in modules - they have to be listed
in sBuiltInModules in module.c to be registered automatically.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7318 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-04-26 21:02:27 +00:00
Axel Dörfler
04ba0ff394 Implemented support for the module_dependency structure.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7317 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-04-26 17:13:36 +00:00
Axel Dörfler
3a4a20a09e Updated to match general boot loader changes.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7294 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-04-22 01:13:20 +00:00
Axel Dörfler
3004a40b85 address_range is now called addr_range (again, to let the structure and the
typedef name match).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7293 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-04-22 01:06:01 +00:00
Axel Dörfler
90323acc2d Added boot_loader.ld file (same as stage2.ld for ppc).
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7292 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-04-22 00:53:55 +00:00
Axel Dörfler
9fac193453 Partially implemented get_system_info(), courtesy of Jack Burton.
Added system_info.c to the build.
Added stats support functions to sems & ports.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7290 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-04-21 22:57:39 +00:00
Axel Dörfler
e08a79330a Renamed systeminfo.c into system_info.c
Added syscall for _kern_get_system_info().


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7288 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-04-21 22:41:00 +00:00
Axel Dörfler
bbf495f47d map_page() will now be a bit more specific when it complains about an
invalid page.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7286 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-04-21 18:45:21 +00:00
Axel Dörfler
8d35b1a200 platform_start_kernel() now prints out the kernel entry point instead of
the address of the kernel_args structure.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7285 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-04-21 11:11:45 +00:00
Axel Dörfler
4eedc697c3 platform_get_boot_partition() will now also get the boot device as parameter.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7284 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-04-21 11:10:32 +00:00
Axel Dörfler
4c03f90f63 Now correctly translates the partition block offset into a byte offset.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7283 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-04-21 11:09:33 +00:00
Axel Dörfler
fbe5e77d0b Added a simple second heap that will survive the switch to the kernel.
elf_load_image() now uses this heap for the preloaded_image structures.
Moved gKernelArgs and gKernelEntry to different files.
Improved enabling debug output (it can now be activated by a makefile, too)


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7281 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-04-21 02:32:36 +00:00
Axel Dörfler
d8023a2fc5 Fills in the required kernel args for the loaded kernel image.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7280 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-04-21 01:34:47 +00:00
Axel Dörfler
6ef64f7451 elf_load_image() now also saves the size of the dynamic section.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7279 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-04-21 01:33:44 +00:00
Axel Dörfler
8af4cf5fba Replaced addr with addr_t.
Some minor other cleanups.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7276 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-04-21 01:28:40 +00:00
Axel Dörfler
185df3d6bd Added a comment about why we are copying the passed in kernel args.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7274 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-04-21 01:25:23 +00:00
Axel Dörfler
822757438d No longer uses the local ka at 0x100000 but the global gKernelArgs structure.
The virtual/physical allocated ranges are now correctly filled in mmu_init_for_kernel(),
and no longer too early.
Now allocates a kernel stack of 8192 bytes.
Added some temporary fillers for the kernel args.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7270 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-04-21 00:04:37 +00:00
Axel Dörfler
ffcff6e28c Added platform_start_kernel() function.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7268 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-04-20 23:52:17 +00:00
Axel Dörfler
c93599a8ae Replaced addr with addr_t.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7267 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-04-20 23:47:52 +00:00
Axel Dörfler
7b1a988f65 Fixed a warning due to the change in elf_priv.h
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7266 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-04-20 23:46:39 +00:00
Axel Dörfler
50f3983035 Added gKernelEntry variable; it's now set in load_kernel().
Removed start_kernel() function - it's now replaced by the platform_start_kernel()
call.
Fixed the kernel add-on boot module search path.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7265 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-04-20 23:45:32 +00:00
Axel Dörfler
730036e22e Improved debug output.
start_kernel() now panics, so that we don't run through (since it doesn't
actually jump to the kernel yet).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7256 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-04-20 01:36:12 +00:00
Axel Dörfler
f7fced6cf5 Slightly improved debug output.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7255 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-04-20 01:34:21 +00:00
Axel Dörfler
276c009500 Moved the platform region and heap functions to mmu.cpp.
The heap will now no longer be mapped in kernel space, but will be placed
at a fixed address (0x110000 - former start of free physical memory).
platform_allocate_region() is now implemented and calls mmu_allocate().
mmu_allocate() now supports mapping to a predefined virtual address
to be able to load the kernel correctly (and only for that).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7254 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-04-20 01:31:20 +00:00
Axel Dörfler
0f87a64b54 Add support for the boot partition offset as provided by the BFS boot block.
Now, platform_get_boot_partition() will work correctly.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7253 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-04-20 01:26:56 +00:00
Axel Dörfler
cdc8d6b6f5 The source files may now include the boot/partitions.h header.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7252 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-04-20 01:21:42 +00:00
Axel Dörfler
c8baeaf6cf Added support for the boot partition offset as provided by the BFS boot block.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7251 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-04-20 01:20:43 +00:00
Axel Dörfler
9fd7586724 gBootDriveID is now uint8, no longer uint16.
Now prints out a comment if LBA access doesn't work (since CHS access is not yet implemented).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7250 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-04-19 23:33:23 +00:00
Axel Dörfler
f52302c408 Actually, one byte is enough for gBIOSDriveID - it only has to store %dl, not %dx.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7249 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-04-19 23:31:53 +00:00
Axel Dörfler
502a70f884 Implemented LBA drive access using the BIOS. The boot device is correctly
published, and can be accessed as needed.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7248 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-04-19 23:14:05 +00:00
Axel Dörfler
7ca2763dc3 Now uses the kExtraSegmentScratch constant rather than a direct address.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7247 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-04-19 22:43:04 +00:00
Axel Dörfler
cc551468f8 Added some constants that define scratch buffers in the data and extra
segment that can be used for BIOS calls.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7246 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-04-19 22:38:30 +00:00
Axel Dörfler
6ed14d8c59 Added a global variable gBootDriveID where %dl is stored to.
Moved the data section closer to the end of the 1024 bytes of the boot
block - the region before is reused as scratch buffer in the real mode
data segment.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7245 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-04-19 22:36:13 +00:00
Axel Dörfler
c2cb9079b5 Fixed a warning with debug turned on.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7244 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-04-19 21:58:43 +00:00
Axel Dörfler
acfef65c84 Fixed a bug that would rescan the boot partition in mount_file_systems() in
case it couldn't be used for booting (lack of a kernel or whatever).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7243 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-04-19 21:57:50 +00:00
Axel Dörfler
a7226c0a48 The boot loader now uses the boot_loader.ld linking script instead of
the stage2.ld script (which is now only used by the old boot mechanism).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7241 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-04-19 02:23:50 +00:00
Axel Dörfler
3796dbef26 Added the new files to the build, and implemented a real startup.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7240 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-04-19 01:57:29 +00:00
Axel Dörfler
b2f8da6214 Added prototype for the (currently unused) mmu_init_for_kernel() function.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7239 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-04-19 01:56:36 +00:00
Axel Dörfler
95aa3fbf11 MMU functions and initialization for the boot loader.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7238 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-04-19 01:50:26 +00:00
Axel Dörfler
487cc516ec Register %es was not properly set from the bios_regs structure
(since switch_to_real_mode() overwrites %es).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7237 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-04-19 01:31:19 +00:00
Axel Dörfler
65daec27d1 Added a definition for the carry flag.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7236 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-04-19 01:30:13 +00:00
Axel Dörfler
a8242cca9c Added a new linker script for our boot loader (a.k.a. zbeos in the BeOS world).
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7235 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-04-19 00:05:32 +00:00
Axel Dörfler
d2e0469de4 Verified A20 gate BIOS call values with Ralf Brown's interrupt list - 0x2401/2
was already correct, and my other source was wrong about it.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7234 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-04-19 00:00:53 +00:00
Axel Dörfler
46df41d103 Implemented call_bios() function that is called from protected mode.
It switches to real mode for execution of the BIOS interrupt; it's really
only intended for the boot loader.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7233 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-04-18 23:58:26 +00:00
Axel Dörfler
1e56fb4aeb The "ax" code I was using for the A20 gate stuff was obviously wrong; but
both Bochs and my real computer seem to know it anyway, so it's untested.
The real mode segment descriptors now start at 0x10000, because the code
is loaded there. Added an additional stack segment descriptor to be able
to use a stack below 0x10000.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7232 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-04-18 22:07:41 +00:00
Axel Dörfler
7ab45fdea5 Removed unused welcome message print code.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7198 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-04-13 16:54:42 +00:00
Axel Dörfler
b911d01e3d Started the "shell" of the 2nd stage boot loader: it will enable the A20
gate, switch to protected mode, and will then jump to the platform dependent
loader initialization.
This is the start of the zbeos equivalent. It can already be executed
using the BFS boot block, but it cannot yet load itself from a floppy
like the original does.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7197 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-04-13 16:43:12 +00:00
Axel Dörfler
d018f3568f Implemented rename_thread() and _user_rename_thread() (as pointed out by Jack Burton).
The syscall is not yet connected, and the code has not yet been tested.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7179 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-04-06 21:38:45 +00:00
Axel Dörfler
2b75cca8d2 Added a dummy implementation of call_all_cpus() that will at least work on
single CPU machines.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7122 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-03-30 13:05:24 +00:00
Axel Dörfler
8fa03f6c41 Added a ToDo comment about how to correctly implement get_cpuid().
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7121 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-03-30 13:02:49 +00:00
Axel Dörfler
264a5adff5 NewOS read/write hooks return ssize_t, but on BeOS, they return status_t and
the number of bytes read/written in an argument. Until now, we had a buggy
mix between those two solutions. Courtesy of Jack Burton.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7101 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-03-29 12:28:34 +00:00
Axel Dörfler
725c92923a Fixed a warning.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7097 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-03-28 23:52:11 +00:00
Axel Dörfler
1ed3192432 find_command() did not return NULL if it couldn't find a command, courtesy
of Jack Burton.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7061 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-03-23 15:42:39 +00:00
Axel Dörfler
56c7aeaee8 Fixed a typo, thanks to Jack Burton for pointing this out.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7060 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-03-23 15:37:48 +00:00
Axel Dörfler
cdae4b7cf1 Added panic()/dprintf() calls to the x86 bootloader bindings.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7057 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-03-23 01:03:24 +00:00
Axel Dörfler
06c0f437a7 Added "\n" -> "\r\n" translation for console output, not yet tested.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7031 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-03-19 18:32:37 +00:00
Axel Dörfler
498a8e8be0 Now uses vsnprintf() instead of vsprintf() which makes the output safe.
Removed "\n" -> "\r\n" translation (it's now done in the platform dependent part).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7030 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-03-19 18:30:31 +00:00
Axel Dörfler
788d2b04ea Implemented console output for x86 boot loader.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7029 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-03-19 18:28:26 +00:00
Axel Dörfler
6e1d8b671a Cleanup.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7012 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-03-17 15:30:43 +00:00
Axel Dörfler
0f00c4fff9 Renamed global variables to match our coding style guide.
Removed thread_kill_thread_nowait().
Renamed thread_init_percpu().
Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7011 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-03-17 15:29:45 +00:00
Axel Dörfler
bd3f643494 Renamed thread_init_percpu() to thread_per_cpu_init().
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7010 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-03-17 15:28:08 +00:00
Axel Dörfler
0cec1c047b No longer calls thread_kill_thread_nowait() but sends the signal directly
(because the former function doesn't exist anymore).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7008 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-03-17 15:25:43 +00:00
Axel Dörfler
15edae152e Completed find_thread() implementation, courtesy of Starr Kline.
Added some comments.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7007 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-03-17 15:08:36 +00:00
Axel Dörfler
a206c3746f Lowered the thread priority boost on death.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7004 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-03-17 00:43:16 +00:00
Axel Dörfler
8e14887212 Moved some dprintf()s to use the TRACE() macro.
Also fixed compilation with tracing enabled.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6999 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-03-16 03:14:48 +00:00
Axel Dörfler
a9e1ba1d5b Fixes due to the team/thread.h separation and minor header cleanup.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6998 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-03-16 02:53:41 +00:00
Axel Dörfler
974982d56d Factored out two functions out of thread_exit() (in team.c).
Incorporated NewOS change 1930: sends the parent SIGCHLD if the team
goes away.
create_thread() now returns B_BAD_TEAM_ID when the team is in death state
instead of ERR_TASK_PROC_DELETED.
Cleaned headers.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6997 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-03-16 02:50:25 +00:00
Axel Dörfler
074af04cf2 Factored out two new functions (team_remove_team() and team_delete_team())
from thread_exit().
Removed team_remove_team_from_hash() as it's no longer necessary.
Also incorporated NewOS change 1930: maintain the parent/children lists.
Cleaned up the headers.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6996 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-03-16 02:46:28 +00:00
Axel Dörfler
b721e8fd26 Gained knowledge from NewOS change 1930 and fixed the sig_block_mask change
as already suggested in my earlier comment.
Added some comments.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6993 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-03-16 02:23:32 +00:00
Axel Dörfler
a7b6bd943e The bootloader now takes this region into account, no need to do that manually over here.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6986 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-03-15 02:02:25 +00:00
Axel Dörfler
3bba0ebe0a NewOS revisited, applied patch 1916: now evaluates the extended BIOS
RAM size call.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6984 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-03-15 00:58:49 +00:00
Axel Dörfler
4a2e872cca Applied NewOS change 1914: moved APIC setup into the kernel due to a
problem with the APIC clock speed test.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6980 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-03-14 22:54:00 +00:00
Axel Dörfler
7ec81f4c11 Disabled debug output for arch_int_enable_io_interrupt().
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6979 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-03-14 22:50:41 +00:00
Axel Dörfler
03c1062163 set_real_time_clock() is supposed to set the hardware clock as well.
Fixed dump function.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6978 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-03-14 21:53:48 +00:00
Axel Dörfler
09e395fbe3 Applied ages old cleanup patch from Jack Burton.
Took the chance and cleaned it up even more; this change is not a functional change.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6972 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-03-14 18:02:22 +00:00
Axel Dörfler
743c42a747 arch_setup_signal_frame() must not access the user space stack without
using user_memcpy(); therefore it can now fail.
Taken from NewOS, thanks to Travis for pointing this out.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6971 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-03-14 17:59:42 +00:00
Axel Dörfler
eb9335a34b Applied NewOS change 1972: "Fix the build with gcc 3.3.3. The bootloader
was broken because of some new behavior that puts initialized varaibles
in .bss anyway (if you initialize with zero). The bootloader was relying
on not having a .bss. Fixed in the linker script.".


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6968 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-03-14 17:01:51 +00:00
Axel Dörfler
f7f6185398 A bit more BeOS compatible math.h functions.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6962 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-03-13 18:48:55 +00:00
Axel Dörfler
48847a2aab You must not copy a list in that way; it's now using the new list_move_to_list()
call.
"testapp" now works fine with the new port code.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6958 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-03-12 21:36:02 +00:00
Axel Dörfler
ed3f63ae37 Added a call to move the contents of one list to another.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6957 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-03-12 21:34:20 +00:00
Axel Dörfler
28f42fcecc get_port_info() is not supposed to succeed on a closed port.
Saved the port_entry.closed member and now set the capacity to 0, since
it is not used any longer (reduces the size of the port table).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6956 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-03-12 05:28:50 +00:00
Axel Dörfler
85b89008bd Replaced the MAX_PORTS constant with the gMaxPorts variable, so that it
could be changed at startup (adapted to system properties).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6955 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-03-12 05:09:29 +00:00
Axel Dörfler
b672b21619 Renamed some variables to match our style guide better.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6954 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-03-12 05:06:13 +00:00
Axel Dörfler
b3d07d6550 Rewritten the msg queue code to use a doubly linked list of port_msgs.
Right now, it allocates/frees the msgs from the kernel heap for every
message sent - that might be too slow for real world usage.
Also removed all known race conditions from the code.
Not tested at all yet, though.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6953 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-03-12 04:57:38 +00:00
Axel Dörfler
2f6684aaee Fixed _user_find_thread(NULL), courtesy of Jack Burton.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6939 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-03-09 15:45:34 +00:00
Stefano Ceccherini
805bba9456 Fixed the debugger "region" command (still looking for others like that one)
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6938 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-03-09 09:53:54 +00:00
Axel Dörfler
349b01808e Seems like I'm getting old: fixed a similar typo in pipefs (like the one I
did in ports.c), thanks to Jack Burton for pointing this out.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6932 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-03-08 12:08:06 +00:00
Axel Dörfler
89ea3ca9d6 Fixed a stupid typo, thanks to Bill Hayden for pointing this out :-)
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6910 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-03-05 23:55:19 +00:00
Axel Dörfler
135d20a96e Now properly shuts down the thread message cache in thread_exit(),
its semaphores get deleted, thanks to Jack Burton for reporting.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6904 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-03-05 12:55:27 +00:00
Axel Dörfler
5fd77dc430 Moved a few functions around to have a better separation between public
port API and private functions.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6903 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-03-05 02:28:37 +00:00
Axel Dörfler
7fb4c29b80 port_buffer_size_etc() was horribly broken in a lot of ways, it even read
the info from the wrong end of the queue.
find_port() did not return the correct error codes.
write_port_etc() checked incorrectly for a deleted semaphore.
B_WOULD_BLOCK would let various functions print out a warning for no reason
(the comments in the code actually didn't fit to the implementation).
"total_count" was counting the number of messages written, not those that
have been read (as the BeBook says).
Thanks to Bill Hayden who reported a lot of these.
Added TRACE macro and moved some of the dprintf()s to that.
Added/fixed some comments.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6901 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-03-05 01:23:43 +00:00
Axel Dörfler
7b83e8b24c Made find_port() less heavy; it no longer disables interrupts for the whole
run. Also create_port() now changes the port ID only when the port lock is
grabbed, so that we don't need to acquire the port list lock in find_port().
Removed setting lock to "0" in create_port() because if it's not 0 in the
first place, there is something seriously wrong (should add an assert there).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6897 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-03-04 20:43:13 +00:00
Axel Dörfler
b752b6bb02 Fixed port & sem debugger commands, fixed sem.c compilation with tracing
enabled, courtesy of Jack Burton.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6896 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-03-04 12:14:48 +00:00
Axel Dörfler
0efc0b5804 Forgot to remove some parts of the previous read lock.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6892 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-03-03 18:58:54 +00:00
Axel Dörfler
76946b95da Fixed the pipefs. It now should work without any problems.
I don't know which part of me has written the previous version, but
it seems not have been supervised by a brain while doing it.
The read requests are now maintained per inode (as it has to be),
and there is one read lock per request.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6891 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-03-03 18:57:52 +00:00
Axel Dörfler
025019e571 Renamed thread/team syscalls to new scheme.
Minor cleanups.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6887 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-03-03 01:15:48 +00:00
Axel Dörfler
96246c6b3b Fixed warnings.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6886 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-03-03 01:15:15 +00:00
Axel Dörfler
663bccf7f9 Renamed thread/team syscalls to new scheme.
Code cleanup.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6885 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-03-03 01:14:49 +00:00
Axel Dörfler
5d83d63c08 Renamed thread/team syscalls to new scheme.
Removed old ERR_* error codes.
Removed funny area names in rldheap.c.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6884 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-03-03 01:13:00 +00:00
Axel Dörfler
39622c6739 sys_get_current_thread_id() is no more.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6882 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-03-03 01:10:08 +00:00
Axel Dörfler
5be410a7cd Renamed thread/team syscalls to new scheme.
Tuned the license a bit.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6880 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-03-03 01:09:17 +00:00
Axel Dörfler
a16600d146 Renamed thread/team syscalls to new scheme.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6878 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-03-03 01:08:27 +00:00
Axel Dörfler
6f2229385e Renamed thread/team syscalls to new scheme.
read_data(), has_data(), and receive_data() are no longer exported
by this file, but their _kern_*() equivalents are now.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6877 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-03-03 01:07:21 +00:00
Axel Dörfler
ade669abd7 Renamed thread/team syscalls to new scheme.
Added commented out wait_for_team() which we might want to have in the
final version, too.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6875 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-03-03 01:06:23 +00:00
Axel Dörfler
3dbf98a59a Renamed thread/team syscalls to new scheme.
find_thread() is now correct.
Moved send_data(), has_data(), and receive_data() back into this file.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6874 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-03-03 01:05:13 +00:00
Axel Dörfler
57ffd61845 _kfind_thread_() is now correctly implemented.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6872 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-03-03 01:03:31 +00:00
Axel Dörfler
acfdb017dd team_kill_team() is now called kill_team().
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6871 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-03-03 01:02:08 +00:00
Axel Dörfler
0ff38616f4 Renamed syscalls to new scheme.
Changed thread_kill_thread() to the BeOS compatible kill_thread() function.
Added missing _user_kill_thread().


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6870 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-03-03 01:00:16 +00:00
Axel Dörfler
564ffd3da7 Renamed thread/team syscalls to new scheme.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6869 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-03-03 00:58:19 +00:00
Axel Dörfler
98d68e7085 Renamed syscalls to new scheme.
Moved wait_for_team() into the exported kernel API region.
Added missing call for _user_get_current_team().
Made the team_kill_team() call to the BeOS compatible kill_team().


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6868 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-03-03 00:57:00 +00:00
Axel Dörfler
1748ad5db7 Added find_thread() (does not yet work with name != NULL).
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6860 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-03-02 17:40:14 +00:00
Stefano Ceccherini
7667c061fe Simplified an expression (which was even wrong before)
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6859 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-03-02 16:29:04 +00:00
Stefano Ceccherini
b2fece1ec0 renamed some global variables to have the "g" prefix
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6858 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-03-02 16:16:11 +00:00
Axel Dörfler
f9e9fb76f0 On second thought, it would be strange if the pattern used everywhere
else is not found here. The BeOS kernel also exports these two *_etc()
functions, and we might want to do that, too.
{receive|send}_data() are now interruptible from userland, but not when
called from the kernel.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6700 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-02-23 06:29:59 +00:00
Axel Dörfler
510a1ab1e9 Removed arch_cpu_user_strncpy()/strcpy().
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6698 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-02-23 05:18:51 +00:00
Axel Dörfler
775470756b On second thought, also removed user_strcpy().
Copied over the function description of user_strlcpy() from x86/arch_cpu.h
to this file.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6697 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-02-23 05:13:31 +00:00
Axel Dörfler
f4d747d77b No longer uses user_strcpy(), and it's even slightly faster.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6696 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-02-23 05:08:17 +00:00
Axel Dörfler
26b91cb6ec No longer use user_strcpy() but user_strlcpy().
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6695 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-02-23 05:03:04 +00:00
Axel Dörfler
083d73d739 No longer uses strncpy(). Removed the user_strncpy() call - we don't want
to have it in the kernel.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6694 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-02-23 04:40:02 +00:00
Axel Dörfler
0d6f9a67e5 Banned strncpy(), switched return type from "int" to "status_t" for vfs_get_vnode_from_path().
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6693 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-02-23 04:31:51 +00:00
Axel Dörfler
c0601b3a79 Cleaned up _get_sem_info() and _get_next_sem_info().
Implemented the B_CURRENT_TEAM mechanism for _get_next_sem_info().


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6691 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-02-23 04:26:44 +00:00
Axel Dörfler
faeac94982 Removed <kerrors.h> and the last occurences of ERR_* codes.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6690 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-02-23 04:12:34 +00:00
Axel Dörfler
48f31b9581 Replaced team_get_team_struct() with its safer friend team_is_valid().
Replaced SYS_MAX_OS_NAME_LEN with B_OS_NAME_LENGTH.
Banned strncpy().
Some cleanup.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6689 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-02-23 04:08:09 +00:00
Axel Dörfler
3402b15625 No longer needed.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6688 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-02-23 04:05:47 +00:00
Axel Dörfler
70f0602f2d Cleaned up the _get_port_info() and _get_next_port_info() calls, factored
out the port_info setup to fill_port_info(), implemented the B_CURRENT_TEAM
behaviour as described in the BeBook (well, almost, since B_CURRENT_TEAM
is not defined in R5, it's just "0"), improved error checking.
Cleaned up user syscalls.
Replaced SYS_MAX_OS_NAME_LEN with B_OS_NAME_LENGTH.
Banned strncpy().
Added our license.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6687 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-02-23 04:02:24 +00:00
Axel Dörfler
492e5970b0 Cleaned up the user syscalls: no longer uses strncpy(), replaced SYS_MAX_OS_NAME_LEN
with B_OS_NAME_LENGTH, make use of the IS_USER_ADDRESS() macro, etc.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6685 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-02-23 03:54:00 +00:00
Axel Dörfler
592a6437f2 receive_data() is now interruptible (as reported by Starr Kline) - not tested!
Cleaned up _get_thread_info() & _get_next_thread_info() - factored out
the thread_info setup into fill_thread_info().
Is now using team_is_alive() instead of team_get_team_struct().
Replaced SYS_MAX_OS_NAME_LEN with B_OS_NAME_LENGTH.
Banned strncpy() in favor for strlcpy().


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6683 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-02-23 03:46:42 +00:00
Axel Dörfler
2a3ec096a4 Replaced usage of team_get_team_struct() with team_is_valid().
Replaced some old error codes.
Explained a bit more how to solve a race condition.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6681 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-02-23 03:31:08 +00:00
Axel Dörfler
07f317bf6a Replaced SYS_MAX_OS_NAME_LEN with B_OS_NAME_LENGTH.
Removed old error codes.
Replaced the DEVFS_IOCTL_* with their Be equivalents. Note, the related
functions are not user space safe yet. But since the devfs will be
almost rewritten, there is no point in changing it now.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6679 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-02-23 03:21:59 +00:00
Axel Dörfler
677e35664d Replaced SYS_MAX_OS_NAME_LEN with B_OS_NAME_LENGTH.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6678 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-02-23 03:19:02 +00:00
Axel Dörfler
38afe35e66 Renamed CHECK_USER_ADDRESS() to IS_USER_ADDRESS() to make its function more clear.
Added our license to the updated source files.
Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6672 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-02-22 14:52:59 +00:00
Axel Dörfler
81e08ae466 kernel_cpp.cpp needs direct access to headers/private/kernel/util in order
to not include our current stdio.h.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6598 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-02-15 18:08:15 +00:00
Axel Dörfler
b8c2776bb7 Moved some more functionality into create_new_vnode() to reduce code duplication.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6469 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-02-02 15:09:21 +00:00
Axel Dörfler
6be2590464 Also added "bootfloppy" to build the boot floppy (still available using "boot_floppy", too).
Just for consistency with "installfloppy" and Marcus :).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6361 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-01-27 20:36:12 +00:00
Axel Dörfler
4472757fb0 Renamed the generic "floppy" target to "boot_floppy" so that it doesn't
clash with the floppy driver anymore.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6325 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-01-26 10:33:13 +00:00
Axel Dörfler
daf0126bb2 alarm_event() has sent the signal to the currently running thread instead
of the one that issues the alarm - it now does an ugly cast to get the
real thread structure. It would be nice if we had an additional user
parameter to a timer event.
Thanks to Travis for reporting this one!


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6310 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-01-26 02:01:46 +00:00
Axel Dörfler
016f7b6f32 Fixed compilation when you can't add private/kernel to your include headers.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6301 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-01-25 18:31:04 +00:00
Axel Dörfler
86228d9f03 Applied NewOS change 1914: fixes small bug (one page off), calls
{get|put}_physical_page_tmap() directly.
Also replaced all occurrences of "addr" with "addr_t".


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5938 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-01-06 16:12:52 +00:00
Tyler Dauwalder
581cfaf2c0 - Added declaration and definition of std::nothrow
- Wrapped everything but #includes in #if _KERNEL_MODE to keep from
  redeclaring/definining operator new and nothrow in userland.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5921 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-01-06 00:27:34 +00:00
Axel Dörfler
11e38cc1d9 Applied the unmount() fix from NewOS change 1906.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5906 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-01-05 01:03:14 +00:00
Axel Dörfler
462e4bb4fa That restriction was superfluous.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5789 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-12-29 02:29:27 +00:00
Axel Dörfler
caeef6fada Fixed the broken use of read_request::PutBuffer() - the team's address space
is now honoured: the shortcut is now only made if it's okay to do it. Added
a comment what we could do to further improve performance.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5788 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-12-29 02:27:22 +00:00
Axel Dörfler
6994475d83 Added a comment about a stupidity I did with pipefs - I seem to have completely
forgotten about different address spaces with direct (unbuffered) pipe transfer,
shame on me.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5786 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-12-28 15:27:24 +00:00
Axel Dörfler
e9a4e838e8 Added missing vsnprintf() for BSD stdio.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5717 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-12-20 16:00:51 +00:00
Axel Dörfler
65a98eb199 Hacks to get glibc's stdio-common working.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5473 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-11-24 19:59:26 +00:00
Axel Dörfler
348820b57c Hacks to let it compile: disabled/removed wide character stuff, disabled
floating-point output.
Unfortunately, I needed to change the identation etc. to find my way through
it. Could resist to rewrite it completely, though :)


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5472 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-11-24 19:24:21 +00:00
Axel Dörfler
0bcee3c93c Hacks to let it compile. Disabled wide character stuff *and* all number
conversions since they rely on private glibc functions.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5471 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-11-24 19:20:57 +00:00
Axel Dörfler
bc659826df t[e]mpnam() stuff now works.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5433 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-11-21 18:25:02 +00:00
Axel Dörfler
cc9c5de901 Small changes to let it compile.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5432 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-11-21 18:23:17 +00:00
Axel Dörfler
290ba80867 Hacks to get the libio package working:
- all wide character functions have been disabled or removed
- ftrylockfile() does not yet work
- reformatted code to be readable (sometimes needed for changes)

Note, this code is not able to be simply updated with newer glibc releases! Sorry.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5429 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-11-21 17:01:42 +00:00
Axel Dörfler
1bed4dd008 No longer needed.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5427 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-11-21 16:45:03 +00:00
Axel Dörfler
545237514a We really only allow 0x7fffffff maximum characters, so we now mask out
everything above (not even in an intelligent way).
Now accepts zero bufferSize and NULL buffer - although it should probably
not catch the latter...


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5408 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-11-18 04:12:29 +00:00
Axel Dörfler
c29da59747 Moved number() closer to vsnprintf() because it'll need the put_*() functions
once it's fixed.
Renamed some variables.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5407 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-11-18 04:02:59 +00:00
Axel Dörfler
ac3863db5e About to move vsprintf() over to vsnprintf() which is more secure since
it allows to specify the buffer size. Not yet finished; number() has to
be fixed - tests have to be written as well.
Implemented snprintf() and vsprintf() using vsnprintf().
Some smaller cleanups.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5406 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-11-18 03:54:14 +00:00
Axel Dörfler
2d9c5abca2 Renamed kvsprintf.c to kernel_vsprintf.c.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5405 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-11-18 03:05:36 +00:00
Axel Dörfler
9672de86ce Renamed kvsprintf.c to kernel_vsprintf.c to make it more salient.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5404 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-11-18 03:05:02 +00:00
Axel Dörfler
497c0bf9c1 Removed unneeded file.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5402 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-11-18 02:39:36 +00:00
Axel Dörfler
51d951ad00 Added glib'c temp. path creation routines to stdio-common (the only place
where they are actually used).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5382 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-11-15 15:21:38 +00:00
Axel Dörfler
76e34f86e5 Not needed.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5381 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-11-15 15:19:53 +00:00
Axel Dörfler
5eb81b22fe Renamed printf-prs.c to printf-parse.c
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5380 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-11-15 15:18:44 +00:00
Axel Dörfler
4a4fcca956 Forgot to check the fix... it now compiles again, and there is a new
accessor method Inode::BytesInChain().


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5379 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-11-15 15:15:54 +00:00
Axel Dörfler
b92791bf92 No longer needed.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5378 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-11-15 15:09:01 +00:00
Axel Dörfler
28d9e59387 Added process.c to the build, implemented getpid().
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5377 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-11-15 15:02:09 +00:00
Axel Dörfler
5eb712b2dd Now correctly returns the available bytes in the pipe in st_size.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5360 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-11-14 13:21:37 +00:00
Axel Dörfler
57b3bc3b9c Added _kern_debug_output() syscall.
Fixed warning about missing user_strlcpy() prototype.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5354 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-11-13 22:08:30 +00:00
Axel Dörfler
9289abf0e4 Added _kern_debug_output() syscall.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5353 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-11-13 22:07:36 +00:00
Axel Dörfler
fe4817d5c0 Didn't set the facility correctly if set from both, openlog() and syslog().
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5342 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-11-13 02:51:15 +00:00
Axel Dörfler
c094c0c22b Added a comment about a missing dump of the message to stderr if write_port()
fails.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5338 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-11-12 16:55:04 +00:00
Axel Dörfler
87a98412a1 Now correctly differentiates between options and priority/facilities.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5334 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-11-12 16:34:12 +00:00
Axel Dörfler
fb4dcd08dc Now checks in the argument's options as well for LOG_CONS.
The LOG_MASK() macro is now used correctly.
The non-standard LOG_PERROR is always visible in stderr as well (in BeOS,
so we copied it). Added a newline for stderr output.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5332 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-11-12 16:11:50 +00:00
Axel Dörfler
f2eb00db1e Fixed and simplified the user_*() team syscalls.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5331 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-11-12 15:37:44 +00:00
Axel Dörfler
9ff210a134 Use the SYSLOG_PORT_NAME constant instead of the name directly.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5330 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-11-12 15:14:48 +00:00
Axel Dörfler
41c6e8cc55 Fixed the setlogmask*() functions; the priority mask is only set if the
parameter is not 0, and it returns the old mask as well.
Also fixed the initial log mask for the team context; it's now set to -1
(enable all priorities) by default.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5329 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-11-12 14:44:31 +00:00
Axel Dörfler
3b737adbda Implemented the POSIX syslog API including the BeOS extensions. In BeOS,
this API is found in libbe.so, in OpenBeOS, it's directly in libroot.so.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5326 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-11-12 14:35:22 +00:00
Axel Dörfler
e81f0e1f79 Added "where" as alias of "sc" as in BeOS.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5310 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-11-11 04:49:15 +00:00
Axel Dörfler
1e065e6132 dbg_register_file[][] now reserves space for SMP_MAX_CPUS CPUs, not only 2.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5309 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-11-11 04:02:54 +00:00
Axel Dörfler
b196064201 dbg_init() no longer sets sCommands to NULL - variables in the BSS are
always zeroed anyway.
cmd_help() is now able to print out help about the specified command
only - it will also print out all aliases of that command. Reduced
the distance between the command name and its description; NULL
descriptions are now also allowed.
There is now a find_command() function that's used throughout the
module. Like in the Be debugger, it will now also accept partial
matches, i.e. "co" will most probably match "continue" (as long as
there is no new "co*" command added by another component). It will
first try to find an exact match, and only if that failed it will
search for a partial match.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5307 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-11-11 03:47:14 +00:00
Axel Dörfler
91d35b5f62 Removed dbg_set_serial_debug() - there is now only set_dprintf_enabled().
Disabled dbg_get_serial_debug(); it's only used temporarily in the keyboard
device (and I removed its usage there, too).
Added "continue", "exit", and "es" commands as in the Be kernel debugger
(they will all exit the debugger and try to continue normal kernel execution).
Reordered the sources so that public kernel API is together.
Added a _user_debug_output() syscall (not yet activated) which dumps to the
kernel's serial output.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5305 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-11-11 03:07:53 +00:00
Axel Dörfler
36c3931c38 Added quick implementation of real_time_clock() and real_time_clock_usecs() -
it might even be correct, but we also might want to have this stuff somewhere
else (libroot).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5279 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-11-08 02:13:19 +00:00
Axel Dörfler
eb04c7678e Added and implemented gettimeofday() using real_time_clock_usecs().
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5278 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-11-08 01:17:26 +00:00
Axel Dörfler
28d179274c Implemented time() - it still doesn't work, though, as real_time_clock()
is not yet implemented.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5277 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-11-08 01:16:35 +00:00
Axel Dörfler
6046623a99 Fixed broken Jamrule.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5267 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-11-06 01:39:33 +00:00
Axel Dörfler
8a09700174 Accidently killed the kernel build (again...).
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5266 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-11-06 01:37:44 +00:00
Axel Dörfler
48a7b199b7 Added fcntl() empty stub implementation.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5264 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-11-06 00:10:57 +00:00
Axel Dörfler
ea2aba5dc9 Fixed compilation with local changes (to be commited later).
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5263 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-11-06 00:10:03 +00:00
Axel Dörfler
b86315d90a Removed NewOS error descriptions.
Replaced some descriptions with more appropriate ones.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5262 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-11-05 23:58:31 +00:00
Axel Dörfler
8529e01d1f Implemented strerror_r() - the actual error description is now returned
by a static function and used by both, strerror() and strerror_r().


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5261 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-11-05 23:53:29 +00:00