svc: populate namespace

This commit is contained in:
Michael Scire 2020-01-17 20:11:03 -08:00
parent 7806766a59
commit 3a91a6b786
23 changed files with 1258 additions and 273 deletions

View file

@ -137,13 +137,12 @@ namespace ams::spl::impl {
}
void InitializeDeviceAddressSpace() {
constexpr u64 DeviceName_SE = 29;
/* Create Address Space. */
R_ASSERT(svcCreateDeviceAddressSpace(&g_se_das_hnd, 0, (1ul << 32)));
/* Attach it to the SE. */
R_ASSERT(svcAttachDeviceAddressSpace(DeviceName_SE, g_se_das_hnd));
R_ASSERT(svcAttachDeviceAddressSpace(svc::DeviceName_Se, g_se_das_hnd));
const u64 work_buffer_addr = reinterpret_cast<u64>(g_work_buffer);
g_se_mapped_work_buffer_addr = WorkBufferMapBase + (work_buffer_addr % DeviceAddressSpaceAlign);