From 92fd705990d785dcfee3b2283eeafee091c6ce90 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Sun, 21 Feb 2021 19:06:07 +0800 Subject: [PATCH] increase memory allocated to comms CPU See discussion in #1612. --- artiq/firmware/ksupport/glue.c | 4 ++-- artiq/firmware/ksupport/ksupport.ld | 6 +++--- artiq/firmware/libboard_artiq/rpc_queue.rs | 4 ++-- artiq/firmware/libproto_artiq/kernel_proto.rs | 4 ++-- artiq/firmware/runtime/runtime.ld | 2 +- artiq/gateware/amp/kernel_cpu.py | 2 +- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/artiq/firmware/ksupport/glue.c b/artiq/firmware/ksupport/glue.c index 7f87d5e3c..a15491689 100644 --- a/artiq/firmware/ksupport/glue.c +++ b/artiq/firmware/ksupport/glue.c @@ -14,8 +14,8 @@ struct slice { void send_to_core_log(struct slice str); void send_to_rtio_log(struct slice data); -#define KERNELCPU_EXEC_ADDRESS 0x40800000 -#define KERNELCPU_PAYLOAD_ADDRESS 0x40860000 +#define KERNELCPU_EXEC_ADDRESS 0x45000000 +#define KERNELCPU_PAYLOAD_ADDRESS 0x45060000 #define KERNELCPU_LAST_ADDRESS 0x4fffffff #define KSUPPORT_HEADER_SIZE 0x80 diff --git a/artiq/firmware/ksupport/ksupport.ld b/artiq/firmware/ksupport/ksupport.ld index bc6a97ab1..b139833f3 100644 --- a/artiq/firmware/ksupport/ksupport.ld +++ b/artiq/firmware/ksupport/ksupport.ld @@ -2,16 +2,16 @@ INCLUDE generated/output_format.ld INCLUDE generated/regions.ld ENTRY(_reset_handler) -/* First 4M of main memory are reserved for runtime +/* First 64M of main memory are reserved for runtime * code/data/heap, then comes kernel memory. - * Next 4M of main memory are reserved for + * Next 16M of main memory are reserved for * the background RPC queue. * First 384K of kernel memory are for support code. * Support code is loaded at ORIGIN-0x80 so that ELF headers * are also loaded. */ MEMORY { - ksupport (RWX) : ORIGIN = 0x40800000, LENGTH = 0x60000 + ksupport (RWX) : ORIGIN = 0x45000000, LENGTH = 0x60000 } /* Kernel stack is at the end of main RAM. */ diff --git a/artiq/firmware/libboard_artiq/rpc_queue.rs b/artiq/firmware/libboard_artiq/rpc_queue.rs index 8b25372e5..0e2049c81 100644 --- a/artiq/firmware/libboard_artiq/rpc_queue.rs +++ b/artiq/firmware/libboard_artiq/rpc_queue.rs @@ -5,8 +5,8 @@ use board_misoc::{mem, cache}; const SEND_MAILBOX: *mut usize = (mem::MAILBOX_BASE + 4) as *mut usize; const RECV_MAILBOX: *mut usize = (mem::MAILBOX_BASE + 8) as *mut usize; -const QUEUE_BEGIN: usize = 0x40400000; -const QUEUE_END: usize = 0x407fff80; +const QUEUE_BEGIN: usize = 0x44000000; +const QUEUE_END: usize = 0x44ffff80; const QUEUE_CHUNK: usize = 0x1000; pub unsafe fn init() { diff --git a/artiq/firmware/libproto_artiq/kernel_proto.rs b/artiq/firmware/libproto_artiq/kernel_proto.rs index 3ca55426d..b16dc8005 100644 --- a/artiq/firmware/libproto_artiq/kernel_proto.rs +++ b/artiq/firmware/libproto_artiq/kernel_proto.rs @@ -1,8 +1,8 @@ use core::fmt; use dyld; -pub const KERNELCPU_EXEC_ADDRESS: usize = 0x40800000; -pub const KERNELCPU_PAYLOAD_ADDRESS: usize = 0x40860000; +pub const KERNELCPU_EXEC_ADDRESS: usize = 0x45000000; +pub const KERNELCPU_PAYLOAD_ADDRESS: usize = 0x45060000; pub const KERNELCPU_LAST_ADDRESS: usize = 0x4fffffff; pub const KSUPPORT_HEADER_SIZE: usize = 0x80; diff --git a/artiq/firmware/runtime/runtime.ld b/artiq/firmware/runtime/runtime.ld index a0a884dd2..a7bcc5a0d 100644 --- a/artiq/firmware/runtime/runtime.ld +++ b/artiq/firmware/runtime/runtime.ld @@ -6,7 +6,7 @@ ENTRY(_reset_handler) * ld does not allow this expression here. */ MEMORY { - runtime (RWX) : ORIGIN = 0x40000000, LENGTH = 0x400000 /* 4M */ + runtime (RWX) : ORIGIN = 0x40000000, LENGTH = 0x4000000 /* 64M */ } SECTIONS diff --git a/artiq/gateware/amp/kernel_cpu.py b/artiq/gateware/amp/kernel_cpu.py index b1c06517e..9294cb353 100644 --- a/artiq/gateware/amp/kernel_cpu.py +++ b/artiq/gateware/amp/kernel_cpu.py @@ -7,7 +7,7 @@ from misoc.integration.wb_slaves import WishboneSlaveManager class KernelCPU(Module): def __init__(self, platform, - exec_address=0x40800000, + exec_address=0x45000000, main_mem_origin=0x40000000, l2_size=8192): self._reset = CSRStorage(reset=1)