[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:
@@ -7,6 +7,12 @@ uint64_t aligned_size(uint64_t size, uint64_t alignment);
|
|||||||
bool is_aligned(uint64_t addr, uint64_t alignment);
|
bool is_aligned(uint64_t addr, uint64_t alignment);
|
||||||
|
|
||||||
#define CACHE_BLOCK_SIZE 64
|
#define CACHE_BLOCK_SIZE 64
|
||||||
#define ALLOC_BASE_ADDR 0x00000000
|
// NOTE(hansung): This is changed to something more akin to be in a heap area
|
||||||
#define LOCAL_MEM_SIZE 4294967296 // 4 GB
|
// 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
|
#define DEVICE_MAX_ADDR 0xfffffffful
|
||||||
|
|||||||
Reference in New Issue
Block a user