adds volatile to array passed to tohost and updates bsp submodule

This commit is contained in:
Hongyu Liu 2025-03-14 17:53:49 +01:00
parent e88c1148fb
commit c6bfaf0546
2 changed files with 7 additions and 5 deletions

@ -1 +1 @@
Subproject commit 3042e0e1243ff816fa0bc3a24d71ae4501e1ca17
Subproject commit ada4881d335e079b1ea655461e03e1e6fd90d63f

@ -19,13 +19,15 @@ extern volatile uint32_t tohost;
extern volatile uint32_t fromhost;
int main() {
volatile int result = factorial(10);
char string[] = "hello world with write";
volatile char string[] = "hello world with write in hello";
volatile uint64_t payload[4] = {64, 0, (uintptr_t)string,
(strlen(string) + 1)};
tohost = (uint32_t)payload;
write(STDOUT_FILENO, string, sizeof(string));
uint64_t payload[4] = {64, 0, (uintptr_t)string, (strlen(string) + 1)};
// tohost = (uint32_t)payload;
printf("Factorial is %d", result);
// printf("End of execution");
// printf("End of execution");
return 0;
}