Add args.bin to ELF
Change KERNEL_ARG_DEV_MEM_ADDR for sgemm_{wg,gemmini,tcore}
This commit is contained in:
@@ -10,6 +10,7 @@ ENTRY(_start)
|
||||
|
||||
MEMORY {
|
||||
DRAM0 (rwx): ORIGIN = 0x80000000, LENGTH = 512M
|
||||
DRAMARG (rwx): ORIGIN = 0x9fff0000, LENGTH = 8K
|
||||
DRAM1 (rwx): ORIGIN = 0xa0000000, LENGTH = 32K
|
||||
DRAM2 (rwx): ORIGIN = 0xa1000000, LENGTH = 32K
|
||||
}
|
||||
@@ -259,6 +260,10 @@ SECTIONS
|
||||
.gnu.attributes 0 : { KEEP (*(.gnu.attributes)) }
|
||||
/DISCARD/ : { *(.note.GNU-stack) *(.gnu_debuglink) *(.gnu.lto_*) }
|
||||
|
||||
.args : {
|
||||
*(.args)
|
||||
. += 8K;
|
||||
}> DRAMARG
|
||||
.operand.a : {
|
||||
*(.operand.a)
|
||||
. += 32K;
|
||||
|
||||
@@ -107,15 +107,19 @@ kernel.elf: $(VX_SRCS)
|
||||
$(VX_CXX) $(VX_CFLAGS) $(VX_SRCS) $(VX_LDFLAGS) -o $@
|
||||
$(OBJCOPY) --set-section-flags .operand.a=$(OBJCOPY_FLAGS) $@
|
||||
$(OBJCOPY) --set-section-flags .operand.b=$(OBJCOPY_FLAGS) $@
|
||||
$(OBJCOPY) --set-section-flags .args=$(OBJCOPY_FLAGS) $@
|
||||
$(OBJCOPY) --update-section .operand.a=input.a.bin $@
|
||||
$(OBJCOPY) --update-section .operand.b=input.b.bin $@
|
||||
$(OBJCOPY) --update-section .args=args.bin $@
|
||||
|
||||
kernel.radiance.elf: $(VX_SRCS)
|
||||
$(VX_CXX) $(VX_CFLAGS) $(VX_SRCS) $(VX_LDFLAGS) -DRADIANCE -o $@
|
||||
$(OBJCOPY) --set-section-flags .operand.a=$(OBJCOPY_FLAGS) $@
|
||||
$(OBJCOPY) --set-section-flags .operand.b=$(OBJCOPY_FLAGS) $@
|
||||
$(OBJCOPY) --set-section-flags .args=$(OBJCOPY_FLAGS) $@
|
||||
$(OBJCOPY) --update-section .operand.a=input.a.bin $@
|
||||
$(OBJCOPY) --update-section .operand.b=input.b.bin $@
|
||||
$(OBJCOPY) --update-section .args=args.bin $@
|
||||
|
||||
ifneq ($(CONFIG),)
|
||||
kernel$(CONFIGEXT).elf: kernel.elf
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
#define KERNEL_ARG_DEV_MEM_ADDR 0x7fff0000
|
||||
#define KERNEL_ARG_DEV_MEM_ADDR 0x9fff0000
|
||||
#define DEV_SMEM_START_ADDR 0xff000000
|
||||
|
||||
typedef struct {
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
#define KERNEL_ARG_DEV_MEM_ADDR 0x7fff0000
|
||||
#define KERNEL_ARG_DEV_MEM_ADDR 0x9fff0000
|
||||
#define DEV_SMEM_START_ADDR 0xff000000
|
||||
|
||||
typedef struct {
|
||||
@@ -15,4 +15,4 @@ typedef struct {
|
||||
uint64_t addr_c;
|
||||
} kernel_arg_t;
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
#define KERNEL_ARG_DEV_MEM_ADDR 0x7fff0000
|
||||
#define KERNEL_ARG_DEV_MEM_ADDR 0x9fff0000
|
||||
#define DEV_SMEM_START_ADDR 0xff000000
|
||||
|
||||
typedef struct {
|
||||
|
||||
Reference in New Issue
Block a user