Commit Graph

84 Commits

Author SHA1 Message Date
Michael Scire
0447aa67a5 hos: be a little friendlier about versioning 2020-06-14 22:54:12 -07:00
Michael Scire
bc653fa855 exo2: Initial work on the exosphere rewrite.
exo2: Implement uncompressor stub and boot code up to Main().

exo2: implement some more init (uart/gic)

exo2: implement more of init

exo2: improve reg api, add keyslot flag setters

exo2: implement se aes decryption/enc

exo2: fix bugs in loader stub/mmu mappings

exo2: start skeletoning bootconfig/global context types

arch: fix makefile flags

exo2: implement through master key derivation

exo2: implement device master keygen

exo2: more init through start of SetupSocSecurity

exo2: implement pmc secure scratch management

se: implement sticky bit validation

libexosphere: fix building for arm32

libexo: fix makefile flags

libexo: support building for arm64/arm

sc7fw: skeleton binary

sc7fw: skeleton a little more

sc7fw: implement all non-dram functionality

exo2: fix DivideUp error

sc7fw: implement more dram code, fix reg library errors

sc7fw: complete sc7fw impl.

exo2: skeleton the rest of SetupSocSecurity

exo2: implement fiq interrupt handler

exo2: implement all exception handlers

exo2: skeleton the entire smc api, implement the svc invoker

exo2: implement rest of SetupSocSecurity

exo2: correct slave security errors

exo2: fix register definition

exo2: minor fixes
2020-06-14 22:53:53 -07:00
Michael Scire
2944347060 fs: miscellaneous bucket tree fixes 2020-06-14 22:53:52 -07:00
Adubbz
797dfa782e ncm: implement firmware downgrading (#958)
* ncm: implement firmware downgrading

* ncm: make storage list const
2020-05-18 08:22:12 -07:00
Michael Scire
f3ae89aa2b os: use ported libnx mutex impl 2020-05-18 08:22:12 -07:00
Michael Scire
bbbe67937a nca-pr: update for c++20 2020-05-14 02:22:37 -07:00
SciresM
b38939adb5 Implement support for parsing/interacting with NCAs. (#942)
* fs: implement support for interacting with ncas.

* spl: extend to use virtual keyslots
2020-05-12 15:44:19 -07:00
SciresM
7d041e853d Switch atmosphere's build target to C++20. (#952)
* ams: update to build with gcc10/c++20

* remove mno-outline-atomics

* ams: take care of most TODO C++20s

* fusee/sept: update for gcc10

* whoosh, your code now uses pre-compiled headers

* make: dependency fixes
2020-05-12 15:44:19 -07:00
Michael Scire
0cc84d4c47 ams: use psc acknowledge_ex on 5.1.0+ (fixes wake-from-sleep on 5.1.0) 2020-05-12 15:44:18 -07:00
Michael Scire
1f35c699a7 ams: revamp target firmware 2020-05-12 15:44:18 -07:00
Michael Scire
b4442b1c20 ams:bpc: allow programatically setting reboot payload 2020-05-12 15:44:18 -07:00
Michael Scire
ea45d6e146 os: oh geez look at the time 2020-05-12 15:44:16 -07:00
Michael Scire
b7491393b2 dmnt: move stuff around slightly, add client bindings 2020-04-24 17:29:14 -07:00
SciresM
d2de74155d PRODINFO: Revamp blanking/write disallow policy. (#913)
* exo/fusee: hookup new prodinfo settings

* fusee: new scheme doesn't need FLAGS_DEFAULT

* fusee: fix c/p errors

* ams.mitm: completely revamp prodinfo backup mechanism

* ams.mitm: Implement revamped blanking/write policy

* strat: make early boot more debuggable

* exo: condense flag logic
2020-04-24 17:29:12 -07:00
Michael Scire
fb3b3f4a72 creport: Try to take screenshot of application crashes on 9.x+ 2020-04-24 17:29:12 -07:00
Michael Scire
716797efc5 erpt: fix access to time service on versions where it is disallowed 2020-04-24 17:29:11 -07:00
Michael Scire
2e18a27f3a os: bug fixes after re-review of rwlock code 2020-04-24 17:29:11 -07:00
Michael Scire
b8be9d0031 os: implement ReadWriteLock 2020-04-24 17:29:11 -07:00
Michael Scire
0c0762fc8f refactor jpegdec implementation into libstrat (thanks again, Behemoth!) 2020-04-24 17:29:10 -07:00
Michael Scire
18666a88c0 ams: centralize system thread definitions 2020-04-24 17:29:09 -07:00
Michael Scire
0de0f530f3 sf: properly support preservation of inline context 2020-04-24 17:29:08 -07:00
Michael Scire
5a52014d1c hos: change initialization API
This was needed to make stratosphere buildable with debugging on.

os:: assertions rely on GetCurrentThread() working, and this requires
the global os resource manager to be constructed. However, __appInit executes
before global constructors. We now require that hos::InitializeForStratosphere()
be called before anything else is done. This initializes the os resource manager,
sets the hos version for libnx, and may do more things in the future.

TODO: Consider replacing __appInit/__appExit with ams:: namespace functions in general,
and wrap them so that we guarantee hos::InitializeForStratosphere is called first, and
generally ensure a consistent stratosphere environment.
2020-04-24 17:29:08 -07:00
SciresM
c1fe12fcbd pgl: Reimplement the pgl sysmodule (#896)
* pgl: add skeleton folder to stratosphere

* pgl: Add service interface for IShellInterface

* pgl: begin skeletoning shell service, implement two commands.

* pgl: Implement three more commands.

* pgl: implement bool tracking commands

* pgl: Implement TriggerApplicationSnapShotDumper

* pgl: implement InitializeProcessControlTask

* pgl: Implement pgl::srv::Initialize

* pgl: Implement main()

* pgl: Implement (Get)ShellEventObserver

* pgl: implement LaunchProgramFromHost, GetHostContentMetaInfo

* pgl: Implement ProcessControlTask

* settings: fix duplicate object name

* pgl: fix minor bugs in impl
2020-04-16 20:05:56 -07:00
Michael Scire
e01ad57120 pgl: update with client C++ bindings 2020-04-16 20:05:55 -07:00
Michael Scire
ca8ebfa73c emummc: fix for svcQueryIoMapping abi change 2020-04-15 11:55:07 -07:00
Michael Scire
a253850abc ams: fix boot sysmodule/kernel for 10.0.0 2020-04-15 11:55:06 -07:00
Adubbz
345499c71e ncm: update to 10.0.0 (#879) 2020-04-15 11:55:06 -07:00
Michael Scire
a346fd5c94 boot2: update for 10.0.0 2020-04-15 11:55:03 -07:00
Michael Scire
04fd512153 pm: Update to support 10.0.0 2020-04-15 11:55:02 -07:00
Michael Scire
dd81610366 loader: update for 10.0.0 2020-04-15 11:55:02 -07:00
Michael Scire
c2017825e6 exosphere: update to support 10.0.0 2020-04-15 11:55:01 -07:00
Michael Scire
c190d46343 hos::Version: rename enum members 2020-04-15 11:55:01 -07:00
SciresM
78653041d4 erpt: reimplement the sysmodule (#875)
* erpt: reimplement the sysmodule

* fatal: update for latest bindings

* erpt: amend logic for culling orphan attachments
2020-04-15 11:55:01 -07:00
Michael Scire
a0cddf7c06 os: refactor/rewrite entire namespace. 2020-04-15 11:54:59 -07:00
Michael Scire
801a461c6c fs: Implement AesXtsStorage 2020-04-06 17:44:36 -07:00
Michael Scire
aa9523f385 fs: correct error result in AesCtrStorage 2020-04-06 17:44:36 -07:00
Michael Scire
2319e4a450 fs: add AesCtrStorage 2020-04-06 17:44:35 -07:00
Michael Scire
cd0c4af60c fs: implement PooledBuffer 2020-04-06 17:44:35 -07:00
Michael Scire
e5f02531a4 fs: implement system heap 2020-04-06 17:44:35 -07:00
Michael Scire
442d5cf711 fssystem: add RomFsFileSystem 2020-04-05 23:25:44 -07:00
Adubbz
6e8ea3aafd NCM client implementation (#858)
* ncm: Implement InstallTaskDataBase and FileInstallTaskData

* ncm: minor bugfixes

* ncm: Implemented MemoryInstallTaskData

* ncm: more std

* ncm: begin implementing install task base

* ncm: move protected funcs

* ncm: fix recursive include

* ncm: more install task progress

* ncm install task: implement IncrementProgress and update UpdateThroughputMeasurement

* ncm: more work

* ncm client: more progress

* ncm client: more progress

* ncm client: finish implementing GetContentMetaInfoList

* ncm client: more progress

* ncm client: finished InstallTaskBase

* ncm client: implement PackageInstallTaskBase

* ncm client: fixes

* ncm: improve accuracy

* ncm client: implement PackageInstallTask

* ncm client: implement PackageSystemUpdateTask

* ncm client: minor name tweaks

* ncm client: implement SubmissionPackageInstallTask

* ncm client: add missing this to SubmissionPackageInstallTask

* ncm client: add missing nullptr check to SubmissionPackageInstallTask destructor

* ncm client: SubmissionPackageInstallTask fixes

* ncm: fix forward declarations

* ncm client: added simplified funcs

* ncm: cleanup client code

* ncm: fix bug introduced by cleanup

* ncm: fix typo

* ncm: implement correct ReadVariationContentMetaInfoList behavior

* ncm: correct InstallContentMetaWriter ctor

* ncm: correct conversion of content meta header types

Co-authored-by: Michael Scire <SciresM@gmail.com>
2020-04-05 23:25:44 -07:00
Michael Scire
0f46474dde fs: add an extension common name generator for sd card 2020-03-31 22:37:23 -07:00
Michael Scire
a40d4593d7 nim: add DestroySystemUpdateTask/ListSystemUpdateTask 2020-03-31 12:53:48 -07:00
Michael Scire
63d5df84e6 updater: improve api 2020-03-30 20:41:22 -07:00
Michael Scire
bb6b72f1f3 lmem: fix memory block header placement error 2020-03-30 20:41:21 -07:00
Michael Scire
ec527bc460 ncm: use static memory pools for different allocations 2020-03-30 20:41:21 -07:00
SciresM
926d5a55d6 mem: implement most of StandardAllocator (#860)
This was tested using `https://github.com/node-dot-cpp/alloc-test` plus a few other by-hand tests.

It seems to work for the case we care about (sysmodules without thread cache-ing).

External users are advised to build with assertions on and contact SciresM if you find issues.

This is a lot of code to have gotten right in one go, and it was written mostly after midnight while sick, so there are probably un-noticed issues.
2020-03-30 20:41:21 -07:00
Michael Scire
6f77a6bf65 fs: add MountImageDirectory 2020-03-27 17:00:14 -07:00
Adubbz
4bf56b3088 fs: implement FileHandleStorage (#857)
* fs: implement FileHandleStorage

* fs: merge FileHandleStorage into file_storage TU

Co-authored-by: Michael Scire <SciresM@gmail.com>
2020-03-27 17:00:14 -07:00
Adubbz
abc0e93763 fssystem: Implement PartitionFileSystemCore (#856)
* fssystem: implement PartitionFileSystemMetaCore

* fssystem: PartitionFileSystemMetaCore cleanup

* fs: add IFile::DryWrite, update results

* fssystem: implement PartitionFileSystemCore

* fssystem: cleanup PartitionFileSystemCore

* fssystem: implement Sha256PartitionFileSystem

Co-authored-by: Michael Scire <SciresM@gmail.com>
2020-03-27 17:00:14 -07:00