diff options
Diffstat (limited to 'src/core/memory.cpp')
| -rw-r--r-- | src/core/memory.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/core/memory.cpp b/src/core/memory.cpp index 103ff0b77..190ccc25c 100644 --- a/src/core/memory.cpp +++ b/src/core/memory.cpp | |||
| @@ -44,7 +44,7 @@ PageTable* GetCurrentPageTable() { | |||
| 44 | 44 | ||
| 45 | static void MapPages(PageTable& page_table, VAddr base, u64 size, u8* memory, PageType type) { | 45 | static void MapPages(PageTable& page_table, VAddr base, u64 size, u8* memory, PageType type) { |
| 46 | LOG_DEBUG(HW_Memory, "Mapping {} onto {:016X}-{:016X}", fmt::ptr(memory), base * PAGE_SIZE, | 46 | LOG_DEBUG(HW_Memory, "Mapping {} onto {:016X}-{:016X}", fmt::ptr(memory), base * PAGE_SIZE, |
| 47 | (base + size) * PAGE_SIZE); | 47 | (base + size) * PAGE_SIZE); |
| 48 | 48 | ||
| 49 | RasterizerFlushVirtualRegion(base << PAGE_BITS, size * PAGE_SIZE, | 49 | RasterizerFlushVirtualRegion(base << PAGE_BITS, size * PAGE_SIZE, |
| 50 | FlushMode::FlushAndInvalidate); | 50 | FlushMode::FlushAndInvalidate); |
| @@ -206,7 +206,7 @@ void Write(const VAddr vaddr, const T data) { | |||
| 206 | switch (type) { | 206 | switch (type) { |
| 207 | case PageType::Unmapped: | 207 | case PageType::Unmapped: |
| 208 | LOG_ERROR(HW_Memory, "Unmapped Write{} 0x{:08X} @ 0x{:016X}", sizeof(data) * 8, | 208 | LOG_ERROR(HW_Memory, "Unmapped Write{} 0x{:08X} @ 0x{:016X}", sizeof(data) * 8, |
| 209 | static_cast<u32>(data), vaddr); | 209 | static_cast<u32>(data), vaddr); |
| 210 | return; | 210 | return; |
| 211 | case PageType::Memory: | 211 | case PageType::Memory: |
| 212 | ASSERT_MSG(false, "Mapped memory page without a pointer @ {:016X}", vaddr); | 212 | ASSERT_MSG(false, "Mapped memory page without a pointer @ {:016X}", vaddr); |
| @@ -349,8 +349,8 @@ void RasterizerMarkRegionCached(Tegra::GPUVAddr gpu_addr, u64 size, bool cached) | |||
| 349 | // The GPU <-> CPU virtual memory mapping is not 1:1 | 349 | // The GPU <-> CPU virtual memory mapping is not 1:1 |
| 350 | if (!maybe_vaddr) { | 350 | if (!maybe_vaddr) { |
| 351 | LOG_ERROR(HW_Memory, | 351 | LOG_ERROR(HW_Memory, |
| 352 | "Trying to flush a cached region to an invalid physical address {:016X}", | 352 | "Trying to flush a cached region to an invalid physical address {:016X}", |
| 353 | gpu_addr); | 353 | gpu_addr); |
| 354 | continue; | 354 | continue; |
| 355 | } | 355 | } |
| 356 | VAddr vaddr = *maybe_vaddr; | 356 | VAddr vaddr = *maybe_vaddr; |
| @@ -485,8 +485,8 @@ void ReadBlock(const Kernel::Process& process, const VAddr src_addr, void* dest_ | |||
| 485 | switch (page_table.attributes[page_index]) { | 485 | switch (page_table.attributes[page_index]) { |
| 486 | case PageType::Unmapped: { | 486 | case PageType::Unmapped: { |
| 487 | LOG_ERROR(HW_Memory, | 487 | LOG_ERROR(HW_Memory, |
| 488 | "Unmapped ReadBlock @ 0x{:016X} (start address = 0x{:016X}, size = {})", | 488 | "Unmapped ReadBlock @ 0x{:016X} (start address = 0x{:016X}, size = {})", |
| 489 | current_vaddr, src_addr, size); | 489 | current_vaddr, src_addr, size); |
| 490 | std::memset(dest_buffer, 0, copy_amount); | 490 | std::memset(dest_buffer, 0, copy_amount); |
| 491 | break; | 491 | break; |
| 492 | } | 492 | } |
| @@ -549,8 +549,8 @@ void WriteBlock(const Kernel::Process& process, const VAddr dest_addr, const voi | |||
| 549 | switch (page_table.attributes[page_index]) { | 549 | switch (page_table.attributes[page_index]) { |
| 550 | case PageType::Unmapped: { | 550 | case PageType::Unmapped: { |
| 551 | LOG_ERROR(HW_Memory, | 551 | LOG_ERROR(HW_Memory, |
| 552 | "Unmapped WriteBlock @ 0x{:016X} (start address = 0x{:016X}, size = {})", | 552 | "Unmapped WriteBlock @ 0x{:016X} (start address = 0x{:016X}, size = {})", |
| 553 | current_vaddr, dest_addr, size); | 553 | current_vaddr, dest_addr, size); |
| 554 | break; | 554 | break; |
| 555 | } | 555 | } |
| 556 | case PageType::Memory: { | 556 | case PageType::Memory: { |
| @@ -597,8 +597,8 @@ void ZeroBlock(const Kernel::Process& process, const VAddr dest_addr, const size | |||
| 597 | switch (page_table.attributes[page_index]) { | 597 | switch (page_table.attributes[page_index]) { |
| 598 | case PageType::Unmapped: { | 598 | case PageType::Unmapped: { |
| 599 | LOG_ERROR(HW_Memory, | 599 | LOG_ERROR(HW_Memory, |
| 600 | "Unmapped ZeroBlock @ 0x{:016X} (start address = 0x{:016X}, size = {})", | 600 | "Unmapped ZeroBlock @ 0x{:016X} (start address = 0x{:016X}, size = {})", |
| 601 | current_vaddr, dest_addr, size); | 601 | current_vaddr, dest_addr, size); |
| 602 | break; | 602 | break; |
| 603 | } | 603 | } |
| 604 | case PageType::Memory: { | 604 | case PageType::Memory: { |
| @@ -638,8 +638,8 @@ void CopyBlock(const Kernel::Process& process, VAddr dest_addr, VAddr src_addr, | |||
| 638 | switch (page_table.attributes[page_index]) { | 638 | switch (page_table.attributes[page_index]) { |
| 639 | case PageType::Unmapped: { | 639 | case PageType::Unmapped: { |
| 640 | LOG_ERROR(HW_Memory, | 640 | LOG_ERROR(HW_Memory, |
| 641 | "Unmapped CopyBlock @ 0x{:016X} (start address = 0x{:016X}, size = {})", | 641 | "Unmapped CopyBlock @ 0x{:016X} (start address = 0x{:016X}, size = {})", |
| 642 | current_vaddr, src_addr, size); | 642 | current_vaddr, src_addr, size); |
| 643 | ZeroBlock(process, dest_addr, copy_amount); | 643 | ZeroBlock(process, dest_addr, copy_amount); |
| 644 | break; | 644 | break; |
| 645 | } | 645 | } |