File tree Expand file tree Collapse file tree 2 files changed +14
-6
lines changed Expand file tree Collapse file tree 2 files changed +14
-6
lines changed Original file line number Diff line number Diff line change @@ -30,10 +30,14 @@ _start:
30
30
slli t0, a0, 3
31
31
sub sp, sp, t0
32
32
33
- # check if the core has the F-extension
34
- csrr t0, misa
35
- andi t0, t0, (1 << 5 )
36
- beqz t0, _clr_ireg
33
+ .globl _putcb
34
+ _init_putcb:
35
+ la t0, _putcb
36
+ # Initialize ptchar buffer size of each core to 0
37
+ slli t1, a0, 10
38
+ add t0, t0, t1
39
+ sw zero, 0 (t0)
40
+ sw zero, 4 (t0)
37
41
38
42
_skip_dmcc_work:
39
43
# Skip the coming two steps unless we are the DMA core
@@ -78,6 +82,11 @@ _dmcc_work_sync:
78
82
# Synchronize cores so data is ready
79
83
csrr x0, 0x7C2
80
84
85
+ # check if the core has the F-extension
86
+ csrr t0, misa
87
+ andi t0, t0, (1 << 5 )
88
+ beqz t0, _clr_ireg
89
+
81
90
# Reset float regs if present
82
91
_clr_freg:
83
92
fcvt.d.w f0, x0
@@ -158,6 +167,5 @@ _done:
158
167
wfi
159
168
160
169
161
- .globl _putcb
162
170
.section .data ._putcb
163
171
_putcb:
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ static inline volatile uint32_t __rt_get_hartid() {
32
32
}
33
33
// Rudimentary string buffer for putchar calls.
34
34
extern uint32_t _putcb ;
35
- #define PUTC_BUFFER_LEN (1024 - sizeof(size_t))
35
+ #define PUTC_BUFFER_LEN (1024 - sizeof(size_t) - 8*sizeof(uint64_t) )
36
36
37
37
typedef struct {
38
38
size_t size ;
You can’t perform that action at this time.
0 commit comments