Commit Graph

20 Commits

Author SHA1 Message Date
joevt
5412fbc198 Remove superfluous semicolons. 2025-06-27 19:01:14 -07:00
joevt
fa865a79fc memctrlbase: Log mirror range.
Because it may differ from the range of the region it points to.
2025-04-14 06:06:42 -07:00
joevt
71990129f3 memctrlbase: Remove region by entry. 2025-04-12 08:38:32 -07:00
Maxim Poliakovski
2a3e46eab4 memctrlbase: overload add_ram_region()
to accept externally allocated memory.
2025-04-01 03:05:46 +02:00
joevt
83066bbf5f memctrlbase: Return entry instead of bool. 2025-03-24 07:29:31 -07:00
dingusdev
08f67c010c Add get_type_str + get_entry+str
Co-Authored-By: joevt <950609+joevt@users.noreply.github.com>
2025-03-14 10:43:37 -07:00
joevt
cf0d78fe98 debugger: add regions command.
To dump the list of memory regions.
2025-03-14 10:31:57 -07:00
Mihai Parparita
9b49603c72 memctrl: keep address_map sorted by address
We do a linear scan in find_range (which is called on all TLB misses) to
find the entries. The largest and most frequently hit entry is the
system memory (which starts at 0). By ensuring that it's the first entry
in the list, we end up only doing one iteration through the loop.
2024-07-28 13:27:48 -07:00
Maxim Poliakovski
e722ef3e8a memctrlbase: add get_region_hostmem_ptr(). 2024-04-21 23:04:12 +02:00
joevt
9ade14e076 memctrlbase: fix possible memory leak. 2024-03-27 14:08:20 +01:00
Maxim Poliakovski
8e19164977 memctrlbase: introduce add_mem_mirror_common(). 2024-03-26 00:39:33 +01:00
Maxim Poliakovski
ab60bb8d0b memctrlbase: cosmetic improvements. 2024-03-26 00:39:33 +01:00
joevt
9a26016ed4 memctrlbase: Clear RAM to zero. 2024-03-08 20:58:41 -07:00
Mihai Parparita
35c86ad6bf Clean up #includes
Result of running IWYU (https://include-what-you-use.org/) and
applying most of the suggestions about unncessary includes and
forward declarations.

Was motivated by observing that <thread> was being included in
ppcopcodes.cpp even though it was unused (found while researching
the use of threads), but seems generally good to help with build
times and correctness.
2023-11-03 00:33:47 -07:00
Maxim Poliakovski
299f0d3a9f Accept 1MB New World Boot ROMs. 2023-02-15 02:36:40 +01:00
Maxim Poliakovski
8d01440558 Improve previous (cosmetics & code duplication). 2023-01-11 23:36:16 +01:00
joevt
52fa30b71d Add ability to unregister mmio region.
mmio regions are registered when a PCI BAR is set. Add the ability to reverse that - for when a PCI BAR is changed.
2023-01-11 00:05:23 -08:00
joevt
911acb4bc2 Remove MPC106 RAM allocation failed error.
It might not be an error - usually it just means that it was already allocated so demote this message to a warning.

Related memory allocation changes:
- Added find_range_exact which searches for an allocation that exactly matches a range.
- Added find_range_contains which searches for an allocation that is completely contained within a range.
- Added find_range_overlaps which searches for an allocation that overlaps any part of a range.
- Added is_range_free which is similar to the above three. It returns false if any allocated range overlaps a range. It reports the regions that it overlaps.
- Fix add_mem_region and add_memio_region so that they don't just check the first byte and last byte.
- Memory allocation logging should include the range (first byte..last byte) and device if possible.
- Log memory allocations.
2023-01-11 00:05:23 -08:00
Maxim Poliakovski
c0cd6eb38f Add missing licence headers, update license date. 2021-10-23 21:00:31 +02:00
Maxim Poliakovski
9329d56d83 Move devices into dedicated subdirectories. 2021-10-23 20:17:47 +02:00