Commit Graph

5909 Commits

Author SHA1 Message Date
Adrien Destugues 51145d87bd Support for setting 12/24Hr mode in locale preflet.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37427 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-08 09:14:09 +00:00
Axel Dörfler 816d81b51b * Minor cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37424 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-08 06:52:16 +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 7b2003907a * Replace remaining BeOS int types.
* Removed inclusion of <SupportDefs.h>, respectively replaced it with
  <stdint.h>.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37404 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-05 16:11:43 +00:00
Jérôme Duval bafdc02b99 forgot an uint16 type for x86_64
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37389 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-04 12:38:45 +00:00
Jérôme Duval 5efd950f28 * followed Ingo's suggestion and used uint*_t types instead of public Haiku types.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37388 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-04 12:36:38 +00:00
Jérôme Duval 8386c959c4 Fixes uses of __uint16_t and __uint32_t which we don't define, also fixes the ppc buildtools build.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37387 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-04 11:10:28 +00:00
Jérôme Duval 818786a83a Define ssize_t in Haiku headers when building with GCC4 (see also #5719). This could imply a conflict with old gcc4 Haiku builds.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37380 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-03 16:39:29 +00:00
François Revol c31429c581 include sys/cdefs.h to hopefully fix building the cross tools for arm & ppc.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37377 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-03 13:45:15 +00:00
Stefano Ceccherini 4225e5b785 Use the Bfont object to discriminate between fonts (as in Dano)
and not just size and code. Style cleanups.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37369 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-03 09:34:59 +00:00
Adrien Destugues 2f0eb7b11e * Introduce a new method in BCountry to get the first day of week (monday or sunday)
* Localize date in deskbar properly, and use the new API to show the calendar. The "show european date" checkbox is now gone.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37344 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-02 17:15:55 +00:00
Adrien Destugues be8fa2fb30 * Update all applications in tree to use the new localizing system
* Remove the old one from the locale librairy, with some cleanup
Known regressions :
 * readonlybootprompt will no longer update the locale settings : the 
method used messed with internal undocumented things
 * external localized apps (webpositive for example) will not run 
anymore.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37336 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-02 11:36:13 +00:00
Wim van der Meer 15676f3a87 Code style cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37331 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-02 03:07:18 +00:00
Adrien Destugues 76a4353b79 Add a new way of using the locale kit with static accessors instead of global variables. This has the following consequences :
* Applications don't have to declare BCatalog fCatalog themselves, it's now done automatically
 * Libs and add-ons can be localized just the same way (except static libraries)
For now this new system is yet disabled as I'm looking for some peer review before going on. To enable it you have to define B_TRANSLATE_USE_NEW_MACROS in each file doing catalog access. This will not stay, I'll update the 
other apps to use it.
The linking in jamfiles must be not only with liblocale.so, but also liblocalestub.a. Not sure how to handle this for user-side applications. Libraries are also required to provide a MIME signature to use any catalog.
The locale preflet is updated to the new system (as a test). Othe rapps will follow if everyone is ok with this approach.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37323 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-01 11:54:09 +00:00
François Revol dae84707ac Patch by "notzed" (Ticket #5380): Add support for setting video mode for OMAP3.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37321 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-30 17:39:36 +00:00
François Revol 6c6d79f7fa Add some defines for memory ranges. Missed in r37319.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37320 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-30 17:25:08 +00:00
François Revol 9020ce87e6 Patch by "notzed" (ticket #5368) (modified): Add bootloader support for BeagleBoard.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37319 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-30 17:24:11 +00:00
Stefano Ceccherini 8460e00cc0 _AddDynamicItems didn't pass the keyDown parameter to _OkToProceed (noticed
by Ziusudra).
Also removed leftover fDynamicItemsAdded.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37314 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-30 14:49:42 +00:00
François Revol 2e749db8bf Debug console on FreeRunner is on UART3, though you need a debug board.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37306 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-30 00:05:30 +00:00
Wim van der Meer b3df2c9a87 Fixing BeOS binary compatibility.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37296 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-28 22:16:07 +00:00
Philippe Houdoin 307ff45454 Promoted newest 3dfx video driver by Gerald Zajac in place of the outdated tdfx driver.
Added to Haiku image.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37294 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-28 20:43:37 +00:00
Wim van der Meer e4eb2e7e45 Reverting r37289 because it breaks the build.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37293 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-28 11:45:04 +00:00
Wim van der Meer 2ec871140d Change the tempnam() prototype in stdio.h to match its implementation.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37292 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-28 11:11:25 +00:00
Wim van der Meer 31f2baa4fd Changeset r37275 makes the name parameter in the BGLView class constructor a const char*, which breaks binary compatibility with R5.
This change uses _BEOS_R5_COMPATIBLE_ to determine which function prototype to use.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37289 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-28 09:03:55 +00:00
Andreas Färber d46ce4d62a kernel_ppc: Save caller's stack pointer in arch_debug_save_registers
Suggested by Ingo in ticket #6139. Code is adapted from x86.
Note that on ppc64 GPR1 needs to be 64-bit, thus the choice of addr_t.

Resolves part of ticket #6160.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37281 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-27 20:16:59 +00:00
Wim van der Meer 329e7bd264 Compiler warning fix.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37275 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-27 09:11:17 +00:00
Rene Gollent 8154643efe Updated AI_* flags to match up with our implementation. Should fix #3945.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37266 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-26 17:50:14 +00:00
Andreas Färber 04ec719a70 Convert line endings to LF
In r33670 the svn:eol-style property was dropped, which took care of
locally converting the line endings to the user's native style.
While most files use Unix-style LF line endings, some files have
Windows-style CR LF line endings.

Assure that the following r37262 directories use Unix-style line endings:

src/system/boot/
src/system/boot/arch/
src/system/boot/arch/ppc/
src/system/boot/loader/
src/system/boot/loader/net/
src/system/boot/platform/
src/system/boot/platform/openfirmware/
src/system/boot/platform/openfirmware/arch/
src/system/boot/platform/openfirmware/arch/ppc/
src/system/kernel/
src/system/kernel/arch/
src/system/kernel/arch/ppc/
src/system/kernel/platform/
src/system/kernel/platform/openfirmware/
headers/private/kernel/
headers/private/kernel/arch/
headers/private/kernel/arch/ppc/
headers/private/kernel/platform/
headers/private/kernel/platform/openfirmware/
headers/private/kernel/boot/
headers/private/kernel/boot/net/
headers/private/kernel/boot/platform/
headers/private/kernel/boot/platform/openfirmware/

This avoids patches containing irrelevant lines unintentionally converted.

No functional changes.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37265 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-26 17:38:03 +00:00
Fredrik Holmqvist e5dca54f1a r37259 fails to compile on one of my systems without this header. Checking out fresh tree and reconfiguring didn't work so don't really know why.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37263 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-26 17:24:11 +00:00
Stefano Ceccherini 780b76dcf9 Applied patch by Ziusudra in ticket #4930 to avoid a deadlock when
navigating the menus via keyboard.
I also factored some code into functions, in particular the code to
add the dynamic items. Also keep track if the dynamic items have been added
or not (using a new boolean class member).
I tested for regressions but couldn't find any.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37261 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-26 12:29:17 +00:00
Ingo Weinhold 45bd7bb3db Removed unnecessary inclusions of <boot/kernel_args.h> in private kernel
headers and respectively added includes in source files.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37259 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-25 22:16:10 +00:00
Philippe Houdoin a56bc48835 ImÃport new 3dfx graphics driver from Gerald Zajac (see #6215.
Supports Banshee, Voodoo3 and Voodoo5 chips.
It will be promoted as older tdfx replacement soon, but not until 
my small changes around phys_addr_t are validated.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37241 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-24 03:47:49 +00:00
Ingo Weinhold 7a0dca5c54 Moved SHA256 code to libshared.a.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37235 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-23 17:47:07 +00:00
Ingo Weinhold f3eead13e4 Changed to 64 bit physical addresses for x86. This enabled PAE support.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37233 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-23 16:10:08 +00:00
Ingo Weinhold 2a25d16d33 * 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
2010-06-23 16:09:26 +00:00
Ingo Weinhold b46540452a Added vm_page_max_address() which returns the greatest address of accessible
physical memory.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37230 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-23 13:52:32 +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 ff9151d11f Added ignore_physical_memory_ranges_beyond_4gb() which removes the memory
beyond 4 GB from the physical memory ranges.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37224 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-23 11:10:01 +00:00
Ingo Weinhold be87d0a03e * Added area creation "lock" constant B_32_BIT_MEMORY for physically
contiguous memory < 4 GB.
* vm_create_anonymous_area(): Implemented support for B_LOMEM and
  B_32_BIT_MEMORY.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37200 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-21 16:46:19 +00:00
Ingo Weinhold e7a5527b53 Some enum definitions were also defining variables.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37197 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-21 16:13:47 +00:00
Ingo Weinhold 13638944db Removed never read VMCache::scan_skip.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37195 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-21 15:10:37 +00:00
Ingo Weinhold 0d5ab7a14d Moved duplicate code from the VMTranslationMap subclasses' UnmapPage() and
ClearAccessedAndModified() implementations into helper methods PageUnmapped()
and UnaccessedPageUnmapped() in the base class.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37187 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-21 13:32:33 +00:00
Wim van der Meer 2a2b528e73 Report ignored memory pages seperately, thanks to bonefish for the patch review. Closes ticket #6178
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37175 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-19 14:07:26 +00:00
Ingo Weinhold c955359cb6 Added vm_available_not_needed_memory_debug(), a
vm_available_not_needed_memory() version that can be called from within the
kernel debugger.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37167 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-18 20:57:05 +00:00
Ingo Weinhold f8e263c184 Slipped by in r37138: Added VMCache::Dump() and removed GetLock().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37141 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-15 00:07:18 +00:00
Ingo Weinhold 377ecfe797 * Renamed cache_type_to_string() to vm_cache_type_to_string() and made in
kernel private.
* Moved dumping code from dump_cache() to new VMCache::Dump().
* Override VMCache::Dump() in VMVnodeCache to also print the vnode.
* Removed no longer needed VMCache::GetLock().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37138 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-14 23:57:00 +00:00
Ingo Weinhold 0f48aa877a The ConstIterator only needs a const tree.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37137 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-14 23:51:54 +00:00
Oliver Ruiz Dorantes a5bf12376d *Incorrect endianess handling from bdaddr at parsing from string.
*Remove bluetooth_util deprecated header
*Issue conn_req for socket connect() call



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37132 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-14 20:04:10 +00:00
Ingo Weinhold a8ad734f1c * 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
2010-06-14 16:25:14 +00:00
Ingo Weinhold 84e9db7fb7 x86 mmu_init(): Sum up the physical memory we ignore for whatever reason --
stored in kernel_args::ignored_physical_memory.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37116 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-12 15:57:21 +00:00
Travis Geiselbrecht 9623c48284 SMP: remove the tracking of apic id -> cpu id. Don't pass between bootloader and kernel.
Kernel doesn't use it, and it could be regenerated in the kernel if it did need it.

This also unlocks the apic range the bios can use. Previously the apic ids would have
to fit within 0..MAX_CPUS or it'd reject the cpu. Some boxes (mine in particular)
seem to sparsely populate the apic id so that the range is pretty large.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37108 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-12 01:01:54 +00:00
Ingo Weinhold d382fc3a8e Added commented line to enable PAE.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37101 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-11 16:26:11 +00:00
Ingo Weinhold f498c07968 Added STATIC_ASSERT() macro (from <Debug.h>, which cannot be included in the
kernel).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37087 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-10 17:31:57 +00:00
Ingo Weinhold 1d26c7248f vm_page_allocate_page_run(): Added parameter "limit", specifying the upper
physical address limit for the page run to allocate.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37086 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-10 17:30:49 +00:00
Ingo Weinhold 9e101ddfcc Definition for CR4 PAE bit.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37073 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-09 21:21:48 +00:00
Ingo Weinhold 641b3c82df Renamed allocate_early_physical_page() to vm_allocate_early_physical_page()
and made it public.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37072 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-09 21:21:18 +00:00
Ingo Weinhold 2ea7b17cf3 * vm_allocate_early(): Replace "bool blockAlign" parameter by a more flexible
"addr_t aligmnent".
* X86PagingMethod32Bit::PhysicalPageSlotPool::InitInitial(),
  generic_vm_physical_page_mapper_init(): Use vm_allocate_early()'s alignment
  feature instead of aligning by hand.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37070 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-09 11:15:43 +00:00
Stephan Aßmus d698997098 Fixed misspelled header, closes ticket #6147.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37065 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-08 21:07:38 +00:00
Ingo Weinhold 5aa0503c7c * Removed i386_translation_map_get_pgdir() and adjusted the one place where it
was used.
* Renamed X86VMTranslationMap to X86VMTranslationMap32Bit and pulled the paging
  method agnostic part into new base class X86VMTranslationMap.
* Moved X86PagingStructures into its own header/source pair.
* Moved pgdir_virt from X86PagingStructures to X86PagingStructures32Bit where
  it is actually used.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37055 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-08 00:20:34 +00:00
Axel Dörfler cdfd124b11 * Now phys_addr_t should be used where needed.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37028 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-06 09:39:38 +00:00
Axel Dörfler d48edac1a6 * Should fix #6132, PropertyInfo.h was not self contained.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37027 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-06 09:37:46 +00:00
Ingo Weinhold 1ba89e67ed Removed no-op VMTranslationMap::InitPostSem() and
VMAddressSpace::InitPostSem().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37025 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-05 22:20:34 +00:00
Ingo Weinhold c3e021e862 x86:
* Renamed i386_context_switch() to x86_context_switch().
* x86_context_switch() no longer sets the page directory.
  arch_thread_context_switch() does that explicitly, now. This allows to solve
  the TODO by reordering releasing the previous paging structures reference and
  setting the new page directory.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37024 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-05 22:09:24 +00:00
Ingo Weinhold fabdf00e6a Renamed i386_swap_pgdir() to x86_swap_pgdir.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37023 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-05 21:53:32 +00:00
Ingo Weinhold 8421714089 x86:
* Renamed vm_translation_map_arch_info to X86PagingStructures, and all
  members and local variables of that type accordingly.
* arch_thread_context_switch(): Added TODO: The still active paging structures
  can indeed be deleted before we stop using them.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37022 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-05 21:51:05 +00:00
Ingo Weinhold 78dde7abd7 Consequently use uint32 for the physical page directory address.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37011 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-04 22:23:22 +00:00
Ingo Weinhold 8c9b84a588 Replaced the swap_addr_t and SWAP_SLOT_NONE in RadixBitmap.{h,cpp} by
radix_slot_t and RADIX_SLOT_NONE.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36998 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-02 20:42:53 +00:00
Ingo Weinhold 435c43f591 * Introduced type generic_io_vec, which is similar to iovec, but uses types
that are wide enough for both virtual and physical addresses.
* DMABuffer, IORequest, IOScheduler,... and code using them: Use
  generic_io_vec and generic_{addr,size}_t where necessary.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36997 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-02 18:42:20 +00:00
Ingo Weinhold 4a57f84396 Introduced types [__haiku_]generic_{addr,size}_t which are wide enough for
virtual and physical addresses.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36996 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-02 18:22:38 +00:00
Axel Dörfler 455b379c27 * Added a read_write() function to the scsi_periph module.
* Internally, moved the contents of periph_io() into a static read_write()
  function, and use it from the new periph_read_write() as well.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36988 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-01 13:37:55 +00:00
Axel Dörfler 598a6d8517 * UTF8CountChars() was not 64-bit safe (and that in a hard to detect way).
* Automatic white space cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36968 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-05-28 18:37:36 +00:00
Axel Dörfler 9a063f059c * Fixed the AGP interface to correctly use phys_addr_t where needed.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36962 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-05-28 09:19:11 +00:00
Ingo Weinhold 64d79eff72 * 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
2010-05-27 22:07:27 +00:00
Stephan Aßmus 908967a199 Improved the BNotification API after suggestions from Karsten, thanks! Using
cosnt BString& instead of const char* could potentially save copying the string,
although in most use cases, it will probably ammount to the same thing. It may
provide more flexibility later on, like for example when BString knows its
encoding or something similar. Removed superfluous second version of
AddOnClickRef().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36958 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-05-27 21:13:11 +00:00
Stephan Aßmus f33637d9a8 * Improved BNotification API.
- No more manual memory management.
   - Make it clear who keeps or releases ownership of arguments passed.
   - Copy icon, arguments and entry_refs.
   - Do not expose implementation details (What do the BLists contain?!).
   - BRoster takes const BNotification& and bigtime_t timeout.

 * BRoster::Notify():
   - Proper error handling.
   - Fixed documentation.

 * Adjusted notify:
   - Renamed fOk to fHasGoodArguments.
   - The "const char*" members were really "char*" members (self-managed).
   - free() is NULL-safe.
   - fRefs contains BEntries, so passing void* to delete does no good.
   - Adjustments to the changed API.
   - Coding style fixes.

 * notification_server:
   - Adjustment to the new type for timeout.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36952 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-05-27 17:50:12 +00:00
Ingo Weinhold e5846dfa61 Added shared sort_[physical_]address_ranges() to avoid code duplication. Also
fixes the m68k build.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36951 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-05-27 17:08:47 +00:00
Axel Dörfler 0cf9610449 * Fixed incorrect spacing and blank lines.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36950 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-05-27 15:53:35 +00:00
Stephan Aßmus de9dcd41f8 Patch by plfiorini: Integration of InfoPopper as a system service. See ticket
#1245. There are some TODOs outlined in the ticket, but they will be much
easier to review as individual patches against trunk, versus as a new version
of the huge patch.

I've messed a lot with src/servers/notification/NotificationsView.cpp in order
to resolve a crash I was getting when testing this thing (rewrote line
wrapping). I've also replaced the icons with the one that zuMi did long ago.

Thanks, plfiorini, for working on this code as much as you did!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36949 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-05-27 14:48:27 +00:00
Ingo Weinhold d73ddac5bf * Introduced phys_addr_range type, an equivalent to addr_range for physical
address ranges, and a set of support functions working with it.
* Changed the type of the kernel_args physical address range arrays to
  phys_addr_range and adjusted the code working with those.
* Removed a bunch of duplicated address range code in the PPC's mmu.cpp.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36947 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-05-27 11:50:40 +00:00
Ingo Weinhold 147133b76c * First run through the kernel's private parts to use phys_{addr,size}_t
where appropriate.
* Typedef'ed page_num_t to phys_addr_t and used it in more places in
  vm_page.{h,cpp}.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36937 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-05-25 21:34:08 +00:00
Ingo Weinhold ea021b94d8 * Moved phys_addr_t definition to SupportDefs.h.
* Added phys_size_t.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36934 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-05-25 11:18:38 +00:00
Ingo Weinhold a9139aa356 * FS shell: Use 64 bit [s]size_t on 64 bit platforms.
* SupportDefs.h (build platform): Define [s]size_t printf() macros correctly
  on 64 bit hosts.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36929 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-05-24 21:44:16 +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 d34daac82a * config/{HaikuConfig.h,types.h}:
- Added macro __HAIKU_ARCH_BITS specifying the architecture bitness (32/64)
    (might be more convenient to use than __HAIKU_ARCH_{32,64}_BIT).
  - Added macros __HAIKU_ARCH_PHYSICAL_BITS, __HAIKU_ARCH_PHYSICAL_{32,64}_BIT,
    and the types __haiku_phys_[s]addr_t. The intention is to use separate
    macros and types for virtual and physical addresses, since for some
    architectures (e.g. x86 with PAE) those actually differ.
* sys/types.h, BeBuild.h, SupportDefs.h:
  - Added types phys_[s]addr_t and respective printf() format macros.
  - Added public macros B_HAIKU_BITS, B_HAIKU_PHYSICAL_BITS,
    B_HAIKU_PHYSICAL_{32,64}_BIT.

Might break the build under older Haiku installations. Will test next.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36926 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-05-24 19:55:38 +00:00
Stephan Aßmus e4200ae30c Part of patch by kaliber: Fixed OpenHashElementArray<Element>::Add(
const Element &newElement), element is a pointer. See ticket #5892 (found
by compiling Haiku with clang).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36909 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-05-23 12:41:15 +00:00
Fredrik Holmqvist ffb873afec Merge acpi from acpica vendor branch 20100428:
* AcpiSetGpeType no longer exists, replaced with AcpiSetGpe. Since acpi changed gpe handling embedded controller might need improvements.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36867 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-05-19 21:33:02 +00:00
Ingo Weinhold f51bcfb25b Added a heap_init_post_area() which is called right after areas can be
created, and moved the heap's grow and VIP heap initialization to it. Should
fix #5956.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36855 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-05-18 15:51:27 +00:00
Stephan Aßmus a2b1193e13 Fixed spelling, thanks Adrien!
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36851 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-05-17 20:24:29 +00:00
Stephan Aßmus 0a93eaefb8 Patch by Jorma Karvonen: Add LocaleKit.h header and also add it to Be.h. Thanks!
Closes ticket #6004.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36831 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-05-16 16:07:55 +00:00
Stephan Aßmus 33394b856d Patch by Wim van der Meer: Added get_mouse_bitmap() global method to
InterfaceDefs.h and corresponding implementation in the app_server. Thanks a
bunch! Closes ticket #5978.

A note to those using "update-all" with hybrid builds - the alternative GCC
system libs will not be updated this way, and this and Wim's last patch
change the libbe <-> app_server interface. You need to manually update the
respective libbe.so, or do a clean build, otherwise apps for the other GCC will
not start anymore.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36830 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-05-16 15:51:54 +00:00
Stephan Aßmus 1c73ffa102 Patch by Wim van der Meer: Implemented global Interface Kit function to retrieve
the current mouse position and pressed buttons. I've changed the return code
to status_t and added anal error checking, most of the rest of the file is not
doing it, though... :-) Thanks, Wim!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36811 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-05-14 15:53:09 +00:00
Ingo Weinhold 97901ec593 Patch by Nathan Mentley:
* Added a few header files in headers/posix/arch that'll allow for an x86_64
  haiku target to be compiled. fenv.h is src/lib/msun/amd64/fenv.h from
  freebsd.
* configure: Added support for x86_64 arch when running
  build_cross_tools_gcc4.
* config[_build]/HaikuConfig.h, BuildSetup: Added x86_64 recognition.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36794 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-05-11 19:40:06 +00:00
Matt Madia e1361e2e66 Additional TR*-->B_TRANSLATE* cleanup
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36784 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-05-10 14:44:54 +00:00
Jérôme Duval 6f1452f92f merge zlib 1.2.5 into trunk
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36780 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-05-09 15:28:00 +00:00
François Revol 28e9f6c22a Patch by mmadia: Fix locale macros. Fixes the build.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36735 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-05-07 22:59:42 +00:00
Oliver Ruiz Dorantes 125183f9e5 - Add possibility yo set a custom friendly name to our device. Which will be seen by remotes devices at discovery
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36729 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-05-07 18:25:09 +00:00
Axel Dörfler 96eaa02e8f * Changed BLocaleRoster::GetLanguage() to a signature that makes more sense,
and looks more like the rest of the API.
* Also, it will now return an appropriate error code if the language couldn't
  be allocated (anything else than B_OK is an improvement :-)).
* Several changes in BLanguage:
  - GetName() now gets a BString reference, also
  - it now returns the name in its own language, ie. for German this would
    always be "deutsch", no matter the current language settings, and finally,
  - it now empties the string it gets before adding the name.
  - added GetTranslatedName() that behaves like the previous version.
  - added const where it made sense (ie. almost everywhere).
  - Code() now returns the code of the language only.
  - ID() now returns the full ID of this language, ie. including country,
    variant, and keywords if any.
  - added Country(), and Variant().
  - renamed IsCountry() to IsCountrySpecific().
  - added IsVariant().
* Cleaned up Language.h, minor cleanup in LocaleRoster.cpp.
* Removed the whole move item logic from LanguageListView; while this was not
  only spaghetti code, it doesn't make much sense in the first place.
* Instead of removing stuff from the left, and even worse, moving all countries
  for a language even if only one had been dragged, we now only mark the items
  that are already in the preferred list, and only those.
* Fixed various mixups of FullList*() vs. *() methods that could lead to things
  like bug #5896.
* Pressing the delete key in the preferred list view will now remove the
  language.
* Moved LocaleWindow specific message constants to LocaleWindow.cpp; Locale.h
  is supposed to contain application wide constants.
* The drop logic is now in LocaleWindow.
* We now make sure that each base language can only be in the list once.
* Lots of cleanup, even though I mostly replaced spaghettie code with different
  looking spaghettie code - still, I think things have slightly improved.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36727 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-05-07 17:38:40 +00:00
Axel Dörfler 542aff1be0 * Added constructor that takes a name for the view.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36725 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-05-07 17:24:22 +00:00
Axel Dörfler a77ec88a9d * Fixed Group(BWindow*, ...) and Grid(BWindow*, ...) constructors to no longer
leak a view.
* Also set the view's background color to B_PANEL_BACKGROUND_COLOR to make this
  better usable in applications.
* Removed the admittedly useless Group(BView*, ...) constructor I introduced
  earlier.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36723 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-05-07 15:08:27 +00:00