Commit Graph

2242 Commits

Author SHA1 Message Date
Axel Dörfler
b18fc6654c transfer_area() now reserves the address range of the old area after removing
it, so that it can guarantee readding it again, in case the transfer is failing.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11173 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-01-31 18:36:05 +00:00
Ingo Weinhold
242ebd2030 The reduced area size was used for testing only.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11165 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-01-30 23:40:17 +00:00
Ingo Weinhold
576ca13ddb Added debug output. No functional change. Surprisingly things seem to work.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11164 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-01-30 23:28:49 +00:00
Ingo Weinhold
d06fe82117 Exemplarily implemented notify_entry_moved(). Untested.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11160 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-01-30 16:13:35 +00:00
Ingo Weinhold
244f03dc1c * Moved the autolocking code for recursive lockers to <util/AutoLock.h>.
* Added resolve_mount_point_to_volume_root() version for external use
  (by the node monitor).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11159 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-01-30 16:11:46 +00:00
Ingo Weinhold
3424c4fea4 Renamed node_monitor.c to node_monitor.cpp and fixed implicit conversions from void*.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11155 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-01-30 14:09:01 +00:00
Philippe Houdoin
4220e676ba Added more fields length safety.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11124 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-01-29 15:24:49 +00:00
Axel Dörfler
04b59e02dd team_id == aspace_id.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11087 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-01-27 07:17:01 +00:00
Axel Dörfler
e6a3e8011c Added and implemented transfer_area() syscall; for now, transfer_area() is
not exported, only the syscall is.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11086 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-01-27 07:13:41 +00:00
Axel Dörfler
bde6836aff vm_create_aspace() now also get the team_id of the owner of the address
space to be created - this replaces the internal ID they had before.
Now, team_id == aspace_id.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11085 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-01-27 07:11:45 +00:00
Axel Dörfler
0b111f38f9 read_port() and write_port() must accept a NULL pointer as buffer if
the bufferSize is zero.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11084 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-01-27 07:08:17 +00:00
Axel Dörfler
82e4378f29 Added missing include.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11081 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-01-27 01:01:16 +00:00
Axel Dörfler
b15a05da82 Added empty arch_dbg_con_init_settings().
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11079 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-01-26 18:40:57 +00:00
Axel Dörfler
6c59a0b5bd Added empty arch_cpu_shutdown() (just returns EOPNOTSUPP for now).
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11078 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-01-26 18:40:16 +00:00
Axel Dörfler
4cf3e70f94 Added empty arch_system_info functions, added arch_system_info.c to the build.
Removed grist from libppc source files.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11077 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-01-26 18:39:25 +00:00
Axel Dörfler
f2e40399c2 Moved initialization of the arch depending real_time_data fields into the arch
depending section by calling arch_rtc_init().


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11076 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-01-26 18:30:50 +00:00
Axel Dörfler
72c01a1b3b Added arch_rtc_init() function.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11075 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-01-26 18:29:41 +00:00
Axel Dörfler
ca0b0a4857 Replaced old VM *_region() calls with current calls.
KSTACK_SIZE has been renamed to KERNEL_STACK_SIZE.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11073 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-01-26 18:22:38 +00:00
Axel Dörfler
8b2fa4d23c Added crti/n files for PPC - not tested, but they even might work.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11072 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-01-26 18:20:13 +00:00
Ingo Weinhold
7f1ee731a9 Using namespace std for nothrow.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11070 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-01-26 14:58:18 +00:00
Ingo Weinhold
c277ab01e6 Make the compiler happy. Shadowing super class methods with different signature is a very annoying C++ feature.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11069 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-01-26 14:57:35 +00:00
Ingo Weinhold
ea69d9d35f Moved the kMessageHeaderMagic constant into the class. Made BMessage a friend of KMessage.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11059 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-01-26 02:10:42 +00:00
Ingo Weinhold
ea3df577a3 After resolving the flag clash things work. Use our nice B_KERNEL_{READ,WRITE}_AREA flags for clarity.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11052 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-01-25 23:30:53 +00:00
Ingo Weinhold
aa50545364 As I recently learned making a kernel area B_READ_AREA/B_WRITE_AREA makes
it readable/writable for all userland apps. This is not what we want here.
We want to make the area cloneable for the registrar and hence use the
new flag B_USER_CLONEABLE_AREA. But there seems to be a bug that causes
strange things to happen, when using that flag only, therefore we go with
all of them until it is fixed.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11046 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-01-25 22:18:23 +00:00
Ingo Weinhold
6e53f60e2c Added support for protection flag B_USER_CLONEABLE_AREA.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11045 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-01-25 22:13:10 +00:00
Axel Dörfler
f29e97d3ae Not at all needed
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11042 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-01-25 21:23:51 +00:00
Axel Dörfler
72d7d28ef8 I accidently broke glibc's perror() - now it's working.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11040 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-01-25 21:20:35 +00:00
Ingo Weinhold
27bd55fdf3 * Improved initialization.
* The counter semaphore is now only released when writing a command into
  an formerly empty area. The userland part is aware of that. :-)


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11026 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-01-25 14:51:06 +00:00
Ingo Weinhold
d7b6591345 Added initialization of the messaging service.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11025 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-01-25 14:48:34 +00:00
Axel Dörfler
0bfd48e555 Will now also publish directories for existing driver directories that
have subdirectories in order to find device drivers like /dev/audio/raw
without any drivers in /dev/audio.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11017 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-01-25 02:57:52 +00:00
Axel Dörfler
7ec59908da Added a devfs_publish_directory() function that just tries to make sure
that a path is available (like "mkdir -p").


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11015 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-01-25 02:17:02 +00:00
Ingo Weinhold
b5c8eaec52 Added messaging service header.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10994 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-01-24 01:23:20 +00:00
Ingo Weinhold
65174bbf57 Added unregistration. Fixed MessagingService::RegisterService(): the semaphores weren't stored.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10992 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-01-24 01:22:03 +00:00
Ingo Weinhold
2c872c4fe5 Removed obsolete ancestor.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10990 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-01-23 23:00:37 +00:00
Ingo Weinhold
4cacc85bae Prevent a linker error. It complains about multiple definitions of nothrow.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10985 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-01-23 19:56:19 +00:00
Ingo Weinhold
2d50eca728 Added the messaging service.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10984 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-01-23 19:54:46 +00:00
Ingo Weinhold
59b9b48bb3 Added a service that will be responsible for sending messages from kernel
to userland applications. A userland server (probably the registrar) will
register as the server responsible for delivering the messages. The
messages are passed to it via shared memory.

The advantage over sending the messages directly will be, that they won't
need to be dropped, if the receiver port is temporarily full.

Currently only the kernel side is implemented. Completely untested yet.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10983 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-01-23 19:54:19 +00:00
Philippe Houdoin
ce0c82200a Fixed the "no previous prototype" warning.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10962 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-01-22 21:23:33 +00:00
Ingo Weinhold
c3a3ddf246 Added KMessage, a data container pretty much like BMessage, but
append-only and hence has very compact storage and a comparatively small
footprint implementation. Can be used for kernel->userland messaging.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10958 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-01-22 19:19:36 +00:00
Ingo Weinhold
1e78d7ff9f That may be the wrong place, but R5's libroot prints 'Abort' when abort() was called. That's at least a helpful clue, when you see your program terminate spontaneously.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10951 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-01-22 17:34:57 +00:00
Ingo Weinhold
14a8f01955 Also call the initialization function of an executable's image. I don't know for what reason it wasn't done before, but not doing it at all breaks C++ exceptions.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10950 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-01-22 17:29:40 +00:00
Ingo Weinhold
3e35b88903 Rather keep the .eh_frame section, if we want exceptions.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10949 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-01-22 16:29:21 +00:00
Axel Dörfler
ba6aff63d0 The userland build now includes GCC's crtbegin/end.o as needed, surrounded
by our crti.o/crtn.o. In the future, we really shouldn't use kernel build
rules for userland applications/libraries anymore...


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10947 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-01-22 14:13:39 +00:00
Axel Dörfler
5af708a20c Changed our nice crt0.c to something more GCC compatible; we're not calling
the global constructors/desctructors ourselves anymore, but let GCC do
that using crtbegin/end.o how it's thought to be done.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10946 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-01-22 13:36:31 +00:00
Axel Dörfler
9cc2fa71c5 The top-level stack frame now clears %ebp to mark the end.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10939 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-01-21 22:02:49 +00:00
Ingo Weinhold
984c3a2ec3 It's already 2005, isn't it. :-)
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10930 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-01-21 15:18:34 +00:00
Ingo Weinhold
61a9031bd0 Added get_stack_frame().
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10929 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-01-21 15:03:08 +00:00
Axel Dörfler
60ec020574 Added a temporary fix to be able to boot using bootfs.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10924 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-01-21 02:15:58 +00:00
Axel Dörfler
205c4c26e7 Use native types instead of "long".
Updated license.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10915 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-01-20 20:59:00 +00:00
Axel Dörfler
5195a9a892 Added __errno_location() when building under Linux - we might adopt this
as standard, though (and keep errnop() for BeOS compatibility only).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10914 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-01-20 20:12:10 +00:00
Axel Dörfler
2b9e2cec46 Fixed warning (GCC 3).
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10910 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-01-20 17:58:58 +00:00
Axel Dörfler
623d7696c0 Added a platform_register_boot_device() stub function.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10908 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-01-20 17:40:46 +00:00
Axel Dörfler
5629cb08f3 Have I already mentioned how amazing many bugs can be in such a short code snippet?
cache_io() should now finally work correctly in all cases.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10906 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-01-20 17:15:42 +00:00
Axel Dörfler
17351b0417 If we remove bochs support from the build system one day, make sure that
this file still does the right thing as suggested by Michael Pfeiffer.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10882 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-01-19 17:32:06 +00:00
Ingo Weinhold
327a7d825f The FD supplied to _user_open() was not passed to file_open().
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10875 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-01-19 14:59:05 +00:00
Ingo Weinhold
791e6b3a75 BOCHS_DEBUG_HACK is always defined (to 0 or 1). Reported by Gert van Valkenhoef.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10873 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-01-19 14:19:35 +00:00
Ingo Weinhold
285449a68f Default arg in implementation. Reported by Gert van Valkenhoef.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10872 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-01-19 14:16:01 +00:00
Axel Dörfler
19b83dc2b3 Got rid of ERR_VM_NO_REGION_SLOT - we now return BeBook friendly error codes.
Added short description to find_reserved_area() as that name is not that good.
vm_reserve_address_range() now doesn't do anything if the requested size
of the reservation is zero.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10867 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-01-19 03:17:25 +00:00
Axel Dörfler
0f4c53b1d0 Better debug output, minor cleanup.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10866 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-01-19 02:59:00 +00:00
Axel Dörfler
0f8e6927d8 Fixed another big and stupid bug: the first read/write not in the cache
and not on a page boundary had been executed with a I/O size too large,
and thus clobbering all sorts of memory (oh my god).
The problems with ResourceFile now seems to be gone.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10863 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-01-19 02:35:39 +00:00
Ingo Weinhold
ffb6ed34b3 Fixed build with debug output enabled.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10860 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-01-19 01:07:30 +00:00
Axel Dörfler
5e07b72508 Renamed probe() to register_device(), cleanup.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10849 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-01-18 19:03:01 +00:00
Axel Dörfler
dcbf2cb678 Now uses a driver/device exploration like R5; when a directory is looked
up for the first time, it will try to load all drivers that may export
devices there. Those devices will currently stay loaded, though - this
will only be changed when load_kernel_add_on() is able to cache add-ons.
Renamed pnp_devfs_probe() to pnp_devfs_register_device().
Fixed debug output for devfs_create().


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10838 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-01-18 16:51:21 +00:00
Axel Dörfler
568f1574d2 dev_init() and bus_init() are now both obsolete.
con_init() now takes care of the initialization of its currently built-in
console drivers itself.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10836 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-01-18 16:44:44 +00:00
Axel Dörfler
19abe05796 Removed dev.c as it's no longer in use (driver loading is now done by
the device manager).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10835 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-01-18 16:39:33 +00:00
Axel Dörfler
321fcdaf57 Removed ToDo comment about removing kernel.so - actually, we'll keep kernel.so
because it has some advantages over a relocatable kernel.
Removed libbus.a as it's no longer needed.
kernel.so now depends on kernel, so that both files are updated at once.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10834 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-01-18 16:37:49 +00:00
Axel Dörfler
a9435d9740 Some work in progress cut back to support R5 style device exploration.
Also includes the loader of R5 styled drivers (taken from dev.c).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10833 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-01-18 16:29:40 +00:00
Axel Dörfler
339a06ca55 get_vnode_name() now handles a NULL parent vnode gracefully (and returns
an error in case the vnode name could not be retrieved without it).
Comment cleanup for consistency.
Renamed remaining "omode" variables to openMode.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10831 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-01-18 15:59:18 +00:00
Axel Dörfler
e8edb8545b A hash_lookup() to the module images was made without having the proper lock held.
Added kernel private calls load_module() and unload_module() that can be used to
load/unload modules by path.
load_module_image() now only mentions when it couldn't load a module when tracing
is enabled (because the device manager uses it to determine if an add-on is a
module or an old-style driver).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10821 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-01-18 02:37:38 +00:00
Axel Dörfler
cdde948ccc Fixed compilation in case COMPILE_FOR_R5 is defined.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10810 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-01-17 22:35:28 +00:00
Axel Dörfler
c004da882f Fixed compilation issues that came with changing it to be C++ (hi mmu_man :-)).
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10809 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-01-17 22:23:20 +00:00
Axel Dörfler
7e536c5607 Renamed probe.c to probe.cpp to prepare if for all the changes it got.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10808 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-01-17 22:19:43 +00:00
Ingo Weinhold
523144419b * utsname::sysname is the name of the OS while system_info::kernel_name is
the name of the kernel file. Now return "Haiku" as operating system.
* Even if we can't fill in utsname::nodename with something useful yet,
  fill in at least something.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10782 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-01-17 01:18:56 +00:00
Ingo Weinhold
7e3ac9f35f Changed return value of read_port[_etc] from status_t to ssize_t. That's not how it is declared in R5, but it is what actually is returned.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10761 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-01-15 21:45:13 +00:00
Ingo Weinhold
2751025516 Temporarily added debug_[v]printf() functions for userland usage, equivalent to dprintf() in kernel.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10760 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-01-15 21:44:16 +00:00
Ingo Weinhold
6fef29ae45 * Changed return value of read_port[_etc] from status_t to ssize_t. That's
not how it is declared in R5, but it is what actually is returned.
* Fixed _user_read_port_etc(): It didn't copy the message code back to
  userland, if the message had a size > 0.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10759 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-01-15 21:43:07 +00:00
Axel Dörfler
cafa4dd931 Removed next_dev() again - it's implemented in libroot/os/fs_info.c and
now used from there, sorry Ingo (I forgot to commit the Jamfile that
included fs_info.c).
Minor comment cleanup to make their appearance consistent throughout
the kernel.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10753 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-01-15 14:41:00 +00:00
Axel Dörfler
40174b5c1b Added fs_info.c functions to the kernel (next_dev, fs_stat_dev, ...).
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10752 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-01-15 14:36:31 +00:00
Ingo Weinhold
40be269010 Added missing next_dev(). Axel?
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10751 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-01-15 13:46:04 +00:00
Axel Dörfler
d7e274c031 The "/tmp" symlink targeted the wrong location.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10741 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-01-15 01:27:04 +00:00
Axel Dörfler
e3954f5a94 acquire_sem_etc() really didn't like the combination of B_RELATIVE_TIMEOUT
and B_INFINITE_TIMEOUT -- it now does and won't start a timer anymore in
this situation. Reported by Ingo.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10740 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-01-15 01:07:23 +00:00
Axel Dörfler
849647ec72 sync() now also syncs the vnode caches (file data).
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10739 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-01-15 00:38:16 +00:00
Axel Dörfler
8b74caaae0 Brought dump_port_info() into shape, added output of port_entry::total_count.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10733 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-01-14 20:45:18 +00:00
Axel Dörfler
6158f7d53a Fixed a crashing bug in port_buffer_size_etc() - it had a special error
check for B_TIMED_OUT and B_WOULD_BLOCK, but it got through with other
errors.
Removed special error check for "known" error codes from port_buffer_size_etc(),
read_port_etc() and write_port_etc() - they no longer print out a warning in
that case.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10732 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-01-14 20:21:58 +00:00
Axel Dörfler
4d00c5e1ea We introduced the new constant B_CURRENT_TEAM for this.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10731 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-01-14 19:50:12 +00:00
Ingo Weinhold
2397da28a0 Added support for get_next_image_info() with team ID == 0, which means the current team.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10727 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-01-14 15:32:14 +00:00
Axel Dörfler
9c4f4c037d Changes because of renaming various data structures (pnp_node -> device_node, ...).
Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10673 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-01-11 23:28:38 +00:00
Axel Dörfler
08ec614080 Changes because of renaming various data structures (pnp_node -> device_node, ...).
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10672 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-01-11 23:26:00 +00:00
Axel Dörfler
b8877975aa Added some code to dump the node tree. This is currently done always
after hardware recognition (but will be moved into a debugger command
later).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10667 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-01-11 16:19:59 +00:00
Axel Dörfler
d1f630f624 Fixed some typos, minor cleanup.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10659 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-01-10 18:30:37 +00:00
Axel Dörfler
f1a1d6e98a Implemented get_safemode_option() (not yet tested).
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10657 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-01-10 18:06:25 +00:00
Axel Dörfler
57af9fc29e Added a small program to control the cache (using the generic syscall mechanism).
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10645 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-01-10 08:08:14 +00:00
Axel Dörfler
104de70bd8 Oops, the driver name was not propagated as needed.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10644 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-01-10 08:01:39 +00:00
Axel Dörfler
c51144040d The BOCHS_DEBUG_HACK definition now only enables support for the bochs
debug output - to activate it, you now have to enable it in the kernel
settings file ("bochs_debug_output true").
Reimplemented the serial output so that it's flexible towards the base
port at run time.
Implemented support for kernel settings "serial_debug_port" (which can
now also be an index in the BIOS provided serial ports list), and
"serial_debug_speed".
That also means that you can finally use the same kernel executable
under BeOS Bochs and on a real system without any restrictions.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10642 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-01-10 07:53:22 +00:00
Axel Dörfler
163338aef6 Now calls the new arch_dbg_con_init_settings() function.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10641 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-01-10 07:48:44 +00:00
Axel Dörfler
b15a7e8e0a Now initializes the driver_settings services (so that it can find the
settings passed over by the boot loader).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10640 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-01-10 07:47:51 +00:00
Axel Dörfler
74272e4c46 mutex_lock() will no longer panic() if acquire_sem() failed and the mutex
holder did not change (required for booting properly).
Also added a ToDo comment about a required mutex API change in order to
be able to return a status that indicates failure.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10639 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-01-10 07:46:48 +00:00
Axel Dörfler
486c7eddeb Added driver_settings support: it will now read in the vesa kernel driver
settings and use that one as standard video size (but ignores the depth
parameter for now).
It will be the app_server's responsibility to keep this file up to date.
This file should no longer be edited by users.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10637 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-01-10 07:41:01 +00:00
Axel Dörfler
4c89c923bf For now doesn't switch to text mode and back to the logo anymore when the
menu is shown - the logo is now shown after the menu anyway.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10636 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-01-10 07:38:01 +00:00
Axel Dörfler
78c5ef46fc Added driver_settings support.
It will now load all settings in the kernel driver settings directory
and pass them over to the kernel (unparsed).
Additionally, it allows other parts of the boot loader to access
driver_settings just like in the kernel.
Moved the switch to the logo in the boot loader much further to the end
of the boot loader's life cycle. This is done so that the boot loader
can directly use the video mode as configured in Haiku, without a jumping
logo. Since the delay will be noticeable on a real system, we might want
to introduce a second different boot logo, though. We'll see.
stdio.cpp now also exports errno (and _errnop). Might be changed to a
different approach later as well (it's now done this way so that strtol.o
can be taken over unchanged from libroot.so).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10634 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-01-10 07:32:54 +00:00
Axel Dörfler
a2940337b4 Added strcasecmp(), strlcat(), and strtol() to the boot loader in order to
be able to use the driver settings in a useful way.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10633 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-01-10 07:26:50 +00:00
Axel Dörfler
f753d9c494 Updated to export all the functionality we need from within the kernel
and the boot loader.
When compiled in the kernel, driver settings are cached and may be used
without disk access at all.
Added some comments.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10632 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-01-10 07:25:23 +00:00
Axel Dörfler
c776c35a04 Added a temporary way to differentiate between kernel and userland builds for
parts of kernel_os_main.o.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10628 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-01-10 01:32:11 +00:00
Axel Dörfler
0f6c560eec Removed the upper restriction of maximum cache transfers (was restricted
to 32 pages at a time out of pure lazyness).
Also fixed a potential bug when reading across page bounds (pageOffset
might not have been properly reset).
Added some more comments and ToDo items.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10627 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-01-09 22:40:30 +00:00
Axel Dörfler
f3d2f0ffa2 cache_module_info::node_opened() was called with the wrong argument order.
Added generic syscall to control the cache. Right now, only setting/removing
cache modules is implemented.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10601 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-01-07 00:55:08 +00:00
Axel Dörfler
2a5dafa804 recurse_directory() is no longer part of the build if SUPPORT_BOOTFS is
not defined. It will now also skip about all entries called "boot" (to
not load the boot modules again).
The path of preloaded images is now hacked together so that the module
image hash contains the correct path in case the images get replaced
while being used.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10600 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-01-06 21:46:03 +00:00
Axel Dörfler
b1e252f77f Added a SUPPORT_BOOTFS definition and made the vfs_get_module_path() the new
standard mechanism - recurse_directory() is now only used if SUPPORT_BOOTFS
is defined and vfs_get_module_path() failed.
Added standard system kernel add-ons directory to the search path list.
Renamed USER_MODULE_PATHS to FIRST_USER_MODULE_PATH as that's what it is.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10599 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-01-06 20:31:22 +00:00
Axel Dörfler
fb77bc372f vfs_get_module_path() now actually works: it failed to create a valid full
path, since it didn't take into account that vnode_path_to_vnode() may
actually change the provided buffer.
Also fixed a potential buffer overrun in that function (bufferSize was
not correctly changed), and added a comment about a previously undocumented
property of vnode_path_to_vnode() that vfs_get_module_path() relies on.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10598 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-01-06 20:20:48 +00:00
Jérôme Duval
d1e2263502 untested uname implementation
still lacking some way of getting/setting hostname in our kernel


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10484 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-12-17 16:23:22 +00:00
Jérôme Duval
5622a2e2c5 added get_rtc_info, needed in the kernel for services which use local timestamps such as the dos filesystem
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10463 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-12-15 09:23:50 +00:00
Axel Dörfler
e93e8b9a66 Removed unused mount/unmount commands.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10462 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-12-15 00:13:25 +00:00
Axel Dörfler
dbef8d930c As suggested by Ingo, the "subsystem" parameter is now a string. That allows
modules to use their module name directly.
Also introduced a whole range of reserved syscall functions in case we want
to add some more.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10458 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-12-14 17:09:06 +00:00
Axel Dörfler
f4160aedf9 Renamed semaphore syscalls to the new scheme.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10454 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-12-14 16:07:23 +00:00
Axel Dörfler
483a56e2fa Implemented a generic syscall mechanism. For example, kernel modules can use
this during runtime to add and remove specific syscalls. You can also use this
to add debugging or temporary kernel calls without messing up the syscall
table (the syscall numbers will stay constant).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10452 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-12-14 15:49:20 +00:00
Axel Dörfler
836356a0ca Since we now have a working B_BASE_ADDRESS, we don't need the "RLD_padding"
area anymore.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10447 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-12-14 04:02:42 +00:00
Axel Dörfler
c3808a9e47 Address specifier B_BASE_ADDRESS actually didn't work at all - it now does.
Renamed find_reserved_region() to find_reserved_area(), and
find_and_insert_region_slot() to find_and_insert_area_slot().


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10446 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-12-14 04:02:11 +00:00
Axel Dörfler
8a16a1a0c9 lock_memory() now at least makes sure that the memory range is mapped in.
It's a bit hackish due to the iospace area, and it also might not work
perfectly in all situations, but it does fulfill the current needs.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10445 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-12-14 02:39:37 +00:00
Axel Dörfler
09eaf756d0 Included some code from NewOS to set up a double fault handler. Doesn't seem to work yet, though.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10443 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-12-14 01:46:04 +00:00
Axel Dörfler
e082899afe Replaced SYS_MAX_PATH_LEN with B_PATH_NAME_LENGTH.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10441 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-12-13 23:15:25 +00:00
Axel Dörfler
220a60685b Updated because of some header changes.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10440 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-12-13 23:14:56 +00:00
Axel Dörfler
84a910b64f Updated because of header changes.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10439 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-12-13 23:02:18 +00:00
Axel Dörfler
a1d0963176 Locking of the vm_cache_ref was almost completely missing...
cache_node_{opened|closed}() now correctly get the file_cache_ref from a vm_cache_ref.
Implemented cache_prefetch(): for now, it always prefetches the first 64 kB from the file.
Renamed read_from_cache() to read_into_cache().


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10438 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-12-13 22:58:40 +00:00
Axel Dörfler
fcab2bafe0 Added a pointer to the file_cache_ref to the vnode_store.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10437 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-12-13 22:47:41 +00:00
Axel Dörfler
d316037c89 Updated because of header changes.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10436 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-12-13 22:46:11 +00:00
Axel Dörfler
64e7394c50 PARANOID_POINTER_CHECK is now only defined if DEBUG is defined, too, by default.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10435 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-12-13 22:44:17 +00:00
Axel Dörfler
b2ac251743 Replaced SYS_MAX_PATH_LEN with B_PATH_NAME_LENGTH.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10432 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-12-13 22:19:26 +00:00
Axel Dörfler
204db7744a get_new_fd() now has a separate fs_mount parameter, so you no longer need to cast
different types to vnodes.
Renamed vfs_get_vnode() to vfs_lookup_vnode() as it doesn't grab a ref to the node.
Added new vfs_get_vnode() that actually grabs such a ref.
vfs_get_vnode_cache() now fills a vm_cache_ref instead of a void pointer.
Replaced SYS_MAX_NAME_LEN constants with the B_FILE_NAME_LENGTH that should have
been used there.
vnode::cache should have been a vm_cache_ref and is now.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10431 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-12-13 22:17:00 +00:00
Axel Dörfler
5d45bbd482 Now uses ASSERT_LOCKED_MUTEX() some more.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10429 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-12-13 22:05:47 +00:00
Axel Dörfler
3a5d1279cf vm_create_vnode_cache() now fills a vm_cache_ref instead a void pointer.
Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10428 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-12-13 22:05:05 +00:00
Axel Dörfler
cb44b765b0 Minor cleanup.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10423 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-12-13 21:21:06 +00:00
Axel Dörfler
6363d47567 Better debug output to ease userland debugging while we don't have any tools.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10411 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-12-13 03:41:32 +00:00
Axel Dörfler
66340e6747 get_vnode_name() for file system's that do not export the fs_get_vnode_name()
function was slightly broken :)


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10407 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-12-12 23:12:08 +00:00
Axel Dörfler
4692c99460 Added function that allocates more than one page at a time, but without
the need for having them in a run.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10406 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-12-12 20:53:47 +00:00
Axel Dörfler
f6743bd145 Added query support - it's more or less the same as found in R5 for now.
Later on (but before R1), we should find a better balance between what
the FS has to implement, and what the kernel delivers to them.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10399 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-12-12 20:39:45 +00:00
Axel Dörfler
62ceb50f43 Refactored fs_open_query() calls a bit - there is no only one internal
implementation that the two public functions call.
Adapted to the changes to _kern_open_query().
Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10398 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-12-12 20:35:27 +00:00
Axel Dörfler
71a81208ef Fixed build and warnings. Thanks to Jonas for reporting this.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10395 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-12-12 16:19:46 +00:00
Axel Dörfler
e96f985d95 fs_read_attr() and fs_write_attr() transferred bytes from/to the provided
file descriptor, not from/to the attribute...
Added ToDo comment about eventually adding syscalls for these functions.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10373 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-12-08 02:15:09 +00:00
Axel Dörfler
6780f6f417 The open attr dir syscalls didn't work correctly in the FD modes.
fd_and_path_to_vnode() now accepts NULL as path argument.
Added some more debug output and comments.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10368 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-12-07 16:15:57 +00:00
Axel Dörfler
53b0609a4a Initial support for cache modules.
Also fixed a minor bug in dec_vnode_ref_count(): the unusued vnode counter
was not decremented again when one vnode was removed.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10336 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-12-01 07:41:07 +00:00
Axel Dörfler
324fc66b90 Fixed another stupid bug in cache_io(): if one request needed new pages
more than once, the size requested was only correct for the first time.
Added preliminary support for cache modules.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10335 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-12-01 07:38:27 +00:00
Axel Dörfler
26a78aa41d Removed broken _user_exit(), and implemented working _user_exit_team().
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10328 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-12-01 04:26:10 +00:00
Axel Dörfler
71463c834e Now uses _kern_exit_team().
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10327 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-12-01 04:24:15 +00:00
Axel Dörfler
72013b22a5 Now uses _kern_exit_team().
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10326 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-12-01 04:17:57 +00:00
Axel Dörfler
2f9720f07d exit_thread() was using _kern_exit() instead of _kern_exit_thread().
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10324 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-12-01 04:10:12 +00:00
Axel Dörfler
e25fbc6849 Moved cpuid.S from src/kernel/libroot/os/arch/x86/. Fixed it so that it
actually fills a cpuid_info structure. Renamed cpuid() to get_current_cpuid().
Added syscall _user_get_cpuid().
Added a lot of other vendor brand strings. The cpu_type and cpu_revision
fields should now be correctly set.
get_cpuid() now returns B_BAD_VALUE if the cpuNum parameter is out of bounds
(ie. higher than the number of available CPUs in the system).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10321 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-12-01 03:48:28 +00:00
Axel Dörfler
fc4ff6bda0 Renamed systeminfo.c to system_info.c - also replaced the (broken) get_cpuid()
implementation by a syscall. Moved cpuid.S to src/kernel/core/arch/x86.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10318 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-12-01 03:31:45 +00:00
Axel Dörfler
7c3dbcf249 Threads and teams now maintain a used counter - they also provide a maximum
limit, but this is not yet enforced. Added getter functions.
team_init() now returns a status_t.
System info stuff is now globally initialized in main().
get_system_info() now also reports the number of used pages, and calls the
architecture dependent function.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10315 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-30 21:11:37 +00:00
Axel Dörfler
e774a942a9 Implemented basics of the architecture specific get_system_info(), also
added get_cpuid() function (does not respect the cpu parameter yet).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10314 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-30 21:08:19 +00:00
Axel Dörfler
f79889e75b Now also sets the cpu_clock_speed field.
Disabled debug output.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10312 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-30 20:59:55 +00:00
Axel Dörfler
d3ee51c1d2 Removed the ERR_VM_PF_BAD_ADDRESS constant, and use B_BAD_ADDRESS instead.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10307 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-30 18:27:38 +00:00