Commit Graph

5413 Commits

Author SHA1 Message Date
Dario Casalinuovo
3c1e013390 MediaClient: Fix build 2016-11-24 01:22:27 +01:00
Dario Casalinuovo
f506f3056f MediaClient: Improve internals and API
* Capabilities() become Kind()
* Use media_client and media_connection to better model
the different situations of the API. Reduce code duplication
and move media_kit structs/methods into private.
* Various API and beauty improvements.
* Introduce id management for media_connections.
* Fix different issues preventing to correctly begin a connection.
2016-11-24 00:27:58 +01:00
Dario Casalinuovo
23d5326e2b MediaClient: Introduce media_client and media_connection
* Those structs are provided as replacement for the classic
media_kit ones. They provide better encapsulation of the data
and the resulting code is heavily simplified. It's planned to
introduce BMediaRoster functions to provide conversion from
media_node and media_input/media_output to media_client
and media_connection.
2016-11-24 00:27:58 +01:00
Rene Gollent
a9d53d9e7e Debugger: Fix regression introduced in hrev50534.
FunctionInstance:
- Add new state FUNCTION_SOURCE_SUPPRESSED. This signals that the user
  explicitly forced disassembly to be loaded despite source code being
  available.

LoadSourceCodeJob:
- When forced to disassembly, use the above suppressed state accordingly.

SourceView/TeamWindow/TeamDebugger:
- Adjust to take new state into account as needed.

TeamDebugInfo::GetActiveSourceCode:
- When looking at a function to decide whether to return line information
  based on source or disassembly, first examine the source code state. If
  the source has never been loaded for that function, but we have it available,
  set it on the function at that point. This lazily addresses the fact that
  LoadSourceCodeJob is called on behalf of a specific function, and
  consequently only sets the source code onto that function, and not all others
  present in the same file. This allows us to differentiate between the case
  where a function doesn't have source code available at all, versus a function
  that has simply been forced to disassembly view at this point in time.

The primary symptom of the above issue was that attempting to set a breakpoint
outside of the currently active function, but within the same file would result
in the breakpoints view indicating that the breakpoint was at line 0 rather
than the appropriate line, and breakpoints would also not be drawn in the
source view for such locations.

Thanks to Humdinger for the heads up!
2016-11-22 23:06:09 -05:00
Dario Casalinuovo
2082b5d25f MediaClient: Use media_client_kind for client capabilities 2016-11-18 17:56:51 +01:00
Dario Casalinuovo
5ec9bd1eff MediaClient: general cleanup 2016-11-18 17:46:19 +01:00
Dario Casalinuovo
0253ecbd9e MediaClient: Remove BeginConnection for external connections
* While it looked like a good formalism, there's no need to add
unneeded complex steps to the user of the API.
2016-11-17 02:43:40 +01:00
Janus
586734d609 Fixes Success/Failure colors in Appearance
* Fixes the mapping function index_to_color_which
* Fixes #13073
2016-11-14 19:47:29 +01:00
Jessica Hamilton
f4ff9cb02c Merge branch 'uefi-support' 2016-11-14 03:21:59 +13:00
Jessica Hamilton
6e6efaecdc EFI: add ACPI support
Also add support in the kernel to get the ACPI RSDP from the
bootloader, and pass onto the ACPI driver using get_boot_item.
2016-11-14 03:21:36 +13:00
Henry Harrington
82dcc31606 bootloader: Translate kernel args before adding them to kernel_args_range.
Chunks may be physically contiguous, but virtually disjoint. Adding
physical addresses may cause ranges to be merged incorrectly.

Signed-off-by: Jessica Hamilton <jessica.l.hamilton@gmail.com>
2016-11-14 01:00:00 +13:00
Dario Casalinuovo
9b410c41e8 Initial merge of the BMediaClient branch
* The BMediaClient is an higher level API to the media_kit. It
corresponds to what the layout API was for the interface_kit.
The main idea is to allow the developer concentrate only on
higher level details and avoiding handle with the tricky parts
of the media_kit. At the same time the general purpose node that
is implemented inside would allow implementing the best techniques
around thus at the same time reducing code duplication and increasing
efficiency.
* BMediaClient is WIP, this is the initial merge of the branch.
The initial development stone was set long time ago and walked
through various design/implementation phases.
2016-11-11 13:47:56 +01:00
Dario Casalinuovo
8023d6bafd PluginManager: Move reference counting in the MediaPlugin
* Ideally we should support this feature by default to allow
future improvements to the plugins management.
* Fixes the major memory corruption that lead to various
crashes on exit in MediaPlayer.
2016-10-31 23:39:32 +01:00
Dario Casalinuovo
42a3f9477d PluginManger: Remove BReferenceable and add locking 2016-10-31 23:39:32 +01:00
Alexander von Gluck IV
b2bdabc797 arm: Add beaglebone target, rename beagle
* beaglebone vs beagleboard
* While the boards are almost the same, they have
  diff. FDT's now (more memory, different layout etc)
* Make u-boot script more rpi-like
  (depend on u-boot for initial addresses)
* Wasn't working, still doesn't.
2016-10-20 11:05:46 -05:00
Jérôme Duval
e340f717a4 runtime_loader: add support for ELF init/term routine arrays.
* binutils 2.27 defaults to DT_INIT_ARRAY instead of DT_INIT.
2016-10-11 22:26:06 +02:00
Adrien Destugues
af0282f91f Make US-english the default KDL keymap again. 2016-10-10 07:18:12 +02:00
S K
fe2557b6eb PS/2: fix warnings, enable -Werror
- elantech: Remove unused variables and functions.
- "movement maker": float/int confusions
- debugger keymap: don't use multi-byte chars in preprocessor to avoid
  warnings with gcc2 (even with -Wno-multichar)

Signed-off-by: Adrien Destugues <pulkomandy@pulkomandy.tk>

Fixes #12658
2016-10-09 21:11:55 +02:00
Alexander von Gluck IV
25a087bc7c radeon_hd: AtomBIOS version bump. Encoder work.
* Now pulling in latest amdgpu atombios.h headers
* Lots of DisplayPort cleanup and removal of legacy stuff
* Add obsolete atombios header for things that disappear
  (amdgpu doesn't support older cards like we do)
* Introduce new code to support later encoder tables
* Drop radeon-specific encoder service from common dp_info
* Tested on HD 5450 hdmi
2016-10-05 13:54:24 -05:00
Alexander von Gluck IV
38f17b01ce radeon_hd: Polaris10 power distribution fix
* Helps prevent mainboard explosions and other bad stuff.
* ...maybe not explosions, but bad things.
* The RX 480 reference design can pull as much as 90W
  from its PCIe slot at load. PCIe is rated for 75W.
* This change overloads the PCIe power cables vs the PCIe
  slot. The PCIe power cables can handle going over spec.
* Untested since we really can't come close to loading a
  RX 480 without hardware OpenGL ^_^
* Should be able to test on real hardware within a week.
2016-09-28 15:46:14 -05:00
Rene Gollent
b65adbdfbc Debugger: Fix #12940.
- Add new interface TeamFunctionSourceInformation. Currently this
  exposes a single function allowing one to query for the currently
  active source code given a FunctionDebugInfo instance.
- Implement TeamFunctionSourceInformation on TeamDebugInfo.
- Pass TeamFunctionSourceInformation to Dwarf{Team,Image}DebugInfo.
  In turn, make use of it in DwarfImageDebugInfo::GetStatement() in
  order to determine whether to return the corresponding assembly
  or source statement.

With this piece of information, the debugger is now correctly able to
determine that the user is currently looking at disassembly despite debug
info being available, and consequently adjust its stepping behavior based on
that. Previously, the source code statement was always used, leading to it
not being possible to single step assembly lines in such a circumstance
without manually using run to cursor.

Other related cleanups:
- TeamDebugInfo now inherits BReferenceable directly, rather than relying on
  indirectly inheriting it from TeamTypeInformation.
- Remove BReferenceable from TeamTypeInformation. The latter is only an
  interface anyways, and inheriting that base class from multiple locations
  was causing GCC5 trouble when resolving BReference<TeamDebugInfo>, even
  when virtual inheritance was used.
2016-09-13 22:14:10 -04:00
Dario Casalinuovo
e3f2079964 AdapterIO: Remove unuseful Close() 2016-09-07 18:21:13 +02:00
Dario Casalinuovo
79bd3b4837 StreamerPlugin: Add reference count
* Keep the Streamer around until everyone released it.
2016-09-07 18:19:10 +02:00
François Revol
495efc382b loader: Drop the HashMap for partition lookup by id
The HashMap constructor was called before the heap is initialized,
ending up calling malloc from the OpenHashMap constructor.

Oddly it was still working on x86 but broke other platforms.

Instead we add a Lookup() static method to Partition,
which by default walks gPartitions for the id,
and recursively calls itself on the children lists.

This means we must add a partition even temporarily to gPartitions
before Scan()ing it though.

Signed-off-by: François Revol <revol@free.fr>
2016-09-02 19:02:33 +12:00
Fredrik Holmqvist
211483cb51 EFI: Initial test EFI application
* Only set HAIKU_BOOT_PLATFORM to bios_ia32 if not defined
* Add gnuefi build feature
* Introduce BOOT_LDFLAGS, and move options for passing to linker
  into ArchitectureSetup
* x86_64 compile fixes for warnings in boot loader
* loader/elf.cpp: don't include ELF32 support when targeting EFI
* relocation_func.cpp: copy of the relocation code from gnuefi
  to make _relocate extern "C", and avoid including <efilib.h>
* boot_loader_efi.ld: copy of gnuefi's elf_x86_64_efi.lds,
  modified to include support for C++ constructors, etc. Keep in
  sync with the gnuefi package

Signed-off-by: Jessica Hamilton <jessica.l.hamilton@gmail.com>
2016-09-02 19:02:29 +12:00
Adrien Destugues
187ad82a62 intel_extreme: fix wait_for_vblank on SandyBridge
There was some mixup with the interrupt registers, still:
- The driver uses 16-bit read/write, but on SandyBridge the register is
  32 bits
- There is a global interrupt enable bit, which must be set to unmask
  everything else
- The bits for vblank interrupt are not the same on SNB and later PCH
  based devices, and the code mixed the two.

Move the computation of the interrupt bits to an helper function, and
use it everywhere to make sure we always use the right bits.
2016-08-26 21:45:38 +02:00
Adrien Destugues
adc0f76e64 More SandyBridge fixes and cleanups
Modesetting
===========

My previous hack was setting the transcoder registers, instead of the
display ones. Do that the way it is designed in the driver instead:

- If there is a transcoder, set its registers, but do not set the
display timings. The display will remain set at its native (and only)
resolution, and panel fitting will adjust the output of the transcoder
to match.
- If there is no transcoder, set the display registers directly to the
native resolution, as it was done on previous generation devices.
- fPipeOffset hacks no longer needed

DPMS
====

It seems the panel control register is not readable on PCH? Anyway, the
code would loop forever waiting for the bit to become unset when turning
the display off. Waiting seems to not be needed, so just remove it as
well as the "unlock" bit, which does not work for me and results in a
black screen.

Remaining hacks
===============

I still need to force HEAD_MODE_A_ANALOG to get output on pipe B (LVDS
display) working. I suspect something is common to the two pipes or not
allocated to the right one.

This version will have less side effects on other generations and help
with getting things to work on SandyBridge and possibly later devices.
Please test and report.
2016-08-25 23:17:12 +02:00
Adrien Destugues
9b1935445c CID 608995: buffer overflow.
This should not happen, so in case a file has an unexpectedly large
name, drop to debugger.
2016-08-21 17:49:52 +02:00
Adrien Destugues
bb4190f050 Fix SandyBridge support.
This reverts commit 4f2b258c32.
This reverts commit c86f3dba23.
This reverts commit 61fbdb0667.
This reverts commit b3f14fb7c7.
2016-08-21 16:54:03 +02:00
John Scipione
9d37e7411c Tracker FindPanel: Make a copy of fDeviceIcon
... so that it gets deleted by destructor and not the original
2016-07-31 19:42:39 -07:00
John Scipione
d8c4f7b54a IconMenuItem: Make icon_size B_MINI_ICON by default 2016-07-31 19:42:39 -07:00
John Scipione
caf0a129d6 Tracker: Draw IconMenuItem in closed state
Add an Icon() and SetIcon() method. Override SetMarked() to set the
parent menu field icon.

Don't move the label right if icon is NULL. Make the first menu item
an IconMenuItem with a NULL icon. This allows the icon to draw in the
closed menu state.

icon gets updated even if you select an item in a submenu
2016-07-31 19:42:39 -07:00
John Scipione
81364c9d82 BColorMenuItem: add custom color menufield
http://insightfactory.tumblr.com/image/142366356207

* Make the color box a rectangle with proportions of golden ratio.
* Override GetContentSize() to make menu item area larger.
* Label should never truncate since I make sure there is enough room.
* Draw the label using BMenuItem parent class
* Carefully adjust the spacing so that there is an attractive amount of
  padding between the checkmark and color box and the color box and label.

Add _AddMenu method to BMenuField that adds BColorMenuItem as its
base menu item. This shows the BColorMenuItem in the closed state.

Create BPrivate::MenuItemPrivate

Add a SetSubmenu() method to MenuItemPrivate that gives you
the ability to add a submenu after creating the object. This
method should be public

Skip disabled items

Color gets updated even if you select an item in a submenu
2016-07-31 19:42:39 -07:00
John Scipione
e8d4db8e0b MenuPrivate: Add SetItemMargins() method 2016-07-31 19:42:39 -07:00
John Scipione
61dfdec415 BMenu and friends: style fixes
BMenuBar: style fix: msg => message

MenuPrivate: style fixes

MenuItem: 80 char limit style fix

MenuBar: tiny style fix

Menu: tiny style fix, indentation

Menu: Small refactor

Implement _SetIgnoreHidden() in header
Change on to ignoreHidden
Change on in _SetStickyMode to sticky

_BMCItem_: tiny whitespace style fix

Menu: style fixes, rename msgr => messenger

BMenu: style fix, pointer != NULL

BMenu::Archive rename ret to status

Also check pointer against NULL explicitly

BMenuItem style fixes: rename abbreviation, pointer style
2016-07-31 19:42:39 -07:00
Rene Gollent
9c9c24ce08 libdebugger: Add accessor for cpu state size.
Architecture:
- Store and provide accessor for the size in bytes of the low-level
  debug_cpu_state size of the respective target CPU. Adjust subclasses
  to pass in the appropriate size information.
2016-07-31 17:30:12 -04:00
Alexander von Gluck IV
95b6439eec intel_extreme: Implement Snb PCH FDI link training 2016-07-29 17:49:59 -05:00
Alexander von Gluck IV
c0d4def4e4 intel_extreme: Implement Ilk PCH FDI link training
* IronLake tested and FDI says it trains successfully
* Still no LVDS video on Ilk
2016-07-29 16:04:40 -05:00
François Revol
02283e080c M68K: drop the custom C arch_cpu_user_mem*() for the default impl
I didn't notice there was a C++ version that didn't require writing asm.

I'll have to write them anyway for speed someday.
2016-07-20 21:57:19 +02:00
François Revol
d26fd5f68d M68K: drop the platform_type field, the enum is gone from OS.h 2016-07-20 20:31:14 +02:00
François Revol
990d34efdd M68K: add arch_cpu_idle and arch_cpu_pause inline stubs
Remove the stub from arch_cpu.cpp

We might want to implement a 040 CPU module providing idle using LPSTOP.
2016-07-20 20:26:29 +02:00
François Revol
7ab9993a18 M68K: Add missing defines
No idea for cache level.

On 030 and 040 a cache line is 16 bytes.
2016-07-20 20:26:29 +02:00
François Revol
3805f72225 M68K: add arch_atomic.h 2016-07-20 20:26:29 +02:00
Alexander von Gluck IV
f6c32ce310 intel_extreme: Set FDI PLL RX lane count when enabling 2016-07-20 00:25:38 -05:00
Alexander von Gluck IV
a933bb4cbc intel_extreme: IronLake reference clock activation 2016-07-17 15:25:08 -05:00
Alexander von Gluck IV
92e254d047 intel_extreme: Improve PCH detection
* Detect PCH model based on ISA bridge and save
  into shared info for later use.
* On CougarPoint PCH systems, assign pipes via
  special CPT registers
* Drop HasPlatformControlHub as PCH should be
  based on more than just generation.
2016-07-10 21:02:01 -05:00
Murai Takashi
07d59ab7db PictureIterator.h: fix header guard spelling
Signed-off-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Fixes: #12839
2016-07-10 17:11:20 +02:00
Dario Casalinuovo
0474db50d0 AdapterIO: Add IsRunning method
* The backend need to know if we can really get data.
* Adapt WaitForData to be more reliable using this method.
2016-07-09 16:18:09 +02:00
Dario Casalinuovo
5c05bb48f4 AdapterIO: Remove default arguments in ctor 2016-07-09 02:14:37 +02:00
Rene Gollent
05fc1277c4 Debugger: Fix team restart request.
UserInterface:
- Add Clone() function to set of required virtuals. This asks the subclass
  to create a new instance of its respective type.

{CommandLine,Graphical,Report}UserInterface:
- Implement the above function.

TeamDebugger:
- Add accessor for the currently active UI.

TargetHostInterface:
- Set correct request type when setting up the options for a team restart.
- Ask the TeamDebugger for its user interface and clone it in order to fill
  in that aspect of the debug options. This fixes a regression introduced in
  commit 880a64, which inadvertently resulted in team restarts no longer
  working.
2016-07-03 13:53:51 -04:00