All Projects → NienfengYao → armv8-bare-metal

NienfengYao / armv8-bare-metal

Licence: other
No description or website provided.

Programming Languages

c
50402 projects - #5 most used programming language
assembly
5116 projects
Makefile
30231 projects
shell
77523 projects

Projects that are alternatives of or similar to armv8-bare-metal

mdepx
MDEPX — A BSD-style RTOS
Stars: ✭ 17 (-76.39%)
Mutual labels:  qemu, bare-metal
Rust Raspberrypi Os Tutorials
📚 Learn to write an embedded OS in Rust 🦀
Stars: ✭ 7,275 (+10004.17%)
Mutual labels:  bare-metal, armv8
Rpi23 Gen Image
Advanced Debian "stretch" and "buster" bootstrap script for RPi 0/1/2/3 and QEMU
Stars: ✭ 300 (+316.67%)
Mutual labels:  qemu, armv8
simonpi
A quick & dirty script to emulate Raspberry PI family devices on your laptop.
Stars: ✭ 61 (-15.28%)
Mutual labels:  qemu, armv8
Gnu Eprog
Embedded Programming with the GNU Toolchain
Stars: ✭ 230 (+219.44%)
Mutual labels:  qemu, bare-metal
vmwmouse
VMware mouse driver for Windows 3.1
Stars: ✭ 315 (+337.5%)
Mutual labels:  qemu
oneview-sdk-ruby
This project is no longer being developed and has limited support. In the near future this repository will be fully deprecated. Please consider using other OneView projects, such as Golang and Python.
Stars: ✭ 13 (-81.94%)
Mutual labels:  bare-metal
TTstack
A private-cloud solution for SMEs !
Stars: ✭ 55 (-23.61%)
Mutual labels:  qemu
drone-stm32-map
STM32 peripheral mappings for Drone, an Embedded Operating System.
Stars: ✭ 16 (-77.78%)
Mutual labels:  bare-metal
node-qemu-server
Free GUI / Frontend / Management tool for simple setup, configure and control virtual machines (qemu / kvm) within your HTML5 Webbrowser. Virtualization with Node.js / Currently under complete rewrite.
Stars: ✭ 41 (-43.06%)
Mutual labels:  qemu
FirmWire
FirmWire is a full-system baseband firmware emulation platform for fuzzing, debugging, and root-cause analysis of smartphone baseband firmwares
Stars: ✭ 555 (+670.83%)
Mutual labels:  qemu
tensorflow-serving-arm
TensorFlow Serving ARM - A project for cross-compiling TensorFlow Serving targeting popular ARM cores
Stars: ✭ 75 (+4.17%)
Mutual labels:  armv8
async
async is a tiny C++ header-only high-performance library for async calls handled by a thread-pool, which is built on top of an unbounded MPMC lock-free queue.
Stars: ✭ 25 (-65.28%)
Mutual labels:  armv8
bareDOOM
DOOM ported to run within the barebox bootloader
Stars: ✭ 57 (-20.83%)
Mutual labels:  bare-metal
libconfini
Yet another INI parser
Stars: ✭ 106 (+47.22%)
Mutual labels:  bare-metal
derzforth
Bare-metal Forth implementation for RISC-V
Stars: ✭ 25 (-65.28%)
Mutual labels:  bare-metal
bsod-kernel-fuzzing
BSOD: Binary-only Scalable fuzzing Of device Drivers
Stars: ✭ 130 (+80.56%)
Mutual labels:  qemu
aarch64-tensorflow
tensorflow and bazel for aarch64: binaries at...
Stars: ✭ 14 (-80.56%)
Mutual labels:  armv8
docker-routeros
Mikrotik RouterOS inside Docker container
Stars: ✭ 225 (+212.5%)
Mutual labels:  qemu
UTM
Virtual machines for iOS and macOS
Stars: ✭ 16,904 (+23377.78%)
Mutual labels:  qemu

armv8-bare-metal

  • Purpose
    • It's a bare-metal study in QEMU (-M virt -cpu cortex-a57)
  • How to run
    # export PATH inclueding your cross compile tool
    export PATH=$PATH:/home/ryanyao/work/buildroot-2017.11-rc1/output/host/bin
    make run
    
  • GDB (Terminal 1/2 should be in the same directory.)
    Terminal 1:
    	qemu-system-aarch64 -machine virt -cpu cortex-a57 -kernel kernel.elf -nographic -S -s
    Terminal 2:
    	aarch64-linux-gnu-gdb kernel.elf --tui
    	target remote :1234
    
  • Timer IRQ works. It assert Timer_Handler() every 1 sec.
    timer_test
    gic_v3_initialize()
    init_gicd()
    init_gicc()
    CurrentEL = 0x00000000 00000004
    RVBAR_EL1 = 0x00000000 00000000
    VBAR_EL1 = 0x00000000 40000000
    DAIF = 0x00000000 000003C0
    Disable the timer, CNTV_CTL_EL0 = 0x00000000 00000000
    System Frequency: CNTFRQ_EL0 = 0x00000000 03B9ACA0
    Current counter: CNTVCT_EL0 = 0x00000000 0001BA16
    Assert Timer IRQ after 1 sec: CNTV_CVAL_EL0 = 0x00000000 03BB66B6
    Enable the timer, CNTV_CTL_EL0 = 0x00000000 00000001
    Enable IRQ, DAIF = 0x00000000 00000340
    
    Exception Handler! (AARCH64_EXC_IRQ_SPX)
    IRQ found: 0x00000000 0000001B
    timer_handler:
    		Disable the timer, CNTV_CTL_EL0 = 0x00000000 00000000
    		System Frequency: CNTFRQ_EL0 = 0x00000000 03B9ACA0
    		Current counter: CNTVCT_EL0 = 0x00000000 03BD40D5
    		Assert Timer IRQ after 0x00000000 00000001 sec(s): CNTV_CVAL_EL0 = 0x00000000 0776ED75
    		Enable the timer, CNTV_CTL_EL0 = 0x00000000 00000001
    
    Exception Handler! (AARCH64_EXC_IRQ_SPX)
    IRQ found: 0x00000000 0000001B
    timer_handler:
    		Disable the timer, CNTV_CTL_EL0 = 0x00000000 00000000
    		System Frequency: CNTFRQ_EL0 = 0x00000000 03B9ACA0
    		Current counter: CNTVCT_EL0 = 0x00000000 0778E288
    		Assert Timer IRQ after 0x00000000 00000001 sec(s): CNTV_CVAL_EL0 = 0x00000000 0B328F28
    		Enable the timer, CNTV_CTL_EL0 = 0x00000000 00000001
    

Issues

  • GDB can't step into main() if miss lable: main_label in boot.S (commit b72c6a8cc7033a4fed89b57f75826d201466179f)
  • (Fixed, 2018/07/19) Timer IRQ doesn't work(commit b72c6a8cc7033a4fed89b57f75826d201466179f)
    • We can see CNTV_CTL_EL0[2]:ISTATUS changes, but irq_handler doesn't be called.
    • And we also didn't see any changes in ISR_EL1.
    • Solved in commit 2aaa0bff7516e84e01acd10d8de64189839d9d51.
  • (Fixed, 2018/07/05) It should be some problems in vector_table_el1 in boot.S. If I set "b hang" in other vectors except lower_el_aarch64_irq, the uart outpt will be incorrect or system hang (commit b72c6a8cc7033a4fed89b57f75826d201466179f)
    • Root cause should be the stack memory is overlaid. Now, we set stack_top = 0x41000000 to avoid it. (commit c14d653fca24387b5996285f45f0fef2906cb2c9)

Reference

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].