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 /doc | |
| 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 'doc')
| -rw-r--r-- | doc/tex/30pin.tex | 16 | ||||
| -rw-r--r-- | doc/tex/epm.tex | 6 | ||||
| -rw-r--r-- | doc/tex/pci-tree.tex | 18 |
3 files changed, 28 insertions, 12 deletions
diff --git a/doc/tex/30pin.tex b/doc/tex/30pin.tex index 386ddbe..11830fb 100644 --- a/doc/tex/30pin.tex +++ b/doc/tex/30pin.tex @@ -68,6 +68,22 @@ Defines the kinds of packets used in the 30pin recovery protocol: \item \texttt{TPIN\_RECOVERY\_PACKET\_KIND\_EOP = 3} \item \texttt{TPIN\_RECOVERY\_PACKET\_KIND\_EOP\_ACK = 4} \item \texttt{TPIN\_RECOVERY\_PACKET\_KIND\_EOP\_NACK = 5} + \item \texttt{TPIN\_RECOVERY\_PACKET\_KIND\_EOP\_RESET = 6} \end{itemize} +\section{30PIN Extensions} + +\subsection{Validation Extension 1 (VE-1)} + +A valid 30pin recovery packet must have the magic number set to \texttt{"TP"}. +Moreover, the packet should be validated based on the CRC32 algorithm. + +\begin{lstlisting}[language=C] +void validate_entry(nb_tpin_crc_t crc, nb_tpin_recovery_packet_t* packet); +\end{lstlisting} The `nb\_tpin\_crc\_t' type shall be of size 4 bytes to hold the CRC32 checksum. + +\begin{lstlisting}[language=C] +typedef uint8_t nb_tpin_crc_t[sizeof(uint32_t)]; +\end{lstlisting} This ensures that the byte are indexable and compatible with CRC32 calculations. Such CRC32 shall be stored in big-endian order. As per networking protocols standard. + \end{document} diff --git a/doc/tex/epm.tex b/doc/tex/epm.tex index c8b1d7a..db610e7 100644 --- a/doc/tex/epm.tex +++ b/doc/tex/epm.tex @@ -114,13 +114,13 @@ struct __attribute__((packed)) part_block { \subsection{\texttt{cb\_filesystem\_exists}} \begin{lstlisting}[style=customc] -boolean cb_filesystem_exists(caddr_t fs, size_t len); +boolean nb_filesystem_exists(caddr_t fs, size_t len); \end{lstlisting} Checks if a filesystem name is supported. \subsection{\texttt{cb\_parse\_partition\_block\_data\_at}} \begin{lstlisting}[style=customc] -bool cb_parse_partition_block_data_at( +bool nb_parse_partition_block_data_at( voidptr_t blob, size_t blob_sz, size_t index, @@ -132,7 +132,7 @@ Parses an EPM partition block from a blob at the specified index and returns LBA \subsection{\texttt{cb\_parse\_partition\_block\_at}} \begin{lstlisting}[style=customc] -part_block_t* cb_parse_partition_block_at( +part_block_t* nb_parse_partition_block_at( voidptr_t blob, size_t blob_sz, size_t index); diff --git a/doc/tex/pci-tree.tex b/doc/tex/pci-tree.tex index 5ca6dfd..37f3581 100644 --- a/doc/tex/pci-tree.tex +++ b/doc/tex/pci-tree.tex @@ -33,17 +33,17 @@ Language of implementation is the C programming language \begin{lstlisting} struct hw_nb_pci_tree { - cb_pci_num_t d_magic; - cb_pci_num_t d_version; - cb_pci_num_t d_off_props; - cb_pci_num_t d_off_struct; - cb_pci_num_t d_sz_props; - cb_pci_num_t d_sz_struct; + nb_pci_num_t d_magic; + nb_pci_num_t d_version; + nb_pci_num_t d_off_props; + nb_pci_num_t d_off_struct; + nb_pci_num_t d_sz_props; + nb_pci_num_t d_sz_struct; - cb_pci_num_t d_first_node; - cb_pci_num_t d_next_sibling; + nb_pci_num_t d_first_node; + nb_pci_num_t d_next_sibling; - cb_pci_char_t d_name[NB_PCI_NAME_LEN]; + nb_pci_char_t d_name[NB_PCI_NAME_LEN]; }; \end{lstlisting} |
