summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal@nekernel.org>2025-09-28 17:04:02 +0200
committerGitHub <noreply@github.com>2025-09-28 17:04:02 +0200
commitb9d6c2fffc397cd8dd9f7948be6f17f24d4f4850 (patch)
tree83a84bb609e712fd9a6e049d7e5ebf1e31997aa4 /src
parentd41f15b09cc6adce79ce5c698dc5a53ddd7dd5f0 (diff)
parent31eb508f29c88c4468c0b83616561a08521a1878 (diff)
Merge pull request #9 from nekernel-org/dev
v0.0.6: NeBoot
Diffstat (limited to 'src')
-rw-r--r--src/neboot-cpu-api.c4
-rw-r--r--src/neboot-start.c5
-rw-r--r--src/ppc64/ppc64-uart.c3
-rw-r--r--src/rv64/rv64-uart.c3
4 files changed, 11 insertions, 4 deletions
diff --git a/src/neboot-cpu-api.c b/src/neboot-cpu-api.c
index 2491f15..4617343 100644
--- a/src/neboot-cpu-api.c
+++ b/src/neboot-cpu-api.c
@@ -16,5 +16,9 @@ void cb_restart_machine(void) {
while (1) {
asm volatile("wfi");
}
+#else
+ /// @todo add your reset vector here.
+ while (1)
+ ;
#endif
}
diff --git a/src/neboot-start.c b/src/neboot-start.c
index b72793e..29a3389 100644
--- a/src/neboot-start.c
+++ b/src/neboot-start.c
@@ -113,7 +113,8 @@ void cb_start_exec(void) {
} else {
cb_put_string("CB> Trying EPM partition...\r\n");
- part_block_t* blk = cb_parse_partition_block_at((voidptr_t) NB_FLASH_BASE_ADDR, EPM_PART_BLK_SZ, 0);
+ part_block_t* blk =
+ cb_parse_partition_block_at((voidptr_t) NB_FLASH_BASE_ADDR, EPM_PART_BLK_SZ, 0);
if (blk) {
cb_pci_append_tree("@stage2-epm", (cb_pci_num_t) blk, sizeof(part_block_t) * blk->num_blocks);
@@ -144,7 +145,7 @@ void cb_start_exec(void) {
}
/// end of TODO
-
+
while (yes) {
if (__cb_hart_counter == 0) {
cb_restart_machine();
diff --git a/src/ppc64/ppc64-uart.c b/src/ppc64/ppc64-uart.c
index a26a806..9830342 100644
--- a/src/ppc64/ppc64-uart.c
+++ b/src/ppc64/ppc64-uart.c
@@ -20,7 +20,8 @@ volatile ascii_char_t* const UART0DR = (ascii_char_t*) NB_NS16550_COM1;
/// @param
/// @return
utf_char_t cb_get_char(void) {
- while (!(*(((volatile uint8_t*) UART0DR) + 0x05) & 0x01));
+ while (!(*(((volatile uint8_t*) UART0DR) + 0x05) & 0x01))
+ ;
return (utf_char_t) *UART0DR;
}
diff --git a/src/rv64/rv64-uart.c b/src/rv64/rv64-uart.c
index 0fb8ab4..22b0793 100644
--- a/src/rv64/rv64-uart.c
+++ b/src/rv64/rv64-uart.c
@@ -16,7 +16,8 @@ static uint8_t* cb_uart_ptr = (uint8_t*) NB_UART_BASE;
utf_char_t cb_get_char(void) {
uintptr_t ptr = NB_UART_BASE;
- while (!(*(((volatile uint8_t*) ptr) + 0x05) & 0x01));
+ while (!(*(((volatile uint8_t*) ptr) + 0x05) & 0x01))
+ ;
return (utf_char_t) *cb_uart_ptr;
}