mirror of
https://github.com/Takiiiiiiii/strato.git
synced 2025-07-17 08:46:39 +00:00
Refactor the memory implementation and add Regions
This commit does a major refactor of the memory implementation, it forms a memory map which is far cleaner than trying to access it through a handle table lookup. In addition, it creates a common interface for all memory kernel objects: KMemory from which all other kernel memory objects inherit. This allows doing resizing, permission change, etc without casting to the base memory type.
This commit is contained in:
@ -32,7 +32,7 @@ namespace skyline::kernel::ipc {
|
||||
}
|
||||
}
|
||||
|
||||
for (uint index = 0; header->Xno > index; index++) {
|
||||
for (uint index = 0; header->xNo > index; index++) {
|
||||
auto bufX = reinterpret_cast<BufferDescriptorX *>(currPtr);
|
||||
if (bufX->Address()) {
|
||||
inputBuf.emplace_back(bufX);
|
||||
@ -41,7 +41,7 @@ namespace skyline::kernel::ipc {
|
||||
currPtr += sizeof(BufferDescriptorX);
|
||||
}
|
||||
|
||||
for (uint index = 0; header->Ano > index; index++) {
|
||||
for (uint index = 0; header->aNo > index; index++) {
|
||||
auto bufA = reinterpret_cast<BufferDescriptorABW *>(currPtr);
|
||||
if (bufA->Address()) {
|
||||
inputBuf.emplace_back(bufA);
|
||||
@ -50,7 +50,7 @@ namespace skyline::kernel::ipc {
|
||||
currPtr += sizeof(BufferDescriptorABW);
|
||||
}
|
||||
|
||||
for (uint index = 0; header->Bno > index; index++) {
|
||||
for (uint index = 0; header->bNo > index; index++) {
|
||||
auto bufB = reinterpret_cast<BufferDescriptorABW *>(currPtr);
|
||||
if (bufB->Address()) {
|
||||
outputBuf.emplace_back(bufB);
|
||||
@ -59,7 +59,7 @@ namespace skyline::kernel::ipc {
|
||||
currPtr += sizeof(BufferDescriptorABW);
|
||||
}
|
||||
|
||||
for (uint index = 0; header->Wno > index; index++) {
|
||||
for (uint index = 0; header->wNo > index; index++) {
|
||||
auto bufW = reinterpret_cast<BufferDescriptorABW *>(currPtr);
|
||||
if (bufW->Address()) {
|
||||
inputBuf.emplace_back(bufW, IpcBufferType::W);
|
||||
|
Reference in New Issue
Block a user