summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal@nekernel.org>2025-07-31 08:57:14 +0100
committerAmlal El Mahrouss <amlal@nekernel.org>2025-07-31 08:57:14 +0100
commit1891d7343a9ac25ab157c4495581a0fcbd7fbcbf (patch)
treec6da72fdf5db30c67c28e968883f869ee57600d0 /src
parent18d33e155d2f56e59eb49dadbb30ab2f7ac3e852 (diff)
feat! refactor NeBoot for NeKernel.org v1.0.0
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'src')
-rw-r--r--src/amd64/amd64-boot.asm2
-rw-r--r--src/amd64/amd64-test.asm2
-rw-r--r--src/arm64/arm64-uart.c2
-rw-r--r--src/arm64/ci.make4
-rw-r--r--src/arm64/makefile4
-rw-r--r--src/hal/neboot-ahci-driver.c (renamed from src/hal/coreboot-ahci-driver.c)4
-rw-r--r--src/hal/neboot-flash-driver.c (renamed from src/hal/coreboot-flash-driver.c)0
-rw-r--r--src/neboot-bootnet.c (renamed from src/coreboot-bootnet.c)0
-rw-r--r--src/neboot-cpu-api.c (renamed from src/coreboot-cpu-api.c)0
-rw-r--r--src/neboot-cxx-abi.cc (renamed from src/coreboot-cxx-abi.cc)0
-rw-r--r--src/neboot-partition-map-parse.c (renamed from src/coreboot-partition-map-parse.c)0
-rw-r--r--src/neboot-partition-map.c (renamed from src/coreboot-partition-map.c)10
-rw-r--r--src/neboot-pci-tree.c (renamed from src/coreboot-pci-tree.c)22
-rw-r--r--src/neboot-print-name.c (renamed from src/coreboot-print-name.c)8
-rw-r--r--src/neboot-start.c (renamed from src/coreboot-start.c)10
-rw-r--r--src/neboot-string.c (renamed from src/coreboot-string.c)2
-rw-r--r--src/ppc64/makefile4
-rw-r--r--src/ppc64/ppc64-boot.S6
-rw-r--r--src/ppc64/ppc64-hal.c12
-rw-r--r--src/ppc64/ppc64-uart.c6
-rw-r--r--src/rv64/ci.make4
-rw-r--r--src/rv64/makefile4
-rw-r--r--src/rv64/rv64-api.s2
-rw-r--r--src/rv64/rv64-boot.s6
-rw-r--r--src/rv64/rv64-uart.c4
25 files changed, 59 insertions, 59 deletions
diff --git a/src/amd64/amd64-boot.asm b/src/amd64/amd64-boot.asm
index bcd6058..d578aa9 100644
--- a/src/amd64/amd64-boot.asm
+++ b/src/amd64/amd64-boot.asm
@@ -1,4 +1,4 @@
-;; AMD64 CoreBoot Master Boot Program.
+;; AMD64 NeBoot Master Boot Program.
;; Written by Amlal EL Mahrouss
%define ENTRYPOINT 0x00FF
diff --git a/src/amd64/amd64-test.asm b/src/amd64/amd64-test.asm
index 2a8bef8..b89e522 100644
--- a/src/amd64/amd64-test.asm
+++ b/src/amd64/amd64-test.asm
@@ -1,4 +1,4 @@
-;; AMD64 CoreBoot Sample program.
+;; AMD64 NeBoot Sample program.
;; Written by Amlal EL Mahrouss
[bits 16]
diff --git a/src/arm64/arm64-uart.c b/src/arm64/arm64-uart.c
index 5a7f21d..4723204 100644
--- a/src/arm64/arm64-uart.c
+++ b/src/arm64/arm64-uart.c
@@ -13,7 +13,7 @@
/* this file handles the UART */
-static uint32_t* cb_uart_ptr = (uint32_t*) CB_UART_BASE;
+static uint32_t* cb_uart_ptr = (uint32_t*) NB_UART_BASE;
/// @brief Retrieve character from cb_uart_ptr
utf_char_t cb_get_char(void) {
diff --git a/src/arm64/ci.make b/src/arm64/ci.make
index 07f1746..2b0fed2 100644
--- a/src/arm64/ci.make
+++ b/src/arm64/ci.make
@@ -1,7 +1,7 @@
#
# ========================================================
#
- # CoreBoot
+ # NeBoot
# Date Added: 08/11/2023
# Copyright 2024, Amlal El Mahrouss, all rights reserved.
#
@@ -34,7 +34,7 @@ WAIT=sleep 1
.PHONY: all
all: firmware-link
- @echo "[CoreBoot] build done."
+ @echo "[NeBoot] build done."
.PHONY: firmware-link
firmware-link: firmware-compile
diff --git a/src/arm64/makefile b/src/arm64/makefile
index 8d05e8b..a85553b 100644
--- a/src/arm64/makefile
+++ b/src/arm64/makefile
@@ -1,7 +1,7 @@
#
# ========================================================
#
- # CoreBoot
+ # NeBoot
# Date Added: 08/11/2023
# Copyright 2024, Amlal El Mahrouss, all rights reserved.
#
@@ -34,7 +34,7 @@ WAIT=sleep 1
.PHONY: all
all: firmware-link
- @echo "[CoreBoot] build done."
+ @echo "[NeBoot] build done."
.PHONY: firmware-link
firmware-link: firmware-compile
diff --git a/src/hal/coreboot-ahci-driver.c b/src/hal/neboot-ahci-driver.c
index 26a8907..b9badd2 100644
--- a/src/hal/coreboot-ahci-driver.c
+++ b/src/hal/neboot-ahci-driver.c
@@ -5,7 +5,7 @@
------------------------------------------- */
/**
- * @file coreboot-ahci-driver.cc
+ * @file neboot-ahci-driver.cc
* @author Amlal EL Mahrouss (amlal@nekernel.org)
* @brief SATA Disk support, via AHCI.
* @version 0.2
@@ -18,7 +18,7 @@
#include <lib/boot.h>
#include <lib/pci-tree.h>
-#define CB_AHCI_DRIVER_NAME ("@sata")
+#define NB_AHCI_DRIVER_NAME ("@sata")
/// BUGS: 0
/// @brief AHCI support for PowerPC.
diff --git a/src/hal/coreboot-flash-driver.c b/src/hal/neboot-flash-driver.c
index d1b0907..d1b0907 100644
--- a/src/hal/coreboot-flash-driver.c
+++ b/src/hal/neboot-flash-driver.c
diff --git a/src/coreboot-bootnet.c b/src/neboot-bootnet.c
index a547b35..a547b35 100644
--- a/src/coreboot-bootnet.c
+++ b/src/neboot-bootnet.c
diff --git a/src/coreboot-cpu-api.c b/src/neboot-cpu-api.c
index 2491f15..2491f15 100644
--- a/src/coreboot-cpu-api.c
+++ b/src/neboot-cpu-api.c
diff --git a/src/coreboot-cxx-abi.cc b/src/neboot-cxx-abi.cc
index 88b2a6a..88b2a6a 100644
--- a/src/coreboot-cxx-abi.cc
+++ b/src/neboot-cxx-abi.cc
diff --git a/src/coreboot-partition-map-parse.c b/src/neboot-partition-map-parse.c
index 7d8f80f..7d8f80f 100644
--- a/src/coreboot-partition-map-parse.c
+++ b/src/neboot-partition-map-parse.c
diff --git a/src/coreboot-partition-map.c b/src/neboot-partition-map.c
index f5d937b..c13907c 100644
--- a/src/coreboot-partition-map.c
+++ b/src/neboot-partition-map.c
@@ -9,18 +9,18 @@
// include this for documentation.
-#define CB_FILESYSTEM_COUNT 4
-#define CB_FILESYSTEM_LIST \
+#define NB_FILESYSTEM_COUNT 4
+#define NB_FILESYSTEM_LIST \
{ "NeFS", "HeFS", "FAT32", "ext4" }
-/// @brief check if filesystem is supported by CoreBoot.
+/// @brief check if filesystem is supported by NeBoot.
/// @param fs the filesystem magic, as provided by EPM.
boolean cb_filesystem_exists(caddr_t fs, size_t len) {
if (fs == nil || *fs == 0) return no;
- char* fs_list[] = CB_FILESYSTEM_LIST;
+ char* fs_list[] = NB_FILESYSTEM_LIST;
- for (size_t fs_index = 0; fs_index < CB_FILESYSTEM_COUNT; fs_index++) {
+ for (size_t fs_index = 0; fs_index < NB_FILESYSTEM_COUNT; fs_index++) {
if (strncmp(fs_list[fs_index], fs, strlen(fs_list[fs_index])) == 0) {
return yes;
}
diff --git a/src/coreboot-pci-tree.c b/src/neboot-pci-tree.c
index ce168fd..a506323 100644
--- a/src/coreboot-pci-tree.c
+++ b/src/neboot-pci-tree.c
@@ -5,7 +5,7 @@
------------------------------------------- */
/**
- * @file coreboot-pci-tree.c
+ * @file neboot-pci-tree.c
* @author Amlal EL Mahrouss (amlal@nekernel.org)
* @brief PCI tree implementation.
* @version 0.1
@@ -21,7 +21,7 @@
/// BUGS: 0
/// Standard Root table (Mahrouss Table)
-#define CB_PCI_ROOT_NAME "/pci-tree/@/"
+#define NB_PCI_ROOT_NAME "/pci-tree/@/"
static struct hw_cb_pci_tree* cb_base_tree = nil;
static struct hw_cb_pci_tree* cb_latest_tree = nil;
@@ -31,25 +31,25 @@ static struct hw_cb_pci_tree* cb_last_tree = nil;
/// \return if it already exists -> false
/// Otherwise true.
boolean cb_pci_init_tree(void) {
- cb_base_tree = (struct hw_cb_pci_tree*) (CB_PCI_TREE_BASE);
+ cb_base_tree = (struct hw_cb_pci_tree*) (NB_PCI_TREE_BASE);
// huh? anyway let's ignore it then.
- if (cb_base_tree->d_magic != CB_PCI_DEV_MAGIC) {
- cb_base_tree->d_magic = CB_PCI_DEV_MAGIC;
+ if (cb_base_tree->d_magic != NB_PCI_DEV_MAGIC) {
+ cb_base_tree->d_magic = NB_PCI_DEV_MAGIC;
- memncpy(cb_base_tree->d_name, CB_PCI_ROOT_NAME, strlen(CB_PCI_ROOT_NAME));
+ memncpy(cb_base_tree->d_name, NB_PCI_ROOT_NAME, strlen(NB_PCI_ROOT_NAME));
cb_base_tree->d_next_sibling = 0;
cb_base_tree->d_off_props = 0;
cb_base_tree->d_sz_struct = 0;
cb_base_tree->d_sz_props = 0;
cb_base_tree->d_off_struct = 0;
- cb_base_tree->d_version = CB_PCI_VERSION;
+ cb_base_tree->d_version = NB_PCI_VERSION;
cb_base_tree->d_next_sibling = (cb_pci_num_t) (cb_base_tree + sizeof(struct hw_cb_pci_tree));
cb_base_tree->d_first_node = (cb_pci_num_t) cb_base_tree;
- cb_put_string(">> Append root device: " CB_PCI_ROOT_NAME "\r\n");
+ cb_put_string(">> Append root device: " NB_PCI_ROOT_NAME "\r\n");
}
cb_latest_tree = cb_base_tree;
@@ -66,13 +66,13 @@ boolean cb_pci_append_tree(const caddr_t name, cb_pci_num_t struct_ptr, cb_pci_n
struct hw_cb_pci_tree* cb_pci_tree = (struct hw_cb_pci_tree*) (cb_latest_tree);
- while (cb_pci_tree->d_magic == CB_PCI_DEV_MAGIC) {
+ while (cb_pci_tree->d_magic == NB_PCI_DEV_MAGIC) {
if (strcmp(cb_pci_tree->d_name, name) == 0) return no;
cb_pci_tree = (struct hw_cb_pci_tree*) (cb_pci_tree + sizeof(struct hw_cb_pci_tree));
}
- cb_pci_tree->d_magic = CB_PCI_DEV_MAGIC;
+ cb_pci_tree->d_magic = NB_PCI_DEV_MAGIC;
memncpy(cb_pci_tree->d_name, name, strlen(name));
@@ -80,7 +80,7 @@ boolean cb_pci_append_tree(const caddr_t name, cb_pci_num_t struct_ptr, cb_pci_n
cb_pci_tree->d_sz_struct = struct_sz;
cb_pci_tree->d_off_props = 0;
cb_pci_tree->d_sz_props = 0;
- cb_pci_tree->d_version = CB_PCI_VERSION;
+ cb_pci_tree->d_version = NB_PCI_VERSION;
cb_pci_tree->d_next_sibling = (cb_pci_num_t) (cb_pci_tree + sizeof(struct hw_cb_pci_tree));
cb_pci_tree->d_first_node = (cb_pci_num_t) cb_latest_tree;
diff --git a/src/coreboot-print-name.c b/src/neboot-print-name.c
index 6adb099..90fe104 100644
--- a/src/coreboot-print-name.c
+++ b/src/neboot-print-name.c
@@ -10,18 +10,18 @@
/// @param
void cb_print_name(void) {
#ifdef __COMPILE_POWERPC__
- cb_put_string(">> CoreBoot for POWERPC.\r\n");
+ cb_put_string(">> NeBoot for POWERPC.\r\n");
#endif // __COMPILE_POWERPC__
#ifdef __COMPILE_ARM64__
- cb_put_string(">> CoreBoot for ARM64.\r\n");
+ cb_put_string(">> NeBoot for ARM64.\r\n");
#endif // __COMPILE_POWERPC__
#ifdef __COMPILE_AMD64__
- cb_put_string(">> CoreBoot for AMD64.\r\n");
+ cb_put_string(">> NeBoot for AMD64.\r\n");
#endif // __COMPILE_POWERPC__
#ifdef __COMPILE_RISCV__
- cb_put_string(">> CoreBoot for RISC-V.\r\n");
+ cb_put_string(">> NeBoot for RISC-V.\r\n");
#endif // __COMPILE_POWERPC__
}
diff --git a/src/coreboot-start.c b/src/neboot-start.c
index 38aa760..8384791 100644
--- a/src/coreboot-start.c
+++ b/src/neboot-start.c
@@ -45,7 +45,7 @@ void cb_start_exec(void) {
// let the hart 0 init our stuff.
if (hart == 0) {
- cb_put_string("CB> Welcome to CoreBoot, (c) Amlal EL Mahrouss. Built the ");
+ cb_put_string("CB> Welcome to NeBoot, (c) Amlal EL Mahrouss. Built the ");
cb_put_string(__DATE__);
cb_put_string("\r\r\n");
@@ -72,7 +72,7 @@ void cb_start_exec(void) {
/// @brief Boots here if LX header matches what we except.
- volatile struct cb_boot_header* boot_hdr = (volatile struct cb_boot_header*) (CB_FLASH_BASE_ADDR);
+ volatile struct cb_boot_header* boot_hdr = (volatile struct cb_boot_header*) (NB_FLASH_BASE_ADDR);
/**
boot if:
@@ -80,14 +80,14 @@ void cb_start_exec(void) {
- version matches.
*/
- if (boot_hdr->h_mag[0] == CB_BOOT_MAG_0 && boot_hdr->h_mag[1] == CB_BOOT_MAG_1) {
+ if (boot_hdr->h_mag[0] == NB_BOOT_MAG_0 && boot_hdr->h_mag[1] == NB_BOOT_MAG_1) {
uint32_t rev = boot_hdr->h_revision;
#ifdef __aarch64__
rev = __builtin_bswap32(rev);
#endif
- if (rev != CB_BOOT_VER) {
+ if (rev != NB_BOOT_VER) {
if (hart == 0) {
cb_put_string("CB> Can't Boot the StageTwo, LX invalid signature. (CB0003)\r\n");
}
@@ -113,7 +113,7 @@ 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) CB_BOOT_ADDR, EPM_PART_BLK_SZ, 0);
+ part_block_t* blk = cb_parse_partition_block_at((voidptr_t) NB_BOOT_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);
diff --git a/src/coreboot-string.c b/src/neboot-string.c
index 355e734..0c249a4 100644
--- a/src/coreboot-string.c
+++ b/src/neboot-string.c
@@ -5,7 +5,7 @@
------------------------------------------- */
/**
- * @file coreboot-string.c
+ * @file neboot-string.c
* @author Amlal EL Mahrouss (amlal@nekernel.org)
* @brief string library.
* @version 0.1
diff --git a/src/ppc64/makefile b/src/ppc64/makefile
index 8adb03f..d046098 100644
--- a/src/ppc64/makefile
+++ b/src/ppc64/makefile
@@ -1,7 +1,7 @@
#
# ========================================================
#
- # CoreBoot
+ # NeBoot
# Date Added: 08/11/2023
# Copyright 2024, Amlal El Mahrouss, all rights reserved.
#
@@ -35,7 +35,7 @@ IMG_CMD=qemu-img create -f qcow2 epm.img 256M
.PHONY: all
all: firmware-link
- @echo "[CoreBoot] build done."
+ @echo "[NeBoot] build done."
.PHONY: firmware-link
firmware-link: firmware-compile
diff --git a/src/ppc64/ppc64-boot.S b/src/ppc64/ppc64-boot.S
index 28d1865..de366fc 100644
--- a/src/ppc64/ppc64-boot.S
+++ b/src/ppc64/ppc64-boot.S
@@ -29,11 +29,11 @@ cb_reset_vector:
.global cb_start_context
.global cb_boot_processor_ready
-.equ CB_BOOT_ADDR, 0x1030000
+.equ NB_BOOT_ADDR, 0x1030000
cb_start_rom:
- lis 3, CB_BOOT_ADDR@h
- addi 3, 3, CB_BOOT_ADDR@l
+ lis 3, NB_BOOT_ADDR@h
+ addi 3, 3, NB_BOOT_ADDR@l
blr
diff --git a/src/ppc64/ppc64-hal.c b/src/ppc64/ppc64-hal.c
index 74d18c4..993e5be 100644
--- a/src/ppc64/ppc64-hal.c
+++ b/src/ppc64/ppc64-hal.c
@@ -41,7 +41,7 @@ void cb_set_tlb(uint8_t tlb, uint32_t epn, uint64_t rpn, uint8_t perms, uint8_t
void cb_init_hw(void) {
/// amlal:
/// map VGA framebuffer
- cb_set_tlb(0, CB_FRAMEBUFFER_ADDR, /* v_addr, 0x0000A0000 */
+ cb_set_tlb(0, NB_FRAMEBUFFER_ADDR, /* v_addr, 0x0000A0000 */
0x0000A000, /* p_addr. 0x0000A0000 */
MAS3_SW | MAS3_SR, /* perm type=TLB_MAP_IO */
MAS2_I | MAS2_G, /* wimge type=TLB_MAP_IO */
@@ -52,7 +52,7 @@ void cb_init_hw(void) {
// map ccsrbar and uart.
// at start we execute from esel = 0, so chose something else..
- cb_set_tlb(1, CB_UART_BASE, /* v_addr 0xe0000000 see qemu-ppce500.h */
+ cb_set_tlb(1, NB_UART_BASE, /* v_addr 0xe0000000 see qemu-ppce500.h */
0xfe0000000, /* p_addr. 0xfe0000000 */
MAS3_SW | MAS3_SR, /* perm type=TLB_MAP_IO */
MAS2_I | MAS2_G, /* wimge type=TLB_MAP_IO */
@@ -63,7 +63,7 @@ void cb_init_hw(void) {
/// amlal:
/// map pci base for kernel
- cb_set_tlb(0, CB_BASE_ADDRESS, /* v_addr, 0xFE008000 */
+ cb_set_tlb(0, NB_BASE_ADDRESS, /* v_addr, 0xFE008000 */
0xFE0008000, /* p_addr. 0xfe0000000 */
MAS3_SW | MAS3_SR, /* perm type=TLB_MAP_IO */
MAS2_I | MAS2_G, /* wimge type=TLB_MAP_IO */
@@ -74,10 +74,10 @@ void cb_init_hw(void) {
cb_pci_init_tree();
- cb_pci_append_tree("@fb", CB_FRAMEBUFFER_ADDR, 0x0);
+ cb_pci_append_tree("@fb", NB_FRAMEBUFFER_ADDR, 0x0);
cb_pci_append_tree("@mbci", 0x0, 0x0); // did not found a MBCI base for now...
- cb_pci_append_tree("@serial", CB_UART_BASE, 0);
- cb_pci_append_tree("@pci", CB_BASE_ADDRESS, 0x0);
+ cb_pci_append_tree("@serial", NB_UART_BASE, 0);
+ cb_pci_append_tree("@pci", NB_BASE_ADDRESS, 0x0);
cb_flush_tlb();
}
diff --git a/src/ppc64/ppc64-uart.c b/src/ppc64/ppc64-uart.c
index b3b5717..9830342 100644
--- a/src/ppc64/ppc64-uart.c
+++ b/src/ppc64/ppc64-uart.c
@@ -9,10 +9,10 @@
/// BUGS: 0
-#define CB_NS16550_COM1 (CB_UART_BASE + 0x4500)
-#define CB_NS16550_COM2 (CB_UART_BASE + 0x4600)
+#define NB_NS16550_COM1 (NB_UART_BASE + 0x4500)
+#define NB_NS16550_COM2 (NB_UART_BASE + 0x4600)
-volatile ascii_char_t* const UART0DR = (ascii_char_t*) CB_NS16550_COM1;
+volatile ascii_char_t* const UART0DR = (ascii_char_t*) NB_NS16550_COM1;
/* this file handles the UART */
diff --git a/src/rv64/ci.make b/src/rv64/ci.make
index 757d6c1..c9936dd 100644
--- a/src/rv64/ci.make
+++ b/src/rv64/ci.make
@@ -1,7 +1,7 @@
#
# ========================================================
#
- # CoreBoot
+ # NeBoot
# Date Added: 08/11/2023
# Copyright 2024, Amlal El Mahrouss, all rights reserved.
#
@@ -24,7 +24,7 @@ EMU=qemu-system-riscv64 -m 4G -smp 2 -machine virt -bios $(FIRMWARE) -d int -dev
.PHONY: all
all: firmware-link
- @echo "[CoreBoot] Done."
+ @echo "[NeBoot] Done."
# link (make firmware)
.PHONY: firmware-link
diff --git a/src/rv64/makefile b/src/rv64/makefile
index 757d6c1..c9936dd 100644
--- a/src/rv64/makefile
+++ b/src/rv64/makefile
@@ -1,7 +1,7 @@
#
# ========================================================
#
- # CoreBoot
+ # NeBoot
# Date Added: 08/11/2023
# Copyright 2024, Amlal El Mahrouss, all rights reserved.
#
@@ -24,7 +24,7 @@ EMU=qemu-system-riscv64 -m 4G -smp 2 -machine virt -bios $(FIRMWARE) -d int -dev
.PHONY: all
all: firmware-link
- @echo "[CoreBoot] Done."
+ @echo "[NeBoot] Done."
# link (make firmware)
.PHONY: firmware-link
diff --git a/src/rv64/rv64-api.s b/src/rv64/rv64-api.s
index 8fe29e1..b4a0749 100644
--- a/src/rv64/rv64-api.s
+++ b/src/rv64/rv64-api.s
@@ -1,6 +1,6 @@
# ====================================
#
-# Amlal EL Mahrouss CoreBoot
+# Amlal EL Mahrouss NeBoot
# (c) Amlal EL Mahrouss all rights reserved.
#
# Purpose: Assembler API for RISC-V
diff --git a/src/rv64/rv64-boot.s b/src/rv64/rv64-boot.s
index fb95d55..a9afd02 100644
--- a/src/rv64/rv64-boot.s
+++ b/src/rv64/rv64-boot.s
@@ -1,7 +1,7 @@
/*
* ========================================================
*
- * CoreBoot
+ * NeBoot
* Copyright 2024, Amlal EL Mahrouss, all rights reserved.
*
* Purpose: Startup code for RISC-V.
@@ -81,10 +81,10 @@ cb_start_context:
add ra, zero, a1
mret
-.equ CB_BOOT_ADDR, 0x80020000
+.equ NB_BOOT_ADDR, 0x80020000
cb_start_rom:
- li x5, CB_BOOT_ADDR
+ li x5, NB_BOOT_ADDR
mv ra, zero
add ra, zero, t0
mret
diff --git a/src/rv64/rv64-uart.c b/src/rv64/rv64-uart.c
index 3f604fe..22b0793 100644
--- a/src/rv64/rv64-uart.c
+++ b/src/rv64/rv64-uart.c
@@ -11,10 +11,10 @@
/* this file handles the UART */
-static uint8_t* cb_uart_ptr = (uint8_t*) CB_UART_BASE;
+static uint8_t* cb_uart_ptr = (uint8_t*) NB_UART_BASE;
utf_char_t cb_get_char(void) {
- uintptr_t ptr = CB_UART_BASE;
+ uintptr_t ptr = NB_UART_BASE;
while (!(*(((volatile uint8_t*) ptr) + 0x05) & 0x01))
;