Commit Graph

100 Commits

Author SHA1 Message Date
François Revol
693b3532c7 Sam460ex: Add a Linux-type kernel entry point
* the onboard U-Booot and 2nd-stage loader only know a few OS types,
we'll try faking Linux there.
2012-05-17 17:36:19 +02:00
Alexander von Gluck IV
1a17461323 elf32 header: Add defines for e_machine field in elf header
* This is the first step in #8520
* Will enable runtime_loader to idenfify binary
  architecture and raise proper errors.
2012-05-04 13:33:58 -05:00
Jerome Duval
57c324a753 arm: added some missing arch bits and changed asm section for arm compat. 2012-04-01 14:03:36 +02:00
Michael Lotz
44dffa86c0 Fix the etc path that was accidentally changed. 2011-12-02 14:22:28 +01:00
Ingo Weinhold
609fc55f96 Rename the package links directory
Rename the package links directory from /package-links to just
/packages.
2011-11-25 06:19:33 +01:00
Ingo Weinhold
bde1972229 Move <directories.h> to headers/private/system 2011-11-25 06:19:32 +01:00
Axel Dörfler
d5e36fb599 * Introduced new fs_lopen_attr_dir() function that opens the attribute
directory of a file without traversing leaf links (just like lstat()).
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42620 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-08-10 21:08:00 +00:00
Rene Gollent
36dc99a323 Add private get_memory_properties() syscall which allows one to retrieve the
address protection bits as well as the wiring flags for an arbitrary address
in a team's address space. Will be used in the debugger for the purposes
of the memory inspector/editor, in order to determine whether it can in fact
allow editing for the currently inspected address range.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42129 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-06-12 20:17:14 +00:00
Ingo Weinhold
24df65921b Merged signals-merge branch into trunk with the following changes:
* Reorganized the kernel locking related to threads and teams.
* We now discriminate correctly between process and thread signals. Signal
  handlers have been moved to teams. Fixes #5679.
* Implemented real-time signal support, including signal queuing, SA_SIGINFO
  support, sigqueue(), sigwaitinfo(), sigtimedwait(), waitid(), and the addition
  of the real-time signal range. Closes #1935 and #2695.
* Gave SIGBUS a separate signal number. Fixes #6704.
* Implemented <time.h> clock and timer support, and fixed/completed alarm() and
  [set]itimer(). Closes #5682.
* Implemented support for thread cancellation. Closes #5686.
* Moved send_signal() from <signal.h> to <OS.h>. Fixes #7554.
* Lots over smaller more or less related changes.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42116 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-06-12 00:00:23 +00:00
Michael Lotz
9c1714ec1a Enable IO-APICs by default. It's been tested on a broad spectrum of hardware and
all reports so far have been positive. We fall back to legacy mode in the cases
where we can't figure out the correct routing.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41527 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-05-16 08:42:30 +00:00
Oliver Tappe
6a5ce30120 Move functions declared in private/system/system_info.h out of the public namespace.
* prepend private functions get_system_info_etc(), start_watching_system() and 
  stop_watching_system() with '__'
* adjust callers accordingly


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41517 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-05-15 17:02:36 +00:00
Oliver Tappe
22a7fe9695 Cleanup system-revision stuff.
* move system_revision.h to headers/private/libroot
* unify libroot's get_system_revision() (the one I introduced recently) with kernel's
  get_haiku_revision(), the function is now called get_haiku_revision() in the kernel
  and __get_haiku_revision() in libroot
* system_revision.c is now being built as part of libroot and as part of the kernel
* adjusted all callers of get_system_revision() accordingly


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41516 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-05-15 16:33:30 +00:00
Oliver Tappe
a961bbc69d * move sHaikuRevision from uname.c into new system_revision.c
* add private function get_system_revision() for accessing the
  revision string
* adjust uname to use get_system_revision

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41479 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-05-13 20:38:14 +00:00
Oliver Tappe
af2da315dc Fix the larger problem that was hiding behind the build problem of set_haiku_revsion on FreeBSD:
* the length of the sHaikuRevision character array symbol needs to be set explicitly,
  as using either _SYS_NAMELEN or sizeof(utsname::version) will only return the values
  for the host, which may not match ours, thus potentially causing problems when using
  sHaikuRevision
* add headers/private/system_revision.h which defines SYSTEM_REVISION_LENGTH to 128
* adjust definitions of sHaikuRevision in libroot and kernel accordingly
utsname::version is shorter than SYSTEM_REVISION_LENGTH, but that doesn't cause any harm
until we have indeed switched to a DVCS (in which case longer revision strings will be 
cut off by 'uname').


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41421 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-05-10 15:35:04 +00:00
Michael Lotz
56b5ad0781 Added a temporary opt-in option "enable_ioapic" to the boot menu. This way the
IO-APIC can be easily enabled to test it on various configurations. Note that
the previous default opt-out didn't work because the safemode options would not
be touched at all when not actually entering the boot menu.
Once IO-APIC is more broadly tested this can be removed again and the opt-out
option reenabled.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41370 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-05-07 21:41:09 +00:00
Jérôme Duval
245df7abd3 added exFAT partition type
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40410 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-02-09 20:30:00 +00:00
Oliver Tappe
db03311342 Closing #7056:
* inherit umask of calling process to images loaded via exec...()

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40071 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-01-02 19:12:19 +00:00
Ingo Weinhold
d23cadce4c [_{kern,user}_]{start,stop}_system_watching()
-> [_{kern,user}_]{start,stop}_watching_system()


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39872 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-16 17:01:23 +00:00
Ingo Weinhold
d2bf328d72 Implemented a generic system watching mechanism with a userland API. Currently
only a few events can be watched (team creation/deletion/exec, thread creation/
deletion/name changes). The functions start_system_watching()/
stop_system_watching start/stop watching events.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39862 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-16 01:49:52 +00:00
Ingo Weinhold
25dc253d6a * Merged weak-symbols branch.
* Fixed trivial merge conflict in src/system/libroot/posix/locale/nl_langinfo.cpp
* Fixed gcc 2 compilation of src/system/glue/init_term_dyn.c.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39571 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-22 13:06:36 +00:00
Ingo Weinhold
56d734a1aa Added new private API to get more information on a team:
* Userland interface: get_extended_team_info().
* Syscall: _kern_get_extended_team_info.

Only partially implemented yet.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39453 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-16 19:42:08 +00:00
Ithamar R. Adema
f3a3804efa * ARM: Fix ELF relocation name.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39218 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-10-30 22:50:43 +00:00
Clemens Zeidler
bfff9df5eb As suggested by Ingo use a B_WATCH_VOLUME flag to tell the kernel to watch
the whole volume. Kernel part follows.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39106 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-10-24 00:49:20 +00:00
Jérôme Duval
01929b0c94 added a mapping for 0x83 to BTRFS
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39069 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-10-23 15:19:58 +00:00
Oliver Tappe
dbe1e23aa8 Optimised passing around of timezone a bit
* _kern_[sg]et_timezone() now accepts/passes out the timezone name, too
* adjust Time preflet and clockconfig to pass the timezone name into the kernel
  when calling _kern_set_timezone()
* ajust implementation of tzset() to fetch the timezone name from the kernel
  via _kern_get_timezone() instead of reading 'libroot_timezone_info'
* the Time preflet no longer writes 'libroot_timezone_info'


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38164 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-16 22:01:28 +00:00
Oliver Tappe
7e965f506d More consolidation of timezone code:
* dropped DaylightSavingTime from real_time_clock code in kernel, it was
  never really being used for what it meant (and just being referred to by
  gettimeofday(), which put a different meaning to it
* adjusted the syscalls get_timezone() & set_timezone() as well as their callers 
  accordingly
* got rid of get_rtc_info() and rtc_info struct in kernel, as it was only
  being referred to by the FAT add-on and that one (like gettimeofday()) put a
  different meaning to tz_minuteswest. Added a comment to FAT's util.c
  showing a possible solution, should the hardcoded GMT timezone pose a problem.
* fixed declaration of gettimeofday() to match POSIX base specs, issue 7
* changed implementation of gettimeofday() to not bother trying to fill struct
  timezone - it was using wrong values before, anyway.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37888 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-03 23:02:57 +00:00
Oliver Tappe
96ac47e312 Made some progress with consolidation of timezone-related code:
* renamed syscalls _kern_[gs]et_tzfilename 
  to _kern_[gs]et_real_time_clock_is_gmt, as the filename part is no longer
  relevant (and the two corresponding parameters were removed)
* C++-ified and reworked clockconfig to use the info from 'Time settings' 
  to setup the timezone info during boot
* removed invocation of _kern_get_tzfilename() from tzset(), as the syscall
  no longer exists and tzset() is currently broken anyway
* adjusted the Time preflet to use the renamed syscall when getting/setting 
  the RTC info


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37881 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-03 17:47:26 +00:00
Ingo Weinhold
f75e014cb8 Patch by Lucian Adrian Grijincu: Added support for loading kernel modules
with only a single readable/writable/executable text+data segment.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37415 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-06 21:47:08 +00:00
Ingo Weinhold
9fb2d73772 Replaced B_32_BIT_MEMORY by B_32_BIT_FULL_LOCK and B_32_BIT_CONTIGUOUS, so
the constraint can be expressed more precisely. ATM B_32_BIT_FULL_LOCK is
implemented as B_32_BIT_CONTIGUOUS when B_HAIKU_PHYSICAL_BITS > 32, though.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37226 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-23 13:29:25 +00:00
Ingo Weinhold
7b1d69ecbb Added safe mode option B_SAFEMODE_4_GB_MEMORY_LIMIT (plus a boot loader menu
item) and kernel settings option "4gb_memory_limit". Enabling either one
causes the memory beyond 4 GB to be ignored.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37225 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-23 11:13:39 +00:00
Ingo Weinhold
9d570af7c8 Changed the type of the "op" parameter of the fs_vnode_ops::ioctl() hook and
the _kern_ioctl() syscall from ulong to uint32.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36927 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-05-24 21:04:22 +00:00
Ingo Weinhold
907886143f * Changed some parameters of VM syscalls from int to uint32, mostly for sake
of consistency.
* Moved the B_OVERCOMMITTING_AREA flag from B_KERNEL_AREA_FLAGS to
  B_USER_AREA_FLAGS, since we really allow it to be passed from userland.
* Most VM syscalls check the provided protection against B_USER_AREA_FLAGS
  instead of B_USER_PROTECTION, now. This way they allow for
  B_OVERCOMMITTING_AREA as well.
* _user_map_file(), _user_set_memory_protection(): Check the protection like
  the other syscalls do and use fix_protection() instead of doing that
  manually.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36572 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-05-01 19:47:39 +00:00
Ingo Weinhold
45b01eb841 Added private system arch specific arch_cpu_defs.h header, currently defining
only a SPINLOCK_PAUSE() macro.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36351 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-19 14:16:48 +00:00
Axel Dörfler
f46308c92a * More header cleanup, continuing korli's work.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36206 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-13 09:48:02 +00:00
Jérôme Duval
d25dd4b920 some copyright headers clean up
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36203 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-12 21:02:09 +00:00
Axel Dörfler
ee0d2be9e4 bonefish+axeld:
* Implemented a tiny bit more sophisticated version of
  estimate_max_scheduling_latency() that uses a syscall that lets the scheduler
  decide.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36170 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-11 20:40:58 +00:00
Ingo Weinhold
813d4cbe94 * Moved created subdirectory src/system/kernel/lock.cpp to new subdirectory
locks.
* Added syscalls for a new kind of mutex. A mutex consists only of an int32 and
  doesn't require any kernel resources. So it's initialization cannot fail
  (it consists only of setting the mutex value to 0). An uncontended lock or
  unlock operation can basically consist of an atomic_*() in userland. The
  syscalls (when the mutex is contended) are a bit more expensive than semaphore
  operations, though.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36158 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-11 16:07:39 +00:00
Ingo Weinhold
078dbb2d0e Defined more sysconf() and _POSIX_* constants required by POSIX.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36074 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-07 18:52:25 +00:00
Ingo Weinhold
189010cbc2 Added support for I/O scheduling events to the system profiler interface.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34703 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-19 14:33:29 +00:00
Ingo Weinhold
d8d4b902cb * The system profiler scheduling event structures sport nanotime_ts now.
* Adjusted the DebugAnalyzer to handle nanosecond times.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34546 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-12-07 22:56:29 +00:00
Ingo Weinhold
1f3f5ca265 Fixed header guard.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34325 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-11-27 21:10:08 +00:00
Ingo Weinhold
a492466dad Created new private system header computed_asm_macros.h defining the macro we
use for the asm_offsets.cpp file, so it can be reused elsewhere.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34311 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-11-27 14:07:05 +00:00
Axel Dörfler
3f67d04bc4 * This fixes the "'noreturn' function returns" warning in exit().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34293 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-11-26 16:59:46 +00:00
Axel Dörfler
486fffdaaf * Forgot to add linkat(), this really closes #4928 now.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34289 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-11-26 16:30:16 +00:00
Axel Dörfler
fb2500da15 * Added missing AT_EACCESS.
* Implemented renameat(), faccessat(), fchownat(), fchmodat(), and mkfifoat().
* Added stub for mknodat().
* The kernel backend for faccessat() does not yet differentiate between
  effective and real user/group IDs, though.
* Removed B_ENABLE_INCOMPLETE_POSIX_AT_SUPPORT, as we now support everything
  (more or less). This also closes ticket #4928.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34288 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-11-26 16:17:17 +00:00
Axel Dörfler
ecf6b86c92 * The pthread_thread structure is now allocated for all threads.
* Therefore, all pthread functions should now work fine on all threads.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33967 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-11-09 21:33:35 +00:00
Axel Dörfler
6242fd5977 * Added the possibility to debug latency issues with spinlocks.
* When DEBUG_SPINLOCK_LATENCIES is 1, the system will panic if any spinlock is
  held longer than DEBUG_LATENCY micro seconds (currently 200). If your system
  doesn't boot anymore, a new safemode setting can disable the panic.
* Besides some problems during boot when the MTRRs are set up, 200 usecs work
  fine here if all debug output is turned off (the output stuff is definitely
  problematic, though I don't have a good idea on how to improve upon it a lot).
* Renamed the formerly BeOS compatible safemode settings to look better; there
  is no need to be compatible there.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33953 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-11-08 20:26:48 +00:00
Ingo Weinhold
d6778355ee * <DiskDeviceTypes.h>: Removed kPartitionTypeIntel{Primary,Logical} constants.
* Added new header headers/private/system/disk_device_types.h, which defines
  the <DiskDeviceTypes.h> constants as macros and which can be used where the
  constants cannot be used. The constants are defined using the macros, so now
  there's only one place where the string literals should be specified.
* Use the macros in the partitioning systems. I was too lazy to also adjust the
  file systems -- most of them seem to hard-code the string literal yet.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33386 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-10-01 03:07:42 +00:00
Stefano Ceccherini
f0bf38026a Add safemode option to disable the use of APIC timers
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33132 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-09-14 09:02:15 +00:00
Jonas Sundström
893988af82 Added and modified kernel stubs and headers for arch mipsel. Correctness not included.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32621 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-23 02:52:09 +00:00