diff options
| author | Amlal El Mahrouss <amlal@nekernel.org> | 2026-01-12 14:51:30 +0100 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal@nekernel.org> | 2026-01-12 14:51:30 +0100 |
| commit | 04abfb60bc52b7b4235202e0c409821cc63c585a (patch) | |
| tree | 90a2fe910d10e4f550e423c6002935fefeab538f /include/boot.h | |
| parent | 4243516705e4a18cbab62a94975a0d992b21a51e (diff) | |
feat: Update 30-PIN specs and implementation. Breaking API changes in
NeBoot as well.
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'include/boot.h')
| -rw-r--r-- | include/boot.h | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/include/boot.h b/include/boot.h index 143714f..02f87c5 100644 --- a/include/boot.h +++ b/include/boot.h @@ -93,7 +93,7 @@ typedef struct nullptr_* nullptr_t; #define NB_UART_BASE 0x10000000 #define NB_FLASH_BASE_ADDR 0x08000000 -#define cb_sync_synchronize() __sync_synchronize() +#define nb_sync_synchronize() __sync_synchronize() #elif defined(__COMPILE_POWERPC__) #define NB_UART_BASE 0x10000000 #define NB_BOOT_ADDR 0x1030000 @@ -101,7 +101,7 @@ typedef struct nullptr_* nullptr_t; #define NB_FRAMEBUFFER_ADDR 0x40000000L #define NB_FLASH_BASE_ADDR 0x08000000 -#define cb_sync_synchronize() __sync_synchronize() +#define nb_sync_synchronize() __sync_synchronize() #elif defined(__COMPILE_ARM64__) #define NB_UART_BASE 0x09000000 @@ -114,7 +114,7 @@ static inline void __sync_synchronize(void) { /// leave it as is. } -#define cb_sync_synchronize() __sync_synchronize() +#define nb_sync_synchronize() __sync_synchronize() #endif // ifndef __COMPILE_POWERPC__ #define NB_BAUDRATE_TABLE {300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200} @@ -131,7 +131,7 @@ static inline void __sync_synchronize(void) { #endif // ifndef _Nonnull #define NB_BOOT_CALL(struct, offset) \ - volatile cb_proc_t proc_##offset = (volatile cb_proc_t)(struct->offset); \ + volatile nb_proc_t proc_##offset = (volatile nb_proc_t)(struct->offset); \ proc_##offset(); /// @brief Binary64 representation (IEE 7554) in a C structure @@ -153,36 +153,36 @@ typedef char ascii_char_t; /// @brief panic the entire system. /// @param reason why text. -void cb_panic(const char* reason); +void nb_panic(const char* reason); /// @brief update the power status of the machine. -void cb_update_power_status(boolean restart); +void nb_update_power_status(boolean restart); /// @brief puts a string in serial /// @param text /// @return -size_t cb_put_string(const ascii_char_t* _Nonnull text); +size_t nb_put_string(const ascii_char_t* _Nonnull text); /// @brief gets a char from serial /// @param /// @return -utf_char_t cb_get_char(void); +utf_char_t nb_get_char(void); /// @brief puts a char in serial /// @param ch -void cb_put_char(utf_char_t ch); +void nb_put_char(utf_char_t ch); /// @brief Hangs the firmware. /// @param void no args. -void cb_restart_machine(void); +void nb_restart_machine(void); /// @brief Flushs the TLB. /// @param void no args. -void cb_flush_tlb(void); +void nb_flush_tlb(void); /// @brief Print current kernel name. /// @param -void cb_print_name(void); +void nb_print_name(void); /// @brief String length getter /// @param str the string. @@ -195,14 +195,14 @@ size_t strlen(_Nonnull caddr_t str); /// @return size_t strcmp(_Nonnull caddr_t src, _Nonnull caddr_t cmp); -typedef void (*cb_proc_t)(); +typedef void (*nb_proc_t)(); /// \brief ASCII character. typedef char ascii_char_t; /// @brief Linear Executable Header /// @author Amlal El Mahrouss (Amlal El Mahrouss) -struct __attribute__((aligned(4))) cb_boot_header { +struct __attribute__((aligned(4))) nb_boot_header { const ascii_char_t h_mag[2]; // magic number const ascii_char_t h_name[10]; // operating system name const uint32_t h_revision; // firmware revision |
