diff options
| author | 2021-05-30 23:21:39 -0700 | |
|---|---|---|
| committer | 2021-05-30 23:21:39 -0700 | |
| commit | f34176996e443cb79bd70ea2c72feeabac2b1430 (patch) | |
| tree | b1c649a914bd136248782a371202ab314bf18939 /src/common/page_table.h | |
| parent | Merge pull request #6344 from german77/update-libusb (diff) | |
| parent | core/memory: Check our memory fallbacks for out-of-bound behavior. (diff) | |
| download | yuzu-f34176996e443cb79bd70ea2c72feeabac2b1430.tar.gz yuzu-f34176996e443cb79bd70ea2c72feeabac2b1430.tar.xz yuzu-f34176996e443cb79bd70ea2c72feeabac2b1430.zip | |
Merge pull request #6385 from degasus/save_memory_access
core/memory: Check our memory fallbacks for out-of-bound behavior.
Diffstat (limited to 'src/common/page_table.h')
| -rw-r--r-- | src/common/page_table.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/common/page_table.h b/src/common/page_table.h index 61c5552e0..e92b66b2b 100644 --- a/src/common/page_table.h +++ b/src/common/page_table.h | |||
| @@ -98,6 +98,10 @@ struct PageTable { | |||
| 98 | */ | 98 | */ |
| 99 | void Resize(size_t address_space_width_in_bits, size_t page_size_in_bits); | 99 | void Resize(size_t address_space_width_in_bits, size_t page_size_in_bits); |
| 100 | 100 | ||
| 101 | size_t GetAddressSpaceBits() const { | ||
| 102 | return current_address_space_width_in_bits; | ||
| 103 | } | ||
| 104 | |||
| 101 | /** | 105 | /** |
| 102 | * Vector of memory pointers backing each page. An entry can only be non-null if the | 106 | * Vector of memory pointers backing each page. An entry can only be non-null if the |
| 103 | * corresponding attribute element is of type `Memory`. | 107 | * corresponding attribute element is of type `Memory`. |
| @@ -105,6 +109,8 @@ struct PageTable { | |||
| 105 | VirtualBuffer<PageInfo> pointers; | 109 | VirtualBuffer<PageInfo> pointers; |
| 106 | 110 | ||
| 107 | VirtualBuffer<u64> backing_addr; | 111 | VirtualBuffer<u64> backing_addr; |
| 112 | |||
| 113 | size_t current_address_space_width_in_bits; | ||
| 108 | }; | 114 | }; |
| 109 | 115 | ||
| 110 | } // namespace Common | 116 | } // namespace Common |