Commit Graph

5441 Commits

Author SHA1 Message Date
John Scipione
3705d40cd9 BSpinner: Set min value then max value
... reverse this to avoid confusion, you'll see why in next commit.

No functional change intended in this commit, functional change is in the
next commit.
2017-01-12 14:15:44 -08:00
Dario Casalinuovo
e6004b7729 MediaClient: Move WIP min/max functions into BMediaConnection 2017-01-10 22:54:53 +01:00
Dario Casalinuovo
3ef4b20086 Make BMediaRecorder public
* Fills a functionality lack of the classic media_kit.
2017-01-10 21:34:20 +01:00
Dmytro Shynkevych
0e0f49e799 libroot: Implemented pthread barriers
This is an implementation of pthread barriers pursuant to the relevant specification.

Barriers are essentially a special case of conditional variables,
such that all threads waiting on one are woken up when the number of
waiters reaches a number provided at the initialization of the barrier.
In view of that, this implementation mimics the implementation of pthread_cond,
except it is more specialized and self-contained.

Signed-off-by: Jérôme Duval <jerome.duval@gmail.com>
2016-12-30 11:32:04 +01:00
Jessica Hamilton
4419d699ec partitioning: pass along reference to parent when uninitializing.
* Fixes problems with setting the partition name after uninitializing
  a partition in DriveSetup. Previously, UninitializeJob() was
  followed by SetStringJob(), but the kernel was updating the
  change counter for the parent partition when uninitializing a
  partition, leading to SetStringJob() having an incorrect change
  counter for the parent partition. Now the parent change counter
  will be correct when SetStringJob() runs.
2016-12-23 18:53:15 +13:00
Dario Casalinuovo
51844723d3 MediaConnection: Remove redundant IsInput/IsOutput 2016-12-18 15:15:30 +01:00
Jérôme Duval
17b2a3cfcb fork(): Defer signals and lock the heaps while _kern_fork().
* Also defer signals while registering fork hooks.
* While malloc provides fork heap hooks which lock the heaps and unlock/reinit,
  malloc_debug provides empty hooks.
* Ideas suggested by Ingo, patch reviewed by him. Thanks a lot!
* Also call fork parent hooks on failure.
* Solve locks-up when combining multithreading and process forking, should help
  with #13111.
2016-12-17 21:11:15 +01:00
Jérôme Duval
194afffd85 user_thread.h: use struct keyword to be usable in C. 2016-12-17 20:17:38 +01:00
Dario Casalinuovo
75b90c42e5 MediaConnection: Fix buffer size and duration redudancy
* There's no need to supply ways to mismatch the buffer duration
and size. Anything should reflect the media_format, this is at least
fixed on API level.
2016-12-17 19:10:50 +01:00
Dario Casalinuovo
2fdc256d60 BMediaOutput: API cleanup 2016-12-17 19:10:50 +01:00
Dario Casalinuovo
63cb26c536 MediaClient: Hide timesource related API
* There's no point actually in providing BTimeSource dependant
functionality. If and when there will be need for something like
that, possibly never, an higher level solution will be integrated.
2016-12-17 19:10:50 +01:00
Dario Casalinuovo
83cd87d033 SimpleMediaClient: Use virtual inheritance to reduce duplication 2016-12-11 19:16:19 +01:00
Dario Casalinuovo
d1742cc336 MediaInput/Output: Inherit base virtually 2016-12-11 19:16:18 +01:00
Rene Gollent
7bdeef54a2 Debugger: Rework parts of report generation.
Team:
- Adjust report generation event to include a final status code for listeners.

CliContext,TeamWindow,ReportUserinterface:
- Use aforementioned status code to indicate whether report generation
  succeeded or failed.

DebugReportGenerator:
- Notify listeners if report generation fails. This may have previously
  been responsible for some bug reports where it was indicated that the
  debugger hung without exiting after being asked to save a report from
  a crashed app.
- When dumping disassembly, retrieve it directly if necessary rather than
  requesting it via the user interface listener. This also fixes the quirk
  that requesting to save a crash report while looking at the source code
  of a function would trigger switching it to disassembly visually.
- When walking the list of threads to dump, acquire references to all of
  them before starting. Otherwise, it was potentially possible for a running
  but not crashed thread to exit while we were generating the report, leaving
  us with a pointer to a deleted thread. This was most likely the cause of one
  of the crashes reported in #13082.
- When receiving the notification that source code state has changed, clear
  the waiting function. Otherwise, it was potentially possible for us to get
  other state change notifications, leading to the data semaphore being
  released too often. This would then cause later potential waits such as
  the stack frame memory dump to not actually wait when they should,
  potentially leading them to dereference objects that weren't yet ready.
  This fixes another of the crashes in #13802.
2016-12-09 23:11:23 -05:00
Dario Casalinuovo
f1f0956504 MediaClient: Just some interface review 2016-12-06 21:16:36 +01:00
Dario Casalinuovo
c1137899c5 MediaClient: Update comments to last changes
* The interface is being refined and various comments were inconsistent
at this point.
* AddInput/AddOutput is private now.
2016-12-06 16:47:16 +01:00
Rene Gollent
10ba334855 Debugger: Cleanup.
- Split MessageCodes.h into a second file that separates out the
  application-specific message codes from those used by the core.
  Adjust includes accordingly. No functional change.
2016-12-05 18:17:58 -05:00
Rene Gollent
25ec63dbf5 libdebugger: Add string setting type.
- Needed in order to properly implement a settings description for
  a remote interface.
2016-12-05 18:17:48 -05:00
Axel Dörfler
852e09d61f launch_daemon: Added stop target ability.
* Before, you had to stop each job by itself.
2016-11-29 23:14:36 +01:00
Dario Casalinuovo
ecb395852e Introduce BSimpleMediaClient
* The idea is to move the callback based mechanism into a derived
class. The objects can be composed to create working systems.
* The BMediaClient class supply RegisterInput/RegisterOutput
and BeginInput/BeginOutput is moved to BSimpleMediaClient.
* Various minor fixes.
2016-11-29 01:22:35 +01:00
Dario Casalinuovo
209b520fa0 MediaClient: Add some padding and reserved functions 2016-11-26 17:30:49 +01:00
Dario Casalinuovo
05e29ea1ad MediaConnection: Remove Reset() 2016-11-26 17:24:10 +01:00
Dario Casalinuovo
9ee6577e2d MediaClient: Distribute callbacks across derived classes 2016-11-26 17:13:02 +01:00
Dario Casalinuovo
9e9655ed55 MediaClient: Use CurrentTime for both offline and performance time 2016-11-25 17:38:44 +01:00
Dario Casalinuovo
6d0255216e MediaClient: Introduce BMediaInput and BMediaOutput 2016-11-25 17:38:44 +01:00
Dario Casalinuovo
eebedf8f1a MediaClient: Use unique id for both inputs and outputs 2016-11-25 17:38:44 +01:00
Dario Casalinuovo
30f9eb3f90 MediaClient: Use kind/kinds pair for media_connection_kind
* Use const reference for media_connection::kind.
2016-11-25 00:05:06 +01:00
Dario Casalinuovo
902701e6bf MediaClient: Use higher level structs for the remaining methods 2016-11-24 21:37:14 +01:00
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