#
02463fb4 |
|
05-Mar-2024 |
X512 <danger_mail@list.ru> |
kernel/int: consolidate interrupt vector number to `int32` This is no-op for 32 bit platforms because `int32` is defined as `long` there. Change interrupt vector number from 64 bits to 32 bits for 64 bit platforms. Change-Id: I52d1ad616cab16488804e9733c7afaf772a670ba Reviewed-on: https://review.haiku-os.org/c/haiku/+/7507 Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org> Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
|
#
76681bd9 |
|
22-Sep-2023 |
Augustin Cavalier <waddlesplash@gmail.com> |
kernel: Rewrite B_DEBUG_SPINLOCK_CONTENTION. * Replace count_low/count_high with bigtime_t fields plus an int32. sizeof(spinlock) is now 32 bytes with the debug option enabled. * Adjust and clean up all spinlock code to use the new fields. * Fold DEBUG_SPINLOCK_LATENCIES into the new code. Remove the bootloader option and other flags for it (these were not compiled in by default.) The new code should be much easier to understand and also more powerful. However, the information transmitted to userland isn't as useful now; the KDL command output will have the interesting information. (Things could be reworked to transmit more interesting information to userland again if desired, but as this code clearly hadn't been compiled for many years, as it referred to global spinlocks that have been gone for a very long time.) Change-Id: I2cb34078bfdc7604f288a297b6cd1aa7ff9cc512 Reviewed-on: https://review.haiku-os.org/c/haiku/+/6943 Reviewed-by: waddlesplash <waddlesplash@gmail.com> Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
|
#
db9d2a6f |
|
02-Oct-2020 |
Jérôme Duval <jerome.duval@gmail.com> |
POSIX: add dprintf Change-Id: I577d5283a9be04924a8dd05c3be3969b41da60db Reviewed-on: https://review.haiku-os.org/c/haiku/+/3282 Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
|
#
dda8e77b |
|
29-Feb-2020 |
Augustin Cavalier <waddlesplash@gmail.com> |
headers: Move B_KERNEL_{EXECUTE,STACK}_AREA into KernelExport.h. There is no good reason to put them in a private header. No functional change (but drivers now have access to these constants.) Change-Id: I7ac00a120ab44fbc110bc858dfd87d69d0061135 Reviewed-on: https://review.haiku-os.org/c/haiku/+/2294 Reviewed-by: Adrien Destugues <pulkomandy@gmail.com> Reviewed-by: John Scipione <jscipione@gmail.com>
|
#
8a0c9d52 |
|
10-Aug-2019 |
Augustin Cavalier <waddlesplash@gmail.com> |
OS: Rename B_USER_CLONEABLE_AREA to B_CLONEABLE_AREA. It now lives in OS.h. The idea is that this will now be accessible to userland applications, so userland memory is protected from access by other processes, just as kernel memory is. No functional change (the constants are still the same, though I've changed some to use shifts to make clear which bits are allocated are which are unused.)
|
#
ad6b9a1d |
|
19-Dec-2013 |
Pawel Dziepak <pdziepak@quarnos.org> |
scheduler: Use sequential locks instead of atomic 64 bit access
|
#
e736a456 |
|
28-Nov-2013 |
Pawel Dziepak <pdziepak@quarnos.org> |
kernel: Forbid implicit casts between spinlock and int32
|
#
defee266 |
|
06-Nov-2013 |
Pawel Dziepak <pdziepak@quarnos.org> |
kernel: Add read write spinlock implementation
|
#
077c84eb |
|
05-Nov-2013 |
Pawel Dziepak <pdziepak@quarnos.org> |
kernel: atomic_*() functions rework * No need for the atomically changed variables to be declared as volatile. * Drop support for atomically getting and setting unaligned data. * Introduce atomic_get_and_set[64]() which works the same as atomic_set[64]() used to. atomic_set[64]() does not return the previous value anymore.
|
#
4824f763 |
|
04-Nov-2013 |
Pawel Dziepak <pdziepak@quarnos.org> |
kernel: Add sequential lock implementation
|
#
5261923e |
|
20-May-2013 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Add dvprintf()
|
#
92284dcc |
|
08-Jul-2012 |
Pawel Dziepak <pdziepak@quarnos.org> |
nfs4: Use semaphore to cancel threads instead of interrupt_thread()
|
#
e552920f |
|
30-May-2012 |
Pawel Dziepak <pdziepak@quarnos.org> |
nfs4: Fix rpc listener thread cancelation recv on UDP sockets is not interrupted when the socket is closed. Additionaly, signals do not interrupt kernel threads, that is why new function interrupt_thread was implemented in order to cancel listener thread.
|
#
2a25d16d |
|
23-Jun-2010 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
* get_memory_map(): Changed parameters types to fixed-width types. * Added BeOS compatibility wrappers for get_memory_map(), map_physical_memory(), and create_area(). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37232 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
a8ad734f |
|
14-Jun-2010 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
* Introduced structures {virtual,physical}_address_restrictions, which specify restrictions for virtual/physical addresses. * vm_page_allocate_page_run(): - Fixed conversion of base/limit to array indexes. sPhysicalPageOffset was not taken into account. - Takes a physical_address_restrictions instead of base/limit and also supports alignment and boundary restrictions, now. * map_backing_store(), VM[User,Kernel]AddressSpace::InsertArea()/ ReserveAddressRange() take a virtual_address_restrictions parameter, now. They also support an alignment independent from the range size. * create_area_etc(), vm_create_anonymous_area(): Take {virtual,physical}_address_restrictions parameters, now. * Removed no longer needed B_PHYSICAL_BASE_ADDRESS. * DMAResources: - Fixed potential overflows of uint32 when initializing from device node attributes. - Fixed bounce buffer creation TODOs: By using create_area_etc() with the new restrictions parameters we can directly support physical high address, boundary, and alignment. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37131 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
64d79eff |
|
27-May-2010 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
* Changed physical_entry::{address,size} to phys_{addr,size}_t and changed map_physical_memory()'s physicalAddress parameter type from void* to phys_addr_t. This breaks source compatibility, but -- as long as phys_{addr,size}_t remain 32 bit wide -- keeps binary compatibility with BeOS. * Adjusted all code using the affected interfaces (Oh what fun!). Added a few TODOs in places where the wrong types (e.g. void* for physical addresses are used). Looks like quite a few drivers aren't 64 bit safe and others will break with PAE. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36960 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
3684e40b |
|
17-Feb-2009 |
Michael Lotz <mmlr@mlotz.ch> |
* Introduce a (private) flag B_NO_HANDLED_INFO for install_io_interrupt_handler. It causes the interrupt handler to be inserted at the very end of the list instead of at the top. It is intended to be used as a workaround when a interrupt handler cannot know if it actually handled the interrupt. This should never be used by native drivers. Also if we know that the result is not valid because of this flag we won't disable the vector in case we count many unhandled interrupts as those numbers are then unreliable. * Moved B_NO_LOCK_VECTOR to be a private flag as well. * Made the interrupt handler list a simple manually maintaned singly linked list instead of the doubly linked one used with insque and remque as it greatly simplifies things for such an easy use case and is more compact. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29241 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
d9c6f9a9 |
|
01-Feb-2009 |
Michael Lotz <mmlr@mlotz.ch> |
Remove separate GCC4 versions of add_debug_command()/remove_debug_command() and add the const in any case. As Axel points out these are C functions and we do not affect binary compatibility by changing their signature. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29124 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
c33667d4 |
|
01-Feb-2009 |
Michael Lotz <mmlr@mlotz.ch> |
Fixing warnings under GCC4 in preparation to enable -Werror there as well: * Replaced the use of offsetof() for structs that aren't PODs. Add a offset_of_member() macro to util/khash.h because that's what it's used for in our cases. * Change the signature of add_debugger_command()/remove_debugger_command() on GCC > 2 to avoid the depricated conversion from string constants to char *. * Adding some "suggested" parenthesis. I know that not everyone likes that, but it pointed out at least one bug that is fixed here as well. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29113 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
6e60a6ac |
|
23-Jul-2008 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Added function get_memory_map_etc() which works similar to get_memory_map(), but has a saner semantics and allows specifying a team. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26600 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
6db6b628 |
|
16-Jul-2008 |
Axel Dörfler <axeld@pinc-software.de> |
* Added B_PHYSICAL_BASE_ADDRESS address specification for anonymous areas. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26456 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
736352dc |
|
16-Jul-2008 |
Axel Dörfler <axeld@pinc-software.de> |
* Added [un]lock_memory_etc() versions that accept a team_id as first argument. This allows drivers to lock the memory outside of the original team context. * create_area_etc() got a struct team as first argument, but that should have been a team_id. * Removed delete_area_etc() - there is already vm_delete_area() doing the same thing. * Renamed vm_get_address_space_by_id() to vm_get_address_space(), as there is no other method of getting an address space. * Removed erroneous white space. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26455 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
1c8de858 |
|
01-Jun-2008 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
* Added optional spinlock contention measurement feature. Enabled when B_DEBUG_SPINLOCK_CONTENTION is defined to 1. It typedefs spinlock to a structure (thus breaking BeOS binary compatibility), containing a counter which is incremented whenever a thread has to wait for the spinlock. * Added macros for spinlock initialization and access and changed code using spinlocks accordingly. This breaks compilation for BeOS -- the macros should be defined in the respective compatibility wrappers. * Added generic syscall to get the spinlock counters for the thread and the team spinlocks. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25752 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
807cf76d |
|
26-Apr-2008 |
François Revol <revol@free.fr> |
memory barrier functions available for drivers. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25183 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
037f7094 |
|
09-Apr-2008 |
Axel Dörfler <axeld@pinc-software.de> |
* Cleaned up KernelExport.h completely, removed deprecated and non implemented API, uses the _PRINTFLIKE macro where appropriate. * Got rid of the "qent" structure, struct timer now contains everything we need. This makes the affected code in sem.cpp, signal.cpp, and timer.c much cleaner, and resolves a few TODOs. * Minor cleanup in vfs.cpp. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24871 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
f87d72d7 |
|
03-Feb-2008 |
Michael Lotz <mmlr@mlotz.ch> |
Introduce a B_NO_LOCK_VECTOR flag to be used with install_io_interrupt_handler(). When specified it desigantes that the interrupt handler should not lock the vector with a spinlock when executing the installed interrupt handlers. This is necessary to allow the same interrupt vector to be handled in parallel on different CPUs. And it is required for the CPU halt to work synchronously when there is more than one AP CPU. Though the acquire_spinlock() should cause IPIs to be processed, only this fixed the SMP_MSG_FLAG_SYNC problem for me. Not locking is safe as long as it is guaranteed that no interrupt handler is registered or removed while the interrupt handler is running. We can guarantee this for the SMP interrupt handlers we install in arch_smp_init() as they are never uninstalled. Probably this flag should be made private though. Restored the SMP_MSG_FLAG_SYNC when entering the kernel debugger. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23838 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
18397925 |
|
16-Jan-2008 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Change parse_expression() return value from uint32 to uint64. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23571 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
cdb3eb76 |
|
06-May-2007 |
Hugo Santos <hugosantos@nowhere.fake> |
the previously added IO interrupt handling routines are no longer necessary, at least for now. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21046 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
5502e596 |
|
06-May-2007 |
Hugo Santos <hugosantos@nowhere.fake> |
added io_interrupt_handler methods for dynamic handling of IO interrupts, including enabling/disabling without allocation and in interrupt context. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21040 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
badc7b67 |
|
18-Feb-2007 |
Travis Geiselbrecht <geist@foobox.com> |
yet another fix for #1018, which has at this point blossomed into a reorg of how AP cpus are initialized. the new cpuid stuff was apparently exacerbating an existing problem where various bits of low level cpu code (specifically get_current_cpu) weren't really initialized before being used. Changed the order to set up a fake set of threads to point each cpu at really early in boot to make sure that at all points in code it can get the current 'thread' and thus the current cpu. A probably better solution would be to have dr3 point to the current cpu which would then point to the current thread, but that has a race condition that would require an int disable, etc. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20160 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
551b4152 |
|
26-Aug-2006 |
Jérôme Duval <korli@users.berlios.de> |
added the format expected by panic to throw warnings on compilation git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18650 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
b66ae2c9 |
|
25-Jul-2006 |
Oliver Tappe <zooey@hirschkaefer.de> |
- moved dumpBlock() into debug.c, renamed it to dump_block() and added it to kernel-exports. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18268 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
d4112f6b |
|
29-Apr-2005 |
Axel Dörfler <axeld@pinc-software.de> |
Applied some changes suggested by mmu_man, more to come, though: - has_signals_pending() is not declared in Be headers, and it isn't declared in our KernelExport.h anymore, too - removed snooze_etc() from KernelExport.h, as it's already defined in OS.h (and really exported by libroot.so). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12506 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
b20667b3 |
|
26-Apr-2005 |
Axel Dörfler <axeld@pinc-software.de> |
{install|remove}_io_interrupt_handler() now correctly handle the B_NO_ENABLE_COUNTER flag. Lots of cleanup: - moved B_NO_ENABLE_COUNTER flag definition out of int.h to KernelExport.h, as it's described in the BeBook (although it's probably not really used that often :)) - int.c no longer has any platform dependent code (+ 0x20 on interrupt numbers is gone); it's now entirely handled in the arch/x86/ section. - the io_vectors[] is now statically initialized, instead of allocated from the heap - removed {install|remove}_interrupt_handler(); they weren't that useful, arch_smp_init() is now calling install_io_interrupt_handler() correctly instead - introduced a new arch_int.h header file that currently contains NUM_IO_VECTORS only (though on x86, it also has ARCH_INTERRUPT_BASE == 0x20). - changed the return type from {install|remove}_io_interrupt_handler() from "long" to "status_t" - rearranged and cleaned the PIC initialization code, made the PIC code more prominent - changed comments that talk about a non existing 8239 (the PIC chip is actually 8259) - moved arch/x86/interrupts.h to the source directory, as it's not used outside - added BeOS compatible interrupts_enabled() function, that should replace our equivalent (and private) are_interrupts_enabled() git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12477 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
ed932a95 |
|
25-Jan-2005 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Added B_USER_CLONEABLE_AREA protection flag. Here it does belong. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11048 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
47d0b95b |
|
13-Dec-2004 |
Axel Dörfler <axeld@pinc-software.de> |
Moved B_KERNEL_{READ|WRITE_AREA} from vm_types.h to KernelExport.h. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10425 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
2f88663b |
|
29-Sep-2004 |
Axel Dörfler <axeld@pinc-software.de> |
Moved the user_memcpy()/strlcpy()/memset() calls to KernelExport.h. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9102 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
faffd0f3 |
|
11-Jun-2004 |
Axel Dörfler <axeld@pinc-software.de> |
spawn_kernel_thread() now matches the spawn_thread() prototype - there is no reason for them to be different. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7909 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
ebb6a50a |
|
08-Jun-2004 |
Axel Dörfler <axeld@pinc-software.de> |
Fixed the prototype of parse_expression() - it's parameter should be const. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7840 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
1648d0d8 |
|
23-May-2004 |
Axel Dörfler <axeld@pinc-software.de> |
daemon_hook typedef wasn't R5 compatible. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7627 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
f5e4e662 |
|
14-Feb-2003 |
Axel Dörfler <axeld@pinc-software.de> |
Fixed a missing const. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2706 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
e8038705 |
|
09-Feb-2003 |
Philippe Houdoin <philippe.houdoin@gmail.com> |
Forgot to commit these... Should fix network stuff build issues. Add again the load_driver_symbols() export into our KernelExport.h, as it's expected by many kernel add-ons (drivers, modules)... the network ones, for a start. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2672 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
b16ed21a |
|
27-Jan-2003 |
Axel Dörfler <axeld@pinc-software.de> |
Our new KernelExport.h header. Typedefs for debugger and kernel daemon hooks, cleaned up. Added a ToDo item about the "abuse" of the quent structure. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2581 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
5cdacbaa |
|
26-Oct-2002 |
lillo <lillo@nowhere.fake> |
*LOTS* of small changes to make the kernel compatible with Be's KernelExport.h git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1683 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
d7e489f8 |
|
23-Oct-2002 |
beveloper <beveloper@nowhere.fake> |
modified to provider better R5 compatibility git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1615 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
53ae93e6 |
|
19-Sep-2002 |
Philippe Houdoin <philippe.houdoin@gmail.com> |
Source compatibility objective: time to add some BeOS specific public headers. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1091 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
ad6b9a1df8ccdb1093c4b122764f8692d6f7ca2c |
|
19-Dec-2013 |
Pawel Dziepak <pdziepak@quarnos.org> |
scheduler: Use sequential locks instead of atomic 64 bit access
|
#
e736a456ba4d12621654a3f95c394d11fcaac243 |
|
28-Nov-2013 |
Pawel Dziepak <pdziepak@quarnos.org> |
kernel: Forbid implicit casts between spinlock and int32
|
#
defee266db232f7477d62a5ff8f10a0a498cad1e |
|
06-Nov-2013 |
Pawel Dziepak <pdziepak@quarnos.org> |
kernel: Add read write spinlock implementation
|
#
077c84eb27b25430428d356f3d13afabc0cc0d13 |
|
05-Nov-2013 |
Pawel Dziepak <pdziepak@quarnos.org> |
kernel: atomic_*() functions rework * No need for the atomically changed variables to be declared as volatile. * Drop support for atomically getting and setting unaligned data. * Introduce atomic_get_and_set[64]() which works the same as atomic_set[64]() used to. atomic_set[64]() does not return the previous value anymore.
|
#
4824f7630b2ca9c5750f93c4daa837dfcac3059e |
|
04-Nov-2013 |
Pawel Dziepak <pdziepak@quarnos.org> |
kernel: Add sequential lock implementation
|
#
5261923e877d1637aea41ab878af97d49d70fd69 |
|
20-May-2013 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Add dvprintf()
|
#
92284dcc2cc283de8cf553889891ae46aa2ba991 |
|
08-Jul-2012 |
Pawel Dziepak <pdziepak@quarnos.org> |
nfs4: Use semaphore to cancel threads instead of interrupt_thread()
|
#
e552920f09647d2e8a0743dceac5a37f1d57c5be |
|
30-May-2012 |
Pawel Dziepak <pdziepak@quarnos.org> |
nfs4: Fix rpc listener thread cancelation recv on UDP sockets is not interrupted when the socket is closed. Additionaly, signals do not interrupt kernel threads, that is why new function interrupt_thread was implemented in order to cancel listener thread.
|
#
2a25d16d3321358f74112a184c5f917e0fc69195 |
|
23-Jun-2010 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
* get_memory_map(): Changed parameters types to fixed-width types. * Added BeOS compatibility wrappers for get_memory_map(), map_physical_memory(), and create_area(). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37232 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
a8ad734f1c698917badb15e1641e0f38b3e9a013 |
|
14-Jun-2010 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
* Introduced structures {virtual,physical}_address_restrictions, which specify restrictions for virtual/physical addresses. * vm_page_allocate_page_run(): - Fixed conversion of base/limit to array indexes. sPhysicalPageOffset was not taken into account. - Takes a physical_address_restrictions instead of base/limit and also supports alignment and boundary restrictions, now. * map_backing_store(), VM[User,Kernel]AddressSpace::InsertArea()/ ReserveAddressRange() take a virtual_address_restrictions parameter, now. They also support an alignment independent from the range size. * create_area_etc(), vm_create_anonymous_area(): Take {virtual,physical}_address_restrictions parameters, now. * Removed no longer needed B_PHYSICAL_BASE_ADDRESS. * DMAResources: - Fixed potential overflows of uint32 when initializing from device node attributes. - Fixed bounce buffer creation TODOs: By using create_area_etc() with the new restrictions parameters we can directly support physical high address, boundary, and alignment. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37131 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
64d79eff7290437d24b1a420537c3ed5c144ab96 |
|
27-May-2010 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
* Changed physical_entry::{address,size} to phys_{addr,size}_t and changed map_physical_memory()'s physicalAddress parameter type from void* to phys_addr_t. This breaks source compatibility, but -- as long as phys_{addr,size}_t remain 32 bit wide -- keeps binary compatibility with BeOS. * Adjusted all code using the affected interfaces (Oh what fun!). Added a few TODOs in places where the wrong types (e.g. void* for physical addresses are used). Looks like quite a few drivers aren't 64 bit safe and others will break with PAE. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36960 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
3684e40bb8c7029820387ca4c8a63e252297e343 |
|
17-Feb-2009 |
Michael Lotz <mmlr@mlotz.ch> |
* Introduce a (private) flag B_NO_HANDLED_INFO for install_io_interrupt_handler. It causes the interrupt handler to be inserted at the very end of the list instead of at the top. It is intended to be used as a workaround when a interrupt handler cannot know if it actually handled the interrupt. This should never be used by native drivers. Also if we know that the result is not valid because of this flag we won't disable the vector in case we count many unhandled interrupts as those numbers are then unreliable. * Moved B_NO_LOCK_VECTOR to be a private flag as well. * Made the interrupt handler list a simple manually maintaned singly linked list instead of the doubly linked one used with insque and remque as it greatly simplifies things for such an easy use case and is more compact. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29241 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
d9c6f9a92c5e979d7e409a7ab577759419f7c9cd |
|
01-Feb-2009 |
Michael Lotz <mmlr@mlotz.ch> |
Remove separate GCC4 versions of add_debug_command()/remove_debug_command() and add the const in any case. As Axel points out these are C functions and we do not affect binary compatibility by changing their signature. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29124 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
c33667d400856680a8e0122300861eda77d1847a |
|
01-Feb-2009 |
Michael Lotz <mmlr@mlotz.ch> |
Fixing warnings under GCC4 in preparation to enable -Werror there as well: * Replaced the use of offsetof() for structs that aren't PODs. Add a offset_of_member() macro to util/khash.h because that's what it's used for in our cases. * Change the signature of add_debugger_command()/remove_debugger_command() on GCC > 2 to avoid the depricated conversion from string constants to char *. * Adding some "suggested" parenthesis. I know that not everyone likes that, but it pointed out at least one bug that is fixed here as well. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29113 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
6e60a6ac033d07074184341d26598e559aec89b0 |
|
23-Jul-2008 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Added function get_memory_map_etc() which works similar to get_memory_map(), but has a saner semantics and allows specifying a team. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26600 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
6db6b628d6fdad197f44cc51fea342e888064575 |
|
16-Jul-2008 |
Axel Dörfler <axeld@pinc-software.de> |
* Added B_PHYSICAL_BASE_ADDRESS address specification for anonymous areas. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26456 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
736352dcf58f1855db8dc09c456d420ca91596ef |
|
16-Jul-2008 |
Axel Dörfler <axeld@pinc-software.de> |
* Added [un]lock_memory_etc() versions that accept a team_id as first argument. This allows drivers to lock the memory outside of the original team context. * create_area_etc() got a struct team as first argument, but that should have been a team_id. * Removed delete_area_etc() - there is already vm_delete_area() doing the same thing. * Renamed vm_get_address_space_by_id() to vm_get_address_space(), as there is no other method of getting an address space. * Removed erroneous white space. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26455 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
1c8de8581b66c14ea94bccd7ddcea99291955796 |
|
01-Jun-2008 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
* Added optional spinlock contention measurement feature. Enabled when B_DEBUG_SPINLOCK_CONTENTION is defined to 1. It typedefs spinlock to a structure (thus breaking BeOS binary compatibility), containing a counter which is incremented whenever a thread has to wait for the spinlock. * Added macros for spinlock initialization and access and changed code using spinlocks accordingly. This breaks compilation for BeOS -- the macros should be defined in the respective compatibility wrappers. * Added generic syscall to get the spinlock counters for the thread and the team spinlocks. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25752 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
807cf76df012895d6de2cea198c9c3b0558948b1 |
|
26-Apr-2008 |
François Revol <revol@free.fr> |
memory barrier functions available for drivers. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25183 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
037f70947f14b7e7d452543ad645f38d7c96f6eb |
|
09-Apr-2008 |
Axel Dörfler <axeld@pinc-software.de> |
* Cleaned up KernelExport.h completely, removed deprecated and non implemented API, uses the _PRINTFLIKE macro where appropriate. * Got rid of the "qent" structure, struct timer now contains everything we need. This makes the affected code in sem.cpp, signal.cpp, and timer.c much cleaner, and resolves a few TODOs. * Minor cleanup in vfs.cpp. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24871 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
f87d72d7880e6124b0c5f7f09de2cf5e19923d1a |
|
03-Feb-2008 |
Michael Lotz <mmlr@mlotz.ch> |
Introduce a B_NO_LOCK_VECTOR flag to be used with install_io_interrupt_handler(). When specified it desigantes that the interrupt handler should not lock the vector with a spinlock when executing the installed interrupt handlers. This is necessary to allow the same interrupt vector to be handled in parallel on different CPUs. And it is required for the CPU halt to work synchronously when there is more than one AP CPU. Though the acquire_spinlock() should cause IPIs to be processed, only this fixed the SMP_MSG_FLAG_SYNC problem for me. Not locking is safe as long as it is guaranteed that no interrupt handler is registered or removed while the interrupt handler is running. We can guarantee this for the SMP interrupt handlers we install in arch_smp_init() as they are never uninstalled. Probably this flag should be made private though. Restored the SMP_MSG_FLAG_SYNC when entering the kernel debugger. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23838 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
18397925246b82cd36b8211461c6924229955839 |
|
16-Jan-2008 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Change parse_expression() return value from uint32 to uint64. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23571 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
cdb3eb762aa639be5e5bc9806b876c55da30aa86 |
|
06-May-2007 |
Hugo Santos <hugosantos@nowhere.fake> |
the previously added IO interrupt handling routines are no longer necessary, at least for now. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21046 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
5502e596dc065a20d10a8a53e73c146a9812ace1 |
|
06-May-2007 |
Hugo Santos <hugosantos@nowhere.fake> |
added io_interrupt_handler methods for dynamic handling of IO interrupts, including enabling/disabling without allocation and in interrupt context. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21040 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
badc7b674eca3e33d1c5f865a626966110790f8f |
|
18-Feb-2007 |
Travis Geiselbrecht <geist@foobox.com> |
yet another fix for #1018, which has at this point blossomed into a reorg of how AP cpus are initialized. the new cpuid stuff was apparently exacerbating an existing problem where various bits of low level cpu code (specifically get_current_cpu) weren't really initialized before being used. Changed the order to set up a fake set of threads to point each cpu at really early in boot to make sure that at all points in code it can get the current 'thread' and thus the current cpu. A probably better solution would be to have dr3 point to the current cpu which would then point to the current thread, but that has a race condition that would require an int disable, etc. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20160 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
551b4152f639e8387c68521543349be58a665360 |
|
26-Aug-2006 |
Jérôme Duval <korli@users.berlios.de> |
added the format expected by panic to throw warnings on compilation git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18650 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
b66ae2c9c85031c9a2d91152af849e4975a3327b |
|
25-Jul-2006 |
Oliver Tappe <zooey@hirschkaefer.de> |
- moved dumpBlock() into debug.c, renamed it to dump_block() and added it to kernel-exports. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18268 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
d4112f6bc56784206024c5731f829f1e68e9e52a |
|
29-Apr-2005 |
Axel Dörfler <axeld@pinc-software.de> |
Applied some changes suggested by mmu_man, more to come, though: - has_signals_pending() is not declared in Be headers, and it isn't declared in our KernelExport.h anymore, too - removed snooze_etc() from KernelExport.h, as it's already defined in OS.h (and really exported by libroot.so). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12506 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
b20667b35b3effbc937914eba73761f43cc7520d |
|
26-Apr-2005 |
Axel Dörfler <axeld@pinc-software.de> |
{install|remove}_io_interrupt_handler() now correctly handle the B_NO_ENABLE_COUNTER flag. Lots of cleanup: - moved B_NO_ENABLE_COUNTER flag definition out of int.h to KernelExport.h, as it's described in the BeBook (although it's probably not really used that often :)) - int.c no longer has any platform dependent code (+ 0x20 on interrupt numbers is gone); it's now entirely handled in the arch/x86/ section. - the io_vectors[] is now statically initialized, instead of allocated from the heap - removed {install|remove}_interrupt_handler(); they weren't that useful, arch_smp_init() is now calling install_io_interrupt_handler() correctly instead - introduced a new arch_int.h header file that currently contains NUM_IO_VECTORS only (though on x86, it also has ARCH_INTERRUPT_BASE == 0x20). - changed the return type from {install|remove}_io_interrupt_handler() from "long" to "status_t" - rearranged and cleaned the PIC initialization code, made the PIC code more prominent - changed comments that talk about a non existing 8239 (the PIC chip is actually 8259) - moved arch/x86/interrupts.h to the source directory, as it's not used outside - added BeOS compatible interrupts_enabled() function, that should replace our equivalent (and private) are_interrupts_enabled() git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12477 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
ed932a95646dad19f0cdefc5044ea244ce0870d8 |
|
25-Jan-2005 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
Added B_USER_CLONEABLE_AREA protection flag. Here it does belong. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11048 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
47d0b95b38748ed541c842558c3c320439396ce7 |
|
13-Dec-2004 |
Axel Dörfler <axeld@pinc-software.de> |
Moved B_KERNEL_{READ|WRITE_AREA} from vm_types.h to KernelExport.h. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10425 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
2f88663baeedd4ae94c14faf3373e7f657f2d580 |
|
29-Sep-2004 |
Axel Dörfler <axeld@pinc-software.de> |
Moved the user_memcpy()/strlcpy()/memset() calls to KernelExport.h. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9102 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
faffd0f3d75b4e967e8ed72865f81777b56be80f |
|
11-Jun-2004 |
Axel Dörfler <axeld@pinc-software.de> |
spawn_kernel_thread() now matches the spawn_thread() prototype - there is no reason for them to be different. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7909 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
ebb6a50a53759e61ae376cb6b0d7d9032047179c |
|
08-Jun-2004 |
Axel Dörfler <axeld@pinc-software.de> |
Fixed the prototype of parse_expression() - it's parameter should be const. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7840 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
1648d0d88e02df9e4059e6d54fdd415934bd7aa8 |
|
23-May-2004 |
Axel Dörfler <axeld@pinc-software.de> |
daemon_hook typedef wasn't R5 compatible. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7627 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
f5e4e662cd61b74996ee4d44bba751850566fdd6 |
|
14-Feb-2003 |
Axel Dörfler <axeld@pinc-software.de> |
Fixed a missing const. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2706 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
e803870545c64005bf53339217a04d4fa0ca051a |
|
09-Feb-2003 |
Philippe Houdoin <philippe.houdoin@gmail.com> |
Forgot to commit these... Should fix network stuff build issues. Add again the load_driver_symbols() export into our KernelExport.h, as it's expected by many kernel add-ons (drivers, modules)... the network ones, for a start. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2672 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
b16ed21a04b6912b8c1e28fcd5a4128b1cfa8be0 |
|
27-Jan-2003 |
Axel Dörfler <axeld@pinc-software.de> |
Our new KernelExport.h header. Typedefs for debugger and kernel daemon hooks, cleaned up. Added a ToDo item about the "abuse" of the quent structure. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2581 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
5cdacbaabbd66673ada83b4d97d87126776484dc |
|
26-Oct-2002 |
lillo <lillo@nowhere.fake> |
*LOTS* of small changes to make the kernel compatible with Be's KernelExport.h git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1683 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
d7e489f80a82a0dc5974df1e780d7a908129bab4 |
|
23-Oct-2002 |
beveloper <beveloper@nowhere.fake> |
modified to provider better R5 compatibility git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1615 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
53ae93e6d5299d364a2c2361877691fa3e813c80 |
|
19-Sep-2002 |
Philippe Houdoin <philippe.houdoin@gmail.com> |
Source compatibility objective: time to add some BeOS specific public headers. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1091 a95241bf-73f2-0310-859d-f6bbb57e9c96
|