Commit graph

131 commits

Author SHA1 Message Date
Michael Scire
b758e3fc55 strat: update for latest libnx. 2019-12-07 12:41:28 -08:00
Michael Scire
ea3ebbaa7d strat: TitleId -> ProgramId, titles->contents 2019-12-07 12:41:28 -08:00
Michael Scire
1636668762 strat: fixes for compat with latest libnx 2019-12-07 12:41:28 -08:00
Michael Scire
d7a06057eb strat: split out common functionality for future meso use 2019-12-07 12:41:28 -08:00
Michael Scire
8cb77ac136 namespace sts -> namespace ams
namespace sts::ams -> ams::exosphere, ams::.

This is to facilitate future use of ams:: namespace code in
mesosphere, as we'll want to include ams::util, ams::result, ams::svc...
2019-12-07 12:41:28 -08:00
Michael Scire
4059dc6187 Results: Implement namespaced, type-safe results.
Because I was working on multiple things at once, this commit also:
- Adds wrappers for/linker flags to wrap CXX exceptions to make them
  abort. This saves ~0x8000 of memory in every system module.
- Broadly replaces lines of the pattern if (cond) { return ResultX; }
  with R_UNLESS(!cond, ResultX());.
- Reworks the R_TRY_CATCH macros (and the result macros in general).
2019-12-07 12:41:28 -08:00
Michael Scire
0b22af1206 libstrat: namespace remaining non-namespaced code. more new-ipc updates 2019-12-07 12:41:28 -08:00
Michael Scire
535e49a38d strat: statically allocate additional threads 2019-12-07 12:41:28 -08:00
Michael Scire
fbb5730369 strat: update for latest libnx commit 2019-12-07 12:41:28 -08:00
Michael Scire
e5d62025d3 dmnt: update for new-ipc 2019-12-07 12:41:28 -08:00
Michael Scire
799c158b86 fatal: update for new-ipc 2019-12-07 12:41:28 -08:00
Michael Scire
add18d868f sts: add STS_UNREACHABLE_DEFAULT_CASE() 2019-12-07 12:41:28 -08:00
Michael Scire
609a302e16 os: implement waitable management.
This implements waitable management for Events (and
implements Events). It also refactors PM to use new
Event/Waitable semantics, and also adds STS_ASSERT
as a macro for asserting a boolean expression. The
rest of stratosphere has been refactored to use
STS_ASSERT whenever possible.
2019-12-07 12:41:28 -08:00
Michael Scire
bb223eb5ae libstrat: namespace hossynch.hpp 2019-12-07 12:41:28 -08:00
Michael Scire
1f2de35f94 fatal: use new vi enum value 2019-08-07 13:02:02 -07:00
Michael Scire
215f1bc8ee fatal: fix abort in viSetDisplayPowerState on < 3.0.0 2019-08-05 18:55:04 -07:00
Michael Scire
39d041466d fatal: refactor into sts namespace 2019-07-23 14:01:16 -07:00
Michael Scire
2d0c881ffe strat: go all in on ncm::TitleId 2019-07-11 22:24:59 -07:00
Michael Scire
18ca8aaf5b stratosphere: all in on enum class CommandId 2019-06-27 23:34:53 -07:00
Michael Scire
1671c04e24 stratosphere: prefer static waitable managers 2019-06-20 13:15:39 -07:00
Michael Scire
cead8a36ea stratosphere: more result cleanup 2019-06-20 02:00:59 -07:00
Michael Scire
31fde233e1 fatal: refactor for R_TRY 2019-06-17 16:41:03 -07:00
Michael Scire
9319463a6e fatal: use new I2cDevice enum 2019-05-02 17:54:05 -07:00
Michael Scire
14683405be fatal: update to use clkrst api on 8.0.0+ 2019-04-24 16:39:06 -07:00
Michael Scire
3a8f9114fc fatal: fix sm session usage 2019-04-24 05:18:31 -07:00
Michael Scire
b09adb6a34 stratosphere: only hold sm sessions open when needed 2019-04-22 12:59:49 -07:00
Sun
be4ca7eee5 Implement Auto Reboot Timer (#518) (#519)
* Implement Auto Reboot Timer (#518)

* Use > to check for values below -1

* Use TimeoutHelper and accept MS

* Add fatal_auto_reboot_interval into config (commented)

* Check for 0
2019-04-22 00:18:01 -07:00
Michael Scire
ac07971211 stratosphere: custom exception handlers (reboot to fusee) 2019-04-12 15:28:46 -07:00
Michael Scire
03e176d7f1 atmosphere: current year is 2019 2019-04-07 19:00:49 -07:00
Michael Scire
6b41a7e2e1 fatal: unconditionally reassign cpu_ctx ptr 2019-04-06 15:02:48 -07:00
Michael Scire
aed472775c fatal: fix invalid struct access, cap stack trace size. 2019-04-06 15:00:40 -07:00
Mat M
f44a730a90 fatal_font: Add missing va_end() calls to PrintFormatLine() and PrintFormat() (#497)
Fairly self-explanatory. Ensures va_start() is balanced with va_end()
2019-04-04 11:21:25 -07:00
Michael Scire
c6d67eab6a strat: 0 -> ResultSuccess 2019-03-28 22:39:39 -07:00
Michael Scire
9427a5cf46 strat: use TitleId defs instead of magics. 2019-03-28 21:49:14 -07:00
Michael Scire
4167dfea14 strat: vi results over magics 2019-03-28 20:39:17 -07:00
Michael Scire
0001e93810 strat: use atmosphere results instead of magics 2019-03-28 20:19:38 -07:00
Michael Scire
285feba42b fatal: Standardize result definitions 2019-03-28 15:37:50 -07:00
Michael Scire
106ae81614 fatal: improve start address detection 2019-03-26 09:04:32 -07:00
Michael Scire
e62606d276 fatal: only set display magnification on 3.0.0+ 2019-03-06 14:39:48 -08:00
Michael Scire
a38927ec04 fatal: remove debugging log that slipped through 2019-03-05 07:52:42 -08:00
Michael Scire
b4b1208222 stratosphere: fix svcExitThread usage 2019-03-05 07:50:27 -08:00
Michael Scire
f00dd05f82 Make stratosphere use new libnx HosVersion API 2019-02-20 14:17:51 -08:00
Michael Scire
784964d49d ams.mitm: add bpc handler, for reboot power button stuff 2019-02-04 21:17:05 -08:00
Michael Scire
051789c430 fatal: alignas doesn't actually work 2019-01-24 09:31:54 -08:00
Michael Scire
f99dea798a alignas preferred to __attribute__((aligned)) 2019-01-24 09:13:24 -08:00
Michael Scire
08d1e9b880 fatal: fix payload size, pm: take from application instead of applet 2019-01-24 08:33:06 -08:00
Michael Scire
031c9e545b fatal: reboot to sdmc:/atmosphere/reboot_payload.bin 2019-01-24 08:20:27 -08:00
Michael Scire
be5b58d033 fatal: Reboot to RCM if VOL is pressed instead of PWR. 2018-11-30 05:33:35 -08:00
Michael Scire
25956c4fa1 fatal: Print special message for version mistmatch. 2018-11-30 04:51:27 -08:00
Michael Scire
8054b2d219 Fatal: save auto-debug info to SD card. 2018-11-14 14:13:31 -08:00
Michael Scire
962fa0a690 fatal: automatically collect backtrace for callers. 2018-11-14 03:23:28 -08:00
Michael Scire
9714db14d2 fatal/creport: Add cpu context. 2018-11-13 20:22:54 -08:00
Michael Scire
50c65ea7e1 fatal: monospace start address 2018-11-13 19:33:21 -08:00
Michael Scire
98bdb2a7a3 fatal: Add fake monospace for hex output 2018-11-13 19:30:40 -08:00
Michael Scire
d4ee772714 fatal: Display start instead of bt if size = 0 2018-11-13 18:11:08 -08:00
Michael Scire
fa9d7f40fc fatal: Reorder error message lines. 2018-11-13 18:07:27 -08:00
Michael Scire
20026587fd fatal: Draw GPRs + Backtrace to screen. 2018-11-13 17:53:26 -08:00
Michael Scire
f16423c413 fatal: Add font scaling support 2018-11-13 14:32:50 -08:00
Michael Scire
1bface09d5 fatal: add line spacing func, improve 565->888 for blending 2018-11-13 13:28:05 -08:00
Michael Scire
560d899a9b Improve text rendering API, add ams version. 2018-11-13 13:11:41 -08:00
Michael Scire
8550f722ca fatal: Implement basic text rendering. 2018-11-13 06:03:30 -08:00
Michael Scire
9f6ff2ed6e Fatal: Implement basic background drawing. 2018-11-12 22:26:13 -08:00
Michael Scire
caf9d11c8c fatal: Finish CheckRepairStatus 2018-11-10 13:38:17 -08:00
Michael Scire
f7a7ce1847 fatal: Fix FatalType_ErrorReport fallthrough 2018-11-10 13:17:13 -08:00
Michael Scire
893bad0db2 fatal: Mostly implement CheckRepairStatus 2018-11-10 13:15:48 -08:00
Michael Scire
29833539bb fatal: Split out fatal from User, stub CheckRepairStatus 2018-11-10 12:56:43 -08:00
Michael Scire
f914edeebd fatal: Implement configuration based on settings 2018-11-10 12:38:24 -08:00
Michael Scire
5f3187300d fatal: Skeleton ScreenDrawing code 2018-11-10 11:59:55 -08:00
Michael Scire
5d5f8ad3d5 fatal: Finish StopSoundTask 2018-11-10 04:07:26 -08:00
Michael Scire
f8abd2b402 fatal: Implement the first half of StopSoundTask 2018-11-10 03:51:19 -08:00
Michael Scire
6335d21901 fatal: SleepThread takes ns, not ticks 2018-11-10 03:22:21 -08:00
Michael Scire
5649b6d63f fatal: Implement BacklightControlTask 2018-11-10 03:16:13 -08:00
Michael Scire
e96eaa3d7c fatal: Implement AdjustClockTask 2018-11-10 03:05:14 -08:00
Michael Scire
aa86d1abfa fatal: Implement PowerControlTask 2018-11-10 02:42:07 -08:00
Michael Scire
1228cd6903 fatal: misc cleanup, verified to reboot on hardware 2018-11-10 02:21:29 -08:00
Michael Scire
6f240b1665 fatal: Add missing bpcInitialize() call. 2018-11-10 01:47:02 -08:00
Michael Scire
13e5043d64 fatal: Implement PowerButtonObserveTask 2018-11-10 01:41:47 -08:00
Michael Scire
b771c42f7f fatal: Implement StateTransitionStopTask 2018-11-10 01:19:52 -08:00
Michael Scire
4d1481e2eb fatal: Write ErrorReportTask 2018-11-10 01:04:40 -08:00
Michael Scire
21b0f228b6 fatal: Skeleton tasks, write ThrowFatalImpl. 2018-11-10 00:54:12 -08:00
Michael Scire
b9091e9466 fatal: Implement fatal:p, fatal:u stub. 2018-11-10 00:11:38 -08:00