Commit Graph

5748 Commits

Author SHA1 Message Date
Ingo Weinhold 28d05e026f Make scheduler_reschedule() an no-op until we're ready to start the
scheduler. This avoids the need to use the send_signal_etc() work-around for
resume_thread() during the early kernel initialization. Might fix #5851.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36530 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-29 15:10:37 +00:00
François Revol 79bda6fd6e Fix #5754 so at least the driver builds. It is not yet usable since we do not have a tty manager. For now it should be possible to get the BeOS one to work in Haiku though, but it's not tested.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36515 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-28 09:58:18 +00:00
Ingo Weinhold b1e06d23ce * The "page_stats" command does now also print the longest contiguous runs of
free respective free and cached pages.
* Removed the unused vm_page_allocate_page_run_no_base().
* vm_page_allocate_page_run() (and allocate_page_run()):
  - Use vm_page_reserve_pages() instead of vm_page_try_reserve_pages(), i.e.
    wait until the reservation succeeds.
  - Now we iterates two times through the pages to find a suitable page run. In
    the first iteration it only looks for free/clear pages, in the second
    iteration it also considers cached pages. This increases the chance of the
    function to succeed, when a lot of caching is going on.
    This reduces the amount of memory required to use the IOCache when booting
    off the anyboot Live CD to around 160 MB in qemu. It also seems to work with
    128 MB, but the syslog indicates that some memory allocations fail, which
    is not exactly inspiring confidence.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36489 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-26 13:56:09 +00:00
Artur Wyszynski 49a0c7942f Fixed build with GCC4
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36454 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-24 17:51:39 +00:00
Oliver Ruiz Dorantes ddbc9a0f2a - I expected once Haiku sets a connection with a remote device, such connection
was to expire in a couple of minutes, but not, seems to stay forever.
- Implement a Disconnect button in prefrences&kit



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36450 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-24 16:01:08 +00:00
Oliver Ruiz Dorantes 36cb67b24e - Style: alphabetize include directives
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36449 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-24 13:16:13 +00:00
Oliver Ruiz Dorantes 37c7d5d83a LocalDevice:
- Implement REading of the default timeouts
- Retrieval of all possible LinkKeys stored inside the dongle
- Provided function to force an authentication process with remote devices
RemoteDevice:
- Allow Haiku initiate a fully authenticated connection



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36445 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-24 11:34:23 +00:00
Oliver Ruiz Dorantes 40c666a5ab - Introduce template methods for single or non parameter commands
- Remove some old legacy command creation functions



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36444 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-24 11:16:49 +00:00
Fredrik Holmqvist 5d9cc10f80 Moving ACPI Embedded Controller to ACPI bus manager.
* Removed irq_routing struct from ACPI.h to where it is used. Might be able to use acrestype.h instead of duplication.
 * Disable old embedded controller and remove it from image.
 * Move embedded controller code to busmanager module.
 * Remove (some) code duplication

Should work as before, but is now initialized right after the bus manager. Can probably remove further code duplication.
I hope I've done it correctly, feedback is most welcome.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36420 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-22 16:19:41 +00:00
Axel Dörfler 0a96e18689 * Added opcode definitions for read/write-16 and the extended "read capacity 16"
over service-action-in.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36415 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-22 13:44:24 +00:00
Stephan Aßmus d7fcb36f2b * Allow to set the scale (versus multiplication with a scale).
* Added commented versions for translation, rotation and shear, which would
   work similar.
 * Added B_AFFINE_IDENTITY_TRANSFORM constant similar to B_ORIGIN.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36401 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-21 16:46:32 +00:00
Axel Dörfler b19e758b80 * The Keymap::IsDeadKey() of the Keymap preferences which was the main source
of BKeymap was not compatible with IsDeadKey() of the other Keymap
  incarnations.
* Now, I've renamed IsDeadKey() to DeadKey(), and introduced a new
  ActiveDeadKey() method that works like the other former IsDeadKey().
* This fixes the dead key problems my earlier BKeymap work introduced.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36400 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-21 16:36:54 +00:00
Ingo Weinhold efeca209a1 Made VMCache::Resize() virtual and let VMAnonymousCache override it to free
swap space when the cache shrinks. Currently the implementation stil leaks
swap space of busy pages.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36373 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-20 14:04:18 +00:00
Stefano Ceccherini 76d5e0641b Partially revert r35962, since the cure is worse than the sickness.
Should fix #5717 (but probably reopens #3103)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36369 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-20 12:37:08 +00:00
Axel Dörfler 910f10f2fc * Added libshared_build.a, currently only contains Keymap.cpp.
* keymap and <build>keymap are now using the BKeymap class as a base as well.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36368 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-20 08:17:07 +00:00
Axel Dörfler 624693f0c8 * Added the BFileIO class to libbe_build.so.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36367 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-20 08:13:57 +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
Ingo Weinhold 71ad4aedd9 Switched trunk to R1 pre-alpha 3.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36346 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-19 11:50:36 +00:00
Ingo Weinhold bf0a463e35 Introduced version constants for R1 alpha 2 and R1 pre alpha 3.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36344 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-19 11:41:00 +00:00
Jérôme Duval 8c6242d071 * revert previous commit
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36336 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-18 00:27:00 +00:00
Ingo Weinhold ef1716f81b Patch by Lucian Adrian Grijincu: Added pthread spinlock support.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36333 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-17 19:38:01 +00:00
Jérôme Duval c8d939eaa8 * hopefully display correctly Penryn based Pentium models (instead of Core 2 Extreme).
* fix a cache entry I introduced.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36332 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-17 16:20:27 +00:00
Axel Dörfler b44c25de42 * Factored out a single base class out of the three Keymap implementations we
had in our tree.
* Adapted Keymap, <input>keyboard, and consoled to use it - the additional
  functionality is implemented via a subclass in the first two cases.
* "keymap" will come next.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36328 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-16 07:47:41 +00:00
Ingo Weinhold 89dc7e4875 Added private BPositionIO derived classes BFileIO and BFileDescriptorIO which
wrap a FILE* respectively a file descriptor.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36324 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-15 22:19:27 +00:00
Ingo Weinhold f71274580b * Private libroot locking primitives:
- Reimplemented mutex to use the _kern_mutex*() syscalls.
  - The initializer functions cannot fail anymore -- changed their return type
    to void.
  - Changed the initializer function semantics to not copy the name by default
    anymore (as in the kernel). Also added *_etc() versions of them that take an
    additional flags.
  - Added static initializer macros.
  - Made the mutex (and thus recursive_lock) lock functions non-interruptable.
  - Got rid of the "lazy" version. They are no longer needed, since the
    initialization of the standard types can be done statically and cannot fail.
* Adjusted libroot, runtime loader, and other code using the private libroot
  locking primitives to the new semantics.
* pthreads mutexes and condition variables:
  - Reimplemented using the _kern_mutex*() syscalls.
  - Consistently use POSIX error codes.
  - Fixed some not quite POSIX compliant behavior.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36323 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-15 21:52:49 +00:00
Fredrik Holmqvist 186058c517 Some corrections and cleanup to ACPI Embedded controller:
* Exposed ACPI API needed by Embedded Controller
	This will be removed again if moved inside the bus manager.
	It also duplicates ACPI's own headers so it might go out of sync atm.
 * Added mutex to controller and fixed the mixup between acpi_status needed in int handlers and Haiku status.
 * Major code cleanup
	Not for headers as they are mostly redundant if we move the controller.
	Variable names still needs some cleanup

This makes the ACPI errors from the controller understandable. I get AE_NO_HARDWARE_RESPONSE now.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36318 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-15 19:23:43 +00:00
Axel Dörfler 868aa7a0e0 * Added shortcut handling to the boot loader menu (in preparation of adopting
ticket #5312).
* Added shortcut 'b' to continue booting, 'r' to reboot.
* Consolidated asterisk style.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36310 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-15 18:07:40 +00:00
Axel Dörfler 7af231d838 * Cleanup, no functional change.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36305 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-15 17:05:20 +00:00
Adrien Destugues 87158047dd Add a call in BCountry to get an icon for that country.
Untested and not working yet since we don't provide any icon.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36303 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-15 15:57:30 +00:00
Axel Dörfler 9de17be600 * Moved I/O APIC initialization to a later point, now the APCI and DPC modules
can safely be used.
* Since using the I/O APIC is disabled by default, I've removed the "return"
  that prevented its use when enabled. Let's see if it already does anything.
* Adapted other arch_int.cpp with a bit of cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36290 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-15 12:42:10 +00:00
Adrien Destugues 8025477189 * Implement a function to get all the available languages for a given application
* use it in readonlybootprompt instead of previous workaround code.
This makes the readonlybootprompt faster and lighter as it doesn't open and parse all the catalogs anymore, but only checks for their existence.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36276 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-14 23:48:01 +00:00
Axel Dörfler 2c49465329 * Removed the at_kbd_io and AT keyboard stuff; this is now done within the PS/2
driver, and that driver is using the raw_key_info structure as well.
* Renamed kb_mouse_driver.h to keyboard_mouse_driver.h.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36267 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-14 19:19:14 +00:00
Axel Dörfler 19049c8bd3 * Removed now unused header.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36266 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-14 19:16:30 +00:00
Axel Dörfler a608485f26 * Added new team flag B_TEAM_DEBUG_PREVENT_EXIT that prevents teams from exiting
via exit() (the calling thread will drop into the debugger instead).
* The DebugServer now uses this flag by default.
* Added TODO comment: the default debugger should already be able to set a flag
  like this in order to close a race condition between dropping a thread into
  the debugger and setting the flag.
* Cleaned up the debug_server sources a bit.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36265 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-14 18:03:48 +00:00
Axel Dörfler 897ca37d52 * Introduced a new debugger access to the keyboard drivers, and implemented that
in the PS/2 driver for now. The basic idea is to allow everyone to open the
  device, but only allow one key reader (as usual). However, once someone
  registers itself as a debugger, the original reader is blocked, and the
  debugger can read the key presses instead.
* Renamed ps2_keyboard.c to .cpp.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36256 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-14 12:30:23 +00:00
Clemens Zeidler a90ebd77ee Work in progress of a Radeon HD 3200 driver to change the display mode (status when I leave the coding spring). At least it shows a picture but with a wrong scaling.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36243 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-13 22:35:53 +00:00
Michael Lotz ee6e756ef1 Add license headers as pointed out by Jérôme.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36240 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-13 21:55:52 +00:00
Ingo Weinhold c3676b54bf * Added vm_debug_copy_page_memory() which copies memory from a potentially not
mapped page.
* debug_{mem,strl}cpy():
  - Added "team" parameter for specifying the address space the address are
    to be interpreted in.
  - When the standard memcpy() (with fault handler) fails, fall back to
    vm_debug_copy_page_memory().
* Added debug_is_debugged_team(): Predicate returning true, if the supplied
  team_id refers to the same team debug_get_debugged_thread() belongs to.
* Added DebuggedThreadSetter class for scope-based debug_set_debugged_thread().
  Made use of it in several debugger functions.
* print_demangled_call() (x86): Fixed unsafe memory access.

Allows KDL stack traces to work correctly again, even if the page daemon has
already unmapped the concerned pages.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36230 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-13 17:40:15 +00:00
Ingo Weinhold 86875ad9d1 Added VMCache::DebugHasPage() and DebugLookupPage() for use in the kernel
debugger.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36228 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-13 17:18:57 +00:00
Ingo Weinhold 09418c869b Added DebugGet() method for use in the kernel debugger.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36227 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-13 17:16:42 +00:00
Michael Lotz 2548ea219a * Add the framework for adding an arch specific module to the PCI bus_manager.
* Implement such a module for x86 which currently exports only an MSI API.
* Implement the PCI part for configuring and enabling MSIs.
* Some automatic whitespace cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36223 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-13 15:18:46 +00:00
Michael Lotz 33fbe25496 * Add code to allocate and free interrupt vectors for message signaled
interrupts (MSI).
* Add the remaining IDT entries and redirection functions in the interrupt code.
* Make the PIC end_of_interrupt() return a result to indicate whether the vector
  was handled by this PIC. If it isn't we now issue a apic_end_of_interrupt()
  in the assumption of apic local interrupt, MSI or IPI. This also removes
  the need for the gUsingIOAPIC global and doing manual apic_end_of_interrupt()
  calls in the SMP and timer code.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36221 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-13 14:46:09 +00:00
Axel Dörfler ef9dbf80c1 * Cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36218 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-13 13:36:53 +00:00
Axel Dörfler 15c81466c4 * Reverted part of r34474 that broke binary compatibility.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36212 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-13 13:01:56 +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
Oliver Tappe ab1a4bef4f cleaning up after myself 4 years later:
* remove matches_broadcast_address slot in address module, as it
  doesn't exist anywhere
* automatic whitespace cleanup



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36193 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-12 19:06:46 +00:00
Oliver Tappe 56f097ebd9 Applying patch by Atis Elsts:
* fix connecting to INADDR_ANY work for tcp (effectively will
  connect to INADDR_LOOPBACK)
* add same behaviour to udp
* move some ipv4-specific code out of tcp into ipv4 address module
* bind() and connect() now reject addresses from non-matching 
  families
* myself: minor cleanup in udp.cpp with respect to 80 chars limit
Closes #5716 - many thanks!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36192 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-12 18:39:34 +00:00
Adrien Destugues 4343960f55 olta+pulkomandy:
* Introduce an add-on system to allow libbe to call things living inside liblocale (as liblocale depends on libbe, it can't be linked the usual way)
 * This allows localizing the BColorControl class that had some text inside it.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36190 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-12 18:07:09 +00:00
Michael Lotz 3d310bd5f4 * Fix build, the APIC definitions are used in the bootloader too.
* Automatic whitespace cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36189 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-04-12 15:59:40 +00:00