Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/tex/30pin.tex
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ \section{Constants}
\end{itemize}

\section{Data Structures}
\subsection{\texttt{NB\_tpin\_recovery\_packet}}
\subsection{\texttt{nb\_tpin\_recovery\_packet}}
\begin{lstlisting}[language=C]
struct _nb_tpin_recovery_packet
{
Expand All @@ -55,7 +55,7 @@ \subsection{\texttt{NB\_tpin\_recovery\_packet}}
};
\end{lstlisting}

\textbf{Typedef:} \texttt{NB\_tpin\_recovery\_packet\_t}
\textbf{Typedef:} \texttt{nb\_tpin\_recovery\_packet\_t}

\section{Enumerations}
\subsection{Packet Kinds}
Expand Down
2 changes: 2 additions & 0 deletions lib/cxx-abi.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

#pragma once

#include <lib/boot.h>

#define DSO_MAX_OBJECTS (128)

struct atexit_func_entry_t final {
Expand Down
28 changes: 15 additions & 13 deletions src/neboot-start.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,28 +45,28 @@ void cb_start_exec(void) {

// let the hart 0 init our stuff.
if (hart == 0) {
cb_put_string("CB> Welcome to NeBoot, (c) Amlal El Mahrouss. Built the ");
cb_put_string("NB> Welcome to NeBoot, (c) Amlal El Mahrouss. Built the ");
cb_put_string(__DATE__);
cb_put_string("\r\r\n");

#ifdef __COMPILE_POWERPC__
cb_put_string("CB> CPU: PowerPC 64-bit Based SoC.\r\r\n");
cb_put_string("NB> CPU: PowerPC 64-bit Based SoC.\r\r\n");
#endif // __COMPILE_POWERPC__

#ifdef __COMPILE_AMD64__
cb_put_string("CB> CPU: x64 Based SoC.\r\r\n");
cb_put_string("NB> CPU: x64 Based SoC.\r\r\n");
#endif // __COMPILE_AMD64__

#ifdef __COMPILE_ARM64__
cb_put_string("CB> CPU: AArch64 Based SoC.\r\r\n");
cb_put_string("NB> CPU: AArch64 Based SoC.\r\r\n");
#endif // __COMPILE_ARM64__

#ifdef __COMPILE_ARM32__
cb_put_string("CB> CPU: AArch32 Based SoC.\r\r\n");
cb_put_string("NB> CPU: AArch32 Based SoC.\r\r\n");
#endif // __COMPILE_ARM64__

#ifdef __COMPILE_RISCV__
cb_put_string("CB> CPU: RV64 Based SoC.\r\r\n");
cb_put_string("NB> CPU: RV64 Based SoC.\r\r\n");
#endif // __COMPILE_RISCV__
}

Expand All @@ -89,29 +89,30 @@ void cb_start_exec(void) {

if (rev != NB_BOOT_VER) {
if (hart == 0) {
cb_put_string("CB> Can't Boot the StageTwo, LX invalid signature. (CB0003)\r\n");
cb_put_string("NB> Can't Boot the StageTwo, LX invalid signature. (CB0003)\r\n");
}
} else {
if (hart == 0) {
cb_pci_append_tree("@stage2-lx", (cb_pci_num_t) boot_hdr, sizeof(struct cb_boot_header));

cb_put_string("CB> Executing StageTwo: ");
cb_put_string("NB> Executing StageTwo: ");
cb_put_string((const char*) boot_hdr->h_name);
cb_put_char('\r');
cb_put_char('\n');

// printf("CB> address: %x\n", boot_hdr->h_start_address);
// printf("NB> address: %x\n", boot_hdr->h_start_address);
}

if (boot_hdr->h_start_address != 0) {
cb_boot_processor_ready = 1;
cb_start_context(boot_hdr->h_start_address);
cb_boot_processor_ready = 0;
}

cb_put_string("CB> StageTwo has returned? (CB0002)\r\n");
cb_put_string("NB> StageTwo has returned? (CB0002)\r\n");
}
} else {
cb_put_string("CB> Trying EPM partition...\r\n");
cb_put_string("NB> 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);
Expand All @@ -131,16 +132,17 @@ void cb_start_exec(void) {

cb_boot_processor_ready = 1;
cb_start_context((uintptr_t) (voidptr_t) blk + start_lba);
cb_boot_processor_ready = 0;

if (hart == 1) {
cb_put_string("CB> Can't boot to StageTwo. (CB0001)\r\n");
cb_put_string("NB> Can't boot to StageTwo. (CB0001)\r\n");
}
}
}

if (hart == 1) {
cb_put_string(
"CB> Can't boot to StageTwo via EPM, no bootable partition blocks found. (CB0001)\r\n");
"NB> Can't boot to StageTwo via EPM, no bootable partition blocks found. (CB0001)\r\n");
}
}

Expand Down
Loading