struct sbi_trap_info *out_trap);
} __packed;
+/** Platform default per-HART stack size for exception/interrupt handling */
+#define SBI_PLATFORM_DEFAULT_HART_STACK_SIZE 8192
+
/** Representation of a platform */
struct sbi_platform {
/**
.name = "Andes AE350",
.features = SBI_PLATFORM_DEFAULT_FEATURES,
.hart_count = AE350_HART_COUNT,
- .hart_stack_size = AE350_HART_STACK_SIZE,
+ .hart_stack_size = SBI_PLATFORM_DEFAULT_HART_STACK_SIZE,
.platform_ops_addr = (unsigned long)&platform_ops
};
#define _AE350_PLATFORM_H_
#define AE350_HART_COUNT 4
-#define AE350_HART_STACK_SIZE 8192
#define AE350_PLIC_ADDR 0xe4000000
#define AE350_PLIC_NUM_SOURCES 71
.name = "ARIANE RISC-V",
.features = SBI_ARIANE_FEATURES,
.hart_count = ARIANE_HART_COUNT,
- .hart_stack_size = 8192,
+ .hart_stack_size = SBI_PLATFORM_DEFAULT_HART_STACK_SIZE,
.platform_ops_addr = (unsigned long)&platform_ops
};
.name = "Kendryte K210",
.features = SBI_PLATFORM_HAS_TIMER_VALUE,
.hart_count = K210_HART_COUNT,
- .hart_stack_size = K210_HART_STACK_SIZE,
+ .hart_stack_size = SBI_PLATFORM_DEFAULT_HART_STACK_SIZE,
.platform_ops_addr = (unsigned long)&platform_ops
};
#include <sbi/riscv_io.h>
#define K210_HART_COUNT 2
-#define K210_HART_STACK_SIZE 8192
#define K210_UART_BAUDRATE 115200
/* clang-format off */
#define VIRT_HART_COUNT 8
-#define VIRT_HART_STACK_SIZE 8192
#define VIRT_TEST_ADDR 0x100000
#define VIRT_TEST_FINISHER_FAIL 0x3333
.name = "QEMU Virt Machine",
.features = SBI_PLATFORM_DEFAULT_FEATURES,
.hart_count = VIRT_HART_COUNT,
- .hart_stack_size = VIRT_HART_STACK_SIZE,
+ .hart_stack_size = SBI_PLATFORM_DEFAULT_HART_STACK_SIZE,
.platform_ops_addr = (unsigned long)&platform_ops
};
/* clang-format off */
#define FU540_HART_COUNT 5
-#define FU540_HART_STACK_SIZE 8192
#define FU540_SYS_CLK 1000000000
.name = "SiFive Freedom U540",
.features = SBI_PLATFORM_DEFAULT_FEATURES,
.hart_count = FU540_HART_COUNT,
- .hart_stack_size = FU540_HART_STACK_SIZE,
+ .hart_stack_size = SBI_PLATFORM_DEFAULT_HART_STACK_SIZE,
.platform_ops_addr = (unsigned long)&platform_ops
};
/* clang-format off */
#define SPIKE_HART_COUNT 8
-#define SPIKE_HART_STACK_SIZE 8192
#define SPIKE_CLINT_ADDR 0x2000000
.name = "Spike",
.features = SBI_PLATFORM_DEFAULT_FEATURES,
.hart_count = SPIKE_HART_COUNT,
- .hart_stack_size = SPIKE_HART_STACK_SIZE,
+ .hart_stack_size = SBI_PLATFORM_DEFAULT_HART_STACK_SIZE,
.platform_ops_addr = (unsigned long)&platform_ops
};
.name = "platform-name",
.features = SBI_PLATFORM_DEFAULT_FEATURES,
.hart_count = 1,
- .hart_stack_size = 8192,
+ .hart_stack_size = SBI_PLATFORM_DEFAULT_HART_STACK_SIZE,
.platform_ops_addr = (unsigned long)&platform_ops
};
.name = "T-HEAD Xuantie c910",
.features = SBI_THEAD_FEATURES,
.hart_count = C910_HART_COUNT,
- .hart_stack_size = C910_HART_STACK_SIZE,
+ .hart_stack_size = SBI_PLATFORM_DEFAULT_HART_STACK_SIZE,
.platform_ops_addr = (unsigned long)&platform_ops
};
#define _C910_PLATFORM_H_
#define C910_HART_COUNT 16
-#define C910_HART_STACK_SIZE 8192
#define SBI_THEAD_FEATURES \
(SBI_PLATFORM_HAS_SCOUNTEREN | \