Skip to content

Commit 64dd7d1

Browse files
committed
Fix CI build errors
1 parent bc95fc5 commit 64dd7d1

File tree

7 files changed

+14
-13
lines changed

7 files changed

+14
-13
lines changed

.github/workflows/test-build-riscv.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ jobs:
8787
- name: Download and install RISC-V toolchain (riscv32)
8888
if: ${{ inputs.arch == 'riscv' }}
8989
run: |
90-
wget -q https://github.com/riscv-collab/riscv-gnu-toolchain/releases/latest/download/riscv32-elf-ubuntu-24.04-gcc.tar.xz
90+
wget -q https://github.com/riscv-collab/riscv-gnu-toolchain/releases/download/2025.01.17/riscv32-elf-ubuntu-24.04-gcc.tar.xz
9191
tar -xf riscv32-elf-ubuntu-24.04-gcc.tar.xz
9292
echo "$GITHUB_WORKSPACE/riscv/bin" >> $GITHUB_PATH
9393
$GITHUB_WORKSPACE/riscv/bin/riscv32-unknown-elf-gcc --version

hal/mpfs250.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ int mpfs_read_serial_number(uint8_t *serial)
222222
SCBCTRL_REG(SERVICES_CR_OFFSET) = cmd;
223223

224224
/* Wait for request bit to clear (command accepted) */
225-
timeout = 10000;
225+
timeout = MPFS_SCB_TIMEOUT;
226226
while ((SCBCTRL_REG(SERVICES_CR_OFFSET) & SERVICES_CR_REQ_MASK) && timeout > 0) {
227227
timeout--;
228228
}
@@ -232,7 +232,7 @@ int mpfs_read_serial_number(uint8_t *serial)
232232
}
233233

234234
/* Wait for busy bit to clear (command completed) */
235-
timeout = 10000;
235+
timeout = MPFS_SCB_TIMEOUT;
236236
while (mpfs_scb_mailbox_busy() && timeout > 0) {
237237
timeout--;
238238
}

hal/mpfs250.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -295,8 +295,8 @@ typedef struct {
295295
volatile uint32_t shared_mem_marker; /* 0x08: Init marker */
296296
volatile uint32_t shared_mem_status; /* 0x0C: Status */
297297
volatile uint64_t* shared_mem; /* 0x10: Shared memory pointer */
298-
volatile uint64_t reserved[2]; /* 0x18: Reserved/padding */
299-
} HLS_DATA; /* 64 bytes */
298+
volatile uint64_t reserved[5]; /* 0x18: Reserved/padding to 64 bytes */
299+
} HLS_DATA; /* 64 bytes total */
300300
#endif /* __ASSEMBLER__ */
301301

302302
#define HLS_MAIN_HART_STARTED 0x12344321UL

include/printf.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,9 @@
4848

4949
/* support for wolfBoot_printf logging */
5050
#if defined(PRINTF_ENABLED) && !defined(WOLFBOOT_NO_PRINTF)
51-
# include <stdio.h>
51+
# if !defined(DEBUG_UART) && !defined(DEBUG_ZYNQ) && !defined(WOLFBOOT_DEBUG_EFI)
52+
# include <stdio.h>
53+
# endif
5254
# if defined(DEBUG_ZYNQ) && !defined(USE_QNX) && !defined(DEBUG_UART)
5355
# include "xil_printf.h"
5456
# define wolfBoot_printf(_f_, ...) xil_printf(_f_, ##__VA_ARGS__)

src/boot_riscv.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ void do_boot(const uint32_t *app_offset)
273273
unsigned long dts_addr;
274274
hal_dts_fixup((uint32_t*)dts_offset);
275275
dts_addr = (unsigned long)dts_offset;
276-
#else
276+
#elif defined(WOLFBOOT_RISCV_MMODE) || __riscv_xlen == 64
277277
unsigned long dts_addr = 0;
278278
#endif
279279

src/boot_riscv_start.S

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,12 +121,11 @@ _copy_params:
121121
li t0, MIE_MSIE /* wake only on IPI */
122122
csrw mie, t0
123123

124-
/* Set up per-hart stack: base + (hartid+1)*STACK_SIZE_PER_HART */
124+
/* Set up per-hart stack: base + hartid*STACK_SIZE_PER_HART */
125125
csrr a0, mhartid
126126
la t0, _secondary_hart_stack_base
127127
li t1, STACK_SIZE_PER_HART
128-
addi a1, a0, 1
129-
mul t2, a1, t1
128+
mul t2, a0, t1
130129
add sp, t0, t2
131130
li t0, -16
132131
and sp, sp, t0

src/string.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
#if defined(_RENESAS_RA_)
3131
#include <stdint.h>
3232
#endif
33-
#ifndef TARGET_library
33+
#if !defined(TARGET_library) && defined(__STDC_HOSTED__) && __STDC_HOSTED__
3434
#include <string.h>
3535
#else
3636
size_t strlen(const char *s); /* forward declaration */
@@ -289,7 +289,7 @@ void RAMFUNCTION *memcpy(void *dst, const void *src, size_t n)
289289
}
290290
#endif /* IAR */
291291

292-
#ifndef __IAR_SYSTEMS_ICC__
292+
#if !defined(__IAR_SYSTEMS_ICC__) && !defined(TARGET_X86_64_EFI)
293293
void *memmove(void *dst, const void *src, size_t n)
294294
{
295295
int i;
@@ -306,7 +306,7 @@ void *memmove(void *dst, const void *src, size_t n)
306306
return memcpy(dst, src, n);
307307
}
308308
}
309-
#endif
309+
#endif /* !IAR && !X86_64_EFI */
310310
#endif /* __CCRX__ Renesas CCRX */
311311
#endif /* WOLFBOOT_USE_STDLIBC */
312312

0 commit comments

Comments
 (0)