mirror of
https://git.eden-emu.dev/archive/citron
synced 2026-04-14 00:30:51 -04:00
chore: update project branding to CITRON
Signed-off-by: Zephyron <zephyron@citron-emu.org>
This commit is contained in:
@@ -23,7 +23,7 @@ namespace {
|
||||
|
||||
Result AllocateSharedBufferMemory(std::unique_ptr<Kernel::KPageGroup>* out_page_group,
|
||||
Core::System& system, u32 size) {
|
||||
using Core::Memory::YUZU_PAGESIZE;
|
||||
using Core::Memory::CITRON_PAGESIZE;
|
||||
|
||||
// Allocate memory for the system shared buffer.
|
||||
auto& kernel = system.Kernel();
|
||||
@@ -34,7 +34,7 @@ Result AllocateSharedBufferMemory(std::unique_ptr<Kernel::KPageGroup>* out_page_
|
||||
|
||||
// Allocate memory from secure pool.
|
||||
R_TRY(kernel.MemoryManager().AllocateAndOpen(
|
||||
pg.get(), size / YUZU_PAGESIZE,
|
||||
pg.get(), size / CITRON_PAGESIZE,
|
||||
Kernel::KMemoryManager::EncodeOption(Kernel::KMemoryManager::Pool::Secure,
|
||||
Kernel::KMemoryManager::Direction::FromBack)));
|
||||
|
||||
@@ -58,13 +58,13 @@ Result AllocateSharedBufferMemory(std::unique_ptr<Kernel::KPageGroup>* out_page_
|
||||
Result MapSharedBufferIntoProcessAddressSpace(Common::ProcessAddress* out_map_address,
|
||||
std::unique_ptr<Kernel::KPageGroup>& pg,
|
||||
Kernel::KProcess* process, Core::System& system) {
|
||||
using Core::Memory::YUZU_PAGESIZE;
|
||||
using Core::Memory::CITRON_PAGESIZE;
|
||||
|
||||
auto& page_table = process->GetPageTable();
|
||||
|
||||
// Get bounds of where mapping is possible.
|
||||
const VAddr alias_code_begin = GetInteger(page_table.GetAliasCodeRegionStart());
|
||||
const VAddr alias_code_size = page_table.GetAliasCodeRegionSize() / YUZU_PAGESIZE;
|
||||
const VAddr alias_code_size = page_table.GetAliasCodeRegionSize() / CITRON_PAGESIZE;
|
||||
const auto state = Kernel::KMemoryState::IoMemory;
|
||||
const auto perm = Kernel::KMemoryPermission::UserReadWrite;
|
||||
std::mt19937_64 rng{process->GetRandomEntropy(0)};
|
||||
@@ -73,7 +73,7 @@ Result MapSharedBufferIntoProcessAddressSpace(Common::ProcessAddress* out_map_ad
|
||||
Result res = ResultSuccess;
|
||||
int i;
|
||||
for (i = 0; i < 64; i++) {
|
||||
*out_map_address = alias_code_begin + ((rng() % alias_code_size) * YUZU_PAGESIZE);
|
||||
*out_map_address = alias_code_begin + ((rng() % alias_code_size) * CITRON_PAGESIZE);
|
||||
res = page_table.MapPageGroup(*out_map_address, *pg, state, perm);
|
||||
if (R_SUCCEEDED(res)) {
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user