Commit Graph

107 Commits

Author SHA1 Message Date
Michael Scire
03d0fd0f62 kern: refactor init (kill identity map, merge cpu on logic) 2023-02-23 09:00:31 -07:00
Michael Scire
913710ddf3 kern: update KSystemControl::InitializePhase1, dynamically scale 39-bit address space regions 2023-02-23 09:00:30 -07:00
Michael Scire
2a651f73c9 kern: adjust pool allocations 2023-02-23 09:00:29 -07:00
Michael Scire
5f3af914d8 kern/pm: only steal 8 MB from applet.
WebApplet crashes on exit with 16 more MB stolen, apparently.
2023-02-23 09:00:25 -07:00
Michael Scire
be7700023b romfs: thank you fire emblem, very cool (closes #2021) 2023-01-24 14:39:20 -07:00
Michael Scire
9fc57cbbbb kern: move SecureAppletMemory/KPageBuffer heap into the ResourceRegion 2022-10-12 09:15:50 -07:00
Michael Scire
cfe81a7eb3 kern: update for new device map semantics 2022-10-12 09:15:49 -07:00
Michael Scire
8ca94db643 kern: implement K(Secure)SystemResource 2022-10-12 09:15:48 -07:00
Michael Scire
d066ac3d69 kern: update for new hw maintenance semantics 2022-03-23 09:16:06 -07:00
Michael Scire
8bbfe8d277 kern: enforce maximum secure region size 2022-03-23 09:16:04 -07:00
SciresM
00203fd7c3 Integrate new result macros. (#1780)
* result: try out some experimental shenanigans

* result: sketch out some more shenanigans

* result: see what it looks like to convert kernel to use result conds instead of guards

* make rest of kernel use experimental new macro-ing
2022-03-23 09:15:40 -07:00
Michael Scire
a1b462adda kern: fix vi devicename missing in HsSupported device list 2022-01-19 16:28:54 -08:00
Léo Lam
2916512fb7 Minor header fixes to reduce parsing issues with Clang (#1700)
* Work around Clang's incomplete C++20 support for omitting typename

* vapours: fix Clang error about missing return in constexpr function

* stratosphere: fix call to non-constexpr strlen in constexpr function

strlen being constexpr is a non-compliant GCC extension; Clang
explicitly rejects it: https://reviews.llvm.org/D23692

* stratosphere: add a bunch of missing override specifiers

* stratosphere: work around Clang consteval bug

Minimal example: https://godbolt.org/z/MoM64v93M

The issue seems to be that Clang does not consider f(x) to be a
constant expression if x comes from a template argument that isn't
a non-type auto template argument (???)

We can work around this by relaxing GetMessageHeaderForCheck (by using
constexpr instead of consteval). This produces no functional changes
because the result of GetMessageHeaderForCheck() is assigned to a
constexpr variable, so the result is guaranteed to be computed
at compile-time.

* stratosphere: fix missing require clauses in definitions

GCC not requiring the require clauses to be repeated for member
definitions is actually a compiler bug:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96830

Clang rejects declarations with missing require clauses.

* Fix ALWAYS_INLINE_LAMBDA and parameter list relative order

While GCC doesn't seem to care about the position of the always_inline
attribute relative to the parameter list, Clang is very picky
and requires the attribute to appear after the parameter list
(and before a trailing return type)

* stratosphere: fix static constexpr member variable with incomplete type

GCC accepts this for some reason (because of the lambda?) but Clang
correctly rejects this.
2021-11-30 16:34:43 -08:00
Michael Scire
610e99b277 kern: audit (and fix) our hardware maintenance instructions to match official kernel 2021-10-27 22:57:18 -07:00
Michael Scire
3304c91dae kern: add (and use) generic KSystemControlBase 2021-10-26 01:11:18 -07:00
Michael Scire
194e58a3e3 kern/test: add wip qemu-virt board support to mesosphere 2021-10-26 01:11:16 -07:00
Michael Scire
d3ad53a525 kern: devirtualize remaining vcall for class token/dyncast 2021-10-26 01:11:13 -07:00
SciresM
823c0df6b9 kern: avoid constexpr init for many objects (avoids unnecessary memory clear) (#1668) 2021-10-26 01:11:13 -07:00
Michael Scire
5c32ec11ea strat: refactor address taking of form &var[...] 2021-10-15 23:54:34 -07:00
Michael Scire
002422d5dc ams: the copyright^H^H^H^H^H^H^Hmplex plane is the algebraic closure of the reals 2021-10-07 23:06:25 -07:00
Michael Scire
ecb607bade kern/svc: implement IoPool/Region svc support 2021-09-19 10:35:39 -07:00
Michael Scire
b579a6d75e svc/kern/dd: remove MapDeviceAddressSpace() 2021-09-19 10:35:39 -07:00
Michael Scire
3e328eae72 kern: update Initialize0 for new arguments/randomization semantics 2021-09-19 10:35:38 -07:00
Michael Scire
f103b6876b kern: KMemoryManager/KPageGroup use physical addresses instead of virtual, now 2021-09-19 10:35:38 -07:00
Michael Scire
1ac249dd13 kern: support dynamic resource expansion for system heaps/events/sessions. 2021-09-19 10:35:38 -07:00
Michael Scire
1b378d8eb1 exo/daybreak: advertise (and check against) supported hos version 2021-08-20 13:34:00 -07:00
Michael Scire
2a98931260 kern: fix handling of is_aligned parameter in DevicePageTable 2021-07-06 07:28:32 -07:00
Michael Scire
e238fa426d kern: mostly kill magic numbers in assembly, fix SVCs >= 0x80 2021-04-29 03:04:51 -07:00
Michael Scire
e9d44eb71a kern: fuck the KPolice^H^H^H^H^H^HPageGroups 2021-04-11 03:59:20 -07:00
Michael Scire
94dce392ff kern: update KLightConditionVariable 2021-04-11 03:59:17 -07:00
Michael Scire
400137d06b kern: reallocate pool distributions for 8GB units 2021-04-11 03:59:16 -07:00
Michael Scire
0357a98972 kern: simplify global rng initialization 2021-04-11 03:59:15 -07:00
Michael Scire
cf19a7b64d kern: load initial process binary from user pool, rather than from pt heap 2021-04-11 03:59:15 -07:00
Michael Scire
e2f21cbd84 kern: swap tpidr_el1/cntv_cval_el0 as scratch vs exception stack 2021-04-11 03:59:11 -07:00
Michael Scire
ec7e3fb07f kern: update process/thread for new running/termination semantics 2021-04-11 03:59:10 -07:00
Michael Scire
c766cc8347 kern: Increase reserved system memory, require mesosphere for htc/tma 2021-04-11 03:58:54 -07:00
Michael Scire
a8d1eab91a meso: update for new fatal encoding 2021-02-02 12:16:29 -08:00
Michael Scire
b3eef9315b kern: further codegen tweaks 2021-01-13 10:41:27 -08:00
Michael Scire
ca5e69f16d kern: greatly improve codegen for atomics, scheduler 2021-01-13 10:41:26 -08:00
Michael Scire
4ddacf3384 kern: refactor to use m_ for member variables 2020-12-19 10:21:52 -08:00
Michael Scire
3355f97275 exo/meso/fusee: support dynamic control of log port/baud rate 2020-12-11 03:48:58 -08:00
Michael Scire
9c3e45a856 kern: fix reboot to fatal error 2020-12-03 12:48:16 -08:00
Michael Scire
7abc665807 kern: fix copy/paste error 2020-12-02 06:53:19 -08:00
Michael Scire
9d51004a9b kern: fix bugs caused by UB + transition to -Os 2020-12-02 06:53:19 -08:00
Michael Scire
0eb6e0a963 kern: add new overflow checks on KMemoryRegions 2020-12-02 06:53:17 -08:00
Michael Scire
0e6ed3b71b kern: fix sleep save/resume for new x18/tpidr scheme 2020-12-02 06:53:13 -08:00
Michael Scire
b0c96b3bb6 kern: fix race-crash on interrupt controller save, improve fatal output 2020-12-02 06:53:13 -08:00
Michael Scire
0c73792282 kern: Kill KCoreLocalRegion 2020-12-02 06:53:12 -08:00
Michael Scire
396dc066e9 kern: KMemoryManager::Allocate -> AllocateAndOpen 2020-12-02 06:53:09 -08:00
SciresM
791b402320 sdmmc: implement driver suitable for fs + bootloader
* sdmmc: begin skeletoning sdmmc driver

* sdmmc: add most of SdHostStandardController

* sdmmc: implement most of SdmmcController

* sdmmc: Sdmmc2Controller

* sdmmc: skeleton implementation of Sdmmc1Controller

* sdmmc: complete abstract logic for Sdmmc1 power controller

* sdmmc: implement gpio handling for sdmmc1-register-control

* sdmmc: implement pinmux handling for sdmmc1-register-control

* sdmmc: fix building for arm32 and in stratosphere context

* sdmmc: implement voltage enable/set for sdmmc1-register-control

* util: move T(V)SNPrintf from kernel to util

* sdmmc: implement BaseDeviceAccessor

* sdmmc: implement MmcDeviceAccessor

* sdmmc: implement clock reset controller for register api

* sdmmc: fix bug in WaitWhileCommandInhibit, add mmc accessors

* exo: add sdmmc test program

* sdmmc: fix speed mode extension, add CheckMmcConnection for debug

* sdmmc: add DeviceDetector, gpio: implement client api

* gpio: modernize client api instead of doing it the lazy way

* sdmmc: SdCardDeviceAccessor impl

* sdmmc: update test program to read first two sectors of sd card

* sdmmc: fix vref sel

* sdmmc: finish outward-facing api (untested)

* ams: changes for libvapours including tegra register defs

* sdmmc: remove hwinit
2020-12-02 06:52:42 -08:00