mirror of
https://github.com/dingusdev/dingusppc.git
synced 2024-09-27 19:54:46 +00:00
Fix memory controller interface for PDM.
This commit is contained in:
parent
22827642e4
commit
8c9f23daf4
@ -31,7 +31,7 @@ HMC::HMC() : MemCtrlBase()
|
||||
this->name = "Highspeed Memory Controller";
|
||||
|
||||
/* add memory mapped I/O region for the HMC control register */
|
||||
add_mmio_region(0x50F40000, 0xFFFF, this);
|
||||
add_mmio_region(0x50F40000, 0x10000, this);
|
||||
|
||||
this->config_reg = 0ULL;
|
||||
this->bit_pos = 0;
|
||||
|
@ -34,6 +34,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
#include "hwcomponent.h"
|
||||
#include "memctrlbase.h"
|
||||
#include "mmiodevice.h"
|
||||
#include <cinttypes>
|
||||
|
||||
class HMC : public MemCtrlBase, public MMIODevice {
|
||||
public:
|
||||
|
@ -130,7 +130,7 @@ bool MemCtrlBase::add_mmio_region(uint32_t start_addr, uint32_t size, MMIODevice
|
||||
AddressMapEntry *entry;
|
||||
|
||||
/* error if another region for the given range already exists */
|
||||
if (find_range(start_addr) || find_range(start_addr + size))
|
||||
if (find_range(start_addr) || find_range(start_addr + size - 1))
|
||||
return false;
|
||||
|
||||
entry = new AddressMapEntry;
|
||||
|
Loading…
Reference in New Issue
Block a user