kern/test: add wip qemu-virt board support to mesosphere
This commit is contained in:
@@ -26,6 +26,11 @@
|
||||
return ::svcSetHeapSize(reinterpret_cast<void **>(out_address), size);
|
||||
}
|
||||
|
||||
ALWAYS_INLINE Result SetHeapSize(uintptr_t *out_address, ::ams::svc::Size size) {
|
||||
static_assert(sizeof(::ams::svc::Address) == sizeof(uintptr_t));
|
||||
return ::svcSetHeapSize(reinterpret_cast<void **>(out_address), size);
|
||||
}
|
||||
|
||||
ALWAYS_INLINE Result SetMemoryPermission(::ams::svc::Address address, ::ams::svc::Size size, ::ams::svc::MemoryPermission perm) {
|
||||
return ::svcSetMemoryPermission(reinterpret_cast<void *>(static_cast<uintptr_t>(address)), size, static_cast<u32>(perm));
|
||||
}
|
||||
|
||||
@@ -38,6 +38,8 @@ namespace ams {
|
||||
|
||||
namespace init {
|
||||
|
||||
void InitializeSystemModuleBeforeConstructors();
|
||||
|
||||
void InitializeSystemModule();
|
||||
void FinalizeSystemModule();
|
||||
|
||||
@@ -66,6 +68,9 @@ extern "C" void __libnx_initheap(void) {
|
||||
extern "C" void __appInit(void) {
|
||||
/* The very first thing all stratosphere code must do is initialize the os library. */
|
||||
::ams::hos::InitializeForStratosphere();
|
||||
|
||||
/* Perform pre-C++ constructor init. */
|
||||
::ams::init::InitializeSystemModuleBeforeConstructors();
|
||||
}
|
||||
|
||||
extern "C" void __appExit(void) {
|
||||
|
||||
@@ -17,6 +17,10 @@
|
||||
|
||||
namespace ams::init {
|
||||
|
||||
WEAK_SYMBOL void InitializeSystemModuleBeforeConstructors() {
|
||||
/* This should only be used in exceptional circumstances. */
|
||||
}
|
||||
|
||||
WEAK_SYMBOL void InitializeSystemModule() {
|
||||
/* TODO: What should we do here, if anything? */
|
||||
/* Nintendo does nndiagStartup(); nn::diag::InitializeSystemProcessAbortObserver(); */
|
||||
|
||||
Reference in New Issue
Block a user