Commit Graph

153 Commits

Author SHA1 Message Date
Jérôme Duval 27a76e1d73 added amd phenom cpu type, untested
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26642 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-07-26 18:35:39 +00:00
François Revol b409283372 Set max cpu count to 1 for ARM. Anyone knows a real SMP platform using it ?
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26069 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-06-21 21:48:18 +00:00
Ingo Weinhold 4d3680aaef Added timeout constant B_ABSOLUTE_REAL_TIME_TIMEOUT which specifies a
timeout relative to the Epoch.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25434 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-05-10 21:34:51 +00:00
Ingo Weinhold 7727e08e5f Added experimental public API get_port_message_info_etc(). It is similar
to port_buffer_size_etc(), but returns the info through a structure,
which also identifies the sender (uid, gid, team ID) of the message.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25003 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-17 17:46:02 +00:00
Bruno G. Albuquerque 044f45b2db - Another patch by Hervé W.
- Updated code so Processor IDs for older processor do not have to be 
modified.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24979 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-15 23:51:17 +00:00
Jérôme Duval 801fe71d43 added amd geode lx cpu type, untested
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24960 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-13 17:20:46 +00:00
Bruno G. Albuquerque 9c383d9867 Applied patch by Hervé W.
- Updated Intel processor IDs.
- Only take extended family/model into account on Intel processors.




git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24958 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-04-13 07:27:12 +00:00
Jérôme Duval 7e11596a27 added athlon 64 model 3
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24677 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-30 12:27:41 +00:00
Axel Dörfler 41f8d41647 Applied patch by Rene Gollent:
* Add a cached_pages field to the system_info structure, and change the
  meaning of the used_pages field to not include cached pages.
* Provide the needed info using the new calls vm_get_available_memory(),
  and vm_page_num_available_pages().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24571 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-25 11:51:45 +00:00
Bruno G. Albuquerque 7a66a9b8e4 - Added support in system info for extended cpu family and model.
- Take extended family and model into account when generating the cpu
  type and revision.
- Added Intel Core 2 Extreme to the cpu list.

Please review.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24509 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-03-21 16:44:05 +00:00
Ingo Weinhold a54c125e37 Added experimental ktrace_[v]printf() functions to libroot. Their output
is recorded in a kernel trace entry (if tracing is enabled).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23686 a95241bf-73f2-0310-859d-f6bbb57e9c96
2008-01-21 15:10:05 +00:00
François Revol 6b3123cf2f Add the Amiga and Atari platforms (sorry to force a rebuild :p).
Mac is there already (TODO: rename some stuff from apple to mac).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22770 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-30 13:59:48 +00:00
François Revol ae8bc15af5 Some more of m68k. Added errors where ports should add stuff.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22694 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-23 23:43:11 +00:00
Axel Dörfler c8a89db93e Rewrote image.h.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22582 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-15 23:21:01 +00:00
Axel Dörfler f6e4cbb952 * Rewrote BeBuild.h which had "a few" consequences (got rid of all those class
definitions).
* Minor cleanup here and there.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22577 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-15 20:13:55 +00:00
Ingo Weinhold 636bfc08ae * Renamed fs/vfs_select.cpp to wait_for_objects.cpp and got rid of
vfs_select.h, respectively moved most of it into the new kernel
  private header wait_for_objects.h.
* Added new experimental API functions wait_for_objects[_etc](). They
  work pretty much like poll(), but also for semaphores, ports, and
  threads.
* Removed the "ref" parameter from notify_select_events() and the
  select_sync_pool functions as well as from fd_ops::fd_[de]select(). It
  is no longer needed. The FS interface select() hook still has it,
  though -- the VFS will always pass 0.
* de]select_fd() take a select_info* instead of a select_sync* + ref
  pair, now. Added respective functions for semaphores, ports, and
  threads.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22416 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-10-02 19:47:31 +00:00
Ingo Weinhold 44b5d72b5a Added new functions to the debugger API:
{set,clear}_debugger_{break,watch}point(), allowing to set/clear break
and watchpoints for the calling team. When a break/watchpoint is hit,
the team enters the debugger. Handy in situations when the program in
question can't really be started in a debugger (or it would be
complicated to do so). The functions work only as long as no debugger is
installed for the team.

We clear the arch specific team and thread debug infos now, when a new
debugger is installed, thus clearing break- and watchpoints.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20396 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-03-20 16:20:13 +00:00
Ingo Weinhold 2c97a8d164 Use -I instead of -isystem for system header directories when building
with gcc 4. Fixed resulting build errors (gcc is more lenient for
headers in -isystem directories).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20386 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-03-14 20:36:42 +00:00
Jérôme Duval d4d9831990 merge both commpage.h into the private header
Travis, I hope this fits your needs :)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20173 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-02-20 00:21:45 +00:00
Travis Geiselbrecht 1cbf8f4b3c initial support for a commpage, which is a chunk of memory in high kernel space with user readonly permissions.
The first use is to let the kernel decide what the preferred syscall mechanism is at boot time and copy the
appropriate user space code there. Can be used for routines the kernel can decide best how to use (memcpy, some
timing routines, etc).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20161 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-02-19 00:32:44 +00:00
Jérôme Duval 1e8adb7d89 added core and core 2 ids
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18603 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-24 10:33:50 +00:00
Axel Dörfler b2c5594fd2 B_SYSTEM_TEAM is now 1 under Haiku which refers to the real kernel.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17645 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-05-30 00:18:50 +00:00
Ingo Weinhold 716a16ce61 * Find out a few interesting information about the system (like CPU,
bus, and time base frequency) in the PPC boot loader, and propagate
  them to the kernel via kernel_args.
* Now we use the correct time base frequency for timer calculations.
* Implemented PPC specific system info stuff. Added a few PPC CPU
  types to <OS.h>.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15817 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-01-03 13:30:23 +00:00
Axel Dörfler 348c7214f5 Improved processor identification for some VIA C3 models.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15558 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-12-16 11:55:01 +00:00
Ingo Weinhold 758b1d0e05 Fixes that make Haiku build with gcc 4. Mainly out of the following
categories:
* Missing includes (like <stdlib.h> and <string.h>).
* Linking against $(TARGET_LIBSTDC++) instead of libstdc++.r4.so.
* Local variables shadowing parameters.
* Default parameters in function definitions (as opposed to function
  declarations).
* All C++ stuff (nothrow, map, set, vector, min, max,...) must be imported
  explicitly from the std:: namespace now.
* "new (sometype)[...]" must read "new sometype[...]", even if sometype is
  something like "const char *".
* __FUNCTION__ is no longer a string literal (but a string expression), i.e.
  'printf(__FUNCTION__ ": ...\n")' is invalid code.
* A type cast results in a non-lvalue. E.g. "(char *)buffer += bytes"
  is an invalid expression.
* "friend class SomeClass" only works when SomeClass is known before.
  Otherwise the an inner class with that name is considered as friend.
  gcc 4 is much pickier about scopes.
* gcc 4 is generally stricter with respect to type conversions in C.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14878 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-11-12 23:27:14 +00:00
Axel Dörfler 9235adf794 The cpuid "extended features" in function 1/%ecx aren't Intel only anymore - my
AMD docs were not up to date. Thanks to Herve for the note.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14578 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-30 18:26:41 +00:00
Axel Dörfler 1c016e0e3f Cleaned up OS.h a bit more.
Return type of thread_func is now status_t instead of the previous int32.
Added some more cpuid_info fields - many fields aren't just reserved anymore.
"sysinfo" now supports the extended features of Intel CPUs, and also knows
the "HTT" bit of the standard features indicating the hyper-threading capability.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14533 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-26 22:46:30 +00:00
Axel Dörfler da6d1a7022 fs_mount_volume() now returns a dev_t as well - changed mount/mountvolume to take
that into account as well (they were reporting an error even though everything
went fine).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14450 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-10-20 13:03:50 +00:00
Marcus Overhagen 794df3bf25 This removes the inline assembly code for find_thread
from OS.h, sorry for triggering a complete rebuild.
To avoid doing a syscall for find_thread(0), the assembly
version is now in libroot. For BeOS R5 compatibility, 
_kfind_thread_ is retained. This will fix some compile 
problems, and provides a cleaner OS.h for future Haiku
versions.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14014 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-08-20 23:57:11 +00:00
Ingo Weinhold 7f9c673981 * Introduced a new debugger message B_DEBUGGER_MESSAGE_HANDED_OVER, which
is sent to a debugger when the debugged team has been successfully handed
  over to another debugger.
* Fixed handling of B_DEBUG_MESSAGE_PREPARE_HANDOVER. We don't send a reply.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13683 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-07-15 12:18:33 +00:00
Axel Dörfler 183dee22cb Unlike R5, receive_data() could return an error code under Haiku - this
can now only happen if the thread is killed.
_user_receive_data() will now longer pass B_CAN_INTERRUPT to receive_data(),
but B_KILL_CAN_INTERRUPT - this should fix the problem Stefano experienced
with this function, even if I couldn't reproduce it.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13075 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-06-12 11:14:37 +00:00
Jérôme Duval 5258e67dff Courtesy of Olivier Coursiere (aka oco), based on documentation (feel free to check against real hardware)
Adds latests IDs from Intel docs
Adds some Sempron IDs
Renamed Athlon 64 to be consistent with Intel names
Adds IDs in cpu_type.h


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12429 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-04-17 22:46:08 +00:00
Ingo Weinhold 576c52f8b1 Added the gcc printf format attribute for debug_printf(), so that gcc warns about format/parameter inconsistencies.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12096 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-03-28 15:25:57 +00:00
Ingo Weinhold d2c78559a0 We now also support partial writes to the debugged team's memory.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@11992 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-03-25 18:23:33 +00:00
Axel Dörfler 34e92cad76 Added and implemented new system calls switch_sem() and switch_sem_etc(); even if
they are public now, they might become private later on.
It's almost the same as acquire_sem() but allows you to release another semaphore
atomically. This makes condvar implementations and the like very simple to do.
Added B_CHECK_PERMISSION flags to the user calls, although it's not honored yet.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@11887 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-03-17 22:35:00 +00:00
Ingo Weinhold 291e414a9e * Somehow this B_DEBUGGER_MESSAGE_THREAD_STOPPED message bothered me.
Most of the debug events had their own message, but some were grouped
  into this `stopped' message with a `why' field to describe what kind
  of event it actually was. Hence the user had to check two levels until
  they could know what event occurred. So I got rid of this message and
  provided separate messages for the concerned events.
* Got rid of B_DEBUG_MESSAGE_GET_WHY_STOPPED and introduced
  B_DEBUG_MESSAGE_GET_CPU_STATE which is pretty much the same.
* Put B_DEBUG_MESSAGE_RUN_THREAD and B_DEBUG_MESSAGE_STEP_THREAD into
  a single B_DEBUG_MESSAGE_CONTINUE_THREAD message with a boolean
  `single_step' field.
* get_debug_why_stopped_string() -> get_debug_message_string().


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11712 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-03-13 23:43:05 +00:00
Ingo Weinhold 1619a2e5b4 * The exceptions now have their own debugger message. Added
get_debug_exception_string() to get a user-readable string for an
  exception type.
* Added more signal support. Now the debugger can set per thread which
  signals it wishes to be notified of. It can also just ignore the next
  occurrence of a signal.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11701 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-03-12 21:35:31 +00:00
Ingo Weinhold 9a28130b32 Added (currently only) flag B_WAIT_TILL_LOADED for _kern_load_image()
(maybe this should better go into a private header?). If given the function
waits till the loader is done with loading and relocating the executable.
Otherwise it returns before the loader starts.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11690 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-03-12 15:01:25 +00:00
Ingo Weinhold 1c7fbde145 Added message def for preparing to hand over a debugged team to another
debugger. After successful reply to the message the debugger won't receive
any more messages from the debugged team. The mechanism is completely
transparent to the target debugger. It simply installs itself as debugger
for the team.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11662 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-03-10 21:56:23 +00:00
Ingo Weinhold a29ecae5f0 New debug function wait_for_debugger(). Useful when creating teams to be debugged via fork().
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11634 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-03-09 22:45:41 +00:00
Ingo Weinhold 9b92e8c011 Added missing reply port for message B_DEBUG_MESSAGE_GET_WHY_STOPPED. Removed unnecessary alignment in debug_nub_set_cpu_state.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11632 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-03-09 22:04:38 +00:00
Ingo Weinhold 7586a0f3d6 Reading memory is more handy, if it allows for partial reads. So now the size is returned with the reply.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11624 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-03-08 23:09:31 +00:00
Ingo Weinhold 2b3216fc5a Correct terminology.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11518 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-03-01 23:44:23 +00:00
Ingo Weinhold a67d62f1db Added definitions for supporting single step, break- and watchpoints,
and setting the CPU state.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11502 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-02-28 00:25:23 +00:00
Ingo Weinhold 540103da09 * New function get_why_stopped_string() to get a human-readable
translation for the debug_why_stopped codes.
* Added nub_port member to debug_origin structure, so that now all
  synchronous messages to the debugger also include the debug nub port.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11489 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-02-25 14:24:00 +00:00
Ingo Weinhold 17e41f5251 Added new semaphore flag B_KILL_CAN_INTERRUPT. It makes acquire_sem_etc()
interruptable by SIGKILL[THR], even if B_CAN_INTERRUPT is not set. Not
sure, if this is the best solution, but it works.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11484 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-02-25 14:10:41 +00:00
Ingo Weinhold 433e1959ae Introduced a debug_origin structure consisting of thread and team ID of the concerned thread, and being first member of all messages sent to the debugger. This simplifies handling of messages in the debugger a good deal.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11482 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-02-24 18:47:04 +00:00
Ingo Weinhold c3610c8098 * Architecture specifics live in arch/<arch>/debugger.h now.
* team debug flags:
  - Added flags for team creation, thread events (creation,
    deletion), and image events (creation, deletion).
  - Got rid of B_TEAM_DEBUG_SYSCALL_FAST_TRACE. We always send the syscall
    arguments. The overhead should be neglectable.
  - Added B_TEAM_DEBUG_STOP_NEW_THREADS.
* Added debugger notification messages for signals, team, thread and
  image events.
* Added debug request B_DEBUG_MESSAGE_GET_WHY_STOPPED.
* When continuing a thread, the debugger can now specify how to deal with
  the occurred event (ignore or handle).
* More data in the signal received notification message.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11468 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-02-24 15:43:28 +00:00
Ingo Weinhold c53b50023a Trashed the old header and started a new one from the scratch.
Unless a good reason appears not to, we'll break binary compatibility here.
BDB could be considered one, but we need a replacement for it anyway. We
strive to port GDB and a couple of changes in the debugger API will make
that easier.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11307 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-02-10 02:45:18 +00:00
Ingo Weinhold eafe61c06b * Some formatting cleanup.
* Removed ARM support.
* Removed PEF references.
* Added structure and constants for pre syscall tracing.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11245 a95241bf-73f2-0310-859d-f6bbb57e9c96
2005-02-04 14:37:55 +00:00