Commit Graph

58 Commits

Author SHA1 Message Date
Yann MAGNIN 49508b417c vxGOS - v0.7.0-14 : RaspberryPi3b FrameBuffer and ASLR
*add*
> [scripts]
  | [patch_kernel_img] a small tool used to "patch" kernel image to a
        512 bytes-aligned image size. This is required for the
        RaspberryPi Imager
> [boards]
  | [common] add endianness information
  | [raspi3b] add GOT section patching
  | [raspi3b] add default font assets
  | [raspi3b] add GPU board information dumping routine at startup
  | [raspi3b] add GPU framebuffer (physical HDMI seems not work) support
  | [raspi3b] add GPU mailbox support
  | [raspi3b] add GPU memory allocator support

*update*
> [scripts]
  | [vxdev] now support endian handling using VXDEV_TOOLCHAIN_ENDIANNESS
> [sdk]
  | [converter] support endian encoding selection (LSB, MSB)
> [boards]
  | [raspi3b] proper link common display interface with framebuffer interface
  | [raspi3b] proper link fake entry with real entry
  | [raspr3b] proper send relocation information to the bootloader entry
  | [raspi3b] proper isolate the MiniUART driver

*fix*
> [scripts]
  | [vxdev] force ELF section displayed in "wide" format
> [boards]
  | [fxcg50] swap selected and unselected icon
  | [raspi3b] proper support relocation TAG
  | [raspi3b] proper generate 512 bytes-aligned image
  | [raspi3b] fix bootstrap ALSR patching mechanism
2023-06-17 14:14:17 +02:00
Yann MAGNIN b316b98004 vxGOS - v0.7.0-13 : RaspberryPi3b bootstrap and MiniUART driver
*add*
> [boards]
  | [raspi3b] add auxiliary hardware module bitfields (power, IRQ and UART1)
  | [raspi3b] add gpio hardware module bitfields
  | [raspi3b] add bootloader fake entry (test entry)
  | [raspi3b] add bootloader stack

*fix*
> [boards]
  | [raspi3b] patch missing image size in image header
  | [raspi3b] add missing "dfont()" BIOS build request
> [bootloader]
  | [linker] move bootloader stack
2023-06-10 13:33:21 +02:00
Yann MAGNIN 4ea5758074 vxGOS - v0.7.0-12 : proper Casio's devices application generation
*add*
> [boards]
  | [fx9860] add addin icon

*update*
> [boards]
  | [fx9860] icon support
  | [fx9860] generation date support
  | [fxcg50] icon support
  | [fxcg50] generation date support

*fix*
> [boards]
  | [fx9860] fix bad icon wiping offset
2023-06-08 13:48:02 +02:00
Yann MAGNIN d596c74634 vxGOS - v0.7.0-11 : add fx9860 support
*add*
> [vxgos]
  | [fx9860] add vxsdk build entry
  | [fx9860] add G1A file generation
  | [fx9860] add ASLR support
  | [fx9860] add bios primitives
  | [fx9860] add new 3x5 font
  | [fx9860] add custom GCC toolchain dependency for vxSDK
> [sdk]
  | [converter] support assets filter

*update*
> [scripts]
  | [vxdev] proper support "per board" assets requirements declaration
> [bootloader]
  | [display] proper font BIOS-dependant (board-specific) interface

*fix*
> [sdk]
  | [converter] fix default font border size
  | [converter] remove useless core function exposition
> [bootloader]
  | [assets] fix font8x9 to font8x12 (the real size)
> [scripts]
  | [vxdev] convert assets only if needed
2023-06-05 20:57:31 +02:00
Yann MAGNIN cefccb8bb1 vxGOS - v0.7.0-10 : add raspi3b support (WIP)
*add*
> [vxgos]
  | [raspi3b] add vxsdk build entry
  | [raspi3b] add bzImage generation
  | [raspi3b] add ASLR support (WIP)
  | [raspi3b] add fake bios primitives support (WIP)
> [bootloader]
  | [linker] add `.bootloader.header` section for image that need header

*update*
> [scripts]
  | [vxdev] isolate compiler flags from "vxsdk.toml" to "compiles.toml"
  | [vxdev] generate toolchain file for CMake (remove obscure env hook used by the vxSDK)

*fix*
> [bootloader]
  | [linker] disable got section size assert
  | [linker] ignore `.note.*` section
2023-06-02 12:51:39 +02:00
Yann MAGNIN 584e95e11b vxGOS - v0.7.0-9 : fix console issues
*add*
> [scripts]
  | [vxdev] add log level selection
> [bootloader]
  | [unitests] input buffer checks

*update*
> [bootloader]
  | [console] isolate line discipline
  | [console] isolate cursor interaction
  | [console] isolate buffer closing ("\n\0" insertion)
  | [console] isolate input buffer initialisation and closing
  | [console] rework complete input buffer drawing logic
  | [console] proper save font information
  | [display] allow dascii font NULL argument (auto fetch font information)
  | [unitests] output buffer checks

*fix*
> [scripts]
  | [vxdev] fix GCDA/GCDO file purge
  | [vxdev] fix coverage color
  | [vxdev] fix coverage error decoding
  | [vxdev] fix requirements.txt parsing error (abort all)
> [bootloader]
  | [console] fix various input buffer error
2023-05-14 20:44:28 +02:00
Yann MAGNIN 18c917f257 vxGOS - v0.7.0-8 : Improve CMake abstraction + fix console output buffer
*add*
> [bootloader]
  | [console] add reset output buffer primitive (for unitests mainly)

*update*
> [scripts]
  | [vxdev] change CMake abstraction interface (unitests + build)
> [bootloader]
  | [unitests] switch cr_assert_eq -> cr_expect_eq to avoid memory leak error
  | [unitests] check output buffer behavior

*fix*
> [scripts]
  | [vxdev] fix missing debug logs
  | [vxdev] fix GCDA checksum error if binary change (purge GCDA file each time)
> [bootloader]
  | [console] fix various output buffer error
2023-05-13 13:43:11 +02:00
Yann MAGNIN f75210e0fb vxGOS - v0.7.0-7 : Improve unitests interface + PoC code coverage
*add*
> [script]
  | [vxdev] proper support CMake's generator coherency
  | [vxdev] gcovr (code coverage) abstraction
  | [vxdev] unitests now support a requirements.txt which describes tests

*update*
> [scripts]
  | [vxdev] rename KASLR for more appropriate ASLR
  | [vxdev] change CMake generation interface
  | [vxdev] proper isolate Criterion abstraction
> [bootloader]
  | [unitests] change unitests architecture
  | [unitests] add check for output buffer code coverage

*fix*
> [bootloader]
  | [console] first fix for output buffer (code coverage)
2023-05-11 18:50:43 +02:00
Yann MAGNIN 8acbd8bceb vxGOS - v0.7.0-6 : PoC unitests interface
*add*
> [script]
  | [vxdev] add unitests interface
  | [vxdev] add bootloader unitests support
  | [vxdev] add cmake unitests generation
> [bootloader]
  | [unitests] add console open/close primitives unitests

*update*
> [script]
  | [vxdev] depreciate 'configure'
  | [vxdev] depreciate 'install'
  | [vxdev] depreciate 'uninstall'
  | [vxdev] rename build cmake abstraction
  | [vxdev] move KASLR script to build-specific module

*fix*
> [script]
  | [vxdev] fix generated build cmake template layout
> [bootloader]
  | [fxcg50] remove nonbreaking spaces
  | [console] close: proper clear console object
  | [console] open:  proper return error code
2023-05-04 15:00:59 +02:00
Yann MAGNIN 73711a76b2 vxGOS - v0.7.0-5 : Refacto bootloader display + PoC assets converter
*add*
> [sdk]
  | [converter] add font assets converter
  | [converter] add converter user interface
  | [converter] add font output generator selection
> [bootloader]
  | [assets] add default font
  | [display] add character drawing primitive

*update*
> [scripts/vxdev]
  | [bootloader] generate bootloader assets using SDK converter
> [bootloader]
  | [display] move all drawing primitives to "common source" (no bios)
  | [fxcg50] add small r61524 (screen) driver for `_bios_dupdate()`

*fix*
> [scripts/vxdev]
  | [kaslr] proper handle R_SH_GOT32 reloc
2023-05-01 15:25:35 +02:00
Yann MAGNIN b3e1a6ed6c vxGOS - v0.7.0-4 : PoC complete console (not stable)
*add*
> [bootloader]
  | [fxcg50] small driver for SH7305 KEYSC hardware module
  | [fxcg50] high-level key handling (special and common)
  | [console] add read primitive

*update*
> [bootloader]
  | [console] proper isolate input buffer and output buffer
  | [console] expose console buffer primitives
  | [console] isolate the input buffer primitives
  | [console] isolate the output buffer primitives
2023-04-28 14:05:53 +02:00
Yann MAGNIN ac38d420f7 vxGOS - v0.7.0-3 : refacto bios and board-specific sources architecture
*add*
> [vxdev]
  | [kernel] add sources handling
> [bootloader]
  | [ulib] add small as possible libc routines
  | [ulib] add calloc, memset, memcpy, free, malloc, vsnprintf

*update*
> [.nvimrc]
  | proper handle compilation flags declaration
> [scripts]
  | [checkers] add pylint checker (WIP)
  | [vxdev]
    | [cli] diable installation an uninstallation steps
    | [core] prepare kernel build support
    | [core] centralize KASLR generation
    | [bootloader] proper support libs link
    | [bootloader] proper support new board-specific architecture
    | [cmake] proper support libs
    | [cmake] disable install and uninstall steps
    | [kaslr] automatically invoke board-specific KASLR generating routine
> [bootloader]
  | [fxcg50] fragmentation BIOS primitives
  | [console] first implementation of the writing primitive
  | [console] prepare reading routine
  | [display] add some drawing primitive (dinfo, dline, dpixel)
> [vxsdk]
  | [toml] remove libc request

*fix*
> [bootloader]
  | [fxcg50] proper send argument high-level routine
2023-04-27 11:42:12 +02:00
Yann MAGNIN 74571c7882 vxkernel - v0.7.0-2 : fix bootloader bootstrap + prepare kernel build
*add*
> [bootloader]
  | [console] prepare console API (WIP)
  | [main] simple welcome message using console API (WIP)

*update*
> [kernel]
  | small architecture change (WIP)

*fix*
> [vxdev]
  | [kaslr] proper check for unsupported relocation symbols methods
> [bootloader]
  | [fxcg50/bios] fix `printMiniMini()` syscall wrapper
  | [fxcg50/asm] fix syscall trampoline code address
  | [display] fix alloca security check
2023-04-14 17:18:00 +02:00
Yann MAGNIN 597b25682a vxkernel - v0.7.0-1 : architecture overhaul + bootloader KASLR resolve
---

The objective of this early rework of the kernel architecture is to prepare the
project to run on other hardware than the Casio calculator (like Raspberry Pi
devices). This is why I switched the kernel workflow to integrate a custom
bootloader for the particular kernel image we generate.

The v0.7.0 of the kernel is not released since the USB driver is not stable
yet. But the need to deeply rework the architecture is prioritized. So, as this
is a critical update, I update the minor version (which is a major indicator
here since I don't have the mature version yet (v1.x.x)).

Also, I work on a brand-new micro-kernel (for the Raspberry Pi 3b and Google
Pixels), so, the name of this project, Vhex, has migrated to a temporary
name(?): VxGOS (for Vhex Gaming Operating System), which will be changed as
soon as the v0.8.0 is released. (I choose this name only because the word
"gaming" make me laugh. Take showers folks).

The objective of version 0.8.0 is to support:

    - architecture rework
    - internal bootloader
    - proper KASLR support
    - stack protection (libSSP)

---

*update*
> [common]
  | [kernel] move kernel source file in the new "vxgos" root directory
  | [boards] move board-related files / scripts in the new "vxgos"
  | [bootloader] support fxcg50 self-translation from ROM to RAM
  | [bootloader] support fxcg50 KASLR patching
  | [scripts] move `vxdev` tool in the new "scripts" root directory
  | [scripts] move norm related files to "checker" directory
  | [vxsdk] update the vxSDK indication file
2023-04-13 13:59:46 +02:00
Yann MAGNIN 18e895dfb7 vxkernel - v0.7.0-5 : setup libSSP (WIP) + support USB description step (WIP)
*add*
> [cpu]
  | add SH-CPU context structure
  | try to support Stack-Protector but seems not insert check during compile-time
  | add stack abord routine invocation (WIP)
> [usb]
  | add configuration structure
  | add configuration handling
  | add USB logger (WIP)
  | add USB high-level abstraction for debugging (WIP)
  | add USB driver
  | add fake SDL2 USB driver

*update*
> [usb]
  | clean DCP configuration API (WIP)
  | prepare proper pipe handling (WIP)
  | isolate USB protocole initialisation
  | enable some interruption
> [vxsdk.toml]
  | force enable libSSP (but seems not work o(x_x)o)

*fix*
> [usb]
  | fix endpoint type ID
> [display]
  | [dtext] workaround to possible stack corruption (WIP)
> [hypervisor]
  | [switch] fix NULL power primitives
> [vxdev]
  | use `/usr/bin/env python3` instead of `python3`
2023-04-03 10:52:05 +02:00
Yann MAGNIN c6aa4b5ac4 vxkernel - v0.7.0-4 : add USB request handling (WIP)
*add*
> [vhex/display]
  | [text] add va_list version of dtext() and dprint()
> [vhex/defs]
  | [types] add x_union_alone
> [vhex/usb]
  | [request] add USB request (WIP)
  | [pipe] add USB pipe API (WIP)
  | [dcp] add USB DCP API (WIP)
  | [macros] add interrupt clearing helper
  | [descriptor] add main USB descriptors

*update*
> [vhex/defs]
  | [attributes] rename VPACKEDENUM -> VPACKED_ALONE
> [vhex/usb]
  | [interrupt] enable setup interruptions
  | [open] perform USB device configuration check

*fix*
> [vhex/defs]
  | [call] fix last argument injection
> [vhex/usb]
  | [macros] fix delay for register sync.
  | [open] force-clear interrupt flags befor enabling interruption
2023-01-27 16:21:44 +01:00
Yann MAGNIN 42c3fabb34 vxkernel - v0.7.0-3 : add USB power handling (WIP)
*add*
> [vhex/driver/mpu/sh/sh7305/]
  | [tmu] add `sh7305_tmu_sleep_us_spinwait()`
  | [usb] add power management API
  | [usb] add open() primitive (WIP)
  | [usb] add interrupt handler (WIP)
  | [usb] add register sync macro
  | [usb] add interrupt handler

*update*
> [boards/fxcg50]
  | [fxcg50.ld] remove useless interruption gates indication
  | [fxcg50.ld] proper calculate the gap for interrupt gates
  | [fxcg50.ld] add doc about `.bss` section behaviour
> [vhex/defs]
  | [call.h] add predefined VHEX_CALL_* handlers
  | [driver.h] add USB indication (WIP)
> [vhex/driver/mpu/sh/sh7305/]
  | [tmu] proper type exposition (force `sh7305_*`)
  | [tmu] isolate TMU TSTR register
  | [tmu] use `.balign 4` instead of `.align` to minimize potential gap during linking
  | [usb] rename registers exposition

*fix*
> [vhex/module]
  | [hypervisor] fix UNUSED driver loading
> [vhex/include/vhex/defs]
  | [call] fix ALE linter error in VHEX_CALL (use Lephe' tricks)
> [nvimrc]
  | fix assembly file linter (use our custom GCC)
  | fix "_DEFAULT_SOURCE" exposition
> [vhex/driver/mpu/sh/sh7305]
  | [intc] explicit INTC_* enum offset
  | [usb] add missing INTENB0.NRDYE bit
2023-01-25 11:13:25 +01:00
Yann MAGNIN 3a42d0e055 vxkernel - v0.7.0-2 : add USB logger API
*add*
> [include]
  | [usb] add USB logger API
  | [usb] add USB logger structur
> [src/modules]
  | [usb] add USB module information
  | [usb] add USB logger API

*fix*
> [display/draw]
  | [dclear] return 0 if C_NONE color is passed
> [vxsdk.toml]
  | [sdl2] force export `_GNU_SOURCE`
> [nvimrc]
  | force display trailing spaces
  | force display non printable characters
2023-01-23 15:22:09 +01:00
Yann MAGNIN 5ea6e33f46 vxkernel - v0.7.0-1 : fix linker script + update SDL2 keycode + add USB info
*add*
> [include/driver/sh7305/]
  | [usb] add USB hardware bitfields

*update*
> [display/draw]
  | [line] update all line-drawing prototype to `d*line(int color, ...)`
  | [rect] rename `drect_filled()` -> `drect()`
> [drivers/mpu/sdl2]
  | [keyboard] remove hardcoded number of translated key to facilitate update
  | [keyboard] add [0] to [9] keys support
  | [keyboard] change [SHIFT] and [ALPHA] key translation
  | [keyboard] proper use of `SDLK_*` macros for SDL2 key

*fix*
> [.nvimrc]
  | fix header file which are considered as a C++ file
> [boards/fxcg50]
  | [fxcg50.ld] switch tab to 4 spaces
  | [fxcg50.ld] proper inject `.got*` and `.data` sections in `userram`
  | [fxcg50.ld] isolate `.vhex.vbr` section before `.bss`
  | [fxcg50.ld] explicit that the `.bss` section should not be stored in ELF
  | [fxcg50.ld] isolate `.vhex.vbr` gaps in `.bss` section
  | [fxcg50.ld] do not inject `.xram` section in `userram`
> [display/draw]
  | [rect] fix missing header
2023-01-22 18:39:43 +01:00
Yann MAGNIN 7713e5e059 vxkernel - v0.7.0 : SDL2 and FXCG90 support
*notes*
> full project architecture update
> support the new vxSDK integration
> support 64bits architectures
> support SLD2 "fake" board
> add DMA driver and API
> add Timer driver and API
> update configuration script (now called "vxdev")
> rework Keyboard API
> rework scripts isolation
> many fixes
> many "early-optimisations"
> explicit neovim ALE linter configuration
2023-01-18 20:20:49 +01:00
Yann MAGNIN 0ac038e1e2 vxkernel - v0.7.0-rc0 : candidate release for the v0.7.0
*add*
> [.nvimrc]
  | add minimal ALE configuration for neovim
2023-01-18 19:59:06 +01:00
Yann MAGNIN d59a8c986f vxkernel - v0.6.0-31 : fix vxdev + fix FPS synchronization API + disable DMA
*fix*
> [vxdev]
  | proper send script arguments
  | proper boards scanning
> [src/driver/screen/r61524]
  | disable double buffering per default
> [FPS]
  | fix FPS sync
2023-01-17 22:13:43 +01:00
Yann MAGNIN 3fb1bb296e vxkernel - v0.6.0-30 : switch tab to 4 spaces (oskour) + update scripts
*update*
> [common]
  | switch tab to 4 spaces
> [scripts]
  | isolate vxdev scripts
  | add small script for switching tabs to 4 spaces
2023-01-17 21:10:51 +01:00
Yann MAGNIN d656a04385 vxkernel - v0.6.0-29 : fix fxcg50 support
*fix*
> [board/fxcg50]
  | [fxcg50.ld] add ".dynamic" section support
> [kernel/src/module/kalloc]
  | [area_vhex] force first alloc block to NULL
> [vxsdk.toml]
  | [fxcg50] force little endian
  | [fxcg50] force SH4A with no-FPU instruction generation
  | [fxcg50] add missing lib dependencies (libgcc and libc)
  | [fxcg50] proper export linker flags for GCC
  | [sdl2] proper export linker script
2023-01-15 18:16:48 +01:00
Yann MAGNIN c7baead8b3 vxkernel - v0.6.0-28 : update vxSDK integration + "on-the-fly" kernel sources fix
*update*
> [boards]
  | [fxcg50] update board-specific header path
> [scripts/core]
  | [cmake] proper support toolchain indication (vxSDK integration)
> [vxsdk.toml]
  | disable verbose per default
  | update exported flags (WIP)
  | update linker script dependency for fxcg50 (WIP)

*fix*
> [kernel/src]
  | missing return values
> [vxsdk.toml]
  | force expose libmath for SDL2
  | fix ENV variable name for linker script
2023-01-14 14:57:20 +01:00
Yann MAGNIN 735c8b4103 vxkernel 0.6.0-27 : Fix assets generation
@update
> [CMakeLists.txt]
  ¦ support extra file installation request (like linker script)
> [boards]
  ¦ [sdl2] indicate that the sdl2.ld file (linker script) should be installed
> [scripts/core/board]
  ¦ support extra file installation indication
  ¦ remove useless toolchain information (handled by the vxSDK)
> [vxsdk.toml]
  ¦ indicate converter asset prefix
  ¦ use the new ENV handling
  ¦ indicate SDL2 linker script
  ¦ indicate SLD2 correct flags information
2022-12-10 13:30:44 +01:00
Yann MAGNIN 20536b601b vxkernel 0.6.0-26 : fonctional CMake build system! (candidate)
@add
> [vxdev] && [scripts]
  ¦ refacto the configuration script, now handle all compilation step
  ¦ proper cmake abstraction
  ¦ proper isolation between "core" and "command"

@update
> [CMakeLists.txt]
  ¦ support extra C flags configuration
  ¦ support installation request
  ¦ proper remove useless explicit path information
> [boards]
  ¦ [sdl2] move "toolchain" information in the vxsdk.toml (handled by vxSDK)
  ¦ [fxcg50] move "toolchain" information in the vxsdk.toml (handled by vxSDK)
> [vxsdk.toml]
  ¦ proper use of the new ENV configuration protocol
  ¦ isolate toolchain information of each board

@fix
> [.gitignore]
  ¦ use explicit exclusion instead of explicit inclusion
  ¦ add missing kernel source files (!)
2022-12-03 16:50:02 +01:00
Yann MAGNIN 693d9b0d8f vxkernel 0.6.0-25 : switch to CMake ! (WIP)
@note
  This commit doesn't provide the complet CMake support, because many
  improvements need to be done in the vxSDK. You can only build the SDL2 board
  by hardcoding environment variables (the `vxsdk.toml file is not fonctional`)
  The "shared" forms of the library will be handled as a Virtual Dynamic Shared
  Object (vDSO) and will be common for all board. This is not supported yet.

@add
> [CMakeLists.txt]
  ¦ support project architecture
  ¦ support project configuration file
  ¦ support SDL2 board (static-only)
> [scripts]
  ¦ provide proper API
  ¦ proper isolate the board manipulation
  ¦ proper isolate the "library format" selection (static or vdso)
  ¦ generate a CMake file instead of Makefile one

@update
> [common]
  ¦ rename 'board/' to 'boards/'
  ¦ move 'assets/', 'src/' and 'include' in 'kernel/'
  ¦ remove old makefile
  ¦ in 'boards/<board-name>' proper isolate :
    ¦ board description : `board.toml`
    ¦ board file to install : e.i `fxcg50.ld`
    ¦ board source file : `src`
    ¦ board include : `include`
> [configure]
  ¦ proper refacto the script
  ¦ proper isolation between vxSDK use and user

@fix
> [kernel/src]
  ¦ [drivers/common/sdl2]
    ¦ [keyboard] remove unused object
    ¦ [keyboard] proper table size declaration
    ¦ [sdl2] fix return value
    ¦ [timer] fix return value
  ¦ [modules]
    ¦ [dstack] fix return value
    ¦ [hypervisor] fix return value
2022-11-27 10:39:06 +01:00
Yann MAGNIN ca4e598d28 VxKernel 0.6.0-24 : Add SDL2 support (fake board)
@add
<> board/sdl2
  | [board] add DMA module support
  | [board] add RTC module support
<> src/driver/mpu/x86/sdl2
  | [dma] add fake DMA driver
  | [rtc] add fake RTC driver

@update
<> driver/mpu/x86/sdl2
  | [keyboard] add key more information
  | [keyboard] display keymap when the driver is installed
  | [keyboard] allow event pop even if the `event` argument is NULL
  | [timer] display driver installation logs
  | [window] display driver installation logs
  | [window] display VRAM in x2
<> driver/mpu/sh/sh7305/
  | [keysc] allow event pop even if the `event` argument is NULL

@fix
<> board/sdl2
  | [initialize] fix constructor priority
  | [initialize] fix constructor logs
<> driver/mpu/sh/sh7305/
  | [keysc] fix safety with event NULL
  | [rtc] fix file organization
2022-08-26 10:30:46 +02:00
Yann MAGNIN 176f4cb9d1 VxKernel 0.6.0-23 : Add SDL2 support (fake board) (WIP) + update keyboard API
@add
<> board/sdl2
  | [board] add keyboard module support
<> src/driver/mpu/x86/sdl2
  | [keyboard] add fake keyboard driver

@update
<> include/vhex/keyboard
  | new keyboard API based on SDL2 event handling
<> src/driver/mpu/sh/sh7305
  | [keysc] update keysc API

@fix
<> include/vhex/keyboard
  | fix type collision with key_t
2022-08-25 20:11:32 +02:00
Yann MAGNIN 9e1ed3cf58 VxKernel 0.6.0-22 : Add SDL2 support (fake board) (WIP)
@add
<> src/driver/mpu/x86/sdl2
  | [sdl2] move SDL2 initialisation
  | [timer] add fake timer driver

@update
<> src/driver/mpu/x86/sdl2
  | [window] remove SDL2 initialisation

@fix
<> include/vhex/defs
  | [call] fix 64bits support
<> src/timer
  | [fps] fix negative margin
  | [fps] fix named fields
<> src/driver/mpu/sh/sh7305/tmu
  | [fps] fix elapsed time calculation
  | [fps] fix syncronisation waiting
  | [profiling] fix hardware time search
  | [profiling] fix safety guard for all primitives
  | [profiling] fix tmu_prof_quit()
  | [tmu] fix power symbols
  | [tmu] fix power primitives
<> src/display
  | [dtext] fix text register invalid write
2022-08-25 13:03:55 +02:00
Yann MAGNIN 2a107ad5b9 VxKernel 0.6.0-21 : Add SDL2 support (fake board) (WIP)
@add
<> board/
  | [sdl2] add fake board for the SDL2 wrapper
  | [sdl2] fake CPU atomic operation
  | [sdl2] fake hypervisor world-switch
  | [sdl2] fake kernel init
  | [sdl2] use a modified Linux linker script for adding our Vhex special sections
<> src/driver/mpu/x86/sdl2
  | add fake window driver (simple wrapper around SDL2 surface)

@update
<> vxsdk.toml
  | move board specification to the user project
  | remove the SH compiler dependency

@fix
<> board/
  | [fxcg50] move all "flags-specific" of the board in the board description file
<> src/display
  | [common] support 64-bits API!
<> src/hypervisor
  | [table] fix world initialization
<> src/timer
  | [profiling] init default structure
2022-08-25 12:51:14 +02:00
Yann MAGNIN 0bf4f487c7 VxKernel 0.6.0-20 : Add POWER management
@add
<> driver/mpu/sh/sh7305
  | [power] add power hardware module
<> driver/screen
  | [r61524] add triple buffering (DMA)

@update
<> driver/mpu/sh/sh7305
  | [dma] proper power handling
  | [intc] proper power handling
  | [keysc] proper power handling
  | [intc] proper power handling
  | [tmu] proper power handling
  | [tmu] isolate FPS API
  | [tmu] isolate profiling API

@fix
<> driver/mpu/sh/sh7305
  | [tmu] proper expose FPS functions
2022-08-24 10:17:50 +02:00
Yann MAGNIN b8abc2eae7 VxKernel 0.6.0-19 : Add DMA driver
@add
<> board/fxcg50/board
  | add DMA module support
<> src/driver/mpu/sh/sh7305/dma
  | add async transfer primitives
  | add DMA memcpy algorithm
  | add DMA memset algorithm
  | add DMA wait primitives

@update
<> vhex/dma
  | [types] change dma_id_t type
  | [interface] add dma_spinwait primitives
<> vhex/driver
  | add DMA flags for driver interface
<> vhex/driver/mpu/sh/sh7305/dma
  | expose kernel-level primitives
  | add internal types definitions
<> src/driver/mpu/sh/sh7305/dma
  | proper channel cache
  | proper channel interrupt handler
  | proper channel error handler
  | proper address translation
  | proper driver installation (context save/restore)
  | proper driver interface exposition

@fix
<> vhex/keyboard/keycode
  | fix typedef again
<> src/dma
  | fix driver exposition
  | fix driver interface link dump
<> src/driver/mpu/sh/sh7305/intc
  | fix generic handler installation
2022-08-17 13:23:28 +02:00
Yann MAGNIN 7e01fb8444 VxKernel 0.6.0-18 : Add Vhex indirect call + prepare DMA driver
@add
<> vhex/defs/call
  | add common `vhex_call_t` which allow indirect call invocation
  | add default helper macros to generate internal struct
  | add default helper macros to involve manually the vhex call
<> vhex/dma
  | add DMA user-level API
  | add DMA user-level types
  | add DNA driver-level interface
<> vhex/driver/mpu/sh/sh7305
  | [dma] add hardware definition
  | [dma] prepare DMA driver definition (WIP)
  | [dma] add DMA driver declaration (WIP)
  | [dma] prepare DMA primitives     (WIP)
<> src/dma
  | wrap the DMA driver
  | expose the DMA user-level API
  | expose the DMA module

@update
<> board/fxcg50/fxcg50.ld
  | expose the two VRAM for the future frame render which use the triple
     buffering. For now, this method add ~347ko in the generated ELF, but it's a
     temporary.
<> driver/mpu/sh/sh7305
  | [intc] rename some kernel-level function
  | [intc] use the new vhex call mechanism instead of timer-specific indirect call
  | [intc] update the generic interrupt handler installation
  | [intc] isolate the generic interrupt handler
  | [rtc] use the new vhex call mechanism instead of rtc-specific indirect call
  | [keysc] use the new vhex call mechanism

@fix
<> src
  | [keyboard] fix key_t type definition
  | [keyboard] fix the driver priority
  | [timer] fix the driver priority
2022-08-11 19:21:02 +02:00
Yann MAGNIN e8e63016d5 VxKernel 0.6.0-17 : Add RTC driver + prepare FS support
@add
<> include/vhex/display/draw/rect
  | add filled rectangle API
<> src/display/draw/drect
  | add filled rectangle drawing API
<> board/fxcg50/
  | add devices special section (WIP)
<> include/vhex/device
  | add device structure (WIP)
<> include/vhex/driver/mpu/sh/sh7305/
  | [intc] add primitive which allow dummy default interrupt handler
  | [rtc]  add complete RTC hardware structure
  | [rtc]  add hardware-level kernel API
<> include/vhex/fs
  | add file system abstraction API (WIP)
  | add Fugue FAT file system abstraction API (WIP)
<> include/vhex/rtc
  | add RTC user-level API
  | add driver-level interface
  | add kernel-level types
<> src/fs
  | add base Fugue abstraction (WIP)
  | add libc functions (WIP)

@update
<> include/vhex/display/draw/text
  | merge halign and valign argument
  | add special alignment flags
<> include/vhex/driver
  | add RTC driver flags
<> include/vhex/driver/mpu/sh/sh7305/cpg
  | rename weird field
  | add Spread Spectrum emulator field
  | properly expand LSTATS register
<> src/driver/mpu/sh/sh7305
  | [intc] allow user-level interrupt handler installation
  | [intc] expose common interrupt handler
  | [rtc] add RTC entire driver
<> src/driver/scree/r61524
  | use complete VRAM instead of fragmented render

@fix
<> src/display
  | [text] fix height for text display geometry
  | [text] fix alignment calculation
  | [dclear] fix geometry support
<> src/driver/mpu/sh/sh7305
  | [cpg] fix driver installation
  | [cpg] fix driver spread spectrum
  | [cpg] fix driver declaration
  | [tmu] fix exception with the profiling primitives
2022-08-08 20:19:00 +02:00
Yann MAGNIN 585254cb2e hotfix for the vxSDK 2022-08-02 14:59:03 +02:00
Yann MAGNIN 674d4b382c VxKernel 0.6.0-16 : Add rectangle API + fix horizontal line
@add
<> include/vhex/display/draw/rect
  | add filled rectangle API
<> src/display/draw/drect
  | add filled rectangle drawing API

@update
<> include/vhex/display/draw/text
  | merge halign and valign argument
  | add special alignment flags

@fix
<> src/display/font
  | fix height for text display geometry
<> src/display/text
  | fix alignment calculation
2022-06-28 17:34:00 +02:00
Yann MAGNIN 70d31c5268 VxKernel 0.6.0-15 : Add FPS API
@add
<> include/timer
  | add FPS primitives
  | update driver interface (link FPS primitives)
<> src/driver/mpu/sh/sh7305/tmu
  | add hardware-specific primitive for FPS handling
  | add CPU atomic security

@update
<> src/display/image/shader/shadow
  | finish approximately the algorithm
  | support X/Y offset
<> src/timer
  | isolate timer API, profiling API and FPS API

@fix
<> include/timer/types
  | fix special attribute declaration
  | fix types definition
2022-06-25 16:48:44 +02:00
Yann MAGNIN d48e09cb38 VxKernel 0.6.0-14 : Update whole project architecture
@update
<> configure
  | use TOML file format instead of INI for board description
  | block configuration script if it's not involved by the vxSDK
  | comment code and write documentation (WIP)
  | allow kernel module selection
<> Makefile
  | block compilation step if it's not involved by the vxSDK
  | remove the "build/" directory creation
  | moved to the root directory of the project
<> src/modules -> src
  | moved all "kernel modules" in the root directory
  | remove "kernel/" part of the project : now linked to the interrupt controller
<> vxsdk.toml
  | change compilation steps

@fix
<> driver/mpu/sh/sh7305/intc
  | fix TLB interrupt handler freeze
  | link kernel panic (exception/TLB)
<> include/vhex/display
  | add image API by default
2022-06-25 11:26:15 +02:00
Yann MAGNIN 752757e0ef VxKernel 0.6.0-13 : Add keyboard API + update timer API
@add
<> include/vhex/driver/mpu/sh/sh7305/keysc
  | add internal driver primitives
<> include/vhex/driver/mpu/sh/sh7305/tmu
  | add internal driver primitives
<> include/vhex/keyboard
  | add getkey* (high-level) API
  | add key event API
  | add key status API
  | add keycode information
  | add keyboard driver interface

@update
<> include/vhex/driver
  | add KEYBOARD driver flags
<> include/vhex/keyboard
  | isolate each part of the keyboard module
  | link the keycache part with the driver-provided keycache information
<> src/drivers/mpu/sh/sh7305/keysc
  | use the new keycache API (high-level interrupt handler)
  | update keycache API
  | link the new API in the driver device
<> src/drivers/mpu/sh/sh7305/tmu
  | add timer reservation (WIP)
  | use a "reservation" cache to known which timer is free instead of hardware
  | rename internal functions
<> src/module/display
  | Now, by default, DSTACK_CALL() create a pointer on a dstack_call_t
  | use dsubimage dstack primitive in dimage()

@fix
<> board/fxcg50/fxcg50.ld
  | remove the IL-memory and allow only the X-memory area. This because the
      bootloader uses the IL-memory for DMA transfer and other "low-level"
      routine used by Gint.
      Moreover, I originally try to move each "display-driver" in this place,
      but after some profiling and tests, the dclear()/dupdate() combo went from
      9155us up to 33250us (for many reason). So, I keep this area free, but I
      moved-back from RAM display routines.
<> board/fxcg50/initialize
  | remove "section" copy. This role has been delegated to the bootload (vxBoot)
      because, in the final ELF file generated by GCC, many relocalization
      information for the IL/X memory has been set and the bootloader cannot
      performs general relocalization.
      So, all "special section/memory" displacement has been moved in the
      bootloader and we don't have to worrying about the section copy.
<> src/drivers/mpu/sh/sh7305/tmu
  | fix delay calculation in timer reload primitive
  | disable interruption for profiling timer
<> src/module/dislay/
  | fix shader index used during the dstack_render()
  | fix many errors in dimage() shadow render (WIP)
2022-06-24 15:33:36 +02:00
Yann MAGNIN c966807cd7 VxKernel 0.6.0-12 : Fix image rendering + fix shader crash
@update
<> include/display/image/render
  | update dimage_* prototype to force return the display ID
  | update dimage_* prototype to change the arguments order
  | isolate "render" part of the API and the "shader" part
  | prepare shadow shader primitives
<> include/display/shader
  | change routine prototype (remove routine status)
  | update macros, to generate directly usable dshader_call_t pointer
  | add shader primitives to add shader on some display action
<> src/modules/display/stack
  | update shader allocation sizeof for more visibility
  | isolate shader adding
<> src/modules/display/image
  | isolate each render primitive in "render/" sub-folder
  | isolate each shader primitive in "shader/" sub-folder
  | prepare shadow shader code (WIP)
  | enable image rendering for image with no alpha channel

@fix
<> src/modules/display/stack
  | remove memset() which removed shader table allocation
2022-06-21 18:43:11 +02:00
Yann MAGNIN b2fc0db544 VxKernel 0.6.0-11 : Update text/font architecture
@update
<> board/fxcg50.ld
  | add on-chip IL memory information
  | add ".vhex.ilram" section
<> board/initialize
  | relocalize IL memory code
<> include/vhex/display && src/modules/display
  | update color information
  | use only "dsurface_t" type
  | isolate the dsurface_t types
  | isolate interface structure information
  | isolate shader structure information
  | remove dstack configuration structure
  | remove draw/frag information and use only one VRAM information
<> include/vhex/display/font
  | isolate structure-oriented information in <vhex/display/font/types.h>
  | isolate render API information in <vhex/display/font/render.h>
  | isolate information API in <vhex/display/font/information.h>
<> include/vhex/display/text
  | isolate render API information in <vhex/display/text/render.h>
  | isolate information API in <vhex/display/text/information.h>
<> make/Makefile
  | enable DSP instructions
<> src/drivers/screen/r61524
  | try to use the DSP instruction for the sending loop, but seems to be a bit
    too slow instead of the "full-CPU" version generated by GCC
2022-06-20 16:29:28 +02:00
Yann MAGNIN 1ebab24090 VxKernel 0.6.0-10 : Add image API
@add
<> include/vhex/display/image && src/modules/display/draw
  | add image "types" information
  | add image "object" manipulation API
  | add image "render" API (first version)

@update
<> include/vhex/display/shader.h
  | update surface structure to add some precalculated information
<> src/drivers/screen/r61524
  | precalculate some surface geometry information
  | remove useless code
<> src/module/display
  | use the new surface precalculated information

@fix
<> include/display/draw/circle
  | fix DCIRCLE_* flags value
<> src/modules/display/draw
  | fix dhline culling check
  | fix dvline culling check
  | fix circle position
  | fix circle render freeze
2022-06-19 20:11:52 +02:00
Yann MAGNIN 221dacae2e VxKernel 0.6.0-9 : Add line API + circle API
@add
<> include/vhex/display/draw
  | add circle drawing primitive
  | add line drawing primitives
<> src/drivers/screen/r61524
  | add assembly version of the "frame_frag_send" (WIP)
<> src/modules/display/draw
  | add filled circle algorithm
  | add line algorithm

@update
<> include/vhex/display
  | use "dsurface_t" instead of "struct dshader_surface"
  | rename pixel dstack primitives
<> src/drivers/screen/r61524
  | clear proper zone of the surface
  | avoid unused area wiping
  | remove (temporary) surface merging
<> src/module/display/dclear
  | clear proper zone of the surface
  | rename internal primitives
2022-06-15 20:40:43 +02:00
Yann MAGNIN 392925ac3e VxKernel 0.6.0-8 : Add profiling primitives in timer API
@add
<> include/vhex/timer
  | add profiling API
  | add the profiling primitives in driver interface
  | add profiling type
<> src/driver/mpu/sh/sh7305/tmu
  | add profiling primitives
  | add profiling information in driver definition
<> src/module/timer
  | add profiling driver binding
2022-06-15 12:03:21 +02:00
Yann MAGNIN 7aada07d23 VxKernel 0.6.0-7 : First version of the timer API + update INTC API
@add
<> include/vhex/driver/mpu/sh/sh7305/intc
  | add interruption priority primitives
  | add all interruption configuration available
<> src/driver/mpu/sh/sh7305/intc
  | remove the install.c source file (merge its content in driver definition)
  | add proper priority primitive
  | add priority information

@update
<> include/vhex/timer
  | force TIMER_CONTINUE at 0
  | force TIMER_STOP at 1
<> src/driver/mpu/sh/sh7305/keysc
  | use the new interrupt priority primitives

@fix
<> src/driver/mpu/sh/sh7305/tmu
  | fix interrupt handler assembly crash for ETMUx
  | fix timer ID check security
  | fix timer available check
  | fix ETMUx interrupt handlers installation runtime patch
  | add timer interrupt level (enable interrupt)
<> src/modules/display/text/dtext
  | fix string cache reallocation
<> src/module/timer
  | fix driver flag check
  | fix module definition
2022-06-14 21:56:06 +02:00
Yann MAGNIN 0c50357b7d VxKernel 0.6.0-6 : Add exception/kernel panic screen + add assets
@add
<> assets
  | add default font assets (project)
  | add default font assets (image)
  | add default fotn assets (vxsdk conv information)
<> board/fxcg50/fxcg50
  | add kernel relocation start symbols for the kernel panic screen

@update
<> kernel/exch
  | reactivate the kernel panic screen
  | add relocation information
  | isolate the PC address properly

@fix
<> drivers/mpu/sh/sh7305/tmu
  | fix interrupt handler configuration crash
  | enable the TMU/ETMU driver
2022-06-14 10:51:23 +02:00
Yann MAGNIN cb4af4f7bb VxKernel 0.6.0-5 : Clock driver + TMU/ETMU driver (WIP) + timer API
@add
<> include/vhex/driver/mpu/sh/sh7305/cpg
  | add hardware description
  | add kernel-level API to fetch clocks information
<> include/vhex/driver/mpu/sh/sh7305/tmu
  | add hardware description
<> include/vhex/timer
  | add timer API
  | add timer callback definition
  | add timer types information
<> src/drivers/mpu/sh/sh7305/cpg
  | add CPG driver declaration
  | add CPG driver kernel-API
  | prepare "real" driver installation hook
<> src/drivers/mpu/sh/sh7305/cpu/sleep
  | add CPU sleep primitives
<> src/drivers/mpu/sh/sh7305/intc/inth_callback
  | add special interrupt handler callback manager
<> src/drivers/mpu/sh/sh7305/tmu
  | add TMU interrupt handlers
  | add ETMU interrupt handlers
  | add TMU/ETMU driver-level API code
<> src/modules/timer
  | add timer API code (simply a binding to the TMU/ETMU driver)

@update
<> include/vhex/driver
  | add TIMER flags information
<> include/vhex/driver/cpu
  | add sleep primitive
<> include/vhex/driver/mpu/sh/sh7305/intc
  | return the address where the handle has been installed
<> src/driver/screen/r61524
  | perform the "sprite" VRAM merging before sending all pixel on screen

@fix
<> include/vhex/hardware
  | add workaround to allow this header to be included in ASM source file (.S)
<> src/modules/display/text/dfont
  | fix line discipline with \n
  | fix string size when a bad character is detected
2022-06-13 21:15:36 +02:00
Yann MAGNIN dca07d7f06 VxKernel 0.6.0-4 : Support the text API
@add
<> src/modules/display/text/dascii
  | proof-of-concept of "one-char" drawing API (used for kernel debug)
<> src/modules/fs
  | empty File System module used to expose some primitives used by the libc:
  |  write(), read(), lseek() and close() which there have been removed from the
  |  `fxlibc` project which used an old / deprecated ABI/sycall interface that
  | doesn't exist in this version of Vhex

@update
<> include/display/draw/pixel
  | remove the display ID returned by dpixel(). All primitives that support
  |  shaders must provide explicit API. This to allow fast-optimized API and
  |  polyvalence API for shadering which impact the performance
<> src/modules/display/dclear
  | isolate tree level for this primitive:
  |  - kernel  : direct fragment drawing primitive (by-pass dstack)
  |  - dstack  : dstack drawing primitive
  |  - user    : user drawing primitive (dstack-API)
  | invalidate automatically the dstack each time the primitive (user-level) is
  |  involved
<> src/modules/display/dstack
  | isolate the dstack invalidate part in a specific primitive

@fix
<> make/Makefile
  | proper support of the OpenLibm header path
<> src/drivers/screen/r61524
  | proper support of the last data fragment size. This caused an override on
  |  the first X line of the screen
<> src/modules/display/dstack
  | fix a crash when the number of action is full
  | fix a crash with the default index used for action cache
  | fix a crash with the default index used for shader cache
  | fix action initialization
  | fix action quit primitive
<> src/modules/display/text/dfont
  | fix the character drawing algorithm
  | proper support of the character drawing color (foreground/background)
  | fix the kernel-level primitive used to display a Unicode string
<> src/modules/display/text/dtext
  | fix a crash with the internal index counter
  | fix a crash in the internal cache
  | fix the quit function
2022-06-10 21:28:51 +02:00