Commit Graph
19 Commits
Author SHA1 Message Date
joevt 811951ab91 memctrlbase: Add enums for larger DIMMs. 2026-06-17 07:03:21 -07:00
joevt 54a1eb49f7 ppcmmu: Add a debug version of mmu_map_dma_mem.
This is for the DPPC debugger, not for debugging DPPC.
2026-06-02 20:34:26 -07:00
Rairii 09c1248be7 CPU and memory controller endian changes.
===============
Rairii changes:

memctrlbase: The memory controller may have an endian swap mode.
mpc106: Only mmio regions need endian swap and only if PCIR_LE_MODE is
set.

videoctrl: Add framebuffer_in_main_memory flag. Use needs_swap_endian.

debugger: Fix disasm for little endian mode.

ppcmmu: little endian mode requires munging of the data and instruction
addresses, affecting the 3 least significant bits.

ppcexec: pc_real is always recalculated during little endian mode
because instructions are swapped every 8 bytes (due to the address
munging).

==============
joevt changes:

Add SUPPORTS_MEMORY_CTRL_ENDIAN_MODE for memory controller.
Use cmake -DDPPC_SUPPORT_PPC_LE=ON to enable.

Add SUPPORTS_PPC_LITTLE_ENDIAN_MODE for CPU.
Use cmake -DDPPC_SUPPORT_MEM_LE=ON to enable.

Add ppc_change_endian to handle endian switch for MPC601 (uses HID0
instead of MSR) and later PPC CPUs.

Add is_LE flag to ppc_state to indicate little endian mode for all
processor versions.

Create separate ppc_exec_inner template functions for little and big
endian.

Switch endian mode in the ppc_exec outer functions when power_off_reason
is po_endian_switch.

Since MPC601 doesn't have ILE and LE bits, remove that code for that
CPU.

videoctrl: Uses templated methods. See next commit for a fix that this
change introduces.
2026-04-12 10:06:32 -07:00
dingusdev 213dd4c16e Update copyright info further 2026-01-30 08:12:04 -07:00
Maxim Poliakovski e75ee8d32a Update copyright year. 2026-01-30 12:15:00 +01: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
joevt cf0d78fe98 debugger: add regions command.
To dump the list of memory regions.
2025-03-14 10:31:57 -07:00
Maxim Poliakovski e722ef3e8a memctrlbase: add get_region_hostmem_ptr(). 2024-04-21 23:04:12 +02:00
Maxim Poliakovski 4c9fe06229 Implement Aspen memory controller. 2024-04-08 00:44:24 +02: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
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
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 9a6336adb9 Move DRAM capacity constants to memctrlbase.h 2022-08-07 15:25:58 +02: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