Finish Linux x86_64 build

This commit is contained in:
2025-02-10 00:00:38 +08:00
parent bc3c5a8f9d
commit 6c60067ba7
301 changed files with 30720 additions and 1048 deletions

View File

@@ -182,7 +182,7 @@ void Process::ParseKernelCaps(const u32* kernel_caps, std::size_t len) {
// Mapped memory page
AddressMapping mapping;
mapping.address = descriptor << 12;
mapping.size = Memory::CITRA_PAGE_SIZE;
mapping.size = Memory::LUCINA3DS_PAGE_SIZE;
mapping.read_only = false;
mapping.unk_flag = false;
@@ -459,7 +459,7 @@ ResultVal<VAddr> Process::AllocateThreadLocalStorage() {
auto base_memory_region = kernel.GetMemoryRegion(MemoryRegion::BASE);
// Allocate some memory from the end of the linear heap for this region.
auto offset = base_memory_region->LinearAllocate(Memory::CITRA_PAGE_SIZE);
auto offset = base_memory_region->LinearAllocate(Memory::LUCINA3DS_PAGE_SIZE);
if (!offset) {
LOG_ERROR(Kernel_SVC,
"Not enough space in BASE linear region to allocate a new TLS page");
@@ -467,17 +467,17 @@ ResultVal<VAddr> Process::AllocateThreadLocalStorage() {
}
holding_tls_memory +=
MemoryRegionInfo::Interval(*offset, *offset + Memory::CITRA_PAGE_SIZE);
memory_used += Memory::CITRA_PAGE_SIZE;
MemoryRegionInfo::Interval(*offset, *offset + Memory::LUCINA3DS_PAGE_SIZE);
memory_used += Memory::LUCINA3DS_PAGE_SIZE;
// The page is completely available at the start.
tls_slots.emplace_back(0);
// Map the page to the current process' address space.
auto tls_page_addr =
Memory::TLS_AREA_VADDR + static_cast<VAddr>(tls_page) * Memory::CITRA_PAGE_SIZE;
Memory::TLS_AREA_VADDR + static_cast<VAddr>(tls_page) * Memory::LUCINA3DS_PAGE_SIZE;
vm_manager.MapBackingMemory(tls_page_addr, kernel.memory.GetFCRAMRef(*offset),
Memory::CITRA_PAGE_SIZE, MemoryState::Locked);
Memory::LUCINA3DS_PAGE_SIZE, MemoryState::Locked);
LOG_DEBUG(Kernel, "Allocated TLS page at addr={:08X}", tls_page_addr);
} else {
@@ -488,7 +488,7 @@ ResultVal<VAddr> Process::AllocateThreadLocalStorage() {
tls_slots[tls_page].set(tls_slot);
auto tls_address = Memory::TLS_AREA_VADDR +
static_cast<VAddr>(tls_page) * Memory::CITRA_PAGE_SIZE +
static_cast<VAddr>(tls_page) * Memory::LUCINA3DS_PAGE_SIZE +
static_cast<VAddr>(tls_slot) * Memory::TLS_ENTRY_SIZE;
kernel.memory.ZeroBlock(*this, tls_address, Memory::TLS_ENTRY_SIZE);