forked from M-Labs/artiq
generate MAILBOX_BASE with SoC and use it in runtime
to avoid possible future mismatches between SoC/runtime, constants that can be easily generated from SoC should be defined this way.
This commit is contained in:
parent
30dffb6644
commit
fd2def4951
@ -2,10 +2,11 @@
|
||||
#include <system.h>
|
||||
#include <spr-defs.h>
|
||||
#include <hw/common.h>
|
||||
#include <generated/mem.h>
|
||||
|
||||
#include "mailbox.h"
|
||||
|
||||
#define KERNELCPU_MAILBOX MMPTR(0xf0000000)
|
||||
#define KERNELCPU_MAILBOX MMPTR(MAILBOX_BASE)
|
||||
|
||||
static unsigned int last_transmission;
|
||||
|
||||
|
@ -125,6 +125,7 @@ class AMP(_Peripherals):
|
||||
self.submodules.mailbox = amp.Mailbox()
|
||||
self.add_wb_slave(mem_decoder(self.mem_map["mailbox"]), self.mailbox.i1)
|
||||
self.kernel_cpu.add_wb_slave(mem_decoder(self.mem_map["mailbox"]), self.mailbox.i2)
|
||||
self.add_memory_region("mailbox", self.mem_map["mailbox"] + 0x80000000, 4)
|
||||
|
||||
rtio_csrs = self.rtio.get_kernel_csrs()
|
||||
self.submodules.rtiowb = wbgen.Bank(rtio_csrs)
|
||||
|
Loading…
Reference in New Issue
Block a user