Commit Graph

4559 Commits

Author SHA1 Message Date
Alex Smith 5f6b522746 Merge branch 'master' into x86_64 2012-07-21 14:17:22 +01:00
Alex Smith 6497f6b1ec Moved the exception handling functions to arch_int.cpp, shared between x86 and x86_64. 2012-07-21 09:11:09 +01:00
Rene Gollent 902a98ad83 Fix #8753.
- Store whether or not the use of the horizontal scrollbar is desired
  on the class itself. If the CLV was set to use the horizontal scrollbar,
  and then asked to lay itself out while hidden, it would incorrectly assume
  the horizontal scrollbar wasn't in use, and consequently repositioned its
  views such that the horizontal scrollbar and outline view overlapped.
2012-07-20 19:35:21 -04:00
Ingo Weinhold af350aa218 Add private shared class ArgumentVector
The parser is based on the FS shell's ArgVector.
2012-07-20 23:32:58 +02:00
Alex Smith 82694bd124 Merge branch 'master' into x86_64
Conflicts:
	headers/posix/arch/x86_64/arch_setjmp.h
	src/system/kernel/cache/block_cache.cpp
2012-07-20 18:33:46 +01:00
Alex Smith 1b41387b5f Added missing packed attributes on disk_identifier. 2012-07-20 17:14:17 +01:00
John Scipione 4bb5af765f Add control mark color setting. #8054
An enhancement adding a setting to Colors under Appearance to
set the mark color of radio button and check box controls.
2012-07-15 15:09:04 -04:00
Alex Smith bcb07a319b Implemented the rest of the kernel debugger functions for x86_64.
Merged with the x86 implementations, mostly the same except for a
few differences. GDB stub is currently broken, will investigate
later.
2012-07-13 14:09:09 +01:00
Alex Smith 4ebc6dfa68 Moved some 32-bit specific stuff to the 32 subdirectory. 2012-07-12 14:23:55 +01:00
Alex Smith d38f1301d1 Cleaned up 32-bit descriptors.h. 2012-07-12 13:55:03 +01:00
Alex Smith 76a1175dbe Support for SMP on x86_64.
No major changes to the kernel: just compiled in arch_smp.cpp and fixed the
IDT load in arch_cpu_init_percpu to use the correct limit for x86_64 (uses
sizeof(interrupt_descriptor)). In the boot loader, changed smp_boot_other_cpus
to construct a temporary GDT and get the page directory address from CR3, as
what's in kernel_args will be 64-bit stuff and will not work to switch the
CPUs into 32-bit mode in the trampoline code. Refactored 64-bit kernel entry
code to not use the stack after disabling paging, as the secondary CPUs are
given a 32-bit virtual stack address by the SMP trampoline code which will
no longer work.
2012-07-11 18:29:15 +01:00
Alex Smith 659bacac26 Compile arch_real_time_clock.cpp and arch_system_info.cpp for x86_64. 2012-07-11 14:43:44 +01:00
Alex Smith 5670b0a8e4 Moved the 32-bit page fault handler to arch_int.cpp, use it for x86_64.
A proper page fault handler was required for areas that were not locked
into the kernel address space. This enables the boot process to get
up to the point of trying to find the boot volume.
2012-07-09 19:18:09 +01:00
Alex Smith b5c9d24abc Implemented threading for x86_64.
* Thread creation and switching is working fine, however threads do not yet
  get interrupted because I've not implemented hardware interrupt handling
  yet (I'll do that next).
* I've made some changes to struct iframe: I've removed the e/r prefixes
  from the member names for both 32/64, so now they're just named ip, ax,
  bp, etc. This makes it easier to write code that works with both 32/64
  without having to deal with different iframe member names.
2012-07-09 16:43:01 +01:00
Alex Smith 85d4a8bc4e Fixed compilation of C code using ELF headers. 2012-07-09 14:35:01 +01:00
Alex Smith 5e9bb17da7 Renamed remaining i386_* functions to x86_* for consistency. 2012-07-09 12:14:18 +01:00
Alex Smith 3b802628b8 Support ELF64 in the kernel.
This has been done by adding typedefs in elf_common.h to the correct ELF
structures for the architecture, and changing all Elf32_* uses to those
types. I don't know whether image loading works as I cannot test it yet,
there may be some 64-bit safety issues around. However, symbol lookup for
the kernel is working correctly.
2012-07-09 11:11:38 +01:00
Alex Smith 5c7d52183c Implemented system_time() for x86_64.
* Uses 64-bit multiplication, special handling for CPUs clocked < 1 GHz
  in system_time_nsecs() not required like on x86.
* Tested against a straight conversion of the x86 version, noticably
  faster with a large number of system_time() calls.
2012-07-08 10:16:44 +01:00
Alex Smith 15feb60325 A few improvements suggested by Ingo. 2012-07-06 14:34:50 +01:00
Alex Smith 84bf29f97b Compile in arch_platform.cpp for x86_64. The apm_init call is disabled for x86_64, APM is 32-bit only. 2012-07-06 14:17:48 +01:00
Pawel Dziepak 9054c96c17 Move parsing getattrinfo() result out of dns_resolver module 2012-07-05 01:25:17 +02:00
Alex Smith 950b24e32d Begun work on VMTranslationMap implementation for x86_64.
* Added empty source files for all the 64-bit paging method code, and a
  stub implementation of X86PagingMethod64Bit.
* arch_vm_translation_map.cpp has been modified to use X86PagingMethod64Bit
  on x86_64.
2012-07-04 17:08:44 +01:00
Alex Smith 4304bb9894 Added arch_cpu.cpp to the x86_64 build.
* Some things are currently ifndef'd out completely for x86_64 because
  they aren't implemented, there's a few other ifdef's to handle x86_64
  differences but most of the code works unchanged.
* Renamed some i386_* functions to x86_*.
* Added a temporary method for setting the current thread on x86_64
  (a global variable, not SMP safe). This will be changed to be done
  via the GS segment but I've not implemented that yet.
2012-07-04 14:06:46 +01:00
Alex Smith 4e8fbfb2d1 x86_{read,write}_cr{0,4} can just be implemented as macros, put an x86_ prefix on the other read/write macros for consistency. 2012-07-03 20:55:36 +01:00
Alex Smith cbfe5fcd17 Removed redundant x86 sources/headers. 2012-07-03 17:38:18 +01:00
Alex Smith c005e747ef Removed the x86_64 headers/source directories, now all merged with x86. 2012-07-03 11:17:56 +01:00
Alex Smith 020a25ce46 Fixed x86_64 kernel compilation.
For now I've just put all the stub functions that are needed to link the
kernel into a file called stubs.cpp. I've not yet moved across the interrupt
handling code or the ELF64 relocation code to the x86 directory. Once those
have been moved I can get rid of the x86_64 headers/source directories.
2012-07-02 20:56:27 +01:00
Alex Smith 0897e314b7 Merged x86_64 headers into x86 headers.
Not many changes seeing as there's not much x86_64 stuff done yet. Small
differences are handled with ifdefs, large differences (descriptors.h,
struct iframe) have separate headers under arch/x86/32 and arch/x86/64.
2012-07-02 18:47:06 +01:00
Alex Smith 120585d549 Merge branch 'master' into x86_64 2012-07-02 09:39:42 +01:00
Michael Lotz fcc4ecb0c7 Add debug_calloc() to the debug_heap. 2012-07-01 06:37:25 +02:00
Pawel Dziepak 21769ef603 Add dns_resolver module
dns_resolver module provides a means for all kernel mode code to resolve
DNS hostnames.
2012-06-29 02:14:54 +02:00
Pawel Dziepak 06e8742063 Fix #8643: AVLTreeMap strategy Auto discards const
Signed-off-by: Ingo Weinhold <ingo_weinhold@gmx.de>
2012-06-29 01:37:33 +02:00
Alex Smith 0705884ac4 Style fixes. 2012-06-27 15:48:39 +01:00
Alex Smith c9f6d2271f x86_64: Implemented exception handling. 2012-06-27 15:18:10 +01:00
Alex Smith 575a67c7a1 Merge branch 'master' into x86_64 2012-06-27 11:28:28 +01:00
Alex Smith 3403f23e81 Moved the common parts of arch_cpu.h between x86 and x86_64 to arch/common_x86/cpu.h. 2012-06-27 11:23:54 +01:00
Alex Smith e5fc2bfcab Implemented long mode setup/switch code, the bootloader can now start the 64-bit kernel!
The setup procedure is fairly simple: create a 64-bit GDT and 64-bit page
tables that include all kernel mappings from the 32-bit address space, but at
the correct 64-bit address, then go through kernel_args and changes all virtual
addresses to 64-bit addresses, and finally switch to long mode and jump to the
kernel.
2012-06-26 11:08:21 +01:00
Alex Smith 5a17b2f1b2 Forgot to change driver_settings_file to use FixedWidthPointer. 2012-06-26 10:54:37 +01:00
Philippe Saint-Pierre 36784bbc2c StringForRate(): adjustments
* Make 1000.0f the default base
* Also use sizeof() in MediaPlayer to get the string size rather than hardcode.

Thanks Marcus
2012-06-25 13:43:53 -04:00
Philippe Saint-Pierre 8d87f2b43a StringForRate()
Introduce a function to generate the string representation of a bitrate
(kbps, mbps, gbps, etc..)

* Factor out the code from MediaPlayer InfoWindow
* Allow different bases (/1000 or /1024)
2012-06-25 13:29:22 -04:00
Alex Smith f69dd487b1 Fixed x86 GCC2 build. 2012-06-25 13:28:28 +01:00
Alex Smith 6f6d78e877 Cleaned up ELF64 address handling.
* platform_allocate_elf_region() is removed, it is implemented in platform-
  independent code now (ELF*Class::AllocateRegion). For ELF64 it is now
  assumed that 64-bit addresses are mapped in the loader's 32-bit address space
  as (address - KERNEL_BASE_64BIT + KERNEL_BASE).
* mapped_delta field from preloaded_*_image removed, now handled compile-time
  using the ELF*Class::Map method.
* Also link the kernel with -z max-page-size=0x1000, removes the need for
  2MB alignment on the data segment (not going to map the kernel with large
  pages for the time being).
2012-06-25 13:00:50 +01:00
Alex Smith 8846189866 Handle 64-bit load addresses for ELF64 images in the bootloader.
The ELF loader now uses a new platform function, platform_allocate_elf_region,
which returns 2 addresses: the real load address and an address where the
region is mapped in the loader's address space. All of the ELF loading code
has been changed to access the load region through the mapped address rather
than the addresses contained in the ELF image. The ELF64 version of
platform_allocate_elf_region on x86 uses the existing MMU code, which maps
everything at 0x80000000, but returns the correct 64-bit address. The long
mode switch code will just set up the 64-bit address space with everything
remapped at the correct address.
2012-06-24 22:57:48 +01:00
Alex Smith f6a3444449 Added x86_64 ELF64 relocation functions for the bootloader. All that's left to do now is handle the 64-bit load address properly. 2012-06-24 19:22:33 +01:00
Ingo Weinhold 69a8b95491 FixedWidthPointer: Fix ==/!= operators, remove OtherType casts
* FixedWidthPointer:
  - operators ==/!=: Change second operand type from void* to const
    Type*. Also add non-const version to resolve ambiguity warning when
    comparing with non-const pointer.
  - Add Pointer() getter.
  - Remove templatized cast operators. They are nice for casting the
    pointer directly to another pointer type, but result in ambiguity.
* Make preloaded_image::debug_string_table non-const. Avoids clashes of
  the const and non-coast FixedWidthPointer comparison operators. A
  cleaner (but more verbose) solution would be to spezialize
  FixedWidthPointer for const types.
2012-06-24 15:26:00 +01:00
Alex Smith ccadfaeeb5 Changed the boot ELF code to use templates and added ELF64 support.
The actual implementation of the ELF loading methods have been put into
an ELFLoader template class that takes a single template parameter, which
is a structure containing all the necessary ELF typedefs. It's a bit
verbose, but I thought it was a neater solution than using a bunch of
standalone functions with a huge number of template parameters. There is
no change to code outside of elf.cpp, the ELF32/ELF64 differences are
handled internally.
2012-06-23 12:05:16 +01:00
Alex Smith 3a2a3367dc Support static_cast on FixedWidthPointer. 2012-06-22 19:55:38 +01:00
Alex Smith f124497815 Added an ELF64 version of preloaded_image.
* There is now 2 structures, preloaded_elf32_image and preloaded_elf64_image,
  which both inherit from preloaded_image.
* For now I've just hardcoded in use of preloaded_elf32_image, but the
  bootloader ELF code will shortly be converted to use templates which use
  the appropriate structure. The kernel will be changed later when I add
  ELF64 support to it.
* All kernel_args data is now compatible between 32-bit and 64-bit kernels.
2012-06-22 19:24:51 +01:00
Alex Smith 62d36f9833 Removed the addr_t conversion operators from FixedWidthPointer which makes comparison against NULL work properly. 2012-06-22 18:22:11 +01:00
Alex Smith 474aa3b76e Added ELF64 headers, common ELF32 and ELF64 definitions moved to elf_common.h. 2012-06-22 12:54:41 +01:00
Alex Smith 6b87898af5 Code style fixes. 2012-06-22 11:56:55 +01:00
Alex Smith 17e407e945 Proper implementation of arch_kernel.h for x86_64. 2012-06-22 10:53:08 +01:00
Alex Smith 17a3389882 Remove phys_addr_range, just use addr_range for both virtual and physical address ranges (as requested by Ingo). 2012-06-21 19:48:03 +01:00
Alex Smith d8efc6caf6 Changes to kernel_args to make it identical for x86 and x86_64.
* Added a FixedWidthPointer template class which uses 64-bit storage to hold
  a pointer. This is used in place of raw pointers in kernel_args.
* Added __attribute__((packed)) to kernel_args and all structures contained
  within it. This is necessary due to different alignment behaviour for
  32-bit and 64-bit compilation with GCC.
* With these changes, kernel_args will now come out the same size for both
  the x86_64 kernel and the loader, excluding the preloaded_image structure
  which has not yet been changed.
* Tested both an x86 GCC2 and GCC4 build, no problems caused by these changes.
2012-06-21 18:02:23 +01:00
Alex Smith 192af9e0af Changed addr_range to use uint64.
I've tested this change on x86, causing no issues. I've checked over the code
for all other platforms and made the necessary changes and to the best of my
knowledge they should also still work, but I haven't actually built and
tested them. Once I've completed the kernel_args changes the other platforms
will need testing.
2012-06-20 14:11:24 +01:00
Alex Smith 93cb9538be Don't store a KMessage in kernel_args for the boot volume, only the buffer address/size.
Pointers in kernel_args are going to be changed to unconditionally use 64-bit
storage (to make kernel_args compatible with both the x86 and x86_64 kernels).
KMessage stores a pointer to its buffer, however since KMessage is used
outside of the boot code it is undesirable to change it to use 64-bit storage
for the pointer as it may add additional overhead on 32-bit builds. Therefore,
only store the buffer address and size and then construct a KMessage from
those in the kernel.
2012-06-20 11:53:47 +01:00
Alex Smith e114f50ddd Fixed bootloader build under x86_64. 2012-06-19 20:38:53 +01:00
Alex Smith 043c61dde5 Added stub versions of everything needed to build the kernel.
The whole kernel now builds and there are no undefined references when
linking, I just need to fix some strange relocation errors I'm getting
(probably a problem with the linker script) and then I'll have a kernel
image.
2012-06-15 22:50:59 +01:00
Alex Smith 11d3892d28 Changed ICI data argument types from uint32 to addr_t.
Since ICI arguments are used to send addresses in some places, uint32 is
not sufficient on x86_64. addr_t still refers to the same type as uint32
(unsigned long) on other platforms, so this change only really affects
x86_64.
2012-06-14 13:06:55 +01:00
Alex Smith f76bc433e1 Added some x86_64 system/kernel headers and kernel Jamfiles.
* Not all of these headers are correct yet, just adding what's necessary
  to get things to compile for the time being.
2012-06-13 17:45:22 +01:00
Alex Smith 2f3e39bebf Fixed copyright date on arch_config.h. 2012-06-11 12:09:36 +01:00
Alex Smith 07b33113a3 Merge branch 'master' into x86_64 2012-06-11 12:01:35 +01:00
Alexander von Gluck IV 372863638f scsi: Add write same SCSI operation
* Will be used for TRIM
2012-06-10 18:47:12 -07:00
Alexander von Gluck IV 548b1a4988 cpuid: Rework AMD CPUID numbers
* If family is 0xF, we grab extended family and model
  like Intel does
* Idenfify AMD cpu's more correctly
2012-06-04 11:01:39 -05:00
François Revol b837149e73 Sam460ex: Add cpu type and model defines to board_config.h
* we need this in arch_cpu.cpp in the bootloader.
2012-06-02 01:25:53 +02:00
Alexander von Gluck IV 0e8316cc90 intel_810: Style cleanup. No functional change
* I think the FunctionNames need to change to function_name
2012-05-30 16:11:09 -05:00
Gerald Zajac e0ee3b7971 driver: New intel 810 video driver
* Introduced by Gerald Zajac in #8615
* Will need reviewed, tested, and some style cleanup
* Not in images until steps above complete
2012-05-30 15:21:18 -05:00
François Revol 9c02217342 PPC: Add PVR identifiers for 440 and 460 cpus
* from QEMU, 440EP is 0x4222.
* from the datasheet, 460EX is 0x1302.
2012-05-29 18:50:32 +02:00
Alex Smith 65ad1ba320 Made it possible to build the bootloader when targetting x86_64.
* x86_64 is using the existing *_ia32 boot platforms.
* Special flags are required when compiling the loader to get GCC to compile
  32-bit code. This adds a new set of rules for compiling boot code rather
  than using the kernel rules, which compile using the necessary flags.
* Some x86_64 private headers have been stubbed by #include'ing the x86
  versions. These will be replaced later.
2012-05-26 21:47:27 +01:00
Alexander von Gluck IV 361ec26f10 rPi MMU: Cleanup, add gPeripheralBase
* gPeripheralBase keeps track of the device
  peripherals before and after mmu_init
* Add ability to disable mmu for troubleshooting
* Remove static FB_BASE, we actually don't know
  where the FB is yet. (depends on firmware used)
2012-05-24 06:39:43 -05:00
Alexander von Gluck IV f0ba7f9400 MMU: Clean up arm L1 MMU types
* Include map for each page table type
* Reduce MMU_TYPE define name length
2012-05-22 08:30:52 -05:00
Alexander von Gluck IV 9c5e60f656 rPi MMU: Fixes to hrev44189
* I had the wrong addresses, 0x20 was the physical
  address not a mapped one.
* Attempt to map uart in mmu post mmu_init.
2012-05-22 08:30:52 -05:00
Alexander von Gluck IV b8733e36c7 rPi MMU: Working towards mapped memory
* BCM2708 defines no longer assume 0x20 address
  We will be throwing away the blob memory mapping
  and using our own.
* Use existing blob mapping to turn GPIO led on pre mmu_init
* Remap MMU hardware addresses from 0x7E. We could map each device,
  however the kernel will throw away the mappings again anyway. For
  now we just map the whole range and use offsets.
* Serial uart no longer works, however at least
  we know why now :). Serial driver now needs to
  use mapped address.
2012-05-18 10:16:30 -05:00
Alexander von Gluck IV 77591e9657 rPi: MMU Work
* Use U-Boot mmu code as base
* This will be factored out someday into common arch mmu
  code when we can read Flattened Device Trees
* Move mmu_init after serial_init.
  Temporary change as we will want serial_init to use
  memory mapped addresses... for debugging.
2012-05-18 06:36:53 -05:00
Alexander von Gluck IV 1f675a7fcb uart: Fix arm kernel build
* Make kernel use mmu_man's new UART code
* Remove no longer used uart.cpp / uart.h
2012-05-17 05:32:29 -05:00
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 eb93f2661d uart: Style Cleanup, no functional change 2012-05-17 03:31:02 -05:00
Alexander von Gluck IV 182643f763 uart: Remove due to mmu's new (better) UART code 2012-05-17 03:15:56 -05:00
François Revol e9ec7a55dd Attempt to factor out serial stuff
* introduce a DebugUART baseclass,
* rework 8250 and PL011 implementations from kallisti5 to inherit DebutUART,
* each arch should override the IO methods to access registers.
* on ARM registers are 32bit-aligned.
* U-Boot still works for the verdex target.
* rPi still compiles, needs testing.
* Still some more consolidation needed to allow runtime choice of the UART type (as read from FDT blobs for ex.).
* serial.cpp should probably mostly be made generic as well.
* didn't touch x86 or ppc yet.
2012-05-17 04:09:05 +02:00
Alexander von Gluck IV 85c4ab42a1 rpi cpu: Add documentation on PDF locations of registers
* Assist future developers with the location of this data
* No functional change
2012-05-15 08:34:27 -05:00
Alexander von Gluck IV 125c31a827 pl011: Make memory reads and writes 32-bits 2012-05-14 20:47:55 -05:00
François Revol 0fa5c3d115 Add board config header for ACube Sam460ex
* the UART is hardcoded for now, ideally it should be set up from the address found in the FDT blob.
2012-05-11 02:31:57 +02:00
Alexander von Gluck IV f78cbe4710 pl011 uart: Work on uart startup code
* Add missing PL011 register locations
* Move startup code to class init and ensure port is
  started up more like Linux PL011 Amba driver.
2012-05-10 12:38:52 -05:00
Alexander von Gluck IV 57a2ea0d54 uart: Replace Init calls with Enable/Disable
* Enable/Disable makes more sense and matches
  platform loader serial functions.
* Rework PL011 code after finding a PDF covering
  the details of it.
* Rename UART global defines in loader to be more
  exact about location
2012-05-09 12:46:35 -05:00
Alexander von Gluck IV 78004f1677 arm uart: Convert new uart code to classes
* This makes things a little more flexible and
  the interface to use the uarts cleaner.
* May want to make a generic Uart wrapper
  class in uart.h / uart.cpp and call drivers
  as needed from there.
2012-05-08 22:17:03 -05:00
Alexander von Gluck IV b74906293b pl011 uart: Add port_init code
* Add code to initilize the uart port
* Fix uart clock
2012-05-06 22:53:56 -05:00
Alexander von Gluck IV c76127fade arm uart: First work towards Amba serial driver
* Move Raspberry Pi board over to Amba driver
* Add initial set of registers and values
* Few small style cleanups
2012-05-06 19:30:43 -05:00
Alexander von Gluck IV aa7d070732 arm uart: Rename getc/putc to getchar/getchar
* Avoid name collisions
* This uart stuff may work better as a class at
  some point, however I didn't want to rock the
  u-boot boat *too* much as I don't have the
  hardware to test.
2012-05-06 17:03:34 -05:00
Alexander von Gluck IV 917e9be1a6 arm uart: Complete redesign of ARM uart code
* Add nested function wrappers to allow usage of other
  uart drivers depending on board. We may want to use this
  on other platforms at some point (haha, maybe)
2012-05-06 17:03:33 -05:00
Alexander von Gluck IV 52119b503d Pi uart: Begin first attempts at UART communication on Pi.
* Make Kernel ARM UART slightly more generic
  through (BOARD_UART_CLOCK) configured per board
* Add initial Raspberry Pi serial code
* Still rough and non-working
2012-05-04 22:00:23 -05: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
John Scipione 7f7f5eac6e Refactor ToolTipManager a bit.
* Change ShowTip() point parameter name to where.
* Add a parameterless ResetWindowFrame() overload that get's the current
  where and calls ResetWindowFrame(BPoint where) which does the actual
  work. FrameResized() calls this parameterless ResetWindowFrame()
  method instead of doing the work in that method. This is functionaly
  the same but allows me to call the parameterless ResetWindowFrame()
  elsewhere.
2012-05-02 23:51:49 -04:00
Alexander von Gluck IV 5426ff9347 system loader: Initial work on new rasberrypi_arm loader
* Used routerboard loader as a base skel
* May just be temporary if u-boot ever gets Raspberry Pi
  support
2012-05-01 16:57:58 -05:00
Axel Dörfler 8e2140fa5e Fixed a large client side memory leak for app_server memory.
* The areas allocated for BBitmaps were never deleted, even though the
  app_server deleted its part when the memory got freed.
* This resulted in a constant memory increase if the application in question
  would operate on many changing large bitmaps, like photos.
* Since the bitmaps are reference counted, we don't actually know when to delete
  the areas, so that the app_server now notifies the client whenever that is
  possible.
* This might fix #6824.
2012-04-29 20:26:14 +02:00
Axel Dörfler 2f2f3fa042 Moved stable tool tip concept into the BToolManager class.
* This removes the fVisibleToolTip member from BView, and fixes bug #5669;
  BToolTipManager::ShowTip() now gets the owner of the tool tip as an extra
  parameter.
* Removed the work-around to hide that bug.
* Improved ToolTipTest application to include more test cases like a view that
  periodically update its tool tip via SetToolTip(const char*), and one that
  sets a new tool tip every second.
* Furthermore, added a test that shows that inner views inherit the tool tip
  of their parents.
* Fixed another bug in BToolTipManager::ShowTip() that would release an
  extra reference to the tool tip currently shown.
2012-04-28 22:14:03 +02:00
Alexander von Gluck IV 2ec676a4e8 rpi: Add missing uart defines
* The uart defines need validated.
* Verified vector base and size defines
2012-04-22 22:17:24 -05:00
Yongcong Du 45cf3294b2 x86: add cpuid feature 6 flags
Signed-off-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
2012-04-22 21:03:57 +02:00
Alexander von Gluck IV 71d4eb5739 kernel: Initial platform memory defines for Raspberry Pi 2012-04-19 18:44:38 -05:00
Alexander von Gluck IV 9e195872df radeon_hd: Begin work on radeon_hd command processor
* First steps at getting card command processor wired
  up to the ring buffers.
* Code doesn't run yet as I have *no* idea what happens
  when these rings are in an invalid state.
2012-04-17 16:10:40 -05:00
Oliver Tappe 546208a539 More catalog-related cleanup.
* rename B_TRANSLATE_CONTEXT to B_TRANSLATION_CONTEXT and
  B_TRANSLATE_WITH_CONTEXT to B_TRANSLATE_CONTEXT, squashing a TODO
* adjust all uses of both macros in Haiku's source tree
* use correct header guard for collecting/Catalog.h

The renamed macros require adjustments to all external applications
using catalogs.
2012-04-16 21:31:22 +02:00
Oliver Tappe 248f2283dd Final part of cleanup in Catalog.h.
* move versions of the B_TRANSLATE_...-macros used during collecting
  of catalog keys to a specific header file, which will only be picked
  up when running collectcatkeys
* fix a couple of build problems during the preprocessing of the libbe-
  sources when extracting catalog keys, all due to private headers not
  being found
* move ZombieReplicantView.h from kits/interface to
  headers/private/interface, as this way it can be picked up when
  building the libbe catalog
2012-04-16 00:04:41 +02:00
Oliver Tappe 541ff51a6e Cleanup BCatalogAddOn.
* rename BCatalogAddOn to BCatalogData, since it doesn't represent an
  add-on, but rather the catalog data provided by an add-on
* move BCatalogData out of Catalog.{h,cpp} into its own header and
  implementation file
* drop BCatalogData::MarkForTranslation() methods, they're not needed
* drop BCatalog::GetNoAutoCollectString() methods, they're not being
  used anywhere
* cleanup the B_TRANSLATE_... macros somewhat
* add versions of the B_TRANSLATE_MARK_... macros that are meant to be
  used in void context (when the string isn't being used by the program,
  just meant to be picked up by collectcatkeys).
* adjust several apps to use B_TRANSLATE_MARK_..._VOID where needed
* adjust users of BCatalogAddOn accordingly
2012-04-16 00:04:41 +02:00
Oliver Tappe 5ac65b7f11 More cleanup in locale kit, this time regarding namespaces.
* it's bad practice to do a 'using <namespace>' in a header, as that
  is very likely to have unintended effects, so drop those from a couple
  of private Locale headers
* adjust files all over the locale kit in order to fix the problems
  (by explicitly importing the required classes in the implementation
  files)
2012-04-16 00:04:40 +02:00
Oliver Tappe 16e5092306 Extract EditableCatalog from Catalog.{h,cpp}.
* move EditableCatalog to its own header and implementation file
* move problematic BCatalog::CatalogAddOn() to EditableCatalog
* adjust Locale tools accordingly
2012-04-16 00:04:40 +02:00
Yongcong Du cc586f1655 x86: AMD C1E with no ARAT(Always Running APIC Timer) idle support
AMD C1E is a BIOS controlled C3 state. Certain processors families
may cut off TSC and the lapic timer when it is in a deep C state,
including C1E state, thus the cpu can't be waken up and system will hang.

This patch firstly adds the support of idle selection during boot. Then
it implements amdc1e_noarat_idle() routine which checks the MSR which
contains the C1eOnCmpHalt (bit 28) and SmiOnCmpHalt (bit 27)  before
executing the halt instruction, then clear them once set.

However intel C1E doesn't has such problem. AMD C1E is a BIOS controlled
C3 state. The difference between C1E and C3 is that transition into C1E
is not initiated by the operating system. System will enter C1E state
automatically when both cores enters C1 state. As for intel C1E, it
means "reduce CPU voltage before entering corresponding Cx-state".

This patch may fix #8111, #3999, #7562, #7940 and #8060

Copied from the description of #3999:
>but for some reason I hit the power button instead of the reset one. And
>the boot continued!!
The reason is CPUs are waken up once power button is hit.

Signed-off-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
2012-04-14 18:18:29 +02:00
Oliver Tappe eaa5e0936d Fix #8452 (app's crashing for non-existent system catalog)
* make the system catalog a BCatalog instead of a BCatalogAddOn*,
  such that using a non-existing system catalog won't crash but
  simply return the untranslated string instead
* rename MutableLocaleRoster::GetSystemCatalog() to LoadSystemCatalog()
  and adjust it to use BCatalog::SetTo() in order to replace the
  data used by the given catalog
* adjust all users of gSystemCatalog accordingly
2012-04-14 17:58:58 +02:00
François Revol 599f30f93d Fix building the m68k kernel
* Restructured the vm support code to align with the changes done to other archs.
* Not completely finished, but the kernel loads and panics. I had this sitting on the disk anyway.
* Only support 040 for now, 030 will need to be added back.
* This commit is dedicated to Jack Tramiel who passed away away last sunday:
http://www.forbes.com/sites/davidthier/2012/04/09/computer-legend-and-gaming-pioneer-jack-tramiel-dies-at-age-83/
2012-04-13 00:53:09 +02:00
Alexander von Gluck IV d387f54a23 x86: Change cpu feature flags to shifts
* No functional change
* Added missing ia64 emulation flag
* More closely matches AMD_EXT defines
* Easier to read compared to CPU documentation
2012-04-09 08:19:10 -05:00
Alexander von Gluck IV 0de9d6cdef radeon_hd: Move out some DisplayPort common code
* General DisplayPort functions in common dp.cpp
* DP port information struct in common header
* Please don't use this private accelerant common DP
  code just yet as it is very early.
2012-04-06 13:43:09 -05:00
Hamish Morrison 43e7b1c2b0 Fix dladdr behaviour
* If dladdr can't find an exact match, it returns the nearest symbol
  less than the given address.
* If no suitable symbol can be found, but the address is within a
  loaded library, dladdr returns the library name and base address.

Signed-off-by: Ingo Weinhold <ingo_weinhold@gmx.de>
2012-04-05 12:32:31 +02:00
Oliver Tappe 60f75e901c Merge liblocale.so into libbe.so.
* Make the locale kit a part of libbe.
* Drop the LocaleBackend kludge used from within libbe (and from
  other places, too) in order to access system catalog strings. 
  This is now done via gSystemCatalog, which is provided and initialized
  by libbe.
* Drop all references to liblocale.so from all Jamfiles.
* Add legacy symlink liblocale.so in order to keep optional packages
  that rely on it in a working state.

TODO: the documentation hasn't been updated.
2012-04-04 22:44:42 +02:00
Alexander von Gluck IV 8dfc5dbb26 radeon_hd: Complete move to common DisplayPort header
* Non-spec DP stuff in accelerant displayport.h
* Common DisplayPort header still has TODO's however
2012-04-04 10:41:34 -05:00
Alexander von Gluck IV c6799d8ae1 dp_raw: Continued cleanup of DisplayPort common header
* Reduce number of common DP registers in radeon_hd
* Move to bitwise shifts as they will make more
  sense to more people in the long-run
2012-04-03 09:52:21 -05:00
Alexander von Gluck IV 64dcb00f9f radeon_hd: Begin to widdle down DP to common code 2012-04-02 17:00:24 -05:00
Alexander von Gluck IV 37550d80c9 dp_raw: Add AUX communication defines 2012-04-02 15:45:13 -05:00
Alexander von Gluck IV 30d5507541 dp_raw common: Style fix, no change. 2012-04-02 15:36:07 -05:00
Alexander von Gluck IV 4185aa0c8c common header: Add work in progress DisplayPort header
* Obtained via DportV1.1.pdf
* Written based on my Xorg membership
2012-04-02 11:52:36 -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
Axel Dörfler 1674a53a45 Added recursive_lock_transfer_lock() to the fs_shell. 2012-03-31 00:09:47 +02:00
Axel Dörfler fd8b9d4326 Added a recursive_lock_transfer() function. 2012-03-31 00:09:45 +02:00
Alexander von Gluck IV 83e3a8ea50 radeon_hd: Start work on proper DP link training
* The AtomBIOS timeout fix has made my DP bridge
  stop working
* The current DisplayPort code is a little lacking
  on DP link training... I think thats the cause.
* This puts the first steps towards DP training
  in place.
* I plan on trying to make some of this DP stuff
  common accelerant stuff after it works.
2012-03-14 06:22:59 -05:00
Oliver Tappe ec17468f63 Allow switching of timezone string to messages locale, too.
* adjust POSIX locale backend to redirect the timezone string
  through the messages/time-locale indirection
2012-02-23 23:15:36 +01:00
Oliver Tappe 1e1278f46f Implement taking date strings from messages locale.
* mimic LocaleKit and add option to POSIX locale backend for taking
  the date strings from the messages locale (instead of time locale)
2012-02-23 23:15:36 +01:00
Jerome Duval eb5f363978 Fixes some occurrences of 'variable set but not used', disables Werror for problematic items. 2012-02-23 20:32:11 +01:00
Ingo Weinhold 547ad24cea Add macro B_IF_GCC_2
It resolves to an "if" or "else" parameter depending on the gcc version.
2012-02-19 15:11:57 +01:00
Jérôme Duval 4ea3e0d3b8 listusb: display USB vendor and devices names based on usb.ids
* download usb.ids, processed like pci.ids to generate a header.
* best would be to load and parse the file at runtime with shared code.
2012-02-18 14:25:10 +01:00
Alexander von Gluck IV 0a2f1274ff radeon_hd: Update southern islands info
* Add 7770 and 7750 pciid's
* Remove Thames and reorganize code names for SI
  (seems the codenames changed before release)
* Untested as always
2012-02-16 12:05:06 -06:00
Alexander von Gluck IV 3f1eed704a kernel: x86 SSE improvements
* Prepend x86_ to non-static x86 code
* Add x86_init_fpu function to kernel header
* Don't init fpu multiple times on smp systems
* Verified fpu is still started on smp and non-smp
* SSE code still generates general protection faults
  on smp systems though
2012-02-15 12:33:45 -06:00
Oliver Tappe 752527a8fe Cleanup: correct variable name in mbrtowc() signature. 2012-02-07 21:43:00 +01:00
czeidler c7413cf90c Forgot this file. 2012-01-22 15:30:18 +13:00
czeidler 5dbc26dc0a Add AS_RECONNECT_BITMAP to the server protocol. 2012-01-22 15:30:17 +13:00
czeidler 6c40fc5dfc Reconnect BApplication and trigger reconnect of all BWindows in an application.
* handle bitmap reconnect request in the app server
2012-01-22 15:30:16 +13:00
czeidler 577f58763b Make it possible to reconnect BBitmap to the app_server.
* maintain a list of all BBitmaps
* refactor the client memory allocator class, its possible now to just clone existing client area
2012-01-22 15:30:15 +13:00
czeidler 04209cdd81 Catch a app_server crash in the debug server. Let the registrar restart the app_server and notify all apps. 2012-01-22 15:30:14 +13:00
Alexander von Gluck IV 8dd1e875c1 kernel: Fix FPU SSE + MMX instruction usage.
* Rename init_sse to init_fpu and handle FPU setup.
* Stop trying to set up FPU before VM init.
  We tried to set up the FPU before VM init, then
  set it up again after VM init with SSE extensions,
  this caused SSE and MMX applications to crash.
* Be more logical in FPU setup by detecting CPU flag prior
  to enabling FPU. (it's unlikely Haiku will run on
  a processor without a fpu... but lets be consistant)
* SSE2 gcc code now runs (faster even) without GPF
* tqh confirms his previously crashing mmx code now works
* The non-SSE FPU enable after VM init needs tested!
2012-01-20 15:06:01 -06:00
Oliver Tappe b7417fbec1 Switch wchar from glibc to our own implementations. 2012-01-07 22:02:48 +01:00
Oliver Tappe bd55dcbefb Add our implementation for wcscoll() and wcsxfrm().
* add Wcscoll() and Wcsxfrm() ICU locale backend
* provide implementations of wcscoll() and wcsxfrm() that are using
  the respective methods of the locale backend
2012-01-07 21:47:31 +01:00
czeidler b5c5640ec0 Style fixes. Thanks Axel and Ingo. 2012-01-06 09:35:33 +13:00
czeidler 32951c4e63 Make BReference and BWeakReference behave more like a normal pointer.
* Casts like BReference<Derived> to BReference<Base> are now possible.
* This cast for BWeakReference is, because of the underlying structure, not automatically type safe. I used a simple hack to make the compiler complain if the cast
is not type safe. Please take a look if that can be done better.
* Smaller style and bug fixes.
2012-01-05 13:42:45 +13:00
Alex Wilson a84e14ca84 Merge branch 'master' of git://github.com/haiku/haiku 2011-12-15 20:50:28 -07:00
Oliver Tappe ec99f3b2a6 Adjust mbstate_t to embed the state of the ICU converter.
* make room in mbstate_t for containing an ICU-converter's state
  (well, in fact the whole converter object)
* adjust libroot's locale add-on to clone converters into a given
  mbstate_t directly
* adjust ICUThreadLocalStorageValue to contain the converter pointer
  instead of a converter-ID (if the converter is related to an
  mbstate_t, it points into the mbstate_t).
* adjust users of converters to directly use converter pointers
  instead of ICUConverterRef
* drop now unused ICUConverterManager and ICUConverterRef
* update gcc4 optional package

This brings our multibyte implementation into a fully working state,
both non-ascii and non-8-bit characters can now be handled normally
in the Terminal, i.e. this finally fixes #6276.

N.B.: Since the size of mbstate_t has changed, everything (including
the compiler!) needs to be rebuilt.
2011-12-15 13:18:11 +01:00
Alexander von Gluck IV 249495e284 Add complete set of DRM DisplayPort defines into radeon_hd
* I'd rather this be common code, but I don't have access
  to the DisplayPort specifications. If I added it as common
  code I would want to be 100% it was complete and variables
  were named properly.
* For now putting in radeon_hd private headers
2011-12-14 10:19:00 -06:00
John Scipione 0e35d5d2e5 Change instances of wether in comments to whether. No functional change intended. 2011-12-12 14:41:49 -05:00
Oliver Tappe 995d6d827f Implement our own version of wcsrtombs().
* add WcharStringToMultibyte() to libroot's locale backend
* implement wcstombs(), wcsrtombs() and wcsnrtombs() on top of that
  new backend function
2011-12-12 17:27:42 +01:00
Oliver Tappe 73186b2fcd Add implementation of mbsrtowcs() to our locale backend.
* add MultibyteStringToWchar() to ICU locale backend
* implement mbsrtowcs() and mbsnrtowcs() on top of 
  MultibyteStringToWchar()
* drop respective glibc files
2011-12-12 17:27:41 +01:00
Alexander von Gluck IV 61cf713381 Include file style cleanup, no functional change 2011-12-09 21:26:41 -06:00
Rene Gollent 4cc7fee152 Fix broken debug output. 2011-12-06 21:32:09 -05:00
Michael Lotz dd26f81c56 Add an UTF8NextCharLen() version that takes a string length.
This one works with non-terminated strings that we may need to handle.
It also validates that the sequence is valid UTF-8 so it results in
the same behaviour as the version that is used when converting to
codes (syncing the enumeration and drawing behaviour).
2011-12-06 19:09:56 +01:00
Michael Lotz 5cbe06f482 Allow replacing the object cache with the guarded heap.
This allows to use the debug features of the guarded heap also on
allocations made through the object cache API. This is obivously
horrible for performance and uses up huge amounts of memory, so the
initial and grow sizes are adjusted accordingly.

Note that this is a rather simple hack, using the object_cache pointer
to transport the allocation size. The alignment is neglected completely.
2011-12-04 13:52:06 +01:00
Michael Lotz 7418dbd908 Introduce debug page wise kernel area protection functions.
This adds a pair of functions vm_prepare_kernel_area_debug_protection()
and vm_set_kernel_area_debug_protection() to set a kernel area up for
page wise protection and to actually protect individual pages
respectively.

It was already possible to read and write protect full areas via area
protection flags and not mapping any actual pages. For areas that
actually have mapped pages this doesn't work however as no fault, at
which the permissions could be checked, is generated on access.

These new functions use the debug helpers of the translation map to mark
individual pages as non-present without unmapping them. This allows them
to be "protected", i.e. causing a fault on read and write access. As they
aren't actually unmapped they can later be marked present again.

Note that these are debug helpers and have quite a few restrictions as
described in the comment above the function and is only useful for some
very specific and constrained use cases.
2011-12-03 19:49:18 +01:00