This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

Little bit of documentation and try to fix pipeline

Ivan Ilak (Apr 21, 2023, 9:39 PM +0200) eb5428fa 32c8b686

+71 -45
+1 -1
.gitlab-ci.yml
··· 1 1 piOS: 2 - image: rushmash/gcc-arm-embedded-docker:latest 2 + image: registry.gitlab.com/iilak/pios:latest 3 3 stage: build 4 4 script: 5 5 - cmake -G Ninja -B ./build -S .
+7 -15
Dockerfile
··· 1 1 FROM ubuntu:22.04 AS base 2 2 3 - ARG BUILD_TYPE=Release 4 - ARG BUILD_DIR=build 5 - 6 3 RUN apt-get update && apt-get install -y \ 7 4 gdb-multiarch \ 8 5 wget \ ··· 10 7 make cmake ninja-build bzip2 mc file 11 8 12 9 RUN mkdir /usr/opt/ 13 - 14 10 15 11 RUN wget --directory-prefix=/usr/opt/ https://developer.arm.com/-/media/Files/downloads/gnu-a/10.3-2021.07/binrel/gcc-arm-10.3-2021.07-aarch64-aarch64-none-elf.tar.xz 16 12 RUN mkdir -p /usr/opt/aarch64-none-elf ··· 30 26 RUN ln -s /usr/opt/gcc-arm-none-eabi/bin/arm-none-eabi-ld /usr/bin/arm-none-eabi-ld 31 27 RUN ln -s /usr/opt/gcc-arm-none-eabi/bin/arm-none-eabi-objcopy /usr/bin/arm-none-eabi-objcopy 32 28 33 - 34 - ENV CC="/usr/bin/aarch64-none-elf-gcc" 35 - ENV CXX="/usr/bin/aarch64-none-elf-gcc" 36 - 37 29 WORKDIR /home/piOS 38 30 39 - COPY . . 31 + # COPY . . 40 32 41 - FROM base AS build 33 + # FROM base AS build 42 34 43 - RUN rm -rf ./${BUILD_DIR} 44 - RUN cmake -G Ninja -B ./${BUILD_DIR} -S . --debug-output 45 - RUN cmake --build ./${BUILD_DIR} 35 + # RUN rm -rf ./${BUILD_DIR} 36 + # RUN cmake -G Ninja -B ./${BUILD_DIR} -S . --debug-output 37 + # RUN cmake --build ./${BUILD_DIR} 46 38 47 - FROM scratch AS export-stage 48 - COPY --from=build ./home/piOS/build/bin . 39 + # FROM scratch AS export-stage 40 + # COPY --from=build ./home/piOS/build/bin . 49 41
+63 -10
os/include/kernel/atag.h
··· 1 1 // All implementation details have been taken from here 2 2 // http://www.simtec.co.uk/products/SWLINUX/files/booting_article.html#appendix_tag_reference 3 + /** 4 + * @file atag.h 5 + * @brief ATAG parsing 6 + */ 3 7 4 8 #include <stdint.h> 5 9 6 10 #ifndef ATAG_H 7 11 #define ATAG_H 8 12 13 + /** 14 + * @brief Prints the ATAGs 15 + */ 9 16 void print_atags(uint32_t address); 10 17 11 18 #define ATAG_NONE 0 ··· 19 26 #define ATAG_VIDEOLFB 0x54410008 20 27 #define ATAG_CMDLINE 0x54410009 21 28 29 + /** 30 + * @brief ATAG header structure 31 + */ 22 32 typedef struct atag_header 23 33 { 24 34 uint32_t size; /**< Size in words of this tag */ 25 35 uint32_t tag_type; /**< Tag value */ 26 36 } atag_header; 27 37 28 - /* ATAG_NONE ends the list of ATAGs */ 38 + /** 39 + * @brief ATAG_NONE structure 40 + * 41 + * This is the end of the list of ATAGs. 42 + */ 29 43 typedef struct atag_none 30 44 { 31 45 /* No further data in this ATAG */ 32 46 } atag_none; 33 47 34 - /* ATAG_CORE begins the list of ATAGs */ 48 + /** 49 + * @brief ATAG_CORE structure 50 + * 51 + * This is the first ATAG in the list. It is required. It contains the flags 52 + * and page size. 53 + */ 35 54 typedef struct atag_core 36 55 { 37 56 /* Optional entries below */ ··· 40 59 uint32_t rootdevice; /**< Root device number */ 41 60 } atag_core; 42 61 43 - /* ATAG_MEM defines a physical memory region */ 62 + /** 63 + * @brief ATAG_MEM structure 64 + * 65 + * This ATAG describes a physical memory region. 66 + */ 44 67 typedef struct atag_mem 45 68 { 46 69 uint32_t size; /**< Size of region */ ··· 49 72 50 73 /* ATAG_VIDEOTEXT defines a VGA text screen. Not relevant to a Raspberry Pi */ 51 74 52 - /* ATAG_RAMDISK defines an initial ramdisk - floppy images only? */ 75 + /** 76 + * @brief ATAG_RAMDISK structure 77 + * 78 + * This ATAG describes the location of a ramdisk. 79 + */ 53 80 typedef struct atag_ramdisk 54 81 { 55 82 uint32_t flags; /**< Bit 0 = load, bit 1 = prompt */ ··· 57 84 uint32_t start; /**< Start block of ram disk */ 58 85 } atag_ramdisk; 59 86 60 - /* ATAG_INITRD2 - define physical location of ramdisk image */ 87 + /** 88 + * @brief ATAG_INITRD2 structure 89 + * 90 + * This ATAG describes the location of an initial ramdisk. 91 + */ 61 92 typedef struct atag_initrd2 62 93 { 63 94 uint32_t address; /**< Address of ramdisk image */ ··· 71 102 uint32_t high; 72 103 } atag_serial; 73 104 74 - /* ATAG_REVISION - board revision number */ 105 + /** 106 + * @brief ATAG_REVISION structure 107 + * 108 + * This ATAG describes the revision of the board. 109 + */ 75 110 typedef struct atag_revision 76 111 { 77 112 uint32_t revision; 78 113 } atag_revision; 79 114 80 - /* ATAG_VIDEOLFB - describes a framebuffer */ 115 + /** 116 + * @brief ATAG_VIDEOLFB structure 117 + * 118 + * This ATAG describes the parameters for a framebuffer type display. 119 + */ 81 120 typedef struct atag_videolfb 82 121 { 83 122 uint16_t width; /**< Width of buffer */ ··· 96 135 unsigned char reservedpos; /**< Position of reserved bits */ 97 136 } atag_videolfb; 98 137 99 - /* ATAG_CMDLINE - kernel command line */ 138 + /** 139 + * @brief ATAG_CMDLINE structure 140 + * 141 + * This ATAG describes the command line to be passed to the kernel. 142 + */ 100 143 typedef struct atag_cmdline 101 144 { 102 145 char *commandline; /**< Multiple characters from here */ 103 146 } atag_cmdline; 104 147 148 + /** 149 + * @brief ATAG structure 150 + * 151 + * This is the union of all the ATAG types. 152 + */ 105 153 typedef struct atag_t 106 154 { 107 155 atag_header header; ··· 118 166 }; 119 167 } atag_t; 120 168 121 - #define tag_next(t) ((atag_t *)((uint32_t *)(t) + (t)->header.size)) 122 - #define tag_size(type) ((sizeof(atag_header) + sizeof(type)) >> 2) 169 + #define tag_next(t) \ 170 + ((atag_t *)((uint32_t *)(t) + (t)->header.size)) /**< Get next tag */ 171 + #define tag_size(type) \ 172 + ((sizeof(atag_header) + sizeof(type)) >> 2) /**< Get size of tag */ 123 173 174 + /** 175 + * @brief Get the memory size from the ATAGs 176 + */ 124 177 uint32_t get_mem_size(atag_t *atags); 125 178 126 179 #endif
-19
os/include/peripherals/mailbox.h
··· 1 - #include "base.h" 2 - #ifndef P_MBOX_H 3 - #define P_MBOX_H 4 - 5 - /** 6 - * \ingroup peripherals 7 - * The offsets for Mailbox registers (For raspi 3,4). 8 - */ 9 - enum 10 - { 11 - MBOX_BASE 12 - = (MMIO_BASE + 0xB880), /**< The base address for Mailbox registers */ 13 - MBOX_READ = (MBOX_BASE + 0x00), /**< Reads messages from the GPU */ 14 - MBOX_STATUS 15 - = (MBOX_BASE + 0x18), /**< Status for READ and WRITE registers */ 16 - MBOX_WRITE = (MBOX_BASE + 0x20) /**< Writes messages to the GPU */ 17 - }; 18 - 19 - #endif