[driver] Set different base address for device malloc

Change the target area of malloc to something more akin to the heap area
for a CPU userspace program, since that works better with Chipyard's
default memory mapping scheme (0x80000000 and above).
This commit is contained in:
Hansung Kim
2023-10-07 21:22:45 -07:00
parent 46a60cf58e
commit 92ed21f83f

View File

@@ -7,6 +7,12 @@ uint64_t aligned_size(uint64_t size, uint64_t alignment);
bool is_aligned(uint64_t addr, uint64_t alignment);
#define CACHE_BLOCK_SIZE 64
#define ALLOC_BASE_ADDR 0x00000000
#define LOCAL_MEM_SIZE 4294967296 // 4 GB
// NOTE(hansung): This is changed to something more akin to be in a heap area
// for a CPU userspace program, since that works better with Chipyard's default
// memory mapping scheme (0x80000000 and above). This gives us a pretty small
// space though.
#define ALLOC_BASE_ADDR 0xc0000000ul
#define LOCAL_MEM_SIZE 0x40000000ul // 1 GB
// #define ALLOC_BASE_ADDR 0x00000000
// #define LOCAL_MEM_SIZE 4294967296 // 4 GB
#define DEVICE_MAX_ADDR 0xfffffffful