Full Code of minosproject/minos2 for AI

main 47d21453fb3b cached
2570 files
6.1 MB
1.7M tokens
8440 symbols
1 requests
Download .txt
Showing preview only (6,910K chars total). Download the full file or copy to clipboard to get everything.
Repository: minosproject/minos2
Branch: main
Commit: 47d21453fb3b
Files: 2570
Total size: 6.1 MB

Directory structure:
gitextract_nsoa8kf4/

├── .gitignore
├── Makefile
├── README.md
├── generic/
│   └── include/
│       └── uapi/
│           ├── bootdata.h
│           ├── gvm.h
│           ├── hypervisor.h
│           ├── ramdisk.h
│           ├── time.h
│           └── virtio_mmio.h
├── kernel/
│   ├── .gitignore
│   ├── Kconfig
│   ├── LICENSE
│   ├── Makefile
│   ├── VERSION
│   ├── apps/
│   │   ├── Kconfig
│   │   ├── Makefile
│   │   ├── esh/
│   │   │   ├── COPYING
│   │   │   ├── Kconfig
│   │   │   ├── Makefile
│   │   │   ├── README.md
│   │   │   ├── esh.c
│   │   │   ├── esh.h
│   │   │   ├── esh_argparser.c
│   │   │   ├── esh_argparser.h
│   │   │   ├── esh_config.h
│   │   │   ├── esh_hist.c
│   │   │   ├── esh_hist.h
│   │   │   ├── esh_incl_config.h
│   │   │   ├── esh_internal.h
│   │   │   └── shell.c
│   │   └── init.c
│   ├── arch/
│   │   └── aarch64/
│   │       ├── Kconfig
│   │       ├── Makefile
│   │       ├── core/
│   │       │   ├── Kconfig
│   │       │   ├── Makefile
│   │       │   ├── aarch64.S
│   │       │   ├── aarch64_IRQ.c
│   │       │   ├── aarch64_sync.c
│   │       │   ├── arch.c
│   │       │   ├── arm_arch_timer.c
│   │       │   ├── asm-offset.c
│   │       │   ├── boot.S
│   │       │   ├── cache.S
│   │       │   ├── cpu.c
│   │       │   ├── cpu_feature.c
│   │       │   ├── entry.S
│   │       │   ├── fpsimd.c
│   │       │   ├── mem_map.S
│   │       │   ├── stage1.c
│   │       │   ├── stage1.h
│   │       │   └── vector.S
│   │       ├── include/
│   │       │   └── asm/
│   │       │       ├── aarch64_common.h
│   │       │       ├── aarch64_el1_reg.h
│   │       │       ├── aarch64_el2_reg.h
│   │       │       ├── aarch64_el2_vhe_reg.h
│   │       │       ├── aarch64_helper.h
│   │       │       ├── aarch64_reg.h
│   │       │       ├── arch.h
│   │       │       ├── asm_current.h
│   │       │       ├── asm_marco.S
│   │       │       ├── asm_types.h
│   │       │       ├── atomic.h
│   │       │       ├── barrier.h
│   │       │       ├── bitops.h
│   │       │       ├── cache.h
│   │       │       ├── cmpxchg.h
│   │       │       ├── cpu_feature.h
│   │       │       ├── div64.h
│   │       │       ├── gic_reg.h
│   │       │       ├── io.h
│   │       │       ├── power.h
│   │       │       ├── psci.h
│   │       │       ├── reg.h
│   │       │       ├── svccc.h
│   │       │       ├── syscall.h
│   │       │       ├── tcb.h
│   │       │       ├── time.h
│   │       │       ├── tlb.h
│   │       │       ├── trap.h
│   │       │       ├── uaccess.h
│   │       │       ├── virt.h
│   │       │       └── vtcb.h
│   │       ├── lds/
│   │       │   ├── Makefile
│   │       │   └── minos.lds.S
│   │       ├── lib/
│   │       │   ├── Makefile
│   │       │   ├── atomic.S
│   │       │   ├── bitops.S
│   │       │   ├── memchr.S
│   │       │   ├── memcmp.S
│   │       │   ├── memcpy.S
│   │       │   ├── memmove.S
│   │       │   ├── memset.S
│   │       │   ├── spinlock.S
│   │       │   ├── strchr.S
│   │       │   ├── strcmp.S
│   │       │   ├── strcpy.S
│   │       │   ├── strlen.S
│   │       │   ├── strncmp.S
│   │       │   ├── strnlen.S
│   │       │   ├── strrchr.S
│   │       │   └── ticket_lock.S
│   │       ├── userspace/
│   │       │   ├── Makefile
│   │       │   └── asm_syscall.c
│   │       └── virt/
│   │           ├── Kconfig
│   │           ├── Makefile
│   │           ├── arch_virt.c
│   │           ├── smc_service.c
│   │           ├── stage2.c
│   │           ├── stage2.h
│   │           ├── svc_service.c
│   │           ├── trap.c
│   │           ├── vfp.c
│   │           ├── vmsa.c
│   │           └── vtimer.c
│   ├── configs/
│   │   ├── espressobin_defconfig
│   │   ├── fvp_a76_defconfig
│   │   ├── fvp_defconfig
│   │   ├── fvp_rtos_defconfig
│   │   ├── kvim3_defconfig
│   │   ├── qemu_arm64_defconfig
│   │   ├── r8a7795_defconfig
│   │   ├── rpi_3_defconfig
│   │   └── rpi_4_defconfig
│   ├── core/
│   │   ├── Kconfig
│   │   ├── Makefile
│   │   ├── bitmap.c
│   │   ├── bootarg.c
│   │   ├── calltrace.c
│   │   ├── delay.c
│   │   ├── event.c
│   │   ├── find_bit.c
│   │   ├── flag.c
│   │   ├── hook.c
│   │   ├── host_vspace.c
│   │   ├── hweight.c
│   │   ├── idle.c
│   │   ├── init.c
│   │   ├── iomem.c
│   │   ├── irq.c
│   │   ├── kmem.c
│   │   ├── mbox.c
│   │   ├── mem.c
│   │   ├── minos.c
│   │   ├── mutex.c
│   │   ├── page.c
│   │   ├── percpu.c
│   │   ├── print.c
│   │   ├── queue.c
│   │   ├── ramdisk.c
│   │   ├── sched.c
│   │   ├── sem.c
│   │   ├── slab.c
│   │   ├── smp.c
│   │   ├── stdlib.c
│   │   ├── string.c
│   │   ├── task.c
│   │   └── timer.c
│   ├── drivers/
│   │   ├── Kconfig
│   │   ├── Makefile
│   │   ├── console.c
│   │   ├── device_id.c
│   │   ├── iommu/
│   │   │   ├── Kconfig
│   │   │   ├── Makefile
│   │   │   ├── ipmmu-plat.c
│   │   │   └── ipmmu.c
│   │   ├── irq-chips/
│   │   │   ├── Kconfig
│   │   │   ├── Makefile
│   │   │   ├── gicv2.c
│   │   │   ├── gicv3.c
│   │   │   ├── irq-bcm2836.c
│   │   │   └── irqchip.c
│   │   ├── of/
│   │   │   ├── Kconfig
│   │   │   ├── Makefile
│   │   │   ├── of.c
│   │   │   └── of_mm.c
│   │   ├── serial/
│   │   │   ├── Kconfig
│   │   │   ├── Makefile
│   │   │   ├── pl011.h
│   │   │   ├── serial_bcm283x_mu.c
│   │   │   ├── serial_meson.c
│   │   │   ├── serial_mvebu_a3700.c
│   │   │   ├── serial_pl011.c
│   │   │   └── serial_scif.c
│   │   └── tty.c
│   ├── dtbs/
│   │   ├── Makefile
│   │   ├── armada-3720-community-v5.dts
│   │   ├── bcm2837-rpi-3-b-plus.dts
│   │   ├── bcm2838-rpi-4-b-32bit.dts
│   │   ├── bcm2838-rpi-4-b.dts
│   │   ├── foundation-v8-gicv2.dts
│   │   ├── foundation-v8-gicv3-zephyr.dts
│   │   ├── foundation-v8-gicv3.dts
│   │   ├── kvim3.dts
│   │   ├── qemu-arm64.dts
│   │   └── r8a7795.dts
│   ├── include/
│   │   ├── device/
│   │   │   ├── bcm_irq.h
│   │   │   ├── gicv2.h
│   │   │   └── gicv3.h
│   │   ├── libfdt/
│   │   │   ├── fdt.h
│   │   │   ├── libfdt.h
│   │   │   └── libfdt_env.h
│   │   ├── minos/
│   │   │   ├── arch.h
│   │   │   ├── atomic.h
│   │   │   ├── bitmap.h
│   │   │   ├── bitops.h
│   │   │   ├── bootarg.h
│   │   │   ├── calltrace.h
│   │   │   ├── channel.h
│   │   │   ├── compiler.h
│   │   │   ├── console.h
│   │   │   ├── const.h
│   │   │   ├── cpumask.h
│   │   │   ├── current.h
│   │   │   ├── device_id.h
│   │   │   ├── errno.h
│   │   │   ├── event.h
│   │   │   ├── flag.h
│   │   │   ├── hook.h
│   │   │   ├── init.h
│   │   │   ├── irq.h
│   │   │   ├── kbuild.h
│   │   │   ├── list.h
│   │   │   ├── math64.h
│   │   │   ├── mbox.h
│   │   │   ├── memattr.h
│   │   │   ├── memory.h
│   │   │   ├── minos.h
│   │   │   ├── mm.h
│   │   │   ├── mutex.h
│   │   │   ├── of.h
│   │   │   ├── os.h
│   │   │   ├── page.h
│   │   │   ├── percpu.h
│   │   │   ├── platform.h
│   │   │   ├── pm.h
│   │   │   ├── preempt.h
│   │   │   ├── print.h
│   │   │   ├── queue.h
│   │   │   ├── ramdisk.h
│   │   │   ├── raw_spinlock.h
│   │   │   ├── sched.h
│   │   │   ├── sem.h
│   │   │   ├── shell_command.h
│   │   │   ├── slab.h
│   │   │   ├── smp.h
│   │   │   ├── softirq.h
│   │   │   ├── spinlock.h
│   │   │   ├── stdlib.h
│   │   │   ├── string.h
│   │   │   ├── symbol.h
│   │   │   ├── task.h
│   │   │   ├── task_def.h
│   │   │   ├── task_info.h
│   │   │   ├── time.h
│   │   │   ├── timer.h
│   │   │   ├── tty.h
│   │   │   ├── types.h
│   │   │   └── varlist.h
│   │   ├── uapi/
│   │   │   ├── kobject_uapi.h
│   │   │   └── procinfo_uapi.h
│   │   ├── uspace/
│   │   │   ├── elf.h
│   │   │   ├── handle.h
│   │   │   ├── iqueue.h
│   │   │   ├── kobject.h
│   │   │   ├── poll.h
│   │   │   ├── proc.h
│   │   │   ├── procinfo.h
│   │   │   ├── socket.h
│   │   │   ├── syscall.h
│   │   │   ├── uaccess.h
│   │   │   └── vspace.h
│   │   └── virt/
│   │       ├── hypercall.h
│   │       ├── iommu.h
│   │       ├── os.h
│   │       ├── resource.h
│   │       ├── vdev.h
│   │       ├── virq.h
│   │       ├── virq_chip.h
│   │       ├── virt.h
│   │       ├── virtio.h
│   │       ├── vm.h
│   │       ├── vm_mmap.h
│   │       ├── vm_pm.h
│   │       ├── vmbox.h
│   │       ├── vmcs.h
│   │       ├── vmm.h
│   │       └── vmodule.h
│   ├── libs/
│   │   ├── Kconfig
│   │   ├── Makefile
│   │   ├── libfdt/
│   │   │   ├── Makefile
│   │   │   ├── fdt.c
│   │   │   ├── fdt_addresses.c
│   │   │   ├── fdt_empty_tree.c
│   │   │   ├── fdt_overlay.c
│   │   │   ├── fdt_ro.c
│   │   │   ├── fdt_rw.c
│   │   │   ├── fdt_strerror.c
│   │   │   ├── fdt_sw.c
│   │   │   ├── fdt_wip.c
│   │   │   └── libfdt_internal.h
│   │   └── shell_command/
│   │       ├── Kconfig
│   │       ├── Makefile
│   │       ├── clear.c
│   │       ├── help_cmd.c
│   │       ├── shell_command.c
│   │       └── task_cmd.c
│   ├── platform/
│   │   ├── Kconfig
│   │   ├── Makefile
│   │   ├── amlogic/
│   │   │   ├── Kconfig
│   │   │   ├── Makefile
│   │   │   ├── amlogic_smc.c
│   │   │   └── kvim3.c
│   │   ├── espressobin/
│   │   │   ├── Kconfig
│   │   │   ├── Makefile
│   │   │   └── espressobin.c
│   │   ├── fvp/
│   │   │   ├── Kconfig
│   │   │   ├── Makefile
│   │   │   └── fvp.c
│   │   ├── platform.c
│   │   ├── qemu/
│   │   │   ├── Kconfig
│   │   │   ├── Makefile
│   │   │   └── qemu.c
│   │   ├── r8a7795/
│   │   │   ├── Kconfig
│   │   │   ├── Makefile
│   │   │   └── r8a7795.c
│   │   ├── raspberry3/
│   │   │   ├── Kconfig
│   │   │   ├── Makefile
│   │   │   └── raspberry3.c
│   │   └── raspberry4/
│   │       ├── Kconfig
│   │       ├── Makefile
│   │       └── raspberry4.c
│   ├── scripts/
│   │   ├── Kconfiglib/
│   │   │   ├── LICENSE.txt
│   │   │   ├── MANIFEST.in
│   │   │   ├── README.rst
│   │   │   ├── alldefconfig.py
│   │   │   ├── allmodconfig.py
│   │   │   ├── allnoconfig.py
│   │   │   ├── allyesconfig.py
│   │   │   ├── defconfig.py
│   │   │   ├── examples/
│   │   │   │   ├── Kmenuconfig
│   │   │   │   ├── allnoconfig_walk.py
│   │   │   │   ├── defconfig_oldconfig.py
│   │   │   │   ├── dumpvars.py
│   │   │   │   ├── eval_expr.py
│   │   │   │   ├── find_symbol.py
│   │   │   │   ├── help_grep.py
│   │   │   │   ├── list_undefined.py
│   │   │   │   ├── menuconfig_example.py
│   │   │   │   ├── merge_config.py
│   │   │   │   ├── print_config_tree.py
│   │   │   │   ├── print_sym_info.py
│   │   │   │   └── print_tree.py
│   │   │   ├── genconfig.py
│   │   │   ├── guiconfig.py
│   │   │   ├── kconfiglib.py
│   │   │   ├── listnewconfig.py
│   │   │   ├── menuconfig.py
│   │   │   ├── oldconfig.py
│   │   │   ├── olddefconfig.py
│   │   │   ├── savedefconfig.py
│   │   │   ├── setconfig.py
│   │   │   ├── setup.cfg
│   │   │   ├── setup.py
│   │   │   ├── tests/
│   │   │   │   ├── Kappend
│   │   │   │   ├── Kassignable
│   │   │   │   ├── Kchoice
│   │   │   │   ├── Kdefconfig_existent
│   │   │   │   ├── Kdefconfig_existent_but_n
│   │   │   │   ├── Kdefconfig_nonexistent
│   │   │   │   ├── Kdefconfig_srctree
│   │   │   │   ├── Kdepcopy
│   │   │   │   ├── Kdeploop0
│   │   │   │   ├── Kdeploop1
│   │   │   │   ├── Kdeploop10
│   │   │   │   ├── Kdeploop2
│   │   │   │   ├── Kdeploop3
│   │   │   │   ├── Kdeploop4
│   │   │   │   ├── Kdeploop5
│   │   │   │   ├── Kdeploop6
│   │   │   │   ├── Kdeploop7
│   │   │   │   ├── Kdeploop8
│   │   │   │   ├── Kdeploop9
│   │   │   │   ├── Kdirdep
│   │   │   │   ├── Kescape
│   │   │   │   ├── Keval
│   │   │   │   ├── Kexpr_items
│   │   │   │   ├── Kheader
│   │   │   │   ├── Khelp
│   │   │   │   ├── Kifremoval
│   │   │   │   ├── Kimply
│   │   │   │   ├── Kinclude_path
│   │   │   │   ├── Kinclude_path_sourced_1
│   │   │   │   ├── Kinclude_path_sourced_2
│   │   │   │   ├── Kitemlists
│   │   │   │   ├── Klocation
│   │   │   │   ├── Klocation_sourced
│   │   │   │   ├── Kmainmenu
│   │   │   │   ├── Kmenuconfig
│   │   │   │   ├── Kmisc
│   │   │   │   ├── Kmissingrsource
│   │   │   │   ├── Kmissingsource
│   │   │   │   ├── Korder
│   │   │   │   ├── Kpreprocess
│   │   │   │   ├── Krange
│   │   │   │   ├── Krecursive1
│   │   │   │   ├── Krecursive2
│   │   │   │   ├── Kreferenced
│   │   │   │   ├── Krelation
│   │   │   │   ├── Krepr
│   │   │   │   ├── Kstr
│   │   │   │   ├── Kundef
│   │   │   │   ├── Kuserfunctions
│   │   │   │   ├── Kvisibility
│   │   │   │   ├── config_indented
│   │   │   │   ├── config_set_bool
│   │   │   │   ├── config_set_string
│   │   │   │   ├── defconfig_1
│   │   │   │   ├── defconfig_2
│   │   │   │   ├── empty
│   │   │   │   ├── kconfigfunctions.py
│   │   │   │   ├── reltest
│   │   │   │   └── sub/
│   │   │   │       ├── Kconfig_symlink_2
│   │   │   │       ├── Kconfig_symlink_3
│   │   │   │       ├── Klocation_grsourced1
│   │   │   │       ├── Klocation_grsourced2
│   │   │   │       ├── Klocation_gsourced1
│   │   │   │       ├── Klocation_gsourced2
│   │   │   │       ├── Klocation_rsourced
│   │   │   │       ├── defconfig_in_sub
│   │   │   │       └── sub/
│   │   │   │           └── Kconfig_symlink_1
│   │   │   └── testsuite.py
│   │   ├── Minos.build.mk
│   │   ├── Minos.clean.mk
│   │   ├── Minos.config.mk
│   │   └── generate_allsymbols.py
│   ├── userspace/
│   │   ├── Kconfig
│   │   ├── Makefile
│   │   ├── endpoint.c
│   │   ├── futex.c
│   │   ├── handle.c
│   │   ├── iqueue.c
│   │   ├── irq.c
│   │   ├── kobject.c
│   │   ├── kobject_copy.c
│   │   ├── kobject_copy.h
│   │   ├── notify.c
│   │   ├── pma.c
│   │   ├── poll.c
│   │   ├── port.c
│   │   ├── process.c
│   │   ├── procinfo.c
│   │   ├── root_service.c
│   │   ├── socket.c
│   │   ├── stdio.c
│   │   ├── syscall.c
│   │   ├── thread.c
│   │   ├── time.c
│   │   ├── uaccess.c
│   │   └── vspace.c
│   └── virt/
│       ├── Kconfig
│       ├── Makefile
│       ├── debug_console.c
│       ├── hypercall.c
│       ├── iommu.c
│       ├── os/
│       │   ├── Kconfig
│       │   ├── Makefile
│       │   ├── os.c
│       │   ├── os_linux.c
│       │   ├── os_other.c
│       │   └── os_xnu.c
│       ├── resource.c
│       ├── shmem.c
│       ├── varm_timer.c
│       ├── vdev.c
│       ├── vfault.c
│       ├── virq.c
│       ├── virq_chips/
│       │   ├── Kconfig
│       │   ├── Makefile
│       │   ├── bcm_virq.c
│       │   ├── vaic.c
│       │   ├── vgic.c
│       │   ├── vgic.h
│       │   ├── vgicv2.c
│       │   ├── vgicv3.c
│       │   └── virq_chip.c
│       ├── virtio_mmio.c
│       ├── vm.c
│       ├── vm_daemon.c
│       ├── vm_pm.c
│       ├── vmbox/
│       │   ├── Kconfig
│       │   ├── Makefile
│       │   ├── vmbox.c
│       │   └── vmbox_hvc.c
│       ├── vmcs.c
│       ├── vmm.c
│       ├── vmodule.c
│       ├── vrtc.c
│       └── vwdt.c
├── scripts/
│   ├── app_build.mk
│   └── lib_build.mk
├── tools/
│   ├── install.sh
│   ├── make_ramdisk.sh
│   ├── mkrmd/
│   │   ├── Makefile
│   │   └── mkrmd.c
│   ├── qemu.sh
│   └── u-boot.img
├── user.driver/
│   └── virtio-blk/
│       ├── Makefile
│       ├── main.c
│       ├── virtio-blk.c
│       ├── virtio.c
│       └── virtio.h
├── user.libc/
│   ├── .gitignore
│   ├── .mailmap
│   ├── COPYRIGHT
│   ├── INSTALL
│   ├── Makefile
│   ├── README
│   ├── VERSION
│   ├── WHATSNEW
│   ├── arch/
│   │   ├── aarch64/
│   │   │   ├── atomic_arch.h
│   │   │   ├── bits/
│   │   │   │   ├── alltypes.h.in
│   │   │   │   ├── fcntl.h
│   │   │   │   ├── fenv.h
│   │   │   │   ├── float.h
│   │   │   │   ├── hwcap.h
│   │   │   │   ├── posix.h
│   │   │   │   ├── reg.h
│   │   │   │   ├── setjmp.h
│   │   │   │   ├── signal.h
│   │   │   │   ├── stat.h
│   │   │   │   ├── stdint.h
│   │   │   │   ├── syscall.h.in
│   │   │   │   └── user.h
│   │   │   ├── crt_arch.h
│   │   │   ├── fp_arch.h
│   │   │   ├── kstat.h
│   │   │   ├── pthread_arch.h
│   │   │   ├── reloc.h
│   │   │   └── syscall_arch.h
│   │   ├── arm/
│   │   │   ├── arch.mak
│   │   │   ├── atomic_arch.h
│   │   │   ├── bits/
│   │   │   │   ├── alltypes.h.in
│   │   │   │   ├── fcntl.h
│   │   │   │   ├── fenv.h
│   │   │   │   ├── float.h
│   │   │   │   ├── hwcap.h
│   │   │   │   ├── ioctl_fix.h
│   │   │   │   ├── ipcstat.h
│   │   │   │   ├── msg.h
│   │   │   │   ├── posix.h
│   │   │   │   ├── ptrace.h
│   │   │   │   ├── reg.h
│   │   │   │   ├── sem.h
│   │   │   │   ├── setjmp.h
│   │   │   │   ├── shm.h
│   │   │   │   ├── signal.h
│   │   │   │   ├── stat.h
│   │   │   │   ├── stdint.h
│   │   │   │   ├── syscall.h.in
│   │   │   │   └── user.h
│   │   │   ├── crt_arch.h
│   │   │   ├── kstat.h
│   │   │   ├── pthread_arch.h
│   │   │   ├── reloc.h
│   │   │   └── syscall_arch.h
│   │   ├── generic/
│   │   │   ├── bits/
│   │   │   │   ├── dirent.h
│   │   │   │   ├── errno.h
│   │   │   │   ├── fcntl.h
│   │   │   │   ├── fenv.h
│   │   │   │   ├── hwcap.h
│   │   │   │   ├── io.h
│   │   │   │   ├── ioctl.h
│   │   │   │   ├── ioctl_fix.h
│   │   │   │   ├── ipc.h
│   │   │   │   ├── ipcstat.h
│   │   │   │   ├── kd.h
│   │   │   │   ├── limits.h
│   │   │   │   ├── link.h
│   │   │   │   ├── mman.h
│   │   │   │   ├── msg.h
│   │   │   │   ├── poll.h
│   │   │   │   ├── ptrace.h
│   │   │   │   ├── resource.h
│   │   │   │   ├── sem.h
│   │   │   │   ├── shm.h
│   │   │   │   ├── socket.h
│   │   │   │   ├── soundcard.h
│   │   │   │   ├── statfs.h
│   │   │   │   ├── termios.h
│   │   │   │   └── vt.h
│   │   │   └── fp_arch.h
│   │   ├── i386/
│   │   │   ├── arch.mak
│   │   │   ├── atomic_arch.h
│   │   │   ├── bits/
│   │   │   │   ├── alltypes.h.in
│   │   │   │   ├── fenv.h
│   │   │   │   ├── float.h
│   │   │   │   ├── io.h
│   │   │   │   ├── ipcstat.h
│   │   │   │   ├── limits.h
│   │   │   │   ├── mman.h
│   │   │   │   ├── msg.h
│   │   │   │   ├── posix.h
│   │   │   │   ├── ptrace.h
│   │   │   │   ├── reg.h
│   │   │   │   ├── sem.h
│   │   │   │   ├── setjmp.h
│   │   │   │   ├── shm.h
│   │   │   │   ├── signal.h
│   │   │   │   ├── stat.h
│   │   │   │   ├── stdint.h
│   │   │   │   ├── syscall.h.in
│   │   │   │   └── user.h
│   │   │   ├── crt_arch.h
│   │   │   ├── kstat.h
│   │   │   ├── pthread_arch.h
│   │   │   ├── reloc.h
│   │   │   └── syscall_arch.h
│   │   ├── m68k/
│   │   │   ├── arch.mak
│   │   │   ├── atomic_arch.h
│   │   │   ├── bits/
│   │   │   │   ├── alltypes.h.in
│   │   │   │   ├── fcntl.h
│   │   │   │   ├── fenv.h
│   │   │   │   ├── float.h
│   │   │   │   ├── ipcstat.h
│   │   │   │   ├── msg.h
│   │   │   │   ├── posix.h
│   │   │   │   ├── ptrace.h
│   │   │   │   ├── reg.h
│   │   │   │   ├── sem.h
│   │   │   │   ├── setjmp.h
│   │   │   │   ├── shm.h
│   │   │   │   ├── signal.h
│   │   │   │   ├── stat.h
│   │   │   │   ├── stdint.h
│   │   │   │   ├── syscall.h.in
│   │   │   │   └── user.h
│   │   │   ├── crt_arch.h
│   │   │   ├── kstat.h
│   │   │   ├── pthread_arch.h
│   │   │   ├── reloc.h
│   │   │   └── syscall_arch.h
│   │   ├── microblaze/
│   │   │   ├── arch.mak
│   │   │   ├── atomic_arch.h
│   │   │   ├── bits/
│   │   │   │   ├── alltypes.h.in
│   │   │   │   ├── float.h
│   │   │   │   ├── ipcstat.h
│   │   │   │   ├── msg.h
│   │   │   │   ├── posix.h
│   │   │   │   ├── reg.h
│   │   │   │   ├── sem.h
│   │   │   │   ├── setjmp.h
│   │   │   │   ├── shm.h
│   │   │   │   ├── signal.h
│   │   │   │   ├── stat.h
│   │   │   │   ├── stdint.h
│   │   │   │   ├── syscall.h.in
│   │   │   │   └── user.h
│   │   │   ├── crt_arch.h
│   │   │   ├── kstat.h
│   │   │   ├── pthread_arch.h
│   │   │   ├── reloc.h
│   │   │   └── syscall_arch.h
│   │   ├── mips/
│   │   │   ├── arch.mak
│   │   │   ├── atomic_arch.h
│   │   │   ├── bits/
│   │   │   │   ├── alltypes.h.in
│   │   │   │   ├── errno.h
│   │   │   │   ├── fcntl.h
│   │   │   │   ├── fenv.h
│   │   │   │   ├── float.h
│   │   │   │   ├── hwcap.h
│   │   │   │   ├── ioctl.h
│   │   │   │   ├── ipcstat.h
│   │   │   │   ├── mman.h
│   │   │   │   ├── msg.h
│   │   │   │   ├── poll.h
│   │   │   │   ├── posix.h
│   │   │   │   ├── ptrace.h
│   │   │   │   ├── reg.h
│   │   │   │   ├── resource.h
│   │   │   │   ├── sem.h
│   │   │   │   ├── setjmp.h
│   │   │   │   ├── shm.h
│   │   │   │   ├── signal.h
│   │   │   │   ├── socket.h
│   │   │   │   ├── stat.h
│   │   │   │   ├── statfs.h
│   │   │   │   ├── stdint.h
│   │   │   │   ├── syscall.h.in
│   │   │   │   ├── termios.h
│   │   │   │   └── user.h
│   │   │   ├── crt_arch.h
│   │   │   ├── ksigaction.h
│   │   │   ├── kstat.h
│   │   │   ├── pthread_arch.h
│   │   │   ├── reloc.h
│   │   │   └── syscall_arch.h
│   │   ├── mips64/
│   │   │   ├── atomic_arch.h
│   │   │   ├── bits/
│   │   │   │   ├── alltypes.h.in
│   │   │   │   ├── errno.h
│   │   │   │   ├── fcntl.h
│   │   │   │   ├── fenv.h
│   │   │   │   ├── float.h
│   │   │   │   ├── hwcap.h
│   │   │   │   ├── ioctl.h
│   │   │   │   ├── ipc.h
│   │   │   │   ├── mman.h
│   │   │   │   ├── poll.h
│   │   │   │   ├── posix.h
│   │   │   │   ├── ptrace.h
│   │   │   │   ├── reg.h
│   │   │   │   ├── resource.h
│   │   │   │   ├── setjmp.h
│   │   │   │   ├── signal.h
│   │   │   │   ├── socket.h
│   │   │   │   ├── stat.h
│   │   │   │   ├── statfs.h
│   │   │   │   ├── stdint.h
│   │   │   │   ├── syscall.h.in
│   │   │   │   ├── termios.h
│   │   │   │   └── user.h
│   │   │   ├── crt_arch.h
│   │   │   ├── ksigaction.h
│   │   │   ├── kstat.h
│   │   │   ├── pthread_arch.h
│   │   │   ├── reloc.h
│   │   │   └── syscall_arch.h
│   │   ├── mipsn32/
│   │   │   ├── arch.mak
│   │   │   ├── atomic_arch.h
│   │   │   ├── bits/
│   │   │   │   ├── alltypes.h.in
│   │   │   │   ├── errno.h
│   │   │   │   ├── fcntl.h
│   │   │   │   ├── fenv.h
│   │   │   │   ├── float.h
│   │   │   │   ├── hwcap.h
│   │   │   │   ├── ioctl.h
│   │   │   │   ├── ipcstat.h
│   │   │   │   ├── mman.h
│   │   │   │   ├── msg.h
│   │   │   │   ├── poll.h
│   │   │   │   ├── posix.h
│   │   │   │   ├── ptrace.h
│   │   │   │   ├── reg.h
│   │   │   │   ├── resource.h
│   │   │   │   ├── sem.h
│   │   │   │   ├── setjmp.h
│   │   │   │   ├── shm.h
│   │   │   │   ├── signal.h
│   │   │   │   ├── socket.h
│   │   │   │   ├── stat.h
│   │   │   │   ├── statfs.h
│   │   │   │   ├── stdint.h
│   │   │   │   ├── syscall.h.in
│   │   │   │   ├── termios.h
│   │   │   │   └── user.h
│   │   │   ├── crt_arch.h
│   │   │   ├── ksigaction.h
│   │   │   ├── kstat.h
│   │   │   ├── pthread_arch.h
│   │   │   ├── reloc.h
│   │   │   └── syscall_arch.h
│   │   ├── or1k/
│   │   │   ├── arch.mak
│   │   │   ├── atomic_arch.h
│   │   │   ├── bits/
│   │   │   │   ├── alltypes.h.in
│   │   │   │   ├── float.h
│   │   │   │   ├── ipcstat.h
│   │   │   │   ├── limits.h
│   │   │   │   ├── msg.h
│   │   │   │   ├── posix.h
│   │   │   │   ├── reg.h
│   │   │   │   ├── sem.h
│   │   │   │   ├── setjmp.h
│   │   │   │   ├── shm.h
│   │   │   │   ├── signal.h
│   │   │   │   ├── stat.h
│   │   │   │   ├── stdint.h
│   │   │   │   ├── syscall.h.in
│   │   │   │   └── user.h
│   │   │   ├── crt_arch.h
│   │   │   ├── kstat.h
│   │   │   ├── pthread_arch.h
│   │   │   ├── reloc.h
│   │   │   └── syscall_arch.h
│   │   ├── powerpc/
│   │   │   ├── arch.mak
│   │   │   ├── atomic_arch.h
│   │   │   ├── bits/
│   │   │   │   ├── alltypes.h.in
│   │   │   │   ├── errno.h
│   │   │   │   ├── fcntl.h
│   │   │   │   ├── fenv.h
│   │   │   │   ├── float.h
│   │   │   │   ├── hwcap.h
│   │   │   │   ├── ioctl.h
│   │   │   │   ├── ipc.h
│   │   │   │   ├── ipcstat.h
│   │   │   │   ├── mman.h
│   │   │   │   ├── msg.h
│   │   │   │   ├── posix.h
│   │   │   │   ├── ptrace.h
│   │   │   │   ├── reg.h
│   │   │   │   ├── sem.h
│   │   │   │   ├── setjmp.h
│   │   │   │   ├── shm.h
│   │   │   │   ├── signal.h
│   │   │   │   ├── socket.h
│   │   │   │   ├── stat.h
│   │   │   │   ├── stdint.h
│   │   │   │   ├── syscall.h.in
│   │   │   │   ├── termios.h
│   │   │   │   └── user.h
│   │   │   ├── crt_arch.h
│   │   │   ├── kstat.h
│   │   │   ├── pthread_arch.h
│   │   │   ├── reloc.h
│   │   │   └── syscall_arch.h
│   │   ├── powerpc64/
│   │   │   ├── atomic_arch.h
│   │   │   ├── bits/
│   │   │   │   ├── alltypes.h.in
│   │   │   │   ├── errno.h
│   │   │   │   ├── fcntl.h
│   │   │   │   ├── fenv.h
│   │   │   │   ├── float.h
│   │   │   │   ├── hwcap.h
│   │   │   │   ├── ioctl.h
│   │   │   │   ├── ipc.h
│   │   │   │   ├── mman.h
│   │   │   │   ├── posix.h
│   │   │   │   ├── ptrace.h
│   │   │   │   ├── reg.h
│   │   │   │   ├── setjmp.h
│   │   │   │   ├── shm.h
│   │   │   │   ├── signal.h
│   │   │   │   ├── socket.h
│   │   │   │   ├── stat.h
│   │   │   │   ├── stdint.h
│   │   │   │   ├── syscall.h.in
│   │   │   │   ├── termios.h
│   │   │   │   └── user.h
│   │   │   ├── crt_arch.h
│   │   │   ├── kstat.h
│   │   │   ├── pthread_arch.h
│   │   │   ├── reloc.h
│   │   │   └── syscall_arch.h
│   │   ├── riscv64/
│   │   │   ├── atomic_arch.h
│   │   │   ├── bits/
│   │   │   │   ├── alltypes.h.in
│   │   │   │   ├── fenv.h
│   │   │   │   ├── float.h
│   │   │   │   ├── posix.h
│   │   │   │   ├── reg.h
│   │   │   │   ├── setjmp.h
│   │   │   │   ├── signal.h
│   │   │   │   ├── stat.h
│   │   │   │   ├── stdint.h
│   │   │   │   ├── syscall.h.in
│   │   │   │   └── user.h
│   │   │   ├── crt_arch.h
│   │   │   ├── kstat.h
│   │   │   ├── pthread_arch.h
│   │   │   ├── reloc.h
│   │   │   └── syscall_arch.h
│   │   ├── s390x/
│   │   │   ├── atomic_arch.h
│   │   │   ├── bits/
│   │   │   │   ├── alltypes.h.in
│   │   │   │   ├── fcntl.h
│   │   │   │   ├── fenv.h
│   │   │   │   ├── float.h
│   │   │   │   ├── hwcap.h
│   │   │   │   ├── ioctl_fix.h
│   │   │   │   ├── limits.h
│   │   │   │   ├── link.h
│   │   │   │   ├── posix.h
│   │   │   │   ├── ptrace.h
│   │   │   │   ├── reg.h
│   │   │   │   ├── setjmp.h
│   │   │   │   ├── signal.h
│   │   │   │   ├── stat.h
│   │   │   │   ├── statfs.h
│   │   │   │   ├── stdint.h
│   │   │   │   ├── syscall.h.in
│   │   │   │   └── user.h
│   │   │   ├── crt_arch.h
│   │   │   ├── kstat.h
│   │   │   ├── pthread_arch.h
│   │   │   ├── reloc.h
│   │   │   └── syscall_arch.h
│   │   ├── sh/
│   │   │   ├── arch.mak
│   │   │   ├── atomic_arch.h
│   │   │   ├── bits/
│   │   │   │   ├── alltypes.h.in
│   │   │   │   ├── fenv.h
│   │   │   │   ├── float.h
│   │   │   │   ├── hwcap.h
│   │   │   │   ├── ioctl.h
│   │   │   │   ├── ipcstat.h
│   │   │   │   ├── limits.h
│   │   │   │   ├── msg.h
│   │   │   │   ├── posix.h
│   │   │   │   ├── ptrace.h
│   │   │   │   ├── sem.h
│   │   │   │   ├── setjmp.h
│   │   │   │   ├── shm.h
│   │   │   │   ├── signal.h
│   │   │   │   ├── stat.h
│   │   │   │   ├── stdint.h
│   │   │   │   ├── syscall.h.in
│   │   │   │   └── user.h
│   │   │   ├── crt_arch.h
│   │   │   ├── ksigaction.h
│   │   │   ├── kstat.h
│   │   │   ├── pthread_arch.h
│   │   │   ├── reloc.h
│   │   │   └── syscall_arch.h
│   │   ├── x32/
│   │   │   ├── atomic_arch.h
│   │   │   ├── bits/
│   │   │   │   ├── alltypes.h.in
│   │   │   │   ├── fcntl.h
│   │   │   │   ├── fenv.h
│   │   │   │   ├── float.h
│   │   │   │   ├── io.h
│   │   │   │   ├── ioctl_fix.h
│   │   │   │   ├── ipc.h
│   │   │   │   ├── limits.h
│   │   │   │   ├── mman.h
│   │   │   │   ├── msg.h
│   │   │   │   ├── posix.h
│   │   │   │   ├── ptrace.h
│   │   │   │   ├── reg.h
│   │   │   │   ├── sem.h
│   │   │   │   ├── setjmp.h
│   │   │   │   ├── shm.h
│   │   │   │   ├── signal.h
│   │   │   │   ├── socket.h
│   │   │   │   ├── stat.h
│   │   │   │   ├── statfs.h
│   │   │   │   ├── stdint.h
│   │   │   │   ├── syscall.h.in
│   │   │   │   └── user.h
│   │   │   ├── crt_arch.h
│   │   │   ├── ksigaction.h
│   │   │   ├── kstat.h
│   │   │   ├── pthread_arch.h
│   │   │   ├── reloc.h
│   │   │   └── syscall_arch.h
│   │   └── x86_64/
│   │       ├── atomic_arch.h
│   │       ├── bits/
│   │       │   ├── alltypes.h.in
│   │       │   ├── fenv.h
│   │       │   ├── float.h
│   │       │   ├── io.h
│   │       │   ├── limits.h
│   │       │   ├── mman.h
│   │       │   ├── posix.h
│   │       │   ├── ptrace.h
│   │       │   ├── reg.h
│   │       │   ├── sem.h
│   │       │   ├── setjmp.h
│   │       │   ├── signal.h
│   │       │   ├── stat.h
│   │       │   ├── stdint.h
│   │       │   ├── syscall.h.in
│   │       │   └── user.h
│   │       ├── crt_arch.h
│   │       ├── ksigaction.h
│   │       ├── kstat.h
│   │       ├── pthread_arch.h
│   │       ├── reloc.h
│   │       └── syscall_arch.h
│   ├── build.sh
│   ├── compat/
│   │   └── time32/
│   │       ├── __xstat.c
│   │       ├── adjtime32.c
│   │       ├── adjtimex_time32.c
│   │       ├── aio_suspend_time32.c
│   │       ├── clock_adjtime32.c
│   │       ├── clock_getres_time32.c
│   │       ├── clock_gettime32.c
│   │       ├── clock_nanosleep_time32.c
│   │       ├── clock_settime32.c
│   │       ├── cnd_timedwait_time32.c
│   │       ├── ctime32.c
│   │       ├── ctime32_r.c
│   │       ├── difftime32.c
│   │       ├── fstat_time32.c
│   │       ├── fstatat_time32.c
│   │       ├── ftime32.c
│   │       ├── futimens_time32.c
│   │       ├── futimes_time32.c
│   │       ├── futimesat_time32.c
│   │       ├── getitimer_time32.c
│   │       ├── getrusage_time32.c
│   │       ├── gettimeofday_time32.c
│   │       ├── gmtime32.c
│   │       ├── gmtime32_r.c
│   │       ├── localtime32.c
│   │       ├── localtime32_r.c
│   │       ├── lstat_time32.c
│   │       ├── lutimes_time32.c
│   │       ├── mktime32.c
│   │       ├── mq_timedreceive_time32.c
│   │       ├── mq_timedsend_time32.c
│   │       ├── mtx_timedlock_time32.c
│   │       ├── nanosleep_time32.c
│   │       ├── ppoll_time32.c
│   │       ├── pselect_time32.c
│   │       ├── pthread_cond_timedwait_time32.c
│   │       ├── pthread_mutex_timedlock_time32.c
│   │       ├── pthread_rwlock_timedrdlock_time32.c
│   │       ├── pthread_rwlock_timedwrlock_time32.c
│   │       ├── pthread_timedjoin_np_time32.c
│   │       ├── recvmmsg_time32.c
│   │       ├── sched_rr_get_interval_time32.c
│   │       ├── select_time32.c
│   │       ├── sem_timedwait_time32.c
│   │       ├── semtimedop_time32.c
│   │       ├── setitimer_time32.c
│   │       ├── settimeofday_time32.c
│   │       ├── sigtimedwait_time32.c
│   │       ├── stat_time32.c
│   │       ├── stime32.c
│   │       ├── thrd_sleep_time32.c
│   │       ├── time32.c
│   │       ├── time32.h
│   │       ├── time32gm.c
│   │       ├── timer_gettime32.c
│   │       ├── timer_settime32.c
│   │       ├── timerfd_gettime32.c
│   │       ├── timerfd_settime32.c
│   │       ├── timespec_get_time32.c
│   │       ├── utime_time32.c
│   │       ├── utimensat_time32.c
│   │       ├── utimes_time32.c
│   │       ├── wait3_time32.c
│   │       └── wait4_time32.c
│   ├── configure
│   ├── crt/
│   │   ├── Scrt1.c
│   │   ├── crt1.c
│   │   ├── crti.c
│   │   ├── crtn.c
│   │   └── rcrt1.c
│   ├── dynamic.list
│   ├── include/
│   │   ├── aio.h
│   │   ├── alloca.h
│   │   ├── alltypes.h.in
│   │   ├── ar.h
│   │   ├── arpa/
│   │   │   ├── ftp.h
│   │   │   ├── inet.h
│   │   │   ├── nameser.h
│   │   │   ├── nameser_compat.h
│   │   │   ├── telnet.h
│   │   │   └── tftp.h
│   │   ├── assert.h
│   │   ├── bitmap.h
│   │   ├── bitops.h
│   │   ├── byteswap.h
│   │   ├── complex.h
│   │   ├── cpio.h
│   │   ├── crypt.h
│   │   ├── ctype.h
│   │   ├── dirent.h
│   │   ├── dlfcn.h
│   │   ├── elf.h
│   │   ├── endian.h
│   │   ├── err.h
│   │   ├── errno.h
│   │   ├── fcntl.h
│   │   ├── features.h
│   │   ├── fenv.h
│   │   ├── float.h
│   │   ├── fmtmsg.h
│   │   ├── fnmatch.h
│   │   ├── ftw.h
│   │   ├── getopt.h
│   │   ├── glob.h
│   │   ├── grp.h
│   │   ├── iconv.h
│   │   ├── ifaddrs.h
│   │   ├── inttypes.h
│   │   ├── iso646.h
│   │   ├── langinfo.h
│   │   ├── lastlog.h
│   │   ├── libgen.h
│   │   ├── libintl.h
│   │   ├── limits.h
│   │   ├── link.h
│   │   ├── locale.h
│   │   ├── malloc.h
│   │   ├── math.h
│   │   ├── memory.h
│   │   ├── minos/
│   │   │   ├── barrier.h
│   │   │   ├── compiler.h
│   │   │   ├── debug.h
│   │   │   ├── device.h
│   │   │   ├── kobject.h
│   │   │   ├── kobject_uapi.h
│   │   │   ├── libc.h
│   │   │   ├── list.h
│   │   │   ├── mutex.h
│   │   │   ├── poll.h
│   │   │   ├── procinfo.h
│   │   │   ├── procinfo_uapi.h
│   │   │   ├── proto.h
│   │   │   ├── sched.h
│   │   │   ├── service.h
│   │   │   ├── spinlock.h
│   │   │   ├── thread.h
│   │   │   └── types.h
│   │   ├── mntent.h
│   │   ├── monetary.h
│   │   ├── mqueue.h
│   │   ├── net/
│   │   │   ├── ethernet.h
│   │   │   ├── if.h
│   │   │   ├── if_arp.h
│   │   │   └── route.h
│   │   ├── netdb.h
│   │   ├── netinet/
│   │   │   ├── ether.h
│   │   │   ├── icmp6.h
│   │   │   ├── if_ether.h
│   │   │   ├── igmp.h
│   │   │   ├── in.h
│   │   │   ├── in_systm.h
│   │   │   ├── ip.h
│   │   │   ├── ip6.h
│   │   │   ├── ip_icmp.h
│   │   │   ├── tcp.h
│   │   │   └── udp.h
│   │   ├── netpacket/
│   │   │   └── packet.h
│   │   ├── nl_types.h
│   │   ├── paths.h
│   │   ├── poll.h
│   │   ├── pthread.h
│   │   ├── pty.h
│   │   ├── pwd.h
│   │   ├── regex.h
│   │   ├── resolv.h
│   │   ├── sched.h
│   │   ├── scsi/
│   │   │   ├── scsi.h
│   │   │   ├── scsi_ioctl.h
│   │   │   └── sg.h
│   │   ├── search.h
│   │   ├── semaphore.h
│   │   ├── setjmp.h
│   │   ├── shadow.h
│   │   ├── signal.h
│   │   ├── spawn.h
│   │   ├── stdalign.h
│   │   ├── stdarg.h
│   │   ├── stdbool.h
│   │   ├── stdc-predef.h
│   │   ├── stddef.h
│   │   ├── stdint.h
│   │   ├── stdio.h
│   │   ├── stdio_ext.h
│   │   ├── stdlib.h
│   │   ├── stdnoreturn.h
│   │   ├── string.h
│   │   ├── strings.h
│   │   ├── stropts.h
│   │   ├── sys/
│   │   │   ├── acct.h
│   │   │   ├── auxv.h
│   │   │   ├── cachectl.h
│   │   │   ├── dir.h
│   │   │   ├── epoll.h
│   │   │   ├── errno.h
│   │   │   ├── eventfd.h
│   │   │   ├── fanotify.h
│   │   │   ├── fcntl.h
│   │   │   ├── file.h
│   │   │   ├── fsuid.h
│   │   │   ├── inotify.h
│   │   │   ├── io.h
│   │   │   ├── ioctl.h
│   │   │   ├── ipc.h
│   │   │   ├── kd.h
│   │   │   ├── klog.h
│   │   │   ├── membarrier.h
│   │   │   ├── mman.h
│   │   │   ├── msg.h
│   │   │   ├── mtio.h
│   │   │   ├── param.h
│   │   │   ├── personality.h
│   │   │   ├── poll.h
│   │   │   ├── prctl.h
│   │   │   ├── procfs.h
│   │   │   ├── ptrace.h
│   │   │   ├── quota.h
│   │   │   ├── random.h
│   │   │   ├── reboot.h
│   │   │   ├── reg.h
│   │   │   ├── resource.h
│   │   │   ├── select.h
│   │   │   ├── sem.h
│   │   │   ├── sendfile.h
│   │   │   ├── shm.h
│   │   │   ├── signal.h
│   │   │   ├── signalfd.h
│   │   │   ├── socket.h
│   │   │   ├── soundcard.h
│   │   │   ├── stat.h
│   │   │   ├── statfs.h
│   │   │   ├── statvfs.h
│   │   │   ├── stropts.h
│   │   │   ├── swap.h
│   │   │   ├── syscall.h
│   │   │   ├── sysinfo.h
│   │   │   ├── syslog.h
│   │   │   ├── sysmacros.h
│   │   │   ├── termios.h
│   │   │   ├── time.h
│   │   │   ├── timeb.h
│   │   │   ├── timerfd.h
│   │   │   ├── times.h
│   │   │   ├── timex.h
│   │   │   ├── ttydefaults.h
│   │   │   ├── types.h
│   │   │   ├── ucontext.h
│   │   │   ├── uio.h
│   │   │   ├── un.h
│   │   │   ├── user.h
│   │   │   ├── utsname.h
│   │   │   ├── vfs.h
│   │   │   ├── vt.h
│   │   │   ├── wait.h
│   │   │   └── xattr.h
│   │   ├── syscall.h
│   │   ├── sysexits.h
│   │   ├── syslog.h
│   │   ├── tar.h
│   │   ├── termios.h
│   │   ├── tgmath.h
│   │   ├── threads.h
│   │   ├── time.h
│   │   ├── uchar.h
│   │   ├── ucontext.h
│   │   ├── ulimit.h
│   │   ├── unistd.h
│   │   ├── utime.h
│   │   ├── utmp.h
│   │   ├── utmpx.h
│   │   ├── values.h
│   │   ├── wait.h
│   │   ├── wchar.h
│   │   ├── wctype.h
│   │   └── wordexp.h
│   ├── ldso/
│   │   ├── dlstart.c
│   │   └── dynlink.c
│   ├── src/
│   │   ├── bitmap/
│   │   │   ├── bitmap.c
│   │   │   ├── find_bit.c
│   │   │   └── hweight.c
│   │   ├── complex/
│   │   │   ├── __cexp.c
│   │   │   ├── __cexpf.c
│   │   │   ├── cabs.c
│   │   │   ├── cabsf.c
│   │   │   ├── cabsl.c
│   │   │   ├── cacos.c
│   │   │   ├── cacosf.c
│   │   │   ├── cacosh.c
│   │   │   ├── cacoshf.c
│   │   │   ├── cacoshl.c
│   │   │   ├── cacosl.c
│   │   │   ├── carg.c
│   │   │   ├── cargf.c
│   │   │   ├── cargl.c
│   │   │   ├── casin.c
│   │   │   ├── casinf.c
│   │   │   ├── casinh.c
│   │   │   ├── casinhf.c
│   │   │   ├── casinhl.c
│   │   │   ├── casinl.c
│   │   │   ├── catan.c
│   │   │   ├── catanf.c
│   │   │   ├── catanh.c
│   │   │   ├── catanhf.c
│   │   │   ├── catanhl.c
│   │   │   ├── catanl.c
│   │   │   ├── ccos.c
│   │   │   ├── ccosf.c
│   │   │   ├── ccosh.c
│   │   │   ├── ccoshf.c
│   │   │   ├── ccoshl.c
│   │   │   ├── ccosl.c
│   │   │   ├── cexp.c
│   │   │   ├── cexpf.c
│   │   │   ├── cexpl.c
│   │   │   ├── cimag.c
│   │   │   ├── cimagf.c
│   │   │   ├── cimagl.c
│   │   │   ├── clog.c
│   │   │   ├── clogf.c
│   │   │   ├── clogl.c
│   │   │   ├── conj.c
│   │   │   ├── conjf.c
│   │   │   ├── conjl.c
│   │   │   ├── cpow.c
│   │   │   ├── cpowf.c
│   │   │   ├── cpowl.c
│   │   │   ├── cproj.c
│   │   │   ├── cprojf.c
│   │   │   ├── cprojl.c
│   │   │   ├── creal.c
│   │   │   ├── crealf.c
│   │   │   ├── creall.c
│   │   │   ├── csin.c
│   │   │   ├── csinf.c
│   │   │   ├── csinh.c
│   │   │   ├── csinhf.c
│   │   │   ├── csinhl.c
│   │   │   ├── csinl.c
│   │   │   ├── csqrt.c
│   │   │   ├── csqrtf.c
│   │   │   ├── csqrtl.c
│   │   │   ├── ctan.c
│   │   │   ├── ctanf.c
│   │   │   ├── ctanh.c
│   │   │   ├── ctanhf.c
│   │   │   ├── ctanhl.c
│   │   │   └── ctanl.c
│   │   ├── crypt/
│   │   │   ├── crypt.c
│   │   │   ├── crypt_blowfish.c
│   │   │   ├── crypt_des.c
│   │   │   ├── crypt_des.h
│   │   │   ├── crypt_md5.c
│   │   │   ├── crypt_r.c
│   │   │   ├── crypt_sha256.c
│   │   │   ├── crypt_sha512.c
│   │   │   └── encrypt.c
│   │   ├── ctype/
│   │   │   ├── __ctype_b_loc.c
│   │   │   ├── __ctype_get_mb_cur_max.c
│   │   │   ├── __ctype_tolower_loc.c
│   │   │   ├── __ctype_toupper_loc.c
│   │   │   ├── alpha.h
│   │   │   ├── casemap.h
│   │   │   ├── isalnum.c
│   │   │   ├── isalpha.c
│   │   │   ├── isascii.c
│   │   │   ├── isblank.c
│   │   │   ├── iscntrl.c
│   │   │   ├── isdigit.c
│   │   │   ├── isgraph.c
│   │   │   ├── islower.c
│   │   │   ├── isprint.c
│   │   │   ├── ispunct.c
│   │   │   ├── isspace.c
│   │   │   ├── isupper.c
│   │   │   ├── iswalnum.c
│   │   │   ├── iswalpha.c
│   │   │   ├── iswblank.c
│   │   │   ├── iswcntrl.c
│   │   │   ├── iswctype.c
│   │   │   ├── iswdigit.c
│   │   │   ├── iswgraph.c
│   │   │   ├── iswlower.c
│   │   │   ├── iswprint.c
│   │   │   ├── iswpunct.c
│   │   │   ├── iswspace.c
│   │   │   ├── iswupper.c
│   │   │   ├── iswxdigit.c
│   │   │   ├── isxdigit.c
│   │   │   ├── nonspacing.h
│   │   │   ├── punct.h
│   │   │   ├── toascii.c
│   │   │   ├── tolower.c
│   │   │   ├── toupper.c
│   │   │   ├── towctrans.c
│   │   │   ├── wcswidth.c
│   │   │   ├── wctrans.c
│   │   │   ├── wcwidth.c
│   │   │   └── wide.h
│   │   ├── dirent/
│   │   │   ├── __dirent.h
│   │   │   ├── alphasort.c
│   │   │   ├── closedir.c
│   │   │   ├── dirfd.c
│   │   │   ├── fdopendir.c
│   │   │   ├── opendir.c
│   │   │   ├── readdir.c
│   │   │   ├── readdir_r.c
│   │   │   ├── rewinddir.c
│   │   │   ├── scandir.c
│   │   │   ├── seekdir.c
│   │   │   ├── telldir.c
│   │   │   └── versionsort.c
│   │   ├── env/
│   │   │   ├── __environ.c
│   │   │   ├── __init_tls.c
│   │   │   ├── __libc_start_main.c
│   │   │   ├── __reset_tls.c
│   │   │   ├── __stack_chk_fail.c
│   │   │   ├── clearenv.c
│   │   │   ├── getenv.c
│   │   │   ├── putenv.c
│   │   │   ├── secure_getenv.c
│   │   │   ├── setenv.c
│   │   │   └── unsetenv.c
│   │   ├── errno/
│   │   │   ├── __errno_location.c
│   │   │   ├── __strerror.h
│   │   │   └── strerror.c
│   │   ├── exit/
│   │   │   ├── _Exit.c
│   │   │   ├── abort.c
│   │   │   ├── abort_lock.c
│   │   │   ├── arm/
│   │   │   │   └── __aeabi_atexit.c
│   │   │   ├── assert.c
│   │   │   ├── at_quick_exit.c
│   │   │   ├── atexit.c
│   │   │   ├── exit.c
│   │   │   └── quick_exit.c
│   │   ├── fcntl/
│   │   │   ├── creat.c
│   │   │   ├── fcntl.c
│   │   │   ├── open.c
│   │   │   ├── openat.c
│   │   │   ├── posix_fadvise.c
│   │   │   └── posix_fallocate.c
│   │   ├── fenv/
│   │   │   ├── __flt_rounds.c
│   │   │   ├── arm/
│   │   │   │   └── fenv.c
│   │   │   ├── fegetexceptflag.c
│   │   │   ├── feholdexcept.c
│   │   │   ├── fenv.c
│   │   │   ├── fesetexceptflag.c
│   │   │   ├── fesetround.c
│   │   │   ├── feupdateenv.c
│   │   │   ├── m68k/
│   │   │   │   └── fenv.c
│   │   │   ├── mips/
│   │   │   │   └── fenv-sf.c
│   │   │   ├── mips64/
│   │   │   │   └── fenv-sf.c
│   │   │   ├── mipsn32/
│   │   │   │   └── fenv-sf.c
│   │   │   ├── powerpc/
│   │   │   │   └── fenv-sf.c
│   │   │   ├── powerpc64/
│   │   │   │   └── fenv.c
│   │   │   ├── riscv64/
│   │   │   │   └── fenv-sf.c
│   │   │   ├── s390x/
│   │   │   │   └── fenv.c
│   │   │   └── sh/
│   │   │       └── fenv-nofpu.c
│   │   ├── include/
│   │   │   ├── arpa/
│   │   │   │   └── inet.h
│   │   │   ├── crypt.h
│   │   │   ├── errno.h
│   │   │   ├── features.h
│   │   │   ├── langinfo.h
│   │   │   ├── pthread.h
│   │   │   ├── resolv.h
│   │   │   ├── signal.h
│   │   │   ├── stdio.h
│   │   │   ├── stdlib.h
│   │   │   ├── string.h
│   │   │   ├── sys/
│   │   │   │   ├── auxv.h
│   │   │   │   ├── membarrier.h
│   │   │   │   ├── mman.h
│   │   │   │   ├── sysinfo.h
│   │   │   │   └── time.h
│   │   │   ├── time.h
│   │   │   ├── unistd.h
│   │   │   └── wchar.h
│   │   ├── internal/
│   │   │   ├── aio_impl.h
│   │   │   ├── asm.inc
│   │   │   ├── atomic.h
│   │   │   ├── complex_impl.h
│   │   │   ├── defsysinfo.c
│   │   │   ├── dynlink.h
│   │   │   ├── fdpic_crt.h
│   │   │   ├── floatscan.c
│   │   │   ├── floatscan.h
│   │   │   ├── fork_impl.h
│   │   │   ├── futex.h
│   │   │   ├── intscan.c
│   │   │   ├── intscan.h
│   │   │   ├── ksigaction.h
│   │   │   ├── libc.c
│   │   │   ├── libc.h
│   │   │   ├── libm.h
│   │   │   ├── locale_impl.h
│   │   │   ├── lock.h
│   │   │   ├── procfdname.c
│   │   │   ├── pthread_impl.h
│   │   │   ├── sh/
│   │   │   │   └── __shcall.c
│   │   │   ├── shgetc.c
│   │   │   ├── shgetc.h
│   │   │   ├── stdio_impl.h
│   │   │   ├── syscall.h
│   │   │   ├── syscall_ret.c
│   │   │   ├── vdso.c
│   │   │   └── version.c
│   │   ├── ldso/
│   │   │   ├── __dlsym.c
│   │   │   ├── arm/
│   │   │   │   └── find_exidx.c
│   │   │   ├── dl_iterate_phdr.c
│   │   │   ├── dladdr.c
│   │   │   ├── dlclose.c
│   │   │   ├── dlerror.c
│   │   │   ├── dlinfo.c
│   │   │   ├── dlopen.c
│   │   │   ├── dlsym.c
│   │   │   └── tlsdesc.c
│   │   ├── legacy/
│   │   │   ├── cuserid.c
│   │   │   ├── daemon.c
│   │   │   ├── err.c
│   │   │   ├── euidaccess.c
│   │   │   ├── ftw.c
│   │   │   ├── futimes.c
│   │   │   ├── getdtablesize.c
│   │   │   ├── getloadavg.c
│   │   │   ├── getpagesize.c
│   │   │   ├── getpass.c
│   │   │   ├── getusershell.c
│   │   │   ├── isastream.c
│   │   │   ├── lutimes.c
│   │   │   ├── ulimit.c
│   │   │   ├── utmpx.c
│   │   │   └── valloc.c
│   │   ├── locale/
│   │   │   ├── __lctrans.c
│   │   │   ├── __mo_lookup.c
│   │   │   ├── big5.h
│   │   │   ├── bind_textdomain_codeset.c
│   │   │   ├── c_locale.c
│   │   │   ├── catclose.c
│   │   │   ├── catgets.c
│   │   │   ├── catopen.c
│   │   │   ├── codepages.h
│   │   │   ├── dcngettext.c
│   │   │   ├── duplocale.c
│   │   │   ├── freelocale.c
│   │   │   ├── gb18030.h
│   │   │   ├── hkscs.h
│   │   │   ├── iconv.c
│   │   │   ├── iconv_close.c
│   │   │   ├── jis0208.h
│   │   │   ├── ksc.h
│   │   │   ├── langinfo.c
│   │   │   ├── legacychars.h
│   │   │   ├── locale_map.c
│   │   │   ├── localeconv.c
│   │   │   ├── newlocale.c
│   │   │   ├── pleval.c
│   │   │   ├── pleval.h
│   │   │   ├── revjis.h
│   │   │   ├── setlocale.c
│   │   │   ├── strcoll.c
│   │   │   ├── strfmon.c
│   │   │   ├── strxfrm.c
│   │   │   ├── textdomain.c
│   │   │   ├── uselocale.c
│   │   │   ├── wcscoll.c
│   │   │   └── wcsxfrm.c
│   │   ├── malloc/
│   │   │   ├── calloc.c
│   │   │   ├── free.c
│   │   │   ├── libc_calloc.c
│   │   │   ├── lite_malloc.c
│   │   │   ├── mallocng/
│   │   │   │   ├── aligned_alloc.c
│   │   │   │   ├── donate.c
│   │   │   │   ├── free.c
│   │   │   │   ├── glue.h
│   │   │   │   ├── malloc.c
│   │   │   │   ├── malloc_usable_size.c
│   │   │   │   ├── meta.h
│   │   │   │   └── realloc.c
│   │   │   ├── memalign.c
│   │   │   ├── oldmalloc/
│   │   │   │   ├── aligned_alloc.c
│   │   │   │   ├── malloc.c
│   │   │   │   ├── malloc_impl.h
│   │   │   │   └── malloc_usable_size.c
│   │   │   ├── posix_memalign.c
│   │   │   ├── realloc.c
│   │   │   ├── reallocarray.c
│   │   │   └── replaced.c
│   │   ├── math/
│   │   │   ├── __cos.c
│   │   │   ├── __cosdf.c
│   │   │   ├── __cosl.c
│   │   │   ├── __expo2.c
│   │   │   ├── __expo2f.c
│   │   │   ├── __fpclassify.c
│   │   │   ├── __fpclassifyf.c
│   │   │   ├── __fpclassifyl.c
│   │   │   ├── __invtrigl.c
│   │   │   ├── __invtrigl.h
│   │   │   ├── __math_divzero.c
│   │   │   ├── __math_divzerof.c
│   │   │   ├── __math_invalid.c
│   │   │   ├── __math_invalidf.c
│   │   │   ├── __math_invalidl.c
│   │   │   ├── __math_oflow.c
│   │   │   ├── __math_oflowf.c
│   │   │   ├── __math_uflow.c
│   │   │   ├── __math_uflowf.c
│   │   │   ├── __math_xflow.c
│   │   │   ├── __math_xflowf.c
│   │   │   ├── __polevll.c
│   │   │   ├── __rem_pio2.c
│   │   │   ├── __rem_pio2_large.c
│   │   │   ├── __rem_pio2f.c
│   │   │   ├── __rem_pio2l.c
│   │   │   ├── __signbit.c
│   │   │   ├── __signbitf.c
│   │   │   ├── __signbitl.c
│   │   │   ├── __sin.c
│   │   │   ├── __sindf.c
│   │   │   ├── __sinl.c
│   │   │   ├── __tan.c
│   │   │   ├── __tandf.c
│   │   │   ├── __tanl.c
│   │   │   ├── aarch64/
│   │   │   │   ├── ceil.c
│   │   │   │   ├── ceilf.c
│   │   │   │   ├── fabs.c
│   │   │   │   ├── fabsf.c
│   │   │   │   ├── floor.c
│   │   │   │   ├── floorf.c
│   │   │   │   ├── fma.c
│   │   │   │   ├── fmaf.c
│   │   │   │   ├── fmax.c
│   │   │   │   ├── fmaxf.c
│   │   │   │   ├── fmin.c
│   │   │   │   ├── fminf.c
│   │   │   │   ├── llrint.c
│   │   │   │   ├── llrintf.c
│   │   │   │   ├── llround.c
│   │   │   │   ├── llroundf.c
│   │   │   │   ├── lrint.c
│   │   │   │   ├── lrintf.c
│   │   │   │   ├── lround.c
│   │   │   │   ├── lroundf.c
│   │   │   │   ├── nearbyint.c
│   │   │   │   ├── nearbyintf.c
│   │   │   │   ├── rint.c
│   │   │   │   ├── rintf.c
│   │   │   │   ├── round.c
│   │   │   │   ├── roundf.c
│   │   │   │   ├── sqrt.c
│   │   │   │   ├── sqrtf.c
│   │   │   │   ├── trunc.c
│   │   │   │   └── truncf.c
│   │   │   ├── acos.c
│   │   │   ├── acosf.c
│   │   │   ├── acosh.c
│   │   │   ├── acoshf.c
│   │   │   ├── acoshl.c
│   │   │   ├── acosl.c
│   │   │   ├── arm/
│   │   │   │   ├── fabs.c
│   │   │   │   ├── fabsf.c
│   │   │   │   ├── fma.c
│   │   │   │   ├── fmaf.c
│   │   │   │   ├── sqrt.c
│   │   │   │   └── sqrtf.c
│   │   │   ├── asin.c
│   │   │   ├── asinf.c
│   │   │   ├── asinh.c
│   │   │   ├── asinhf.c
│   │   │   ├── asinhl.c
│   │   │   ├── asinl.c
│   │   │   ├── atan.c
│   │   │   ├── atan2.c
│   │   │   ├── atan2f.c
│   │   │   ├── atan2l.c
│   │   │   ├── atanf.c
│   │   │   ├── atanh.c
│   │   │   ├── atanhf.c
│   │   │   ├── atanhl.c
│   │   │   ├── atanl.c
│   │   │   ├── cbrt.c
│   │   │   ├── cbrtf.c
│   │   │   ├── cbrtl.c
│   │   │   ├── ceil.c
│   │   │   ├── ceilf.c
│   │   │   ├── ceill.c
│   │   │   ├── copysign.c
│   │   │   ├── copysignf.c
│   │   │   ├── copysignl.c
│   │   │   ├── cos.c
│   │   │   ├── cosf.c
│   │   │   ├── cosh.c
│   │   │   ├── coshf.c
│   │   │   ├── coshl.c
│   │   │   ├── cosl.c
│   │   │   ├── erf.c
│   │   │   ├── erff.c
│   │   │   ├── erfl.c
│   │   │   ├── exp.c
│   │   │   ├── exp10.c
│   │   │   ├── exp10f.c
│   │   │   ├── exp10l.c
│   │   │   ├── exp2.c
│   │   │   ├── exp2f.c
│   │   │   ├── exp2f_data.c
│   │   │   ├── exp2f_data.h
│   │   │   ├── exp2l.c
│   │   │   ├── exp_data.c
│   │   │   ├── exp_data.h
│   │   │   ├── expf.c
│   │   │   ├── expl.c
│   │   │   ├── expm1.c
│   │   │   ├── expm1f.c
│   │   │   ├── expm1l.c
│   │   │   ├── fabs.c
│   │   │   ├── fabsf.c
│   │   │   ├── fabsl.c
│   │   │   ├── fdim.c
│   │   │   ├── fdimf.c
│   │   │   ├── fdiml.c
│   │   │   ├── finite.c
│   │   │   ├── finitef.c
│   │   │   ├── floor.c
│   │   │   ├── floorf.c
│   │   │   ├── floorl.c
│   │   │   ├── fma.c
│   │   │   ├── fmaf.c
│   │   │   ├── fmal.c
│   │   │   ├── fmax.c
│   │   │   ├── fmaxf.c
│   │   │   ├── fmaxl.c
│   │   │   ├── fmin.c
│   │   │   ├── fminf.c
│   │   │   ├── fminl.c
│   │   │   ├── fmod.c
│   │   │   ├── fmodf.c
│   │   │   ├── fmodl.c
│   │   │   ├── frexp.c
│   │   │   ├── frexpf.c
│   │   │   ├── frexpl.c
│   │   │   ├── hypot.c
│   │   │   ├── hypotf.c
│   │   │   ├── hypotl.c
│   │   │   ├── i386/
│   │   │   │   ├── fabs.c
│   │   │   │   ├── fabsf.c
│   │   │   │   ├── fabsl.c
│   │   │   │   ├── fmod.c
│   │   │   │   ├── fmodf.c
│   │   │   │   ├── fmodl.c
│   │   │   │   ├── llrint.c
│   │   │   │   ├── llrintf.c
│   │   │   │   ├── llrintl.c
│   │   │   │   ├── lrint.c
│   │   │   │   ├── lrintf.c
│   │   │   │   ├── lrintl.c
│   │   │   │   ├── remainder.c
│   │   │   │   ├── remainderf.c
│   │   │   │   ├── remainderl.c
│   │   │   │   ├── rint.c
│   │   │   │   ├── rintf.c
│   │   │   │   ├── rintl.c
│   │   │   │   ├── sqrt.c
│   │   │   │   ├── sqrtf.c
│   │   │   │   └── sqrtl.c
│   │   │   ├── ilogb.c
│   │   │   ├── ilogbf.c
│   │   │   ├── ilogbl.c
│   │   │   ├── j0.c
│   │   │   ├── j0f.c
│   │   │   ├── j1.c
│   │   │   ├── j1f.c
│   │   │   ├── jn.c
│   │   │   ├── jnf.c
│   │   │   ├── ldexp.c
│   │   │   ├── ldexpf.c
│   │   │   ├── ldexpl.c
│   │   │   ├── lgamma.c
│   │   │   ├── lgamma_r.c
│   │   │   ├── lgammaf.c
│   │   │   ├── lgammaf_r.c
│   │   │   ├── lgammal.c
│   │   │   ├── llrint.c
│   │   │   ├── llrintf.c
│   │   │   ├── llrintl.c
│   │   │   ├── llround.c
│   │   │   ├── llroundf.c
│   │   │   ├── llroundl.c
│   │   │   ├── log.c
│   │   │   ├── log10.c
│   │   │   ├── log10f.c
│   │   │   ├── log10l.c
│   │   │   ├── log1p.c
│   │   │   ├── log1pf.c
│   │   │   ├── log1pl.c
│   │   │   ├── log2.c
│   │   │   ├── log2_data.c
│   │   │   ├── log2_data.h
│   │   │   ├── log2f.c
│   │   │   ├── log2f_data.c
│   │   │   ├── log2f_data.h
│   │   │   ├── log2l.c
│   │   │   ├── log_data.c
│   │   │   ├── log_data.h
│   │   │   ├── logb.c
│   │   │   ├── logbf.c
│   │   │   ├── logbl.c
│   │   │   ├── logf.c
│   │   │   ├── logf_data.c
│   │   │   ├── logf_data.h
│   │   │   ├── logl.c
│   │   │   ├── lrint.c
│   │   │   ├── lrintf.c
│   │   │   ├── lrintl.c
│   │   │   ├── lround.c
│   │   │   ├── lroundf.c
│   │   │   ├── lroundl.c
│   │   │   ├── m68k/
│   │   │   │   └── sqrtl.c
│   │   │   ├── mips/
│   │   │   │   ├── fabs.c
│   │   │   │   ├── fabsf.c
│   │   │   │   ├── sqrt.c
│   │   │   │   └── sqrtf.c
│   │   │   ├── modf.c
│   │   │   ├── modff.c
│   │   │   ├── modfl.c
│   │   │   ├── nan.c
│   │   │   ├── nanf.c
│   │   │   ├── nanl.c
│   │   │   ├── nearbyint.c
│   │   │   ├── nearbyintf.c
│   │   │   ├── nearbyintl.c
│   │   │   ├── nextafter.c
│   │   │   ├── nextafterf.c
│   │   │   ├── nextafterl.c
│   │   │   ├── nexttoward.c
│   │   │   ├── nexttowardf.c
│   │   │   ├── nexttowardl.c
│   │   │   ├── pow.c
│   │   │   ├── pow_data.c
│   │   │   ├── pow_data.h
│   │   │   ├── powerpc/
│   │   │   │   ├── fabs.c
│   │   │   │   ├── fabsf.c
│   │   │   │   ├── fma.c
│   │   │   │   ├── fmaf.c
│   │   │   │   ├── sqrt.c
│   │   │   │   └── sqrtf.c
│   │   │   ├── powerpc64/
│   │   │   │   ├── ceil.c
│   │   │   │   ├── ceilf.c
│   │   │   │   ├── fabs.c
│   │   │   │   ├── fabsf.c
│   │   │   │   ├── floor.c
│   │   │   │   ├── floorf.c
│   │   │   │   ├── fma.c
│   │   │   │   ├── fmaf.c
│   │   │   │   ├── fmax.c
│   │   │   │   ├── fmaxf.c
│   │   │   │   ├── fmin.c
│   │   │   │   ├── fminf.c
│   │   │   │   ├── lrint.c
│   │   │   │   ├── lrintf.c
│   │   │   │   ├── lround.c
│   │   │   │   ├── lroundf.c
│   │   │   │   ├── round.c
│   │   │   │   ├── roundf.c
│   │   │   │   ├── sqrt.c
│   │   │   │   ├── sqrtf.c
│   │   │   │   ├── trunc.c
│   │   │   │   └── truncf.c
│   │   │   ├── powf.c
│   │   │   ├── powf_data.c
│   │   │   ├── powf_data.h
│   │   │   ├── powl.c
│   │   │   ├── remainder.c
│   │   │   ├── remainderf.c
│   │   │   ├── remainderl.c
│   │   │   ├── remquo.c
│   │   │   ├── remquof.c
│   │   │   ├── remquol.c
│   │   │   ├── rint.c
│   │   │   ├── rintf.c
│   │   │   ├── rintl.c
│   │   │   ├── riscv64/
│   │   │   │   ├── copysign.c
│   │   │   │   ├── copysignf.c
│   │   │   │   ├── fabs.c
│   │   │   │   ├── fabsf.c
│   │   │   │   ├── fma.c
│   │   │   │   ├── fmaf.c
│   │   │   │   ├── fmax.c
│   │   │   │   ├── fmaxf.c
│   │   │   │   ├── fmin.c
│   │   │   │   ├── fminf.c
│   │   │   │   ├── sqrt.c
│   │   │   │   └── sqrtf.c
│   │   │   ├── round.c
│   │   │   ├── roundf.c
│   │   │   ├── roundl.c
│   │   │   ├── s390x/
│   │   │   │   ├── ceil.c
│   │   │   │   ├── ceilf.c
│   │   │   │   ├── ceill.c
│   │   │   │   ├── fabs.c
│   │   │   │   ├── fabsf.c
│   │   │   │   ├── fabsl.c
│   │   │   │   ├── floor.c
│   │   │   │   ├── floorf.c
│   │   │   │   ├── floorl.c
│   │   │   │   ├── fma.c
│   │   │   │   ├── fmaf.c
│   │   │   │   ├── nearbyint.c
│   │   │   │   ├── nearbyintf.c
│   │   │   │   ├── nearbyintl.c
│   │   │   │   ├── rint.c
│   │   │   │   ├── rintf.c
│   │   │   │   ├── rintl.c
│   │   │   │   ├── round.c
│   │   │   │   ├── roundf.c
│   │   │   │   ├── roundl.c
│   │   │   │   ├── sqrt.c
│   │   │   │   ├── sqrtf.c
│   │   │   │   ├── sqrtl.c
│   │   │   │   ├── trunc.c
│   │   │   │   ├── truncf.c
│   │   │   │   └── truncl.c
│   │   │   ├── scalb.c
│   │   │   ├── scalbf.c
│   │   │   ├── scalbln.c
│   │   │   ├── scalblnf.c
│   │   │   ├── scalblnl.c
│   │   │   ├── scalbn.c
│   │   │   ├── scalbnf.c
│   │   │   ├── scalbnl.c
│   │   │   ├── signgam.c
│   │   │   ├── significand.c
│   │   │   ├── significandf.c
│   │   │   ├── sin.c
│   │   │   ├── sincos.c
│   │   │   ├── sincosf.c
│   │   │   ├── sincosl.c
│   │   │   ├── sinf.c
│   │   │   ├── sinh.c
│   │   │   ├── sinhf.c
│   │   │   ├── sinhl.c
│   │   │   ├── sinl.c
│   │   │   ├── sqrt.c
│   │   │   ├── sqrt_data.c
│   │   │   ├── sqrt_data.h
│   │   │   ├── sqrtf.c
│   │   │   ├── sqrtl.c
│   │   │   ├── tan.c
│   │   │   ├── tanf.c
│   │   │   ├── tanh.c
│   │   │   ├── tanhf.c
│   │   │   ├── tanhl.c
│   │   │   ├── tanl.c
│   │   │   ├── tgamma.c
│   │   │   ├── tgammaf.c
│   │   │   ├── tgammal.c
│   │   │   ├── trunc.c
│   │   │   ├── truncf.c
│   │   │   ├── truncl.c
│   │   │   ├── x32/
│   │   │   │   ├── fma.c
│   │   │   │   └── fmaf.c
│   │   │   └── x86_64/
│   │   │       ├── fabs.c
│   │   │       ├── fabsf.c
│   │   │       ├── fabsl.c
│   │   │       ├── fma.c
│   │   │       ├── fmaf.c
│   │   │       ├── fmodl.c
│   │   │       ├── llrint.c
│   │   │       ├── llrintf.c
│   │   │       ├── llrintl.c
│   │   │       ├── lrint.c
│   │   │       ├── lrintf.c
│   │   │       ├── lrintl.c
│   │   │       ├── remainderl.c
│   │   │       ├── remquol.c
│   │   │       ├── rintl.c
│   │   │       ├── sqrt.c
│   │   │       ├── sqrtf.c
│   │   │       └── sqrtl.c
│   │   ├── minos/
│   │   │   ├── aarch64/
│   │   │   │   ├── aarch64_kobject.c
│   │   │   │   ├── aarch64_svc.S
│   │   │   │   └── aarch64_svc.h
│   │   │   ├── brk.c
│   │   │   ├── device.c
│   │   │   ├── grant.c
│   │   │   ├── kobject.c
│   │   │   ├── map.c
│   │   │   ├── poll.c
│   │   │   ├── procinfo.c
│   │   │   ├── proto.c
│   │   │   ├── service.c
│   │   │   ├── sys.c
│   │   │   ├── thread.c
│   │   │   └── yield.c
│   │   ├── misc/
│   │   │   ├── a64l.c
│   │   │   ├── basename.c
│   │   │   ├── dirname.c
│   │   │   ├── ffs.c
│   │   │   ├── ffsl.c
│   │   │   ├── ffsll.c
│   │   │   ├── fmtmsg.c
│   │   │   ├── forkpty.c
│   │   │   ├── get_current_dir_name.c
│   │   │   ├── getauxval.c
│   │   │   ├── getdomainname.c
│   │   │   ├── getentropy.c
│   │   │   ├── gethostid.c
│   │   │   ├── getopt.c
│   │   │   ├── getopt_long.c
│   │   │   ├── getsubopt.c
│   │   │   ├── initgroups.c
│   │   │   ├── issetugid.c
│   │   │   ├── lockf.c
│   │   │   ├── login_tty.c
│   │   │   ├── mntent.c
│   │   │   ├── nftw.c
│   │   │   ├── openpty.c
│   │   │   ├── ptsname.c
│   │   │   ├── realpath.c
│   │   │   ├── syscall.c
│   │   │   ├── syslog.c
│   │   │   └── wordexp.c
│   │   ├── mman/
│   │   │   ├── madvise.c
│   │   │   ├── mmap.c
│   │   │   ├── mprotect.c
│   │   │   ├── munmap.c
│   │   │   └── posix_madvise.c
│   │   ├── multibyte/
│   │   │   ├── btowc.c
│   │   │   ├── c16rtomb.c
│   │   │   ├── c32rtomb.c
│   │   │   ├── internal.c
│   │   │   ├── internal.h
│   │   │   ├── mblen.c
│   │   │   ├── mbrlen.c
│   │   │   ├── mbrtoc16.c
│   │   │   ├── mbrtoc32.c
│   │   │   ├── mbrtowc.c
│   │   │   ├── mbsinit.c
│   │   │   ├── mbsnrtowcs.c
│   │   │   ├── mbsrtowcs.c
│   │   │   ├── mbstowcs.c
│   │   │   ├── mbtowc.c
│   │   │   ├── wcrtomb.c
│   │   │   ├── wcsnrtombs.c
│   │   │   ├── wcsrtombs.c
│   │   │   ├── wcstombs.c
│   │   │   ├── wctob.c
│   │   │   └── wctomb.c
│   │   ├── passwd/
│   │   │   ├── fgetgrent.c
│   │   │   ├── fgetpwent.c
│   │   │   ├── fgetspent.c
│   │   │   ├── getgr_a.c
│   │   │   ├── getgr_r.c
│   │   │   ├── getgrent.c
│   │   │   ├── getgrent_a.c
│   │   │   ├── getgrouplist.c
│   │   │   ├── getpw_a.c
│   │   │   ├── getpw_r.c
│   │   │   ├── getpwent.c
│   │   │   ├── getpwent_a.c
│   │   │   ├── getspent.c
│   │   │   ├── getspnam.c
│   │   │   ├── getspnam_r.c
│   │   │   ├── lckpwdf.c
│   │   │   ├── nscd.h
│   │   │   ├── nscd_query.c
│   │   │   ├── putgrent.c
│   │   │   ├── putpwent.c
│   │   │   ├── putspent.c
│   │   │   └── pwf.h
│   │   ├── prng/
│   │   │   ├── __rand48_step.c
│   │   │   ├── __seed48.c
│   │   │   ├── drand48.c
│   │   │   ├── lcong48.c
│   │   │   ├── lrand48.c
│   │   │   ├── mrand48.c
│   │   │   ├── rand.c
│   │   │   ├── rand48.h
│   │   │   ├── rand_r.c
│   │   │   ├── random.c
│   │   │   ├── seed48.c
│   │   │   └── srand48.c
│   │   ├── process/
│   │   │   ├── execv.c
│   │   │   ├── wait.c
│   │   │   ├── waitid.c
│   │   │   └── waitpid.c
│   │   ├── regex/
│   │   │   ├── fnmatch.c
│   │   │   ├── glob.c
│   │   │   ├── regcomp.c
│   │   │   ├── regerror.c
│   │   │   ├── regexec.c
│   │   │   ├── tre-mem.c
│   │   │   └── tre.h
│   │   ├── search/
│   │   │   ├── hsearch.c
│   │   │   ├── insque.c
│   │   │   ├── lsearch.c
│   │   │   ├── tdelete.c
│   │   │   ├── tdestroy.c
│   │   │   ├── tfind.c
│   │   │   ├── tsearch.c
│   │   │   ├── tsearch.h
│   │   │   └── twalk.c
│   │   ├── setjmp/
│   │   │   ├── longjmp.c
│   │   │   └── setjmp.c
│   │   ├── stdio/
│   │   │   ├── __fclose_ca.c
│   │   │   ├── __fdopen.c
│   │   │   ├── __fmodeflags.c
│   │   │   ├── __fopen_rb_ca.c
│   │   │   ├── __lockfile.c
│   │   │   ├── __overflow.c
│   │   │   ├── __stdio_close.c
│   │   │   ├── __stdio_exit.c
│   │   │   ├── __stdio_read.c
│   │   │   ├── __stdio_seek.c
│   │   │   ├── __stdio_write.c
│   │   │   ├── __stdout_write.c
│   │   │   ├── __toread.c
│   │   │   ├── __towrite.c
│   │   │   ├── __uflow.c
│   │   │   ├── asprintf.c
│   │   │   ├── clearerr.c
│   │   │   ├── dprintf.c
│   │   │   ├── ext.c
│   │   │   ├── ext2.c
│   │   │   ├── fclose.c
│   │   │   ├── feof.c
│   │   │   ├── ferror.c
│   │   │   ├── fflush.c
│   │   │   ├── fgetc.c
│   │   │   ├── fgetln.c
│   │   │   ├── fgetpos.c
│   │   │   ├── fgets.c
│   │   │   ├── fgetwc.c
│   │   │   ├── fgetws.c
│   │   │   ├── fileno.c
│   │   │   ├── flockfile.c
│   │   │   ├── fmemopen.c
│   │   │   ├── fopen.c
│   │   │   ├── fopencookie.c
│   │   │   ├── fprintf.c
│   │   │   ├── fputc.c
│   │   │   ├── fputs.c
│   │   │   ├── fputwc.c
│   │   │   ├── fputws.c
│   │   │   ├── fread.c
│   │   │   ├── freopen.c
│   │   │   ├── fscanf.c
│   │   │   ├── fseek.c
│   │   │   ├── fsetpos.c
│   │   │   ├── ftell.c
│   │   │   ├── ftrylockfile.c
│   │   │   ├── funlockfile.c
│   │   │   ├── fwide.c
│   │   │   ├── fwprintf.c
│   │   │   ├── fwrite.c
│   │   │   ├── fwscanf.c
│   │   │   ├── getc.c
│   │   │   ├── getc.h
│   │   │   ├── getc_unlocked.c
│   │   │   ├── getchar.c
│   │   │   ├── getchar_unlocked.c
│   │   │   ├── getdelim.c
│   │   │   ├── getline.c
│   │   │   ├── gets.c
│   │   │   ├── getw.c
│   │   │   ├── getwc.c
│   │   │   ├── getwchar.c
│   │   │   ├── ofl.c
│   │   │   ├── ofl_add.c
│   │   │   ├── open_memstream.c
│   │   │   ├── open_wmemstream.c
│   │   │   ├── perror.c
│   │   │   ├── popen.c
│   │   │   ├── printf.c
│   │   │   ├── putc.c
│   │   │   ├── putc.h
│   │   │   ├── putc_unlocked.c
│   │   │   ├── putchar.c
│   │   │   ├── putchar_unlocked.c
│   │   │   ├── puts.c
│   │   │   ├── putw.c
│   │   │   ├── putwc.c
│   │   │   ├── putwchar.c
│   │   │   ├── rewind.c
│   │   │   ├── scanf.c
│   │   │   ├── setbuf.c
│   │   │   ├── setbuffer.c
│   │   │   ├── setlinebuf.c
│   │   │   ├── setvbuf.c
│   │   │   ├── snprintf.c
│   │   │   ├── sprintf.c
│   │   │   ├── sscanf.c
│   │   │   ├── stderr.c
│   │   │   ├── stdin.c
│   │   │   ├── stdout.c
│   │   │   ├── swprintf.c
│   │   │   ├── swscanf.c
│   │   │   ├── ungetc.c
│   │   │   ├── ungetwc.c
│   │   │   ├── vasprintf.c
│   │   │   ├── vdprintf.c
│   │   │   ├── vfprintf.c
│   │   │   ├── vfscanf.c
│   │   │   ├── vfwprintf.c
│   │   │   ├── vfwscanf.c
│   │   │   ├── vprintf.c
│   │   │   ├── vscanf.c
│   │   │   ├── vsnprintf.c
│   │   │   ├── vsprintf.c
│   │   │   ├── vsscanf.c
│   │   │   ├── vswprintf.c
│   │   │   ├── vswscanf.c
│   │   │   ├── vwprintf.c
│   │   │   ├── vwscanf.c
│   │   │   ├── wprintf.c
│   │   │   └── wscanf.c
│   │   ├── stdlib/
│   │   │   ├── abs.c
│   │   │   ├── atof.c
│   │   │   ├── atoi.c
│   │   │   ├── atol.c
│   │   │   ├── atoll.c
│   │   │   ├── bsearch.c
│   │   │   ├── div.c
│   │   │   ├── ecvt.c
│   │   │   ├── fcvt.c
│   │   │   ├── gcvt.c
│   │   │   ├── imaxabs.c
│   │   │   ├── imaxdiv.c
│   │   │   ├── labs.c
│   │   │   ├── ldiv.c
│   │   │   ├── llabs.c
│   │   │   ├── lldiv.c
│   │   │   ├── qsort.c
│   │   │   ├── strtod.c
│   │   │   ├── strtol.c
│   │   │   ├── wcstod.c
│   │   │   └── wcstol.c
│   │   ├── string/
│   │   │   ├── bcmp.c
│   │   │   ├── bcopy.c
│   │   │   ├── bzero.c
│   │   │   ├── explicit_bzero.c
│   │   │   ├── index.c
│   │   │   ├── memccpy.c
│   │   │   ├── memchr.c
│   │   │   ├── memcmp.c
│   │   │   ├── memcpy.c
│   │   │   ├── memmem.c
│   │   │   ├── memmove.c
│   │   │   ├── mempcpy.c
│   │   │   ├── memrchr.c
│   │   │   ├── memset.c
│   │   │   ├── rindex.c
│   │   │   ├── stpcpy.c
│   │   │   ├── stpncpy.c
│   │   │   ├── strcasecmp.c
│   │   │   ├── strcasestr.c
│   │   │   ├── strcat.c
│   │   │   ├── strchr.c
│   │   │   ├── strchrnul.c
│   │   │   ├── strcmp.c
│   │   │   ├── strcpy.c
│   │   │   ├── strcspn.c
│   │   │   ├── strdup.c
│   │   │   ├── strerror_r.c
│   │   │   ├── strlcat.c
│   │   │   ├── strlcpy.c
│   │   │   ├── strlen.c
│   │   │   ├── strncasecmp.c
│   │   │   ├── strncat.c
│   │   │   ├── strncmp.c
│   │   │   ├── strncpy.c
│   │   │   ├── strndup.c
│   │   │   ├── strnlen.c
│   │   │   ├── strpbrk.c
│   │   │   ├── strrchr.c
│   │   │   ├── strsep.c
│   │   │   ├── strsignal.c
│   │   │   ├── strspn.c
│   │   │   ├── strstr.c
│   │   │   ├── strtok.c
│   │   │   ├── strtok_r.c
│   │   │   ├── strverscmp.c
│   │   │   ├── swab.c
│   │   │   ├── wcpcpy.c
│   │   │   ├── wcpncpy.c
│   │   │   ├── wcscasecmp.c
│   │   │   ├── wcscasecmp_l.c
│   │   │   ├── wcscat.c
│   │   │   ├── wcschr.c
│   │   │   ├── wcscmp.c
│   │   │   ├── wcscpy.c
│   │   │   ├── wcscspn.c
│   │   │   ├── wcsdup.c
│   │   │   ├── wcslen.c
│   │   │   ├── wcsncasecmp.c
│   │   │   ├── wcsncasecmp_l.c
│   │   │   ├── wcsncat.c
│   │   │   ├── wcsncmp.c
│   │   │   ├── wcsncpy.c
│   │   │   ├── wcsnlen.c
│   │   │   ├── wcspbrk.c
│   │   │   ├── wcsrchr.c
│   │   │   ├── wcsspn.c
│   │   │   ├── wcsstr.c
│   │   │   ├── wcstok.c
│   │   │   ├── wcswcs.c
│   │   │   ├── wmemchr.c
│   │   │   ├── wmemcmp.c
│   │   │   ├── wmemcpy.c
│   │   │   ├── wmemmove.c
│   │   │   └── wmemset.c
│   │   ├── temp/
│   │   │   ├── __randname.c
│   │   │   ├── mkdtemp.c
│   │   │   ├── mkostemp.c
│   │   │   ├── mkostemps.c
│   │   │   ├── mkstemp.c
│   │   │   ├── mkstemps.c
│   │   │   └── mktemp.c
│   │   ├── termios/
│   │   │   ├── cfgetospeed.c
│   │   │   ├── cfmakeraw.c
│   │   │   ├── cfsetospeed.c
│   │   │   ├── tcdrain.c
│   │   │   ├── tcflow.c
│   │   │   ├── tcflush.c
│   │   │   ├── tcgetattr.c
│   │   │   ├── tcgetsid.c
│   │   │   ├── tcgetwinsize.c
│   │   │   ├── tcsendbreak.c
│   │   │   ├── tcsetattr.c
│   │   │   └── tcsetwinsize.c
│   │   ├── thread/
│   │   │   ├── __lock.c
│   │   │   ├── __set_thread_area.c
│   │   │   ├── __syscall_cp.c
│   │   │   ├── __timedwait.c
│   │   │   ├── __tls_get_addr.c
│   │   │   ├── __unmapself.c
│   │   │   ├── __wait.c
│   │   │   ├── aarch64/
│   │   │   │   ├── __set_thread_area.S
│   │   │   │   ├── __unmapself.S
│   │   │   │   ├── clone.S
│   │   │   │   └── syscall_cp.S
│   │   │   ├── arm/
│   │   │   │   └── __set_thread_area.c
│   │   │   ├── call_once.c
│   │   │   ├── clone.c
│   │   │   ├── cnd_broadcast.c
│   │   │   ├── cnd_destroy.c
│   │   │   ├── cnd_init.c
│   │   │   ├── cnd_signal.c
│   │   │   ├── cnd_timedwait.c
│   │   │   ├── cnd_wait.c
│   │   │   ├── default_attr.c
│   │   │   ├── lock_ptc.c
│   │   │   ├── mtx_destroy.c
│   │   │   ├── mtx_init.c
│   │   │   ├── mtx_lock.c
│   │   │   ├── mtx_timedlock.c
│   │   │   ├── mtx_trylock.c
│   │   │   ├── mtx_unlock.c
│   │   │   ├── pthread_atfork.c
│   │   │   ├── pthread_attr_destroy.c
│   │   │   ├── pthread_attr_get.c
│   │   │   ├── pthread_attr_init.c
│   │   │   ├── pthread_attr_setdetachstate.c
│   │   │   ├── pthread_attr_setguardsize.c
│   │   │   ├── pthread_attr_setinheritsched.c
│   │   │   ├── pthread_attr_setschedparam.c
│   │   │   ├── pthread_attr_setschedpolicy.c
│   │   │   ├── pthread_attr_setscope.c
│   │   │   ├── pthread_attr_setstack.c
│   │   │   ├── pthread_attr_setstacksize.c
│   │   │   ├── pthread_barrier_destroy.c
│   │   │   ├── pthread_barrier_init.c
│   │   │   ├── pthread_barrier_wait.c
│   │   │   ├── pthread_barrierattr_destroy.c
│   │   │   ├── pthread_barrierattr_init.c
│   │   │   ├── pthread_barrierattr_setpshared.c
│   │   │   ├── pthread_cancel.c
│   │   │   ├── pthread_cleanup_push.c
│   │   │   ├── pthread_cond_broadcast.c
│   │   │   ├── pthread_cond_destroy.c
│   │   │   ├── pthread_cond_init.c
│   │   │   ├── pthread_cond_signal.c
│   │   │   ├── pthread_cond_timedwait.c
│   │   │   ├── pthread_cond_wait.c
│   │   │   ├── pthread_condattr_destroy.c
│   │   │   ├── pthread_condattr_init.c
│   │   │   ├── pthread_condattr_setclock.c
│   │   │   ├── pthread_condattr_setpshared.c
│   │   │   ├── pthread_create.c
│   │   │   ├── pthread_detach.c
│   │   │   ├── pthread_equal.c
│   │   │   ├── pthread_getattr_np.c
│   │   │   ├── pthread_getconcurrency.c
│   │   │   ├── pthread_getcpuclockid.c
│   │   │   ├── pthread_getschedparam.c
│   │   │   ├── pthread_getspecific.c
│   │   │   ├── pthread_join.c
│   │   │   ├── pthread_key_create.c
│   │   │   ├── pthread_kill.c
│   │   │   ├── pthread_mutex_consistent.c
│   │   │   ├── pthread_mutex_destroy.c
│   │   │   ├── pthread_mutex_getprioceiling.c
│   │   │   ├── pthread_mutex_init.c
│   │   │   ├── pthread_mutex_lock.c
│   │   │   ├── pthread_mutex_setprioceiling.c
│   │   │   ├── pthread_mutex_timedlock.c
│   │   │   ├── pthread_mutex_trylock.c
│   │   │   ├── pthread_mutex_unlock.c
│   │   │   ├── pthread_mutexattr_destroy.c
│   │   │   ├── pthread_mutexattr_init.c
│   │   │   ├── pthread_mutexattr_setprotocol.c
│   │   │   ├── pthread_mutexattr_setpshared.c
│   │   │   ├── pthread_mutexattr_setrobust.c
│   │   │   ├── pthread_mutexattr_settype.c
│   │   │   ├── pthread_once.c
│   │   │   ├── pthread_rwlock_destroy.c
│   │   │   ├── pthread_rwlock_init.c
│   │   │   ├── pthread_rwlock_rdlock.c
│   │   │   ├── pthread_rwlock_timedrdlock.c
│   │   │   ├── pthread_rwlock_timedwrlock.c
│   │   │   ├── pthread_rwlock_tryrdlock.c
│   │   │   ├── pthread_rwlock_trywrlock.c
│   │   │   ├── pthread_rwlock_unlock.c
│   │   │   ├── pthread_rwlock_wrlock.c
│   │   │   ├── pthread_rwlockattr_destroy.c
│   │   │   ├── pthread_rwlockattr_init.c
│   │   │   ├── pthread_rwlockattr_setpshared.c
│   │   │   ├── pthread_self.c
│   │   │   ├── pthread_setattr_default_np.c
│   │   │   ├── pthread_setcancelstate.c
│   │   │   ├── pthread_setcanceltype.c
│   │   │   ├── pthread_setconcurrency.c
│   │   │   ├── pthread_setname_np.c
│   │   │   ├── pthread_setschedparam.c
│   │   │   ├── pthread_setschedprio.c
│   │   │   ├── pthread_setspecific.c
│   │   │   ├── pthread_sigmask.c
│   │   │   ├── pthread_spin_destroy.c
│   │   │   ├── pthread_spin_init.c
│   │   │   ├── pthread_spin_lock.c
│   │   │   ├── pthread_spin_trylock.c
│   │   │   ├── pthread_spin_unlock.c
│   │   │   ├── pthread_testcancel.c
│   │   │   ├── sem_destroy.c
│   │   │   ├── sem_getvalue.c
│   │   │   ├── sem_init.c
│   │   │   ├── sem_open.c
│   │   │   ├── sem_post.c
│   │   │   ├── sem_timedwait.c
│   │   │   ├── sem_trywait.c
│   │   │   ├── sem_unlink.c
│   │   │   ├── sem_wait.c
│   │   │   ├── sh/
│   │   │   │   ├── __set_thread_area.c
│   │   │   │   └── __unmapself.c
│   │   │   ├── synccall.c
│   │   │   ├── syscall_cp.c
│   │   │   ├── thrd_create.c
│   │   │   ├── thrd_exit.c
│   │   │   ├── thrd_join.c
│   │   │   ├── thrd_sleep.c
│   │   │   ├── thrd_yield.c
│   │   │   ├── tls.c
│   │   │   ├── tss_create.c
│   │   │   ├── tss_delete.c
│   │   │   ├── tss_set.c
│   │   │   └── vmlock.c
│   │   ├── time/
│   │   │   ├── __month_to_secs.c
│   │   │   ├── __secs_to_tm.c
│   │   │   ├── __tm_to_secs.c
│   │   │   ├── __year_to_secs.c
│   │   │   ├── asctime.c
│   │   │   ├── asctime_r.c
│   │   │   ├── clock.c
│   │   │   ├── clock_getres.c
│   │   │   ├── clock_gettime.c
│   │   │   ├── clock_nanosleep.c
│   │   │   ├── clock_settime.c
│   │   │   ├── ctime.c
│   │   │   ├── ctime_r.c
│   │   │   ├── difftime.c
│   │   │   ├── ftime.c
│   │   │   ├── getdate.c
│   │   │   ├── gettimeofday.c
│   │   │   ├── gmtime.c
│   │   │   ├── gmtime_r.c
│   │   │   ├── localtime.c
│   │   │   ├── localtime_r.c
│   │   │   ├── mktime.c
│   │   │   ├── nanosleep.c
│   │   │   ├── strptime.c
│   │   │   ├── time.c
│   │   │   ├── time_impl.h
│   │   │   ├── timegm.c
│   │   │   ├── times.c
│   │   │   ├── timespec_get.c
│   │   │   ├── utime.c
│   │   │   └── wcsftime.c
│   │   └── unistd/
│   │       ├── aarch64/
│   │       │   └── __unistd.c
│   │       ├── access.c
│   │       ├── chdir.c
│   │       ├── close.c
│   │       ├── getpid.c
│   │       ├── gettid.c
│   │       ├── read.c
│   │       └── write.c
│   ├── stat/
│   │   └── stat.c
│   └── tools/
│       ├── add-cfi.common.awk
│       ├── add-cfi.i386.awk
│       ├── add-cfi.x86_64.awk
│       ├── install.sh
│       ├── ld.musl-clang.in
│       ├── mkalltypes.sed
│       ├── musl-clang.in
│       ├── musl-gcc.specs.sh
│       └── version.sh
├── user.libs/
│   ├── libfdt/
│   │   ├── Makefile
│   │   ├── include/
│   │   │   └── libfdt/
│   │   │       ├── fdt.h
│   │   │       ├── libfdt.h
│   │   │       └── libfdt_env.h
│   │   └── src/
│   │       ├── fdt.c
│   │       ├── fdt_addresses.c
│   │       ├── fdt_empty_tree.c
│   │       ├── fdt_overlay.c
│   │       ├── fdt_ro.c
│   │       ├── fdt_rw.c
│   │       ├── fdt_strerror.c
│   │       ├── fdt_sw.c
│   │       ├── fdt_wip.c
│   │       └── libfdt_internal.h
│   ├── liblwext4/
│   │   ├── Makefile
│   │   ├── ext4_mem.c
│   │   ├── ext4_server.c
│   │   ├── include/
│   │   │   └── lwext4/
│   │   │       ├── ext4.h
│   │   │       ├── ext4_balloc.h
│   │   │       ├── ext4_bcache.h
│   │   │       ├── ext4_bitmap.h
│   │   │       ├── ext4_blkdev.h
│   │   │       ├── ext4_block_group.h
│   │   │       ├── ext4_blockdev.h
│   │   │       ├── ext4_config.h
│   │   │       ├── ext4_crc32.h
│   │   │       ├── ext4_debug.h
│   │   │       ├── ext4_dir.h
│   │   │       ├── ext4_dir_idx.h
│   │   │       ├── ext4_errno.h
│   │   │       ├── ext4_extent.h
│   │   │       ├── ext4_fs.h
│   │   │       ├── ext4_hash.h
│   │   │       ├── ext4_ialloc.h
│   │   │       ├── ext4_inode.h
│   │   │       ├── ext4_journal.h
│   │   │       ├── ext4_mbr.h
│   │   │       ├── ext4_misc.h
│   │   │       ├── ext4_mkfs.h
│   │   │       ├── ext4_oflags.h
│   │   │       ├── ext4_super.h
│   │   │       ├── ext4_trans.h
│   │   │       ├── ext4_types.h
│   │   │       ├── ext4_xattr.h
│   │   │       └── misc/
│   │   │           ├── queue.h
│   │   │           └── tree.h
│   │   └── src/
│   │       ├── ext4.c
│   │       ├── ext4_balloc.c
│   │       ├── ext4_bcache.c
│   │       ├── ext4_bitmap.c
│   │       ├── ext4_block_group.c
│   │       ├── ext4_blockdev.c
│   │       ├── ext4_crc32.c
│   │       ├── ext4_debug.c
│   │       ├── ext4_dir.c
│   │       ├── ext4_dir_idx.c
│   │       ├── ext4_extent.c
│   │       ├── ext4_fs.c
│   │       ├── ext4_hash.c
│   │       ├── ext4_ialloc.c
│   │       ├── ext4_inode.c
│   │       ├── ext4_journal.c
│   │       ├── ext4_mbr.c
│   │       ├── ext4_mkfs.c
│   │       ├── ext4_super.c
│   │       ├── ext4_trans.c
│   │       └── ext4_xattr.c
│   └── libmisc/
│       ├── Makefile
│       ├── include/
│       │   └── misc.h
│       └── misc.c
└── user.sbin/
    ├── chiyou/
    │   ├── Makefile
    │   ├── chiyou.c
    │   ├── of.c
    │   └── of.h
    ├── fuxi/
    │   ├── Makefile
    │   └── fuxi.c
    ├── nvwa/
    │   ├── Makefile
    │   ├── elf.h
    │   ├── elf_std.c
    │   └── nvwa.c
    └── pangu/
        ├── .gitignore
        ├── Makefile
        ├── include/
        │   └── pangu/
        │       ├── bootarg.h
        │       ├── elf.h
        │       ├── kmalloc.h
        │       ├── mm.h
        │       ├── proc.h
        │       └── ramdisk.h
        └── src/
            ├── bootarg.c
            ├── elf_ramdisk.c
            ├── kmalloc.c
            ├── mm.c
            ├── of.c
            ├── pangu.c
            ├── process.c
            ├── procinfo.c
            └── ramdisk.c

================================================
FILE CONTENTS
================================================

================================================
FILE: .gitignore
================================================
out/
tags
cscope.in.out
cscope.out
cscope.po.out
linkmap.txt
include/config/config.h
ramdisk.sh
ramdisk2.sh
fat32.sh
*.srv
*.drv
*.app
.*
*.o
*.o.*
*.a
*.s
*.ko
*.so
*.so.dbg
*.mod.c
*.i
*.lst
*.symtypes
*.order
*.elf
*.bin
!user.bin/
*.tar
*.gz
*.bz2
*.lzma
*.xz
*.d
*.lz4
*.lzo
*.patch
*.gcno
modules.builtin
Module.symvers
*.dwo
*.su

#
# Top-level generic files
#
/tags
/TAGS
/linux
/vmlinux
/vmlinux.32
/vmlinux-gdb.py
/vmlinuz
/System.map
/Module.markers

#
# Debian directory (make deb-pkg)
#
/debian/

#
# tar directory (make tar*-pkg)
#
/tar-install/

#
# git files that we don't want to ignore even if they are dot-files
#
!.gitignore
!.mailmap

#
# Generated include files
#
include/config/
include/generated
arch/*/include/generated

# stgit generated dirs
patches-*

# quilt's files
patches
series

# cscope files
cscope.*
ncscope.*

# gnu global files
GPATH
GRTAGS
GSYMS
GTAGS

# id-utils files
ID

*.orig
*~
\#*#

#
# Leavings from module signing
#
extra_certificates
signing_key.pem
signing_key.priv
signing_key.x509
x509.genkey

# Kconfig presets
all.config

# Kdevelop4
*.kdev4
*.lds
allsymbols.S
tmp.minos.symbols
*.dtb
*.py[co]
tools/Kconfiglib/build/
*.egg-info/
tools/Kconfiglib/dist/
tools/fdt_parse/parse_dtb
asm-offset.h


================================================
FILE: Makefile
================================================
PHONY := _all
_all:

ifeq ($(DEBUG),1)
  BUILD_DEBUG = 1
else
  BUILD_DEBUG = 0
endif

ifeq ($(VERBOSE),1)
  Q =
else
  Q = @
endif

projtree := $(shell pwd)
srctree  := .
src	 := $(srctree)

VPATH	:= $(srctree)

export BUILD_DEBUG VERBOSE srctree projtree

ARCH		?= aarch64
CROSS_COMPILE	?= aarch64-linux-gnu-
PLATFORM	?= fvp

TARGET_ARCH            	= $(ARCH)
TARGET_CROSS_COMPILE   	= $(CROSS_COMPILE)
TARGET_PLATFORM 	= $(PLATFORM)

export TARGET_ARCH TARGET_CROSS_COMPILE TARGET_PLATFORM

# Make variables (CC, etc...)
TARGET_AS	= $(TARGET_CROSS_COMPILE)as
TARGET_LD	= $(TARGET_CROSS_COMPILE)ld
TARGET_CC	= $(TARGET_CROSS_COMPILE)gcc
TARGET_APP_CC	= $(projtree)/out/bin/musl-gcc
TARGET_CPP	= $(TARGET_CC) -E
TARGET_AR	= $(TARGET_CROSS_COMPILE)ar
TARGET_NM	= $(TARGET_CROSS_COMPILE)nm
TARGET_STRIP	= $(TARGET_CROSS_COMPILE)strip
TARGET_OBJCOPY	= $(TARGET_CROSS_COMPILE)objcopy
TARGET_OBJDUMP	= $(TARGET_CROSS_COMPILE)objdump
TARGET_INSTALL = $(projtree)/tools/install.sh

TARGET_INCLUDE_DIR = $(projtree)/out/include
TARGET_LIBS_DIR = $(projtree)/out/lib
TARGET_OUT_DIR = $(projtree)/out
UAPI_INCLUDE_DIR = $(projtree)/generic/include/

HOST_LEX	= flex
HOST_YACC	= bison
HOST_AWK	= awk
HOST_PERL	= perl
HOST_PYTHON	= python
HOST_PYTHON2	= python2
HOST_PYTHON3	= python3
HOST_CHECK	= sparse
HOST_CC		= gcc
HOST_AS		= as
HOST_LD		= ld
HOST_CC		= gcc
HOST_CPP	= gcc -E
HOST_AR		= ar
HOST_NM		= nm
HOST_STRIP	= strip
HOST_OBJCOPY	= objcopy
HOST_OBJDUMP	= objdump

MAKE		= make
MFLAGS		:= --no-print-directory

export TARGET_AS TARGET_LD TARGET_CC TARGET_APP_CC TARGET_CPP TARGET_AR TARGET_NM TARGET_STRIP TARGET_OBJCOPY TARGET_OBJDUMP MAKE TARGET_INCLUDE_DIR TARGET_LIBS_DIR TARGET_INSTALL TARGET_OUT_DIR UAPI_INCLUDE_DIR
export HOST_LEX HOST_YACC HOST_AWK HOST_PERL HOST_PYTHON HOST_PYTHON2 HOST_PYTHON3 HOST_CHECK HOST_CC HOST_AS HOST_LD HOST_CC HOST_APP_CC HOST_CPP HOST_AR HOST_NM HOST_STRIP HOST_OBJCOPY HOST_OBJDUMP

LIB_DIRS := user.libs
APP_DIRS := user.sbin user.bin user.driver

# get all the libs folder under LIB_DIRS
LIB_SUB_DIRS = $(foreach dir, $(LIB_DIRS), $(shell find $(dir) -maxdepth 1 -type d))
LIB_TARGETS = $(filter-out $(LIB_DIRS),$(LIB_SUB_DIRS))

# get the all application folders under APP_DIRS
APP_SUB_DIRS = $(foreach dir, $(APP_DIRS), $(shell find $(dir) -maxdepth 1 -type d))
APP_TARGETS = $(filter-out $(APP_DIRS),$(APP_SUB_DIRS))

PHONY += all
_all: all

PHONY += libc libs apps kernel

all: apps kernel

libc libs apps kernel: objdirs

apps: libs
	$(Q) set -e;					\
	for i in $(APP_TARGETS); do 			\
		if [ -f $$i/Makefile ]; then		\
			echo "\n\033[32m ---> Compiling App $$i ... \033[0m \n";	\
			$(MAKE) $(MFLAGS) -C $$i ;		\
			$(MAKE) $(MFLAGS) -C $$i install;	\
		fi					\
	done

libs: libc
	$(Q) set -e;					\
	for i in $(LIB_TARGETS); do 			\
		if [ -f $$i/Makefile ]; then		\
			echo "\n\033[32m ---> Compiling Lib $$i ... \033[0m \n";	\
			$(MAKE) $(MFLAGS) -C $$i ;		\
			$(MAKE) $(MFLAGS) -C $$i install;	\
		fi					\
	done

libc:
	$(Q) echo "\n\033[32m---> Build LIBC ... \033[0m \n"
	$(Q) $(MAKE) $(MFLAGS) -C user.libc -j 16
	$(Q) $(MAKE) $(MFLAGS) -C user.libc install

kernel:
	$(Q) echo "\n\033[32m ---> Build Kernel ... \033[0m \n"
	$(Q) $(MAKE) $(MFLAGS) -C kernel
	$(Q) $(MAKE) $(MFLAGS) -C kernel dtbs
	$(Q) $(MAKE) $(MFLAGS) -C kernel install

clean-kernel:
	$(Q) echo "\n\033[32m ---> Clean Kernel ... \033[0m \n"
	$(Q) $(MAKE) $(MFLAGS) -C kernel clean

objdirs:
	$(Q) mkdir -p $(srctree)/out
	$(Q) mkdir -p $(srctree)/out/include
	$(Q) mkdir -p $(srctree)/out/lib
	$(Q) mkdir -p $(srctree)/out/ramdisk
	$(Q) mkdir -p $(srctree)/out/rootfs/bin
	$(Q) mkdir -p $(srctree)/out/rootfs/sbin
	$(Q) mkdir -p $(srctree)/out/rootfs/driver
	$(Q) mkdir -p $(srctree)/out/rootfs/etc

PHONY += images ramdisk rootfs prepare clean clean-libs clean-apps

clean-libs:
	$(Q)set -e;					\
	for i in $(LIB_TARGETS); do 			\
		if [ -f $$i/Makefile ]; then		\
			echo "\033[32m Clean $$i \033[0m";		\
			$(MAKE) $(MFLAGS) -C $$i clean;	\
		fi					\
	done

clean-apps:
	$(Q)set -e;					\
	for i in $(APP_TARGETS); do 			\
		if [ -f $$i/Makefile ]; then		\
			echo "\033[32m Clean $$i \033[0m";		\
			$(MAKE) $(MFLAGS) -C $$i clean;	\
		fi					\
	done

clean: clean-libs clean-apps
	$(Q) echo "\033[32m Clean libc \033[0m"
	$(Q) $(MAKE) $(MFLAGS) -C user.libc clean
	$(Q) echo "\033[32m Clean kernel \033[0m"
	$(Q) $(MAKE) $(MFLAGS) -C kernel clean
	$(Q) rm -rf out
	$(Q) echo "\033[32m Clean done ... \033[0m"

images: ramdisk rootfs kernel

ramdisk: apps kernel
	$(Q) echo "\n\033[32m ---> Packing Ramdisk image ... \033[0m \n"
	$(Q) mkrmd -d out/ramdisk.bin out/ramdisk

rootfs: apps
	$(Q) echo "\n\033[32m ---> Packing Rootfs image ... \033[0m \n"
	$(Q) mkdir -p /tmp/minos-mnt
	$(Q) dd if=/dev/zero of=/tmp/rootfs.img bs=1M count=64
	$(Q) mkfs.vfat -n "ROOTFS" -F 32 /tmp/rootfs.img
	$(Q) sudo mount /tmp/rootfs.img /tmp/minos-mnt
	$(Q) sudo cp -r out/rootfs/* /tmp/minos-mnt
	$(Q) sudo umount /tmp/minos-mnt
	$(Q) cp -f /tmp/rootfs.img out/rootfs.img
	$(Q) rm -rf /tmp/rootfs.img /tmp/minos-mnt

prepare: objdirs
	$(Q) cd user.libc; ./build.sh $(TARGET_OUT_DIR) $(TARGET_ARCH) $(TARGET_CROSS_COMPILE)
	$(Q) cd kernel; make $(TARGET_PLATFORM)_defconfig
	cp -f kernel/include/uapi/* user.libc/include/minos/

bin/% sbin/% driver/% libs/%:
	$(Q)set -e;					\
	if [ -f user.$@/Makefile ]; then		\
		$(MAKE) $(MFLAGS) -C user.$@;		\
		$(MAKE) $(MFLAGS) -C user.$@ install;	\
	else						\
		echo "Target user.$@ not found";	\
	fi

.PHONY: $(PHONY)


================================================
FILE: README.md
================================================
# Minos2

**Minos2 is a micro-kernel OS.**

- [x] Multi-process
- [x] SMP
- [x] Multi-thread
- [x] Virtual memory management
- [x] Libc (based on musl-libc)
- [x] IPC
- [x] VFS
- [x] Ext4 (based on lwext4)
- [x] Virtio-blk driver
- [x] Qemu
- [x] ARM FVP
- [ ] Virtualization

## Build Minos2

Below command tested on Ubuntu-18.04.

1. Create a working directory

   ```bash
   # mkdir ~/minos2-workspace
   # cd ~/minos2-workspace
   ```

2. Install AARCH64 GCC cross compilation tool (Other GCC version is also work fine)

   ```bash
   # wget https://releases.linaro.org/components/toolchain/binaries/7.2-2017.11/aarch64-linux-gnu/gcc-linaro-7.2.1-2017.11-x86_64_aarch64-linux-gnu.tar.xz
   # tar xjf gcc-linaro-7.2.1-2017.11-x86_64_aarch64-linux-gnu.tar.xz
   # sudo mv gcc-linaro-7.2.1-2017.11-x86_64_aarch64-linux-gnu /opt
   # echo "export PATH=/opt/gcc-linaro-7.2.1-2017.11-x86_64_aarch64-linux-gnu/bin:$PATH" >> ~/.bashrc
   # source ~/.bashrc
   ```

3. Install device-tree tool

   ```bash
   # sudo apt-get install device-tree-compiler
   ```

4. Download minos2 source code

   ```bash
   # git clone https://github.com/minosproject/minos2.git
   ```

5. Compile minos2

   ```bash
   # make PLATFORM=xxx prepare   	(platform can be fvp or qemu_arm64)
   # make ramdisk					(build kernel, libc, system service, application, ramdisk in out/ directory)
   ```

## Download Virtio-blk image

Minos2 support Qemu and FVP now, and both use virtio-blk disk with Ext4 filesystem as rootfs, this image can be create by qemu-img tool. If you do not want to create it by self, you can download the example one here.

```
virtio-sd.img 链接: https://pan.baidu.com/s/1hMaQT20s7n8HNEZ-BqG7XQ 提取码: 9wyh 
```

## Run Minos2 on Qemu

1. Install qemu-system-aarch64

   ```bash
   # apt install qemu-system-arm
   ```

2. Download and compile u-boot

   ```
   # git clone https://github.com/u-boot/u-boot.git
   ```

   Before compile the U-boot, please apply below patch to support boot minos2.

   ```c
   diff --git a/common/image-fdt.c b/common/image-fdt.c
   index eb552ca207..987817546d 100644
   --- a/common/image-fdt.c
   +++ b/common/image-fdt.c
   @@ -175,6 +175,8 @@ int boot_relocate_fdt(struct lmb *lmb, char **of_flat_tree, ulong *of_size)
           if (fdt_high) {
                   void *desired_addr = (void *)simple_strtoul(fdt_high, NULL, 16);
    
   +               desired_addr = (void *)-1;
   +
                   if (((ulong) desired_addr) == ~0UL) {
                           /* All ones means use fdt in place */
                           of_start = fdt_blob;
   
   ```

   Build u-boot

   ```bash
   # make qemu_arm64_defconfig
   # make -j16 CROSS_COMPILE=aarch64-linux-gnu-
   ```

3. Build Minos

   ```bash
   # make PLATFORM=qemu_arm64 prepare
   # make ramdisk
   ```

4. Copy files to the virtio image (use the image which from the pan.baidu.com as an example)

   Mount the virtio image, please refer to https://unix.stackexchange.com/questions/82314/how-to-find-the-type-of-an-img-file-and-mount-it. There are two partitions in the virtio-sd.img, one is fat16 and other is ext4, please put below file in fat16 partitions.

   ```
   out/kernel.bin out/ramdisk.bin out/qemu-arm64.dtb
   ```

   and put below file in ext4 partiotion

   ```
   # mkdir bin  (create a directory named bin first)
   # cp out/rootfs/bin/ps.app out/rootfs/bin/shell.app to $(virtio_ext_partition)/bin
   ```

5. Run minos2 on Qemu

   ```bash
   # qemu-system-aarch64 -nographic -bios u-boot.bin qemu-system-aarch64 -nographic -bios u-boot.bin -cpu cortex-a53 -machine type=virt -smp 4 -m 2G -machine virtualization=true -drive if=none,file=sd.img,format=raw,id=hd0 -device virtio-blk-device,drive=hd0 -device virtio-net-device,netdev=net0 -netdev user,id=net0,hostfwd=tcp:127.0.0.1:5555-:22
       
   After qemu boot, use below command to boot minos2
   
   # fatload virtio 0:1 0x40000000 kernel.bin;fatload virtio 0:1 0x44000000 ramdisk.bin;fatload virtio 0:1 0x43e00000 qemu-arm64.dtb;booti 0x40000000 - 0x43e00000
   ```

Below is the boot log for Qemu

```
minle@minle-Z840:~/work/github/u-boot$ qemu-system-aarch64 -nographic -machine virt -bios u-boot.bin -cpu cortex-a57 -smp 4 -m 2G  -drive if=none,file=/home/minle/work/minos-next/fvp_debug/sd.img,format=raw,id=hd0 \
-device virtio-blk-device,drive=hd0


U-Boot 2019.07-rc4-00358-g1f83431f00-dirty (Dec 24 2021 - 15:20:30 +0800)

DRAM:  2 GiB
(virtio_mmio@a003e00): device (2) vendor (554d4551) version (1)
Flash: 128 MiB
*** Warning - bad CRC, using default environment

In:    pl011@9000000
Out:   pl011@9000000
Err:   pl011@9000000
Net:   No ethernet found.
Hit any key to stop autoboot:  0 
=> fatload virtio 0:1 0x40000000 kernel.bin;fatload virtio 0:1 0x44000000 ramdisk.bin;fatload virtio 0:1 0x43e00000 qemu-arm64.dtb;booti 0x40000000 - 0x43e00000
257656 bytes read in 4 ms (61.4 MiB/s)
695304 bytes read in 1 ms (663.1 MiB/s)
4143 bytes read in 1 ms (4 MiB/s)
## Flattened Device Tree blob at 43e00000
   Booting using the fdt blob at 0x43e00000
   Using Device Tree in place at 0000000043e00000, end 0000000043e0402e

Starting kernel ...

[       0.000000@00 000] NIC Starting Minos AARCH64
[       0.000000@00 000] NIC DTB address [0x43e00000]
[       0.000000@00 000] NIC Minos v0.3.3 unstable
[       0.000000@00 000] NIC memory node address_cells:2 size_cells:2
[       0.000000@00 000] NIC DTB - 0x43e00000 ---> 0x2000
[       0.000000@00 000] NIC MEM: 0x0000000044000000 ---> 0x00000000c0000000 [0x000000007c000000] Normal
[       0.000000@00 000] NIC MEM: 0x0000000040000000 ---> 0x0000000043c00000 [0x0000000003c00000] Kernel
[       0.000000@00 000] NIC MEM: 0x0000000043e02000 ---> 0x0000000044000000 [0x00000000001fe000] Kernel
[       0.000000@00 000] NIC MEM: 0x0000000043e00000 ---> 0x0000000043e02000 [0x0000000000002000] DTB
[       0.000000@00 000] NIC MEM: 0x0000000043c00000 ---> 0x0000000043e00000 [0x0000000000200000] RamDisk
[       0.000000@00 000] NIC kmem [0xffffff804004d000 0xffffff8043c00000]
[       0.000000@00 000] NIC kmem [0xffffff8043e02000 0xffffff8044000000]
[       0.000000@00 000] NIC umem [0x44000000 0xc0000000]
[       0.000000@00 000] NIC slab memory allocator init ...
[       0.000000@00 000] NIC bootargs: bootwait=3 tty=vm0 rootfs=virtio-blk.drv
[       0.000000@00 000] NIC platform : linux,qemu-arm64
[       0.000000@00 000] NIC current EL is 1
[       0.000000@00 000] NIC *** gicv2 init ***
[       0.000000@00 000] NIC gicv2 information: gic_dist_addr=0000000008000000 size=0x10000 gic_cpu_addr=0000000008010000 size=0x10000 gic_hyp_addr=0000000000000000 size=0x0 gic_vcpu_addr=0000000000000000 size=0x0
[       0.000000@00 000] NIC GICv2: 288 lines, 4 cpus (IID 0).
[       0.000000@00 000] WRN not support unmask irq_percpu
[       0.000000@00 000] WRN not support unmask irq_percpu
[       0.000000@00 000] WRN not support unmask irq_percpu
[       0.000000@00 000] WRN not support unmask irq_percpu
[       0.000000@00 000] NIC Register kobject type [5] name [endpoint]
[       0.000000@00 000] NIC Register kobject type [1] name [process]
[       0.000000@00 000] NIC Register kobject type [4] name [pma]
[       0.000000@00 000] NIC Register kobject type [2] name [thread]
[       0.000000@00 000] NIC Register kobject type [9] name [irq]
[       0.000000@00 000] NIC Register kobject type [12] name [poll_hub]
[       0.000000@00 000] NIC Register kobject type [3] name [notify]
[       0.000000@00 000] NIC Register kobject type [13] name [port]
[       0.000000@00 000] NIC    sec_phy_timer  : 29
[       0.000000@00 000] NIC nonsec_phy_timer  : 30
[       0.000000@00 000] NIC       virt_timer  : 27
[       0.000000@00 000] NIC hypervisor_timer  : 26
[      16.687407@00 000] NIC get timer clock freq from reg 62500
[       0.000000@00 000] NIC boot ticks is :0x3e2a8f97
[       0.004660@00 X95] NIC waiting 2 seconds for cpu-1 up
[       0.006231@00 X95] NIC waiting 2 seconds for cpu-2 up
[       0.005760@01 000] NIC cpu-1 is up
[       0.006962@02 000] NIC cpu-2 is up
[       0.007815@00 X95] NIC waiting 2 seconds for cpu-3 up
[       0.008542@03 000] NIC cpu-3 is up
[       0.010513@02 000] NIC current EL is 1
[       0.010518@01 000] NIC current EL is 1
[       0.010652@03 000] NIC current EL is 1
[       0.012897@00 X95] NIC Root service load successfully prepare to run...


PanGu service start...

pangu: dtb     [0x4043e00000 0x4043e02000]
pangu: ramdisk [0x4043c00000 0x4043e00000]
pangu: vmap    [0x1040000000 0x3fc0000000]
pangu: heap    [0x1000000000 0x1010000000]
pangu: sys max proc 4096
pangu: uproc_info 5
pangu: ktask_stat 6
pangu: bootargs: bootwait=3 tty=vm0 rootfs=virtio-blk.drv
pangu: handle send to fuxi.srv [handle@4]
pangu: Start fuxi.srv and waitting ...


FuXi service start...

fuxi: fuxi handle 4
pangu: Get response from fuxi.srv service 4132
fuxi: waitting request
pangu: handle send to nvwa.srv [handle@4]
pangu: Start nvwa.srv and waitting ...


NvWa service start...

pangu: Get response from nvwa.srv service 4132
nvwa: nvwa waitting elf load request
pangu: handle send to chiyou.srv [handle@4,5]
pangu: only support map anon mapping for process
virtio-blk: virtio-dev: legacy mode
virtio-blk: virtio supports unsupported option VIRTIO_BLK_F_SEG_MAX (Maximum number of segments in a request is in seg_max.)
virtio-blk: virtio supports unsupported option VIRTIO_BLK_F_GEOMETRY (Disk-style geometry specified in geometry.)
virtio-blk: virtio supports unsupported option VIRTIO_BLK_F_BLK_SIZE (Block size of disk is in blk_size.)
virtio-blk: virtio supports unsupported option VIRTIO_BLK_F_FLUSH (Cache flush command support.)
virtio-blk: virtio supports unsupported option VIRTIO_BLK_F_TOPOLOGY (Device exports information on optimal I/O alignment.)
virtio-blk: virtio supports unsupported option VIRTIO_BLK_F_CONFIG_WCE (Device can toggle its cache between writeback and writethrough modes.)
virtio-blk: virtio supports unsupported option VIRTIO_F_RING_INDIRECT_DESC (Negotiating this feature indicates that the driver can use descriptors with the VIRTQ_DESC_F_INDIRECT flag set, as described in 2.4.5.3 Indirect Descriptors.)
virtio-blk: virtio supports unsupported option VIRTIO_F_RING_EVENT_IDX (This feature enables the used_event and the avail_event fields as described in 2.4.7 and 2.4.8.)
virtio-blk: virtio-blk: device supports unknown bits 0x1000080 in bank 0
pangu: only support map anon mapping for process
virtio-blk: virtio-blk virtq size 8192
virtio-blk: vd0 capacity : 512MB
ext4_mbr: l: 75   [info]  ext4_mbr_scan
ext4_mbr: l: 96   mbr_part: bootstrap:
00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 
00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 
00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 
00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 
00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 
00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 
00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 
00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 
00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 
00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 
00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 
00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 
00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 
00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 
00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 
00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 
00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 
00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 
00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 
00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 
00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 
00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 
00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 
00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 
00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 
00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 
00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 
00, 00, 00, 00, 00, 00, 00, 00, 9f, 27, 

ext4_mbr: l: 106   mbr_part: 0
ext4_mbr: l: 107   	status: 0x80
ext4_mbr: l: 108   	type 0xe:
ext4_mbr: l: 109   	first_lba: 0x3f
ext4_mbr: l: 110   	sectors: 0x25fc0
ext4_mbr: l: 106   mbr_part: 1
ext4_mbr: l: 107   	status: 0x0
ext4_mbr: l: 108   	type 0x83:
ext4_mbr: l: 109   	first_lba: 0x26000
ext4_mbr: l: 110   	sectors: 0xda000
ext4_mbr: l: 106   mbr_part: 2
ext4_mbr: l: 107   	status: 0x0
ext4_mbr: l: 108   	type 0x0:
ext4_mbr: l: 109   	first_lba: 0x0
ext4_mbr: l: 110   	sectors: 0x0
ext4_mbr: l: 106   mbr_part: 3
ext4_mbr: l: 107   	status: 0x0
ext4_mbr: l: 108   	type 0x0:
ext4_mbr: l: 109   	first_lba: 0x0
ext4_mbr: l: 110   	sectors: 0x0
liblwext4: ext4_mbr_scan:
liblwext4: mbr_entry 0:
liblwext4: 	empty/unknown
liblwext4: mbr_entry 1:
liblwext4: 	offeset: 0x4c00000, 76MB
liblwext4: 	size:    0x1b400000, 436MB
liblwext4: mbr_entry 2:
liblwext4: 	empty/unknown
liblwext4: mbr_entry 3:
liblwext4: 	empty/unknown
ext4_fs: l: 219   [info]  sblock features_incompatible:
ext4_fs: l: 144   filetype
ext4_fs: l: 152   extents
ext4_fs: l: 154   64bit
ext4_fs: l: 158   flex_bg
ext4_fs: l: 222   [info]  sblock features_compatible:
ext4_fs: l: 177   has_journal
ext4_fs: l: 179   ext_attr
ext4_fs: l: 181   resize_inode
ext4_fs: l: 183   dir_index
ext4_fs: l: 225   [info]  sblock features_read_only:
ext4_fs: l: 189   sparse_super
ext4_fs: l: 191   large_file
ext4_fs: l: 195   huge_file
ext4_fs: l: 199   dir_nlink
ext4_fs: l: 201   extra_isize
ext4_fs: l: 207   metadata_csum
liblwext4: ext4 server epfd:10 root_fd:9
pangu: loading init shell.app ...
liblwext4: ext4 server start, waitting for request...
chiyou: rootfs is ready, exit chiyou event loop
pangu: only support map anon mapping for process

 _   _   _   _   _   _
/ \ / \ / \ / \ / \ / \
(M | i | n | o | s | 2 )
\_/ \_/ \_/ \_/ \_/ \_/

  Welcome to Minos2 


minos # help
cd : "change directory"
pwd : "current directory"
clear : "clear the screen"
ls : "list directory"
help : "get help"
exec : "run a application on the filesystem"
exit : "exit the shell"
minos # ls
pangu: only support map anon mapping for process
drw-    c/
total   1
minos # cd c
minos # ls
drw-    ./
drw-    ../
-rw-    kernel.bin 
drw-    bin/
drw-    etc/
drw-    home/
-rw-    ramdisk.bin 
-rw-    qemu-arm64.dtb 
total   8
minos # cd bin
minos # ls
drw-    ./
drw-    ../
-rw-    ps.app 
-rw-    shell.app 
total   4
minos # ps
 PID CMD 
   0 pangu.srv
   1 fuxi.srv
   2 nvwa.srv
   3 chiyou.srv
   4 virtio-blk.drv
   5 /c/bin/shell.app
   6 /c/bin/ps.app
minos # 
```

## Video tutorial

**TBD**


================================================
FILE: generic/include/uapi/bootdata.h
================================================
#ifndef __LIBMINOS_BOOTDATA_H__
#define __LIBMINOS_BOOTDATA_H__

#ifdef __KERNEL__
#include <minos/types.h>
#define ROOTSRV_USTACK_PAGES 4
#else
#include <inttypes.h>
#endif

#define CMDLINE_SIZE	512

#define BOOTDATA_MAGIC  0xe4b990e6958f

struct bootdata {
	uint64_t magic;
	uint64_t dtb_start;
	uint64_t dtb_end;
	uint64_t ramdisk_start;
	uint64_t ramdisk_end;
	uint64_t heap_start;
	uint64_t heap_end;
	uint64_t vmap_start;
	uint64_t vmap_end;
	int max_proc;
	int task_stat_handle;
};

#endif


================================================
FILE: generic/include/uapi/gvm.h
================================================
#ifndef __LIBMINOS_GVM_H__
#define __LIBMINOS_GVM_H__


/*
 * each guest vm may have at least 64 spi irqs,
 * the 32 - 63 virqs is for host vdevs and the
 * 64 - 95 virqs is for guest vms. also the hypervisor
 * provide auto allocation API to allocate virqs.
 * the only case to use the allocate API is to allocate
 * the vmcs irq after all the virtual devices has been
 * created
 *
 * the memory map for a guest vm showed as below:
 * 0x00000000 -> 0x1fffffff [IOMEM for device]
 *    0x00000000 -> 0x0fffffff [Map to directly io device passthough]
 *    0x10000000 -> 0x1fffffff [virtual device]
 * 0x20000000 -> 0xffffffff [Normal memory]
 */

#define GVM_VIRT_TIMER_INT		27

#define GIC_IRQ				9

#define GICV2_GICD_IOMEM_BASE		0x10000000
#define GICV2_GICD_IOMEM_SIZE		0x10000
#define GICV2_GICC_IOMEM_BASE		0x10010000
#define GICV2_GICC_IOMEM_SIZE		0x2000
#define GICV2_GICH_IOMEM_BASE		0x10012000
#define GICV2_GICH_IOMEM_SIZE		0x2000
#define GICV2_GICV_IOMEM_BASE		0x10014000
#define GICV2_GICV_IOMEM_SIZE		0x2000

#define GICV3_GICD_IOMEM_BASE		0x10000000
#define GICV3_GICD_IOMEM_SIZE		0x10000
#define GICV3_GICR_IOMEM_BASE		0x10200000
#define GICV3_GICR_IOMEM_SIZE		0x200000
#define GICV3_GICC_IOMEM_BASE		0x10400000
#define GICV3_GICC_IOMEM_SIZE		0x2000
#define GICV3_GICH_IOMEM_BASE		0x10410000
#define GICV3_GICH_IOMEM_SIZE		0x2000
#define GICV3_GICV_IOMEM_BASE		0x10420000
#define GICV3_GICV_IOMEM_SIZE		0x2000
#define GICV3_ITS_IOMEM_BASE		0x10430000
#define GICV3_ITS_IOMEM_SIZE		0x2000

#define SP805_IRQ			32
#define SP805_CLK_RATE			100000
#define SP805_IOMEM_BASE		0x10440000
#define SP805_IOMEM_SIZE		0x1000

#define PL031_IRQ			33
#define PL031_IOMEM_BASE		0x10441000
#define PL031_IOMEM_SIZE		0x1000

#define GVM_IRQ_BASE			64
#define GVM_IRQ_COUNT			32
#define GVM_IRQ_END			(GVM_IRQ_BASE + GVM_IRQ_COUNT)

#define VM_MAX_VIRTIO_DEVICES		32
#define VM_VIRTIO_IOMEM_BASE		0x1fe00000
#define VM_VIRTIO_IOMEM_SIZE		(0x1000 * VM_MAX_VIRTIO_DEVICES)

#endif


================================================
FILE: generic/include/uapi/hypervisor.h
================================================
#ifndef __LIBMINOS_HYPERVISOR_H__
#define __LIBMINOS_HYPERVISOR_H__

#ifdef __KERNEL__
#include <minos/types.h>
#else
#include <inttypes.h>
#include <sys/types.h>
#endif

#include <common/ramdisk.h>

#define VM_NAME_SIZE	32
#define VM_TYPE_SIZE	16

#define VM_FLAGS_64BIT			(1 << 0)
#define VM_FLAGS_NATIVE			(1 << 1)
#define VM_FLAGS_DYNAMIC_AFF		(1 << 2)
#define VM_FLAGS_NO_RAMDISK		(1 << 3)
#define VM_FLAGS_NO_BOOTIMAGE		(1 << 4)
#define VM_FLAGS_HAS_EARLYPRINTK	(1 << 5)
#define VM_FLAGS_NATIVE_WFI		(1 << 6)
#define VM_FLAGS_NO_OF_RESOURCE		(1 << 7)

#define VM_FLAGS_SETUP_OF		(1 << 8)
#define VM_FLAGS_SETUP_ACPI		(1 << 9)
#define VM_FLAGS_SETUP_ATAG		(1 << 10)
#define VM_FLAGS_SETUP_OTHER		(1 << 11)
#define VM_FLAGS_SETUP_MASK		(0xf00)

#define VM_FLAGS_XNU_APPLE		(1 << 12)

struct vmtag {
	uint32_t vmid;
	char name[VM_NAME_SIZE];
	char os_type[VM_TYPE_SIZE];
	int32_t nr_vcpu;
	uint64_t mem_base;
	uint64_t mem_size;
	uint64_t entry;
	uint64_t setup_data;
	uint64_t flags;
	uint32_t vcpu_affinity[8];
	uint64_t load_address;
	char image_file[RAMDISK_FNAME_SIZE];
	char dtb_file[RAMDISK_FNAME_SIZE];
};

#define IOCTL_CREATE_VM			0xf000
#define IOCTL_DESTROY_VM		0xf001
#define IOCTL_RESTART_VM		0xf002
#define IOCTL_POWER_DOWN_VM		0xf003
#define IOCTL_POWER_UP_VM		0xf004
#define IOCTL_VM_MMAP			0xf005
#define IOCTL_VM_UNMAP			0xf006
#define IOCTL_REGISTER_VCPU		0xf007
#define IOCTL_SEND_VIRQ			0xf008
#define IOCTL_CREATE_VMCS		0xf00a
#define IOCTL_CREATE_VMCS_IRQ		0xf00b
#define IOCTL_UNREGISTER_VCPU		0xf00c
#define IOCTL_VIRTIO_MMIO_INIT		0xf00d
#define IOCTL_VIRTIO_MMIO_DEINIT	0xf00e
#define IOCTL_REQUEST_VIRQ		0xf00f
#define IOCTL_CREATE_VM_RESOURCE	0xf010

struct vm_ring {
	volatile uint32_t ridx;
	volatile uint32_t widx;
	uint32_t size;
	char buf[0];
};

#define VM_RING_IDX(idx, size)		(idx & (size - 1))

#endif


================================================
FILE: generic/include/uapi/ramdisk.h
================================================
#ifndef __LIBMINOS_RAMDISK_H__
#define __LIBMINOS_RAMDISK_H__

#ifdef __KERNEL__
#include <minos/types.h>
#else
#include <inttypes.h>
#include <sys/types.h>
#endif

#define RAMDISK_MAGIC "MINOSRAMDISK...."
#define RAMDISK_MAGIC_SIZE 16

#define RAMDISK_FNAME_SIZE 32

struct ramdisk_inode {
	char f_name[RAMDISK_FNAME_SIZE];
	uint64_t f_offset;	// data offset from ramdisk_start.
	uint64_t f_size;	// data size of this file
} __attribute__((__packed__));

struct ramdisk_sb {
	uint32_t file_cnt;
	uint32_t block_size;	// always 4096
	uint64_t inode_offset;	// inode offset
	uint64_t data_offset;	// file data offset.
	uint64_t ramdisk_size;	// total size of the ramdisk.
};

struct ramdisk_file {
	struct ramdisk_inode *inode;
	unsigned long pos;	// reserved
};

#endif


================================================
FILE: generic/include/uapi/time.h
================================================
#ifndef __LIBMINOS_TIME_H__
#define __LIBMINOS_TIME_H__

struct timespec {
	long ts_sec;
	long ts_nsec;
};

#endif


================================================
FILE: generic/include/uapi/virtio_mmio.h
================================================
#ifndef __LIBMINOS_VIRTIO_MMIO_H__
#define __LIBMIONS_VIRTIO_MMIO_H__

/*
 * for detail of the below mmio register, refer
 * to the Documents/virtio-v1.0.pdf
 */
#define VIRTIO_MMIO_MAGIC_VALUE		0x000
#define VIRTIO_MMIO_VERSION		0x004
#define VIRTIO_MMIO_DEVICE_ID		0x008
#define VIRTIO_MMIO_VENDOR_ID		0x00c
#define VIRTIO_MMIO_HOST_FEATURES	0x010
#define VIRTIO_MMIO_HOST_FEATURES_SEL	0x014
#define VIRTIO_MMIO_GUEST_FEATURES	0x020
#define VIRTIO_MMIO_GUEST_FEATURES_SEL	0x024
#define VIRTIO_MMIO_GUEST_PAGE_SIZE	0x028
#define VIRTIO_MMIO_QUEUE_SEL		0x030
#define VIRTIO_MMIO_QUEUE_NUM_MAX	0x034
#define VIRTIO_MMIO_QUEUE_NUM		0x038
#define VIRTIO_MMIO_QUEUE_ALIGN		0x03c
#define VIRTIO_MMIO_QUEUE_READY		0x044
#define VIRTIO_MMIO_QUEUE_PFN		0x040
#define VIRTIO_MMIO_QUEUE_NOTIFY	0x050
#define VIRTIO_MMIO_INTERRUPT_STATUS	0x060
#define VIRTIO_MMIO_INTERRUPT_ACK	0x064
#define VIRTIO_MMIO_STATUS		0x070
#define VIRTIO_MMIO_QUEUE_DESC_LOW	0x080
#define VIRTIO_MMIO_QUEUE_DESC_HIGH	0x084
#define VIRTIO_MMIO_QUEUE_AVAIL_LOW	0x090
#define VIRTIO_MMIO_QUEUE_AVAIL_HIGH	0x094
#define VIRTIO_MMIO_QUEUE_USED_LOW	0x0a0
#define VIRTIO_MMIO_QUEUE_USED_HIGH	0x0a4
#define VIRTIO_MMIO_CONFIG_GENERATION	0x0fc
#define VIRTIO_MMIO_CONFIG		0x100

/* below register from 0x300 is used for hypervisor */
#define VIRTIO_MMIO_GVM_ADDR		0x300
#define VIRTIO_MMIO_DEV_FLAGS		0x304
#define VIRTIO_MMIO_HOST_FEATURE0	0x308
#define VIRTIO_MMIO_HOST_FEATURE1	0x30c
#define VIRTIO_MMIO_HOST_FEATURE2	0x310
#define VIRTIO_MMIO_HOST_FEATURE3	0x314
#define VIRTIO_MMIO_DRIVER_FEATURE0	0x318
#define VIRTIO_MMIO_DRIVER_FEATURE1	0x31c
#define VIRTIO_MMIO_DRIVER_FEATURE2	0x320
#define VIRTIO_MMIO_DRIVER_FEATURE3	0x324

#define VIRTIO_DEVICE_IOMEM_SIZE	0x1000

#define VIRTIO_MMIO_INT_VRING		(1 << 0)
#define VIRTIO_MMIO_INT_CONFIG		(1 << 1)

#define VIRTIO_EVENT_BUFFER_READY	(1 << 0)
#define VIRTIO_EVENT_QUEUE_READY	(1 << 1)
#define VIRTIO_EVENT_STATUS_CHANGE	(1 << 2)
#define VIRTIO_EVENT_MMIO		(1 << 3)

#define VIRTIO_FEATURE_OFFSET(index) \
	(VIRTIO_MMIO_HOST_FEATURE0 + index * 4)

#endif


================================================
FILE: kernel/.gitignore
================================================
os/out/
tools/mvm/mvm
tags
cscope.in.out
cscope.out
cscope.po.out
linkmap.txt
include/config/config.h
.*
*.o
*.o.*
*.a
*.s
*.ko
*.so
*.so.dbg
*.mod.c
*.i
*.lst
*.symtypes
*.order
*.elf
*.bin
*.tar
*.gz
*.bz2
*.lzma
*.xz
*.lz4
*.lzo
*.patch
*.gcno
modules.builtin
Module.symvers
*.dwo
*.su

#
# Top-level generic files
#
/tags
/TAGS
/linux
/vmlinux
/vmlinux.32
/vmlinux-gdb.py
/vmlinuz
/System.map
/Module.markers

#
# Debian directory (make deb-pkg)
#
/debian/

#
# tar directory (make tar*-pkg)
#
/tar-install/

#
# git files that we don't want to ignore even if they are dot-files
#
!.gitignore
!.mailmap

#
# Generated include files
#
include/config/
include/generated
arch/*/include/generated

# stgit generated dirs
patches-*

# quilt's files
patches
series

# cscope files
cscope.*
ncscope.*

# gnu global files
GPATH
GRTAGS
GSYMS
GTAGS

# id-utils files
ID

*.orig
*~
\#*#

#
# Leavings from module signing
#
extra_certificates
signing_key.pem
signing_key.priv
signing_key.x509
x509.genkey

# Kconfig presets
all.config

# Kdevelop4
*.kdev4
*.lds
allsymbols.S
tmp.minos.symbols
*.dtb
*.py[co]
tools/Kconfiglib/build/
*.egg-info/
tools/Kconfiglib/dist/
tools/fdt_parse/parse_dtb
asm-offset.h


================================================
FILE: kernel/Kconfig
================================================
# Kconfig - main configuration options for Minos
#
# Copyright (c) 2019 Min Le <lemin9538@gmail.com>
#
#
mainmenu "Minos $ARCH Configuration"

config SRCARCH
	string
	option env="SRCARCH"

source "arch/$(SRCARCH)/Kconfig"


================================================
FILE: kernel/LICENSE
================================================
		    GNU GENERAL PUBLIC LICENSE
                       Version 2, June 1991

 Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
 Everyone is permitted to copy and distribute verbatim copies
 of this license document, but changing it is not allowed.

                            Preamble

  The licenses for most software are designed to take away your
freedom to share and change it.  By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users.  This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it.  (Some other Free Software Foundation software is covered by
the GNU Lesser General Public License instead.)  You can apply it to
your programs, too.

  When we speak of free software, we are referring to freedom, not
price.  Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.

  To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.

  For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have.  You must make sure that they, too, receive or can get the
source code.  And you must show them these terms so they know their
rights.

  We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.

  Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software.  If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.

  Finally, any free program is threatened constantly by software
patents.  We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary.  To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.

  The precise terms and conditions for copying, distribution and
modification follow.

                    GNU GENERAL PUBLIC LICENSE
   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION

  0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License.  The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language.  (Hereinafter, translation is included without limitation in
the term "modification".)  Each licensee is addressed as "you".

Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope.  The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.

  1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.

You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.

  2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:

    a) You must cause the modified files to carry prominent notices
    stating that you changed the files and the date of any change.

    b) You must cause any work that you distribute or publish, that in
    whole or in part contains or is derived from the Program or any
    part thereof, to be licensed as a whole at no charge to all third
    parties under the terms of this License.

    c) If the modified program normally reads commands interactively
    when run, you must cause it, when started running for such
    interactive use in the most ordinary way, to print or display an
    announcement including an appropriate copyright notice and a
    notice that there is no warranty (or else, saying that you provide
    a warranty) and that users may redistribute the program under
    these conditions, and telling the user how to view a copy of this
    License.  (Exception: if the Program itself is interactive but
    does not normally print such an announcement, your work based on
    the Program is not required to print an announcement.)

These requirements apply to the modified work as a whole.  If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works.  But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.

Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.

In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.

  3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:

    a) Accompany it with the complete corresponding machine-readable
    source code, which must be distributed under the terms of Sections
    1 and 2 above on a medium customarily used for software interchange; or,

    b) Accompany it with a written offer, valid for at least three
    years, to give any third party, for a charge no more than your
    cost of physically performing source distribution, a complete
    machine-readable copy of the corresponding source code, to be
    distributed under the terms of Sections 1 and 2 above on a medium
    customarily used for software interchange; or,

    c) Accompany it with the information you received as to the offer
    to distribute corresponding source code.  (This alternative is
    allowed only for noncommercial distribution and only if you
    received the program in object code or executable form with such
    an offer, in accord with Subsection b above.)

The source code for a work means the preferred form of the work for
making modifications to it.  For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable.  However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.

If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.

  4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License.  Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.

  5. You are not required to accept this License, since you have not
signed it.  However, nothing else grants you permission to modify or
distribute the Program or its derivative works.  These actions are
prohibited by law if you do not accept this License.  Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.

  6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions.  You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.

  7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License.  If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all.  For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.

If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.

It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices.  Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.

This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.

  8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded.  In such case, this License incorporates
the limitation as if written in the body of this License.

  9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time.  Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.

Each version is given a distinguishing version number.  If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation.  If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.

  10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission.  For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this.  Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.

                            NO WARRANTY

  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.

  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.

                     END OF TERMS AND CONDITIONS

            How to Apply These Terms to Your New Programs

  If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.

  To do so, attach the following notices to the program.  It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.

    <one line to give the program's name and a brief idea of what it does.>
    Copyright (C) <year>  <name of author>

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License along
    with this program; if not, write to the Free Software Foundation, Inc.,
    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

Also add information on how to contact you by electronic and paper mail.

If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:

    Gnomovision version 69, Copyright (C) year name of author
    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
    This is free software, and you are welcome to redistribute it
    under certain conditions; type `show c' for details.

The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License.  Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.

You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary.  Here is a sample; alter the names:

  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
  `Gnomovision' (which makes passes at compilers) written by James Hacker.

  <signature of Ty Coon>, 1 April 1989
  Ty Coon, President of Vice

This General Public License does not permit incorporating your program into
proprietary programs.  If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library.  If this is what you want to do, use the GNU Lesser General
Public License instead of this License.


================================================
FILE: kernel/Makefile
================================================
# SPDX-License-Identifier: GPL-2.0
VERSION = 0
PATCHLEVEL = 0
SUBLEVEL = 1
EXTRAVERSION =
NAME = unstable

PHONY := _all
_all:

MAKEFLAGS += -rR --no-print-directory

ifeq ("$(origin V)", "command line")
  MBUILD_VERBOSE = $(V)
endif
ifndef MBUILD_VERBOSE
  MBUILD_VERBOSE = 0
endif

ifeq ($(VERBOSE),1)
 MBUILD_VERBOSE = 1
endif

ifeq ($(MBUILD_VERBOSE),1)
  quiet =
  Q =
else
  quiet=quiet_
  Q = @
endif

ifeq ("$(origin O)", "command line")
	O_LEVEL = $(O)
endif
ifndef O_LEVEL
	O_LEVEL = 2
endif

ifeq ($(BUILD_DEBUG),1)
  O_LEVEL = 0
endif

export quiet Q MBUILD_VERBOSE

srctree 	:= .
objtree		:= .
src		:= $(srctree)
obj		:= $(objtree)

VPATH		:= $(srctree)

export srctree objtree VPATH

version_h := include/config/version.h

clean-targets := %clean
no-dot-config-targets := $(clean-targets) cscope gtags TAGS tags help% $(version_h)
no-sync-config-targets := $(no-dot-config-targets)

config-targets  := 0
mixed-targets   := 0
dot-config      := 1
may-sync-config := 1

ifneq ($(filter $(no-dot-config-targets), $(MAKECMDGOALS)),)
	ifeq ($(filter-out $(no-dot-config-targets), $(MAKECMDGOALS)),)
		dot-config := 0
	endif
endif

ifneq ($(filter $(no-sync-config-targets), $(MAKECMDGOALS)),)
	ifeq ($(filter-out $(no-sync-config-targets), $(MAKECMDGOALS)),)
		may-sync-config := 0
	endif
endif

# For "make -j clean all", "make -j mrproper defconfig all", etc.
ifneq ($(filter $(clean-targets),$(MAKECMDGOALS)),)
        ifneq ($(filter-out $(clean-targets),$(MAKECMDGOALS)),)
                mixed-targets := 1
        endif
endif

ifeq ($(mixed-targets),1)
# ===========================================================================
# We're called with mixed targets (*config and build targets).
# Handle them one by one.

PHONY += $(MAKECMDGOALS) __build_one_by_one

$(filter-out __build_one_by_one, $(MAKECMDGOALS)): __build_one_by_one
	@:

__build_one_by_one:
	$(Q)set -e; \
	for i in $(MAKECMDGOALS); do \
		$(MAKE) -f $(srctree)/Makefile $$i; \
	done

else

include scripts/Minos.config.mk

# Read KERNELRELEASE from include/config/kernel.release (if it exists)
KERNELRELEASE = $(shell cat include/config/kernel.release 2> /dev/null)
KERNELVERSION = $(VERSION)$(if $(PATCHLEVEL),.$(PATCHLEVEL)$(if $(SUBLEVEL),.$(SUBLEVEL)))$(EXTRAVERSION)
export VERSION PATCHLEVEL SUBLEVEL KERNELRELEASE KERNELVERSION

ARCH		?= aarch64
CROSS_COMPILE 	?= aarch64-linux-gnu-

SRCARCH 	:= $(ARCH)

offset_h  := $(srctree)/arch/$(SRCARCH)/include/asm/asm-offset.h
offset_s  := $(srctree)/arch/$(SRCARCH)/core/asm-offset.s
offset_c  := $(srctree)/arch/$(SRCARCH)/core/asm-offset.c

MCONFIG_CONFIG	?= .config
export MCONFIG_CONFIG

# Make variables (CC, etc...)
AS		= $(CROSS_COMPILE)as
LD		= $(CROSS_COMPILE)ld
CC		= $(CROSS_COMPILE)gcc
CPP		= $(CC) -E
AR		= $(CROSS_COMPILE)ar
NM		= $(CROSS_COMPILE)nm
STRIP		= $(CROSS_COMPILE)strip
OBJCOPY		= $(CROSS_COMPILE)objcopy
OBJDUMP		= $(CROSS_COMPILE)objdump
LEX		= flex
YACC		= bison
AWK		= awk
PERL		= perl
PYTHON		= python
PYTHON2		= python2
PYTHON3		= python3
CHECK		= sparse
DTC		= dtc

CHECKFLAGS     := -D__minos__ -Dminos -D__STDC__ -Dunix -D__unix__ \
		  -Wbitwise -Wno-return-void -Wno-unknown-attribute $(CF)

# Use LINUXINCLUDE when you must reference the include/ directory.
# Needed to be compatible with the O= option
MINOSINCLUDE    := \
		-I$(srctree)/arch/$(SRCARCH)/include \
		-I$(objtree)/include \
		-I$(srctree)/../generic/include

MBUILD_AFLAGS   := -D__ASSEMBLY__
MBUILD_CFLAGS   := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
		   -fno-strict-aliasing -fno-common -fshort-wchar \
		   -Werror-implicit-function-declaration -D__KERNEL__ \
		   -Wno-format-security -O$(O_LEVEL) -DBUILD_HYPERVISOR \
		   -std=gnu89 --static -nostdlib -fno-builtin -g $(MINOSINCLUDE)
MBUILD_CPPFLAGS := -D__KERNEL__
MBUILD_LDFLAGS := --no-undefined

export ARCH SRCARCH CONFIG_SHELL HOSTCC MBUILD_HOSTCFLAGS CROSS_COMPILE AS LD CC DTC
export CPP AR NM STRIP OBJCOPY OBJDUMP MBUILD_HOSTLDFLAGS MBUILD_HOSTLDLIBS
export MAKE LEX YACC AWK GENKSYMS INSTALLKERNEL PERL PYTHON PYTHON2 PYTHON3 UTS_MACHINE

export MBUILD_CPPFLAGS NOSTDINC_FLAGS MINOSINCLUDE OBJCOPYFLAGS MBUILD_LDFLAGS
export MBUILD_CFLAGS CFLAGS_KERNEL CFLAGS_MODULE
export CFLAGS_KASAN CFLAGS_KASAN_NOSANITIZE CFLAGS_UBSAN
export MBUILD_AFLAGS AFLAGS_KERNEL AFLAGS_MODULE
export MBUILD_AFLAGS_KERNEL MBUILD_CFLAGS_KERNEL

export RCS_FIND_IGNORE := \( -name SCCS -o -name BitKeeper -o -name .svn -o    \
			  -name CVS -o -name .pc -o -name .hg -o -name .git \) \
			  -prune -o
export RCS_TAR_IGNORE := --exclude SCCS --exclude BitKeeper --exclude .svn \
			 --exclude CVS --exclude .pc --exclude .hg --exclude .git

PHONY += all
_all: all

core-y		:= core/ userspace/
drivers-y	:= drivers/ platform/
external-y	:= libs/
libs-y		:=

-include .config
drivers-$(CONFIG_VIRT) += virt/

# The arch Makefile can set ARCH_{CPP,A,C}FLAGS to override the default
# values of the respective MBUILD_* variables
ARCH_CPPFLAGS :=
ARCH_AFLAGS :=
ARCH_CFLAGS :=
-include arch/$(SRCARCH)/Makefile

MBUILD_IMAGE 	:= minos.bin
MBUILD_IMAGE_ELF := minos.elf
MBUILD_IMAGE_SYMBOLS := allsymbols.o

all: include/config/config.h $(version_h) $(offset_h) minos dtbs

minos-dirs	:= $(patsubst %/,%,$(filter %/, $(core-y) $(external-y) $(drivers-y) $(libs-y)))

minos-alldirs	:= $(sort $(minos-dirs) $(patsubst %/,%,$(filter %/, \
			$(core-) $(external-) $(drivers-) $(libs-))))

minos-clean-dirs = $(minos-dirs)
minos-cleandirs = $(minos-alldirs) dtbs/

core-y		:= $(patsubst %/, %/built-in.o, $(core-y))
external-y	:= $(patsubst %/, %/built-in.o, $(external-y))
drivers-y	:= $(patsubst %/, %/built-in.o, $(drivers-y))
libs-y1		:= $(patsubst %/, %/lib.a, $(libs-y))
libs-y2		:= $(patsubst %/, %/built-in.o, $(filter-out %.o, $(libs-y)))

# Externally visible symbols (used by link-minos.sh)
export MBUILD_MINOS_INIT := $(head-y)
export MBUILD_MINOS_MAIN := $(core-y) $(libs-y2) $(drivers-y) $(external-y)
export MBUILD_MINOS_LIBS := $(libs-y1)
export MBUILD_LDS          := $(objtree)/arch/$(SRCARCH)/lds/minos.lds
export LDFLAGS_minos
# used by scripts/package/Makefile
export MBUILD_ALLDIRS := $(sort $(filter-out arch/%,$(minos-alldirs)) arch Documentation include samples scripts tools)

minos-deps := $(MBUILD_LDS) $(MBUILD_MINOS_INIT) $(MBUILD_MINOS_MAIN) $(MBUILD_MINOS_LIBS)

CLEAN_DIRS	:=
clean: rm-dirs 	:= $(CLEAN_DIRS)
clean-dirs      := $(addprefix _clean_, . $(minos-cleandirs))

minos_LDFLAGS := $(MBUILD_LDFLAGS)
minos_LDFLAGS += -T$(MBUILD_LDS) -Map=$(srctree)/linkmap.txt

PHONY += $(clean-dirs) clean distclean
$(clean-dirs):
	$(Q) $(MAKE) $(clean)=$(patsubst _clean_%,%,$@)

minos: $(minos-deps) scripts/generate_allsymbols.py
	$(Q) echo "  LD      .tmp.minos.elf"
	$(Q) $(LD) $(minos_LDFLAGS) -o .tmp.minos.elf $(MBUILD_MINOS_INIT) $(MBUILD_MINOS_MAIN) $(MBUILD_MINOS_LIBS)
	$(Q) echo "  NM      .tmp.minos.symbols"
	$(Q) $(NM) -n .tmp.minos.elf > .tmp.minos.symbols
	$(Q) echo "  PYTHON  allsymbols.S"
	$(Q) python3 scripts/generate_allsymbols.py .tmp.minos.symbols allsymbols.S
	$(Q) echo "  CC      $(MBUILD_IMAGE_SYMBOLS)"
	$(Q) $(CC) $(CCFLAG) $(MBUILD_CFLAGS) -c allsymbols.S -o $(MBUILD_IMAGE_SYMBOLS)
	$(Q) echo "  LD      $(MBUILD_IMAGE_ELF)"
	$(Q) $(LD) $(minos_LDFLAGS) -o $(MBUILD_IMAGE_ELF) $(MBUILD_MINOS_INIT) $(MBUILD_MINOS_MAIN) $(MBUILD_MINOS_LIBS) $(MBUILD_IMAGE_SYMBOLS)
	$(Q) echo "  OBJCOPY $(MBUILD_IMAGE)"
	$(Q) $(OBJCOPY) -O binary $(MBUILD_IMAGE_ELF) $(MBUILD_IMAGE)
	$(Q) echo "  OBJDUMP minos.s"
	$(Q) $(OBJDUMP) $(MBUILD_IMAGE_ELF) -D > minos.s

# The actual objects are generated when descending,
# make sure no implicit rule kicks in
$(sort $(minos-deps)): $(minos-dirs) ;

# here goto each directory to generate built-in.o
PHONY += $(minos-dirs)
$(minos-dirs):
	$(Q)$(MAKE) $(build)=$@

define sed-y
    "/^->/{s:->#\(.*\):/* \1 */:; \
    s:^->\([^ ]*\) [\$$#]*\([^ ]*\) \(.*\):#define \1 \2 /* \3 */:; \
    s:->::; p;}"
endef

define cmd_offsets
    (set -e; \
     echo "#ifndef __ASM_OFFSETS_H__"; \
     echo "#define __ASM_OFFSETS_H__"; \
     echo "/*"; \
     echo " * DO NOT MODIFY."; \
     echo " *"; \
     echo " * This file was generated by Kbuild"; \
     echo " *"; \
     echo " */"; \
     echo ""; \
     sed -ne $(sed-y) $<; \
     echo ""; \
     echo "#endif" ) > $@
endef

define filechk_version.h
	(echo \#define MINOS_VERSION_CODE $(shell                         \
	expr $(VERSION) \* 65536 + 0$(PATCHLEVEL) \* 256 + 0$(SUBLEVEL)) > $@; \
	echo '#define MINOS_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))' >> $@; \
	echo '#define MINOS_VERSION_STR "v$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION) $(NAME)"' >> $@;)
endef

PHONY += scriptconfig iscriptconfig menuconfig guiconfig dumpvarsconfig install

ALL_DTS = $(notdir $(wildcard dtbs/*.dts))
ALL_DTB = $(ALL_DTS:%.dts=$(TARGET_OUT_DIR)/%.dtb)

$(TARGET_OUT_DIR)/kernel.bin: minos.bin
	$(Q) cp minos.bin $(TARGET_OUT_DIR)/kernel.bin

$(TARGET_OUT_DIR)/%.dtb: dtbs/%.dtb
	$(Q) cp $< $@

install: $(TARGET_OUT_DIR)/kernel.bin $(ALL_DTB)

PYTHONCMD ?= python
kpython := PYTHONPATH=$(srctree)/scripts/Kconfiglib:$$PYTHONPATH $(PYTHONCMD)
KCONFIG ?= $(srctree)/Kconfig

ifneq ($(filter scriptconfig,$(MAKECMDGOALS)),)
ifndef SCRIPT
$(error Use "make scriptconfig SCRIPT=<path to script> [SCRIPT_ARG=<argument>]")
endif
endif

$(offset_s): $(offset_c)
	$(Q) echo "  CC      $(offset_s)"
	$(Q) gcc $(MINOSINCLUDE) -S $< -o $@

$(offset_h): $(offset_s)
	$(Q) $(call cmd_offsets)

$(version_h) : Makefile
	$(Q) mkdir -p include/config
	$(Q) $(call filechk_version.h)

PHONY += include/config/config.h
include/config/config.h: .config
	$(Q) mkdir -p include/config
	$(Q) $(kpython) $(srctree)/scripts/Kconfiglib/genconfig.py --header-path=include/config/config.h

dtbs: FORCE
	$(Q) $(MAKE) $(build)=$@

clean: $(clean-dirs)
#	$(Q) echo "  CLEAN   all .o .*.d *.dtb built-in.o"
#	$(Q) echo "  CLEAN   allsymbols.o allsymbols.S linkmap.txt minos.s .tmp.minos.elf .tmp.minos.symbols minos.bin minos.elf"
	$(Q) rm -f allsymbols.o allsymbols.S linkmap.txt minos.s .tmp.minos.elf .tmp.minos.symbols minos.bin minos.elf
	$(Q) rm -rf $(offset_h)
	$(Q) rm -rf $(offset_s)
	$(Q) echo "  Clean kernel done..."

distclean: clean
	$(Q) echo "  CLEAN   .config include/config"
	$(Q) rm -rf include/config .config .config.old
	$(Q) echo "  CLEAN   tags cscope.in.out cscope.out cscope.po.out"
	$(Q) rm -f tags cscope.in.out cscope.out cscope.po.out

scriptconfig:
	$(Q)$(kpython) $(SCRIPT) $(Kconfig) $(if $(SCRIPT_ARG),"$(SCRIPT_ARG)")

iscriptconfig:
	$(Q)$(kpython) -i -c \
	  "import kconfiglib; \
	   kconf = kconfiglib.Kconfig('$(Kconfig)'); \
	   print('A Kconfig instance \'kconf\' for the architecture $(ARCH) has been created.')"

menuconfig:
	$(Q)$(kpython) $(srctree)/scripts/Kconfiglib/menuconfig.py $(Kconfig)

guiconfig:
	$(Q)$(kpython) $(srctree)/scripts/Kconfiglib/guiconfig.py $(Kconfig)

dumpvarsconfig:
	$(Q)$(kpython) $(srctree)/scripts/Kconfiglib/examples/dumpvars.py $(Kconfig)

genconfig:
	$(Q)$(kpython) $(srctree)/scripts/Kconfiglib/genconfig.py $(Kconfig)

%defconfig:
	$(Q)test -e configs/$@ || (		\
	echo >&2;			\
	echo >&2 "  ERROR: $@ doest exist.";		\
	echo >&2 ;							\
	/bin/false)
	$(Q) echo "  GEN      .config From configs/$@"
	$(Q) mkdir -p include/config
	$(Q) python $(srctree)/scripts/Kconfiglib/defconfig.py $(Kconfig) configs/$@

endif

PHONY += FORCE
FORCE:

# Declare the contents of the PHONY variable as phony.  We keep that
# information in a variable so we can use it in if_changed and friends.
.PHONY: $(PHONY)


================================================
FILE: kernel/VERSION
================================================
MAJOR_VERSION=0
MINOR_VERSION=0
EXTRA_VERSION=1

Known issue:


================================================
FILE: kernel/apps/Kconfig
================================================
menu "Application Config"

config SHELL
	bool "Shell support"
	default n
	help
	  "hell support using ESH from Chris Pavlina"

source "apps/esh/Kconfig"

endmenu


================================================
FILE: kernel/apps/Makefile
================================================
obj-$(CONFIG_SHELL)	+= esh/
obj-y			+= init.o


================================================
FILE: kernel/apps/esh/COPYING
================================================
                    GNU GENERAL PUBLIC LICENSE
                       Version 2, June 1991

 Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
 Everyone is permitted to copy and distribute verbatim copies
 of this license document, but changing it is not allowed.

                            Preamble

  The licenses for most software are designed to take away your
freedom to share and change it.  By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users.  This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it.  (Some other Free Software Foundation software is covered by
the GNU Lesser General Public License instead.)  You can apply it to
your programs, too.

  When we speak of free software, we are referring to freedom, not
price.  Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.

  To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.

  For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have.  You must make sure that they, too, receive or can get the
source code.  And you must show them these terms so they know their
rights.

  We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.

  Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software.  If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.

  Finally, any free program is threatened constantly by software
patents.  We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary.  To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.

  The precise terms and conditions for copying, distribution and
modification follow.

                    GNU GENERAL PUBLIC LICENSE
   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION

  0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License.  The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language.  (Hereinafter, translation is included without limitation in
the term "modification".)  Each licensee is addressed as "you".

Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope.  The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.

  1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.

You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.

  2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:

    a) You must cause the modified files to carry prominent notices
    stating that you changed the files and the date of any change.

    b) You must cause any work that you distribute or publish, that in
    whole or in part contains or is derived from the Program or any
    part thereof, to be licensed as a whole at no charge to all third
    parties under the terms of this License.

    c) If the modified program normally reads commands interactively
    when run, you must cause it, when started running for such
    interactive use in the most ordinary way, to print or display an
    announcement including an appropriate copyright notice and a
    notice that there is no warranty (or else, saying that you provide
    a warranty) and that users may redistribute the program under
    these conditions, and telling the user how to view a copy of this
    License.  (Exception: if the Program itself is interactive but
    does not normally print such an announcement, your work based on
    the Program is not required to print an announcement.)

These requirements apply to the modified work as a whole.  If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works.  But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.

Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.

In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.

  3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:

    a) Accompany it with the complete corresponding machine-readable
    source code, which must be distributed under the terms of Sections
    1 and 2 above on a medium customarily used for software interchange; or,

    b) Accompany it with a written offer, valid for at least three
    years, to give any third party, for a charge no more than your
    cost of physically performing source distribution, a complete
    machine-readable copy of the corresponding source code, to be
    distributed under the terms of Sections 1 and 2 above on a medium
    customarily used for software interchange; or,

    c) Accompany it with the information you received as to the offer
    to distribute corresponding source code.  (This alternative is
    allowed only for noncommercial distribution and only if you
    received the program in object code or executable form with such
    an offer, in accord with Subsection b above.)

The source code for a work means the preferred form of the work for
making modifications to it.  For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable.  However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.

If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.

  4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License.  Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.

  5. You are not required to accept this License, since you have not
signed it.  However, nothing else grants you permission to modify or
distribute the Program or its derivative works.  These actions are
prohibited by law if you do not accept this License.  Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.

  6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions.  You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.

  7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License.  If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all.  For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.

If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.

It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices.  Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.

This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.

  8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded.  In such case, this License incorporates
the limitation as if written in the body of this License.

  9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time.  Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.

Each version is given a distinguishing version number.  If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation.  If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.

  10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission.  For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this.  Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.

                            NO WARRANTY

  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.

  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.

                     END OF TERMS AND CONDITIONS

            How to Apply These Terms to Your New Programs

  If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.

  To do so, attach the following notices to the program.  It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.

    <one line to give the program's name and a brief idea of what it does.>
    Copyright (C) <year>  <name of author>

    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License along
    with this program; if not, write to the Free Software Foundation, Inc.,
    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

Also add information on how to contact you by electronic and paper mail.

If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:

    Gnomovision version 69, Copyright (C) year name of author
    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
    This is free software, and you are welcome to redistribute it
    under certain conditions; type `show c' for details.

The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License.  Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.

You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary.  Here is a sample; alter the names:

  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
  `Gnomovision' (which makes passes at compilers) written by James Hacker.

  <signature of Ty Coon>, 1 April 1989
  Ty Coon, President of Vice

This General Public License does not permit incorporating your program into
proprietary programs.  If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library.  If this is what you want to do, use the GNU Lesser General
Public License instead of this License.


================================================
FILE: kernel/apps/esh/Kconfig
================================================
if SHELL

menu "Shell config"

config SHELL_TASK_PRIO
	int "The priority of shell task"
	default 63

endmenu

endif


================================================
FILE: kernel/apps/esh/Makefile
================================================
obj-$(CONFIG_SHELL)	+= shell.o esh.o esh_hist.o esh_argparser.o


================================================
FILE: kernel/apps/esh/README.md
================================================
esh - embedded shell
====================

esh is a lightweight command shell for embedded applications in C or Rust,
small enough to be used for (and intended for) debug UART consoles on
microcontrollers.

This readme describes esh and how to try it out. If you think you'd like to
use it, see the guides in the source for informations on how to set it up and
integrate it into your project: [C header](esh.h),
[Rust library](esh_rust/src/esh/lib.rs).

Demo
====

There is a simple demo in the `demo` subdirectory, which can be compiled and
run on a unix-like system by moving into that directory and issuing the `make`
command. There are no dependencies other than libc and a compiler. Once built,
execute `./demo` and try it out!

The Rust demo is in `demo_rust`, and can be compiled and run on a unix-like
system by moving into that directory and issuing `cargo build` and `cargo run`.

Features
========

Line editing
------------

esh supports basic line editing, understanding the backspace key to delete
characters, left and right arrow to move the insertion point, and Ctrl-C
to ditch the entire line. Ctrl-left/right to move by a word is upcoming.

Argument tokenizing
-------------------

esh automatically splits a command string into arguments, and understands
bash-style quoting. The command handler callback receives a simple
argc/argv array of arguments, ready to use. Environment variables are not yet
supported, but may be in the future.

History (optional)
------------------

If compiled in, esh supports history, allowing the use of the up/down arrow keys
to browse previously entered commands and edit/re-issue them. A ring buffer is
used to store a fixed number of characters, so more commands can be remembered
if they're shorter.


================================================
FILE: kernel/apps/esh/esh.c
================================================
/*
 * esh - embedded shell
 * Copyright (C) 2017 Chris Pavlina
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License along
 * with this program; if not, write to the Free Software Foundation, Inc.,
 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 */
#include "esh.h"
#define ESH_INTERNAL_INCLUDE
#include "esh_argparser.h"
#include "esh_internal.h"
#include <minos/string.h>

enum esh_flags {
    IN_ESCAPE = 0x01,
    IN_BRACKET_ESCAPE = 0x02,
    IN_NUMERIC_ESCAPE = 0x04,
};

static struct esh * allocate_esh(void);
static void free_last_allocated(struct esh * esh);
static void do_print_callback(struct esh * esh, char c);
static void do_command(struct esh * esh, int argc, char ** argv);
static void do_overflow_callback(struct esh * esh, char const * buffer);
static bool command_is_nop(struct esh * esh);
static void execute_command(struct esh * esh);
static void handle_char(struct esh * esh, char c);
static void handle_esc(struct esh * esh, char esc);
static void handle_ctrl(struct esh * esh, char c);
static void ins_del(struct esh * esh, char c);
static void term_cursor_move(struct esh * esh, int n);
static void cursor_move(struct esh * esh, int n);
static void word_move(struct esh * esh, int dir);

void esh_default_overflow(struct esh * esh, char const * buffer, void * arg);

#ifdef ESH_STATIC_CALLBACKS
extern void ESH_PRINT_CALLBACK(struct esh * esh, char c, void * arg);
extern void ESH_COMMAND_CALLBACK(
    struct esh * esh, int argc, char ** argv, void * arg);
__attribute__((weak))
void ESH_OVERFLOW_CALLBACK(struct esh * esh, char const * buffer, void * arg)
{
    (void) arg;
    esh_default_overflow(esh, buffer, arg);
}
#else
void esh_register_command(struct esh * esh, esh_cb_command callback)
{
    (void) esh;
    ESH_INSTANCE->cb_command = callback;
}


void esh_register_print(struct esh * esh, esh_cb_print callback)
{
    (void) esh;
    ESH_INSTANCE->print = callback;
}


void esh_register_overflow(struct esh * esh, esh_cb_overflow overflow)
{
    (void) esh;
    ESH_INSTANCE->overflow = (overflow ? overflow : &esh_default_overflow);
}
#endif

// API WARNING: This function is separately declared in lib.rs
void esh_set_command_arg(struct esh * esh, void * arg)
{
    (void) esh;
    ESH_INSTANCE->cb_command_arg = arg;
}

// API WARNING: This function is separately declared in lib.rs
void esh_set_print_arg(struct esh * esh, void * arg)
{
    (void) esh;
    ESH_INSTANCE->cb_print_arg = arg;
}

// API WARNING: This function is separately declared in lib.rs
void esh_set_overflow_arg(struct esh * esh, void * arg)
{
    (void) esh;
    ESH_INSTANCE->cb_overflow_arg = arg;
}

static void do_print_callback(struct esh * esh, char c)
{
    (void) esh;
#ifdef ESH_STATIC_CALLBACKS
    ESH_PRINT_CALLBACK(ESH_INSTANCE, c, ESH_INSTANCE->cb_print_arg);
#else
    ESH_INSTANCE->print(ESH_INSTANCE, c, ESH_INSTANCE->cb_print_arg);
#endif
}


static void do_command(struct esh * esh, int argc, char ** argv)
{
    (void) esh;
#ifdef ESH_STATIC_CALLBACKS
    ESH_COMMAND_CALLBACK(ESH_INSTANCE, argc, argv, ESH_INSTANCE->cb_command_arg);
#else
    ESH_INSTANCE->cb_command(ESH_INSTANCE, argc, argv, ESH_INSTANCE->cb_command_arg);
#endif
}


static void do_overflow_callback(struct esh * esh, char const * buffer)
{
    (void) esh;
#ifdef ESH_STATIC_CALLBACKS
    ESH_OVERFLOW_CALLBACK(ESH_INSTANCE, buffer, ESH_INSTANCE->cb_overflow_arg);
#else
    ESH_INSTANCE->overflow(ESH_INSTANCE, buffer, ESH_INSTANCE->cb_overflow_arg);
#endif
}


/**
 * For the static allocator, this is global so free_last_allocated() can
 * decrement it.
 */
#if ESH_ALLOC == STATIC
static bool g_allocated = false;
struct esh g_esh_struct;
#endif

/**
 * Allocate a new struct esh, or return a new statically allocated one from the pool.
 * This does not perform initialization.
 */
static struct esh * allocate_esh(void)
{
#if ESH_ALLOC == STATIC
    if (g_allocated) {
        return NULL;
    } else {
        g_allocated = true;
        return &g_esh_struct;
    }
#elif ESH_ALLOC == MALLOC
    return malloc(sizeof(struct esh));
#else
#   error "ESH_ALLOC must be STATIC or MALLOC"
#endif
}


/**
 * Free the last struct esh that was allocated, in case an initialization error
 * occurs after allocation.
 */
static void free_last_allocated(struct esh *esh)
{
#if ESH_ALLOC == STATIC
    (void) esh;
    g_allocated = false;
#elif ESH_ALLOC == MALLOC
    free(esh);
#endif
}


// API WARNING: This function is separately declared in lib.rs
struct esh * esh_init(void)
{
    struct esh * esh = allocate_esh();

    memset(esh, 0, sizeof(*esh));
#ifndef ESH_STATIC_CALLBACKS
    esh->overflow = &esh_default_overflow;
#endif

    if (esh_hist_init(ESH_INSTANCE)) {
        free_last_allocated(ESH_INSTANCE);
        return NULL;
    } else {
        return esh;
    }
}


// API WARNING: This function is separately declared in lib.rs
void esh_rx(struct esh * esh, char c)
{
    (void) esh;
    if (ESH_INSTANCE->flags & (IN_BRACKET_ESCAPE | IN_NUMERIC_ESCAPE)) {
        handle_esc(ESH_INSTANCE, c);
    } else if (ESH_INSTANCE->flags & IN_ESCAPE) {
        if (c == '[' || c == 'O') {
            ESH_INSTANCE->flags |= IN_BRACKET_ESCAPE;
        } else {
            ESH_INSTANCE->flags &= ~(IN_ESCAPE | IN_BRACKET_ESCAPE);
        }
    } else {
        // Verify the c is valid non-extended ASCII (and thus also valid
        // UTF-8, for Rust), regardless of whether this platform's isprint()
        // accepts things above 0x7f.
        if (c >= 0x20 && (unsigned char) c < 0x7f) {
            handle_char(ESH_INSTANCE, c);
        } else {
            handle_ctrl(ESH_INSTANCE, c);
        }
    }
}


/**
 * Process a normal text character. If there is room in the buffer, it is
 * inserted directly. Otherwise, the buffer is set into the overflow state.
 */
static void handle_char(struct esh * esh, char c)
{
    (void) esh;
    esh_hist_substitute(ESH_INSTANCE);

    if (ESH_INSTANCE->cnt < ESH_BUFFER_LEN) {
        ins_del(ESH_INSTANCE, c);
    } else {
        // If we let esh->cnt keep counting past the buffer limit, it could
        // eventually wrap around. Let it sit right past the end, and make sure
        // there is a NUL terminator in the buffer (we promise the overflow
        // handler that).
        ESH_INSTANCE->cnt = ESH_BUFFER_LEN + 1;

        // Note that the true buffer length is actually one greater than
        // ESH_BUFFER_LEN (which is the number of characters NOT including the
        // terminator that it can hold).
        ESH_INSTANCE->buffer[ESH_BUFFER_LEN] = 0;
    }
}


/**
 * Process a single-character control byte.
 */
static void handle_ctrl(struct esh * esh, char c)
{
    (void) esh;
    switch (c) {
        case 27: // escape
            ESH_INSTANCE->flags |= IN_ESCAPE;
            break;
        case 3:  // ^C
            esh_puts_flash(ESH_INSTANCE, FSTR("^C\n"));
            esh_print_prompt(ESH_INSTANCE);
            ESH_INSTANCE->cnt = ESH_INSTANCE->ins = 0;
            break;
        case '\n':
            execute_command(ESH_INSTANCE);
            break;
        case 8:     // backspace
        case 127:   // delete
            esh_hist_substitute(ESH_INSTANCE);
            if (ESH_INSTANCE->cnt > 0 && ESH_INSTANCE->cnt <= ESH_BUFFER_LEN) {
                ins_del(ESH_INSTANCE, 0);
            }
            break;
        default:
            // nop
            ;
    }
}


/**
 * Process the last character in an escape sequence.
 */
static void handle_esc(struct esh * esh, char esc)
{
    (void) esh;
    int cdelta;

    if (esc >= '0' && esc <= '9') {
        ESH_INSTANCE->flags
            |= IN_ESCAPE | IN_BRACKET_ESCAPE | IN_NUMERIC_ESCAPE;
        return;
    }

    if (ESH_INSTANCE->flags & IN_NUMERIC_ESCAPE) {
        // Numeric escapes can contain numbers and semicolons; they terminate
        // at letters and ~
        if (esc == '~' || isalpha(esc)) {
            ESH_INSTANCE->flags
                &= ~(IN_BRACKET_ESCAPE | IN_NUMERIC_ESCAPE | IN_ESCAPE);
        }
    } else {
        ESH_INSTANCE->flags
            &= ~(IN_BRACKET_ESCAPE | IN_NUMERIC_ESCAPE | IN_ESCAPE);
    }

    switch (esc) {
    case ESCCHAR_UP:
    case ESCCHAR_DOWN:
        if (esc == ESCCHAR_UP) {
            ++ESH_INSTANCE->hist.idx;
        } else if (ESH_INSTANCE->hist.idx) {
            --ESH_INSTANCE->hist.idx;
        }
        if (ESH_INSTANCE->hist.idx) {
            int offset = esh_hist_nth(ESH_INSTANCE,
                    ESH_INSTANCE->hist.idx - 1);
            if (offset >= 0 || esc == ESCCHAR_DOWN) {
                esh_hist_print(ESH_INSTANCE, offset);
            } else if (esc == ESCCHAR_UP) {
                // Don't overscroll the top
                --ESH_INSTANCE->hist.idx;
            }
        } else {
            esh_restore(ESH_INSTANCE);
        }
        break;

    case ESCCHAR_LEFT:
        cdelta = -1;
        goto cmove;
    case ESCCHAR_RIGHT:
        cdelta = 1;
        goto cmove;
    case ESCCHAR_HOME:
        cdelta = -ESH_INSTANCE->ins;
        goto cmove;
    case ESCCHAR_END:
        cdelta = ESH_INSTANCE->cnt - ESH_INSTANCE->ins;
        goto cmove;
    case ESCCHAR_CTRLLEFT:
        cdelta = -1;
        goto wmove;
    case ESCCHAR_CTRLRIGHT:
        cdelta = 1;
        goto wmove;
    }

    return;
cmove: // micro-optimization, yo!
    cursor_move(ESH_INSTANCE, cdelta);
    return;
wmove:
    word_move(ESH_INSTANCE, cdelta);
}


/**
 * Return whether the command in the edit buffer is a NOP and should be ignored.
 * This does not substitute the selected history item.
 */
static bool command_is_nop(struct esh * esh)
{
    int i;

    (void) esh;
    for (i = 0; ESH_INSTANCE->buffer[i]; ++i) {
        if (ESH_INSTANCE->buffer[i] != ' ') {
            return false;
        }
    }
    return true;
}


/**
 * Process the command in the buffer and give it to the command callback. If
 * the buffer has overflowed, call the overflow callback instead.
 */
static void execute_command(struct esh * esh)
{
    (void) esh;

    // If a command from the history is selected, put it in the edit buffer.
    esh_hist_substitute(ESH_INSTANCE);

    if (ESH_INSTANCE->cnt >= ESH_BUFFER_LEN) {
        do_overflow_callback(ESH_INSTANCE, ESH_INSTANCE->buffer);
        ESH_INSTANCE->cnt = ESH_INSTANCE->ins = 0;
        esh_print_prompt(ESH_INSTANCE);
        return;
    } else {
        ESH_INSTANCE->buffer[ESH_INSTANCE->cnt] = 0;
    }

    esh_putc(ESH_INSTANCE, '\n');

    if (!command_is_nop(ESH_INSTANCE)) {
        esh_hist_add(ESH_INSTANCE, ESH_INSTANCE->buffer);

        int argc = esh_parse_args(ESH_INSTANCE);

        if (argc > ESH_ARGC_MAX) {
            do_overflow_callback(ESH_INSTANCE, ESH_INSTANCE->buffer);
        } else if (argc > 0) {
            do_command(ESH_INSTANCE, argc, ESH_INSTANCE->argv);
        }
    }

    ESH_INSTANCE->cnt = ESH_INSTANCE->ins = 0;
    esh_print_prompt(ESH_INSTANCE);
}


void esh_print_prompt(struct esh * esh)
{
    (void) esh;
    esh_puts_flash(ESH_INSTANCE, FSTR(ESH_PROMPT));
}


/**
 * Default overflow callback. This just prints a message.
 */
// API WARNING: This function is separately declared in lib.rs
void esh_default_overflow(struct esh * esh, char const * buffer, void * arg)
{
    (void) esh;
    (void) buffer;
    (void) arg;
    esh_puts_flash(ESH_INSTANCE, FSTR("\nesh: command buffer overflow\n"));
}


bool esh_putc(struct esh * esh, char c)
{
    (void) esh;

    do_print_callback(ESH_INSTANCE, c);
    return false;
}


bool esh_puts(struct esh * esh, char const * s)
{
    (void) esh;
    char c;

    while ((c = *s++)) {
        esh_putc(ESH_INSTANCE, c);
    }
    return false;
}


#ifdef __AVR_ARCH__
bool esh_puts_flash(struct esh * esh, char const __flash * s)
{
    (void) esh;
    char c;

    while ((c = *s++)) {
        esh_putc(ESH_INSTANCE, c);
    }
    return false;
}
#endif // __AVR_ARCH__


void esh_restore(struct esh * esh)
{
    (void) esh;

    esh_puts_flash(ESH_INSTANCE, FSTR(ESC_ERASE_LINE "\r")); // Clear line
    esh_print_prompt(ESH_INSTANCE);
    ESH_INSTANCE->buffer[ESH_INSTANCE->cnt] = 0;
    esh_puts(ESH_INSTANCE, ESH_INSTANCE->buffer);
    term_cursor_move(ESH_INSTANCE,
            -(int)(ESH_INSTANCE->cnt - ESH_INSTANCE->ins));
}


#ifdef ESH_RUST
// API WARNING: This function is separately declared in lib.rs
size_t esh_get_slice_size(void)
{
    return sizeof (struct char_slice);
}
#endif


/**
 * Move only the terminal cursor. This does not move the insertion point.
 */
static void term_cursor_move(struct esh * esh, int n)
{
    (void) esh;

    for ( ; n > 0; --n) {
        esh_puts_flash(ESH_INSTANCE, FSTR(ESC_CURSOR_RIGHT));
    }

    for ( ; n < 0; ++n) {
        esh_puts_flash(ESH_INSTANCE, FSTR(ESC_CURSOR_LEFT));
    }
}


/**
 * Move the esh cursor. This applies history substitution, moves the terminal
 * cursor, and moves the insertion point.
 */
static void cursor_move(struct esh * esh, int n)
{
    (void) esh;

    esh_hist_substitute(ESH_INSTANCE);
    if ((int) ESH_INSTANCE->ins + n < 0) {
        n = -ESH_INSTANCE->ins;
    } else if ((int) ESH_INSTANCE->ins + n > (int) ESH_INSTANCE->cnt) {
        n = ESH_INSTANCE->cnt - ESH_INSTANCE->ins;
    }

    term_cursor_move(ESH_INSTANCE, n);
    ESH_INSTANCE->ins += n;
}


/**
 * Move the esh cursor backwards or forwards one word. This applies history
 * substitution, moves the terminal cursor, and moves the insertion point.
 *
 * @param dir - move forward if +1 or negative if -1. All other numbers produce
 *              undefined behavior.
 */
static void word_move(struct esh * esh, int dir)
{
    (void) esh;

    size_t ins = ESH_INSTANCE->ins;
    esh_hist_substitute(ESH_INSTANCE);

    if (dir == 0) {
        return;
    } else if (dir < 0) {
        for (; ins > 0 && ESH_INSTANCE->buffer[ins - 1] == ' '; --ins);
        for (; ins > 0 && ESH_INSTANCE->buffer[ins - 1] != ' '; --ins);
    } else {
        const size_t cnt = ESH_INSTANCE->cnt;
        for (; ins < cnt && ESH_INSTANCE->buffer[ins] != ' '; ++ins);
        for (; ins < cnt && ESH_INSTANCE->buffer[ins] == ' '; ++ins);
    }

    term_cursor_move(ESH_INSTANCE, ins - ESH_INSTANCE->ins);
    ESH_INSTANCE->ins = ins;
}


/**
 * Either insert or delete a character at the current insertion point.
 * @param esh - esh instance
 * @param c - character to insert, or 0 to delete
 */
static void ins_del(struct esh * esh, char c)
{
    (void) esh;

    int sgn = c ? 1 : -1;
    bool move = (ESH_INSTANCE->ins != ESH_INSTANCE->cnt);

    memmove(&ESH_INSTANCE->buffer[ESH_INSTANCE->ins + sgn],
            &ESH_INSTANCE->buffer[ESH_INSTANCE->ins],
            ESH_INSTANCE->cnt - ESH_INSTANCE->ins);

    if (c) {
        ESH_INSTANCE->buffer[ESH_INSTANCE->ins] = c;
    }

    ESH_INSTANCE->cnt += sgn;
    ESH_INSTANCE->ins += sgn;

    if (move) {
        esh_restore(ESH_INSTANCE);
    } else if (!c) {
        esh_puts_flash(ESH_INSTANCE, FSTR("\b \b"));
    } else {
        esh_putc(ESH_INSTANCE, c);
    }
}


================================================
FILE: kernel/apps/esh/esh.h
================================================
/**
 * esh - embedded shell
 * ====================
 *
 * *****************************************************************************
 * * PLEASE read ALL of this documentation (all comment blocks starting with a *
 * * double-asterisk **). esh is simple, but a number of things need to be     *
 * * addressed by every esh user.                                              *
 * *****************************************************************************
 *
 * esh is a lightweight command shell for embedded applications in C or rust,
 * small enough to be used for (and intended for) debug UART consoles on
 * microcontrollers. Features include line editing, automatic argument
 * tokenizing (including sh-like quoting), and an optional history ring buffer.
 *
 * esh - embedded shell
 * Copyright (C) 2017 Chris Pavlina
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License along
 * with this program; if not, write to the Free Software Foundation, Inc.,
 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 *
 * -----------------------------------------------------------------------------
 *
 * 1.   Rust users
 * 2.   Configuring esh
 * 2.1.     Line endings
 * 2.2.     Static callbacks
 * 2.3.     History (optional)
 * 3.   Compiling esh
 * 4.   Code documentation
 * 4.1.     Basic interface: initialization and input
 * 4.2.     Callback types and registration functions
 * 4.3.     Advanced functions
 *
 * -----------------------------------------------------------------------------
 *
 * 1. Rust users
 * =============
 *
 * The Rust API and configuration is different, so if you want to use esh with
 * Rust, see esh_rust/src/esh/lib.rs for separate documentation. None of this
 * documentation (including the definitions for `esh_config.h`) applies.
 *
 * 2. Configuring esh
 * ==================
 *
 * esh expects a file called `esh_config.h` to be on the quoted include path. It
 * should define the following:
 *
 *     #define ESH_PROMPT       "% "        // Prompt string
 *     #define ESH_BUFFER_LEN   200         // Maximum length of a command
 *     #define ESH_ARGC_MAX     10          // Maximum argument count
 *     #define ESH_ALLOC        STATIC      // How to allocate struct esh (or MALLOC)
 *
 * Then, to use esh, include `esh.h`, and initialize an esh instance with:
 *
 *     struct esh * esh = esh_init();
 *
 * Unless you're using static callbacks (see below), register your callbacks
 * with:
 *
 *     esh_register_command(esh, &command_callback);
 *     esh_register_print(esh, &print_callback);
 *
 *     // Optional, see the documentation for this function:
 *     esh_register_overflow(esh, &overflow_callback);
 *
 * Now, just begin receiving characters from your serial interface and feeding
 * them in with:
 *
 *     esh_rx(esh, c);
 *
 * 2.1. Line endings
 * -----------------
 *
 * Internally, esh uses strictly `\n` line endings. A great many IO sources use
 * different line endings; the user is responsible for translating them for esh.
 * In general, most raw-mode unix-like terminals will give `\r` from the
 * keyboard and require `\r\n` as output, so your input functions should
 * translate `\r` to `\n`, and your output function should insert `\r` before
 * `\n`.
 *
 * 2.2. Static callbacks
 * ---------------------
 *
 * If you're only using one esh instance, or all your esh instances use the
 * same callbacks, callbacks can be compiled in statically, saving a bit of code
 * space, runtime, and RAM from keeping and following the pointers. Add the
 * following to your `esh_config.h`:
 *
 *     #define ESH_STATIC_CALLBACKS
 *
 * Now, simply name your callback functions `ESH_PRINT_CALLBACK`,
 * `ESH_COMMAND_CALLBACK`, and `ESH_OVERFLOW_CALLBACK` (the overflow callback
 * is still optional), and the linker will find them. The esh_register_*
 * functions are not defined when ESH_STATIC_CALLBACKS is set.
 *
 * 2.3. History (optional)
 * -----------------------
 *
 * To enable the optional history, define the following in `esh_config.h`:
 *
 *     #define ESH_HIST_ALLOC   STATIC      // STATIC, MANUAL, or MALLOC
 *     #define ESH_HIST_LEN     512         // Length. Use powers of 2 for
 *                                          //   efficiency on arithmetic-weak
 *                                          //   devices.
 *
 * If you chose `MANUAL` allocation, call `esh_set_histbuf()` once you have
 * allocated your own buffer of length ESH_HIST_LEN:
 *
 *     esh_set_histbuf(esh, &buffer[0]);
 *
 * Manual allocation was created for one specific purpose: history buffer in
 * external SRAM on AVR (the compiler and allocator don't generally know about
 * external SRAM unless you jump through hoops). However, it's there for
 * whatever you like :)
 *
 * WARNING: static allocation is only valid when using a SINGLE esh instance.
 * Using multiple esh instances with static allocation is undefined and WILL
 * make demons fly out your nose.
 *
 * 3. Compiling esh
 * ================
 *
 * esh has no build script of its own; building it is trivial and it's meant to
 * be integrated directly into your project.
 *
 *  1. Put the `esh` subdirectory on the include path.
 *  2. Make sure `esh_config.h` is on the quoted include path (`-iquote`).
 *  3. Make sure selected C standard is one of `c99`, `c11`, `gnu99`, or
 *       `gnu11`. On AVR, use only `gnu99` or `gnu11` (esh on AVR uses the
 *       Named Address Spaces GNU extension).
 *  4. Include *all* esh C source files in the build (whether or not you used
 *       the feature - e.g. esh_hist.c).
 *
 * esh should compile quietly with most warning settings, including
 * `-Wall -Wextra -pedantic`.
 */

#ifndef ESH_H
#define ESH_H

#define ESH_INTERNAL_INCLUDE
#include "esh_incl_config.h"
#include "esh_hist.h"
#undef ESH_INTERNAL_INCLUDE
#include <minos/types.h>

struct esh;

/**
 * -----------------------------------------------------------------------------
 *
 * 4. Code documentation
 */

/**
 * -----------------------------------------------------------------------------
 * 4.1. Basic interface: initialization and input
 */

/*
 * Return a pointer to an initialized esh object. Must be called before
 * any other functions.
 *
 * See ESH_ALLOC in esh_config.h - this should be STATIC or MALLOC.
 * If STATIC, only a single instance can be used. esh_init() will return a
 * pointer to it on the first call, and all subsequent calls will return
 * NULL.
 *
 * @return esh instance, or NULL in the following cases:
 *  - using malloc to allocate either the esh struct itself or the history
 *      buffer, and malloc returns NULL.
 *  - using static allocation and esh has already been initialized.
 *  - whichever allocation method was chosen for ESH_HIST_ALLOC, if any,
 *      failed.
 */
struct esh *esh_init(void);

/**
 * Pass in a character that was received.
 */
void esh_rx(struct esh * esh, char c);

#ifndef ESH_STATIC_CALLBACKS
/**
 * -----------------------------------------------------------------------------
 * 4.2. Callback types and registration functions
 *
 * These only exist if ESH_STATIC_CALLBACKS is not defined.
 */

/**
 * Callback to handle commands.
 * @param argc - number of arguments, including the command name
 * @param argv - arguments
 * @param arg - arbitrary argument passed to esh_set_command_arg()
 */
typedef void (*esh_cb_command)(struct esh *esh,
		int argc, char **argv, void *arg);

/**
 * Callback to print a character.
 * @param esh - the esh instance calling
 * @param c - the character to print
 * @param arg - arbitrary argument passed to esh_set_print_arg()
 */
typedef void (*esh_cb_print)(struct esh * esh, char c, void *arg);

/**
 * Callback to notify about overflow.
 * @param esh - the esh instance calling
 * @param buffer - the internal buffer, NUL-terminated
 * @param arg - arbitrary argument passed to esh_set_overflow_arg()
 */
typedef void (*esh_cb_overflow)(struct esh *esh,
		char const *buffer, void *rg);

/**
 * Register a callback to execute a command.
 */
void esh_register_command(struct esh *esh, esh_cb_command callback);

/**
 * Register a callback to print a character.
 */
void esh_register_print(struct esh *esh, esh_cb_print callback);

/**
 * Register a callback to notify about overflow. Optional; esh has an internal
 * overflow handler. To reset to that, set the handler to NULL.
 */
void esh_register_overflow(struct esh *esh, esh_cb_overflow overflow);
#endif

/**
 * -----------------------------------------------------------------------------
 * 4.3. Advanced functions
 */

/**
 * Set the location of the history buffer, if ESH_HIST_ALLOC is defined and
 * set to MANUAL. If ESH_HIST_ALLOC is not defined or not set to MANUAL, this
 * is a no-op.
 */
void esh_set_histbuf(struct esh *esh, char *buffer);

/**
 * Set an argument to be given to the command callback. Default is NULL.
 */
void esh_set_command_arg(struct esh *esh, void *arg);

/**
 * Set an argument to be given to the print callback. Default is NULL.
 */
void esh_set_print_arg(struct esh * esh, void *arg);

/**
 * Set an argument to be given to the overflow callback. Default is NULL.
 */
void esh_set_overflow_arg(struct esh *esh, void *arg);

#endif // ESH_H


================================================
FILE: kernel/apps/esh/esh_argparser.c
================================================
/*
 * esh - embedded shell
 * Copyright (C) 2017 Chris Pavlina
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License along
 * with this program; if not, write to the Free Software Foundation, Inc.,
 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 */

#define ESH_INTERNAL
#include "esh.h"
#define ESH_INTERNAL_INCLUDE
#include "esh_argparser.h"
#include "esh_internal.h"

#define DEST(esh) ((esh)->buffer)


/**
 * Consume a quoted string. The source string will be modified into the
 * destination string as follows:
 *
 * source:  " b"
 * dest:     b
 *
 * This is safe to use when the destination and source buffer are the same;
 * it will only ever contract the data, not expand it.
 */
static void consume_quoted(struct esh *esh, size_t *src_i, size_t *dest_i)
{
    (void) esh;
    char quote = ESH_INSTANCE->buffer[*src_i];

    for (++*src_i; *src_i < ESH_INSTANCE->cnt; ++*src_i) {
        char c = ESH_INSTANCE->buffer[*src_i];
        if (c == quote) {
            // End of quoted string
            break;
        } else {
            DEST(ESH_INSTANCE)[*dest_i] = c;
            ++*dest_i;
        }
    }
}


int esh_parse_args(struct esh *esh)
{
    size_t i;
    (void) esh;
    int argc = 0;
    bool last_was_space = true;
    size_t dest = 0;

    for (i = 0; i < ESH_INSTANCE->cnt; ++i) {
        if (ESH_INSTANCE->buffer[i] == ' ') {
            last_was_space = true;
            ESH_INSTANCE->buffer[dest] = 0;
            ++dest;
        } else {
            if (last_was_space) {
                if (argc < ESH_ARGC_MAX) {
                    ESH_INSTANCE->argv[argc] = &ESH_INSTANCE->buffer[dest];
                }
                ++argc;
            }
            if (ESH_INSTANCE->buffer[i] == '\'' || ESH_INSTANCE->buffer[i] == '\"') {
                consume_quoted(ESH_INSTANCE, &i, &dest);
            } else {
                ESH_INSTANCE->buffer[dest] = ESH_INSTANCE->buffer[i];
                ++dest;
            }
            last_was_space = false;
        }
    }
    ESH_INSTANCE->buffer[dest] = 0;
    ESH_INSTANCE->buffer[ESH_BUFFER_LEN] = 0;
    return argc;
}


================================================
FILE: kernel/apps/esh/esh_argparser.h
================================================
/*
 * esh - embedded shell
 * Copyright (C) 2017 Chris Pavlina
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License along
 * with this program; if not, write to the Free Software Foundation, Inc.,
 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 */

#ifndef ESH_INTERNAL_INCLUDE
#error "esh_argparser.h is an internal header and should not be included by the user."
#endif // ESH_INTERNAL_INCLUDE

#ifndef ESH_ARGPARSER_H
#define ESH_ARGPARSER_H

struct esh;

/**
 * Map the buffer to the argv array, and return argc. If argc exceeds the
 * maximum, the full buffer will still be processed; argument pointers will
 * just not be stored beyond the maximum. The number that would have been
 * stored is returned.
 *
 * Handles whitespace and quotes. The entire buffer is processed in place,
 * with any changes leaveing the length equal or shorter.
 *
 * Following is an example buffer before and after processing (# for NUL),
 * with pointers stored in argv[] marked with ^
 *
 * before: git   config user.name "My Name"
 * after:  git###config#user.name#My Name#
 * argv:   ^     ^      ^         ^
 *
 * Rearranging the buffer is necessary because quotes can occur in the
 * middle of arguments. For example:
 *
 * before: why" would you ever"'"'"do this??"
 * after:  why would you ever"do this??#
 * argv:   ^
 *
 */
int esh_parse_args(struct esh *esh);

#endif // ESH_ARGPARSER_H


================================================
FILE: kernel/apps/esh/esh_config.h
================================================
#define ESH_PROMPT "minos # "
#define ESH_BUFFER_LEN 200
#define ESH_ARGC_MAX 10

#define ESH_HIST_ALLOC STATIC
#define ESH_HIST_LEN 4096

#define ESH_ALLOC STATIC
#define ESH_INSTANCES 1


================================================
FILE: kernel/apps/esh/esh_hist.c
================================================
/*
 * esh - embedded shell
 * Copyright (C) 2017 Chris Pavlina
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License along
 * with this program; if not, write to the Free Software Foundation, Inc.,
 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 */

// History allocation types
#define STATIC 1
#define MANUAL 2
#define MALLOC 3

#include "esh.h"
#define ESH_INTERNAL_INCLUDE
#include "esh_internal.h"
#include <minos/string.h>

#ifdef ESH_HIST_ALLOC
// Begin actual history implementation

/**
 * Initialize the history buffer.
 *
 * The initial value is a NUL byte followed by a fill of 0xff. This avoids
 * the extra empty-string history entry that would be seen if the buffer
 * were filled with 0x00.
 */
static void init_buffer(char * buffer)
{
    memset(buffer, 0xff, ESH_HIST_LEN);
    buffer[0] = 0;
}

/**
 * True signed modulo, for wraparound signed arithmetic. This is mathematically
 * equivalent to "0 + a   mod b".
 */
static int modulo(int n, int modulus)
{
    int rem = n % modulus;
    return (rem >= 0) ? rem : rem + modulus;
}

/**
 * Given an offset in the ring buffer, call the callback once for each
 * character in the string starting there. This is meant to abstract away
 * ring buffer access.
 *
 * @param esh - esh instance
 * @param offset - offset into the ring buffer
 * @param callback - will be called once per character
 *      - callback:param esh - esh instance
 *      - callback:param c - character
 *      - callback:return - true to stop iterating, false to continue
 *
 * Regardless of the callback's return value, iteration will always stop at NUL
 * or if the loop wraps all the way around.
 */
static void for_each_char(struct esh * esh, int offset,
        bool (*callback)(struct esh * esh, char c))
{
    int i;
    (void) esh;

    for (i = offset; ESH_INSTANCE->hist.hist[i]; i = (i + 1) % ESH_HIST_LEN) {
        if (i == modulo(offset - 1, ESH_HIST_LEN)) {
            // Wrapped around and didn't encounter NUL. Stop here to prevent
            // an infinite loop.
            return;
        }

        if (callback(ESH_INSTANCE, ESH_INSTANCE->hist.hist[i])) {
            return;
        }
    }
}


/**
 * Internal callback passed to for_each_char by clobber_buffer
 */
static bool clobber_cb(struct esh * esh, char c)
{
    (void) esh;
    ESH_INSTANCE->buffer[ESH_INSTANCE->cnt] = c;
    ++ESH_INSTANCE->cnt;
    ++ESH_INSTANCE->ins;
    return false;
}


/**
 * Put the selected history item in the buffer. Make sure to call
 * esh_restore afterward to display the buffer.
 * @param esh - esh instance
 * @param offset - offset into the ring buffer
 */
static void clobber_buffer(struct esh * esh, int offset)
{
    (void) esh;
    if (offset < 0 || offset >= ESH_HIST_LEN) {
        return;
    }

    ESH_INSTANCE->cnt = 0;
    ESH_INSTANCE->ins = 0;
    for_each_char(ESH_INSTANCE, offset, &clobber_cb);
}


bool esh_hist_init(struct esh * esh)
{
    (void) esh;
#if ESH_HIST_ALLOC == STATIC
    static char esh_hist[ESH_HIST_LEN] = {0};
    ESH_INSTANCE->hist.hist = &esh_hist[0];
    init_buffer(ESH_INSTANCE->hist.hist);
    return false;
#elif ESH_HIST_ALLOC == MALLOC
    ESH_INSTANCE->hist.hist = malloc(ESH_HIST_LEN);
    if (ESH_INSTANCE->hist.hist) {
        init_buffer(ESH_INSTANCE->hist.hist);
        return false;
    } else {
        return true;
    }
#elif ESH_HIST_ALLOC == MANUAL
    ESH_INSTANCE->hist.hist = NULL;
    return false;
#endif
}


int esh_hist_nth(struct esh * esh, int n)
{
    int i;
    (void) esh;
    const int start = modulo(ESH_INSTANCE->hist.tail - 1, ESH_HIST_LEN);
    const int stop = (ESH_INSTANCE->hist.tail + 1) % ESH_HIST_LEN;

    for (i = start; i != stop; i = modulo(i - 1, ESH_HIST_LEN)) {
        if (n && ESH_INSTANCE->hist.hist[i] == 0) {
            --n;
        } else if (ESH_INSTANCE->hist.hist[i] == 0) {
            return (i + 1) % ESH_HIST_LEN;
        }
    }

    return -1;
}


bool esh_hist_add(struct esh * esh, char const * s)
{
    int i;
    (void) esh;
    const int start = (ESH_INSTANCE->hist.tail + 1) % ESH_HIST_LEN;

    for (i = start; ; i = (i + 1) % ESH_HIST_LEN)
    {
        if (i == modulo(ESH_INSTANCE->hist.tail - 1, ESH_HIST_LEN)) {
            // Wrapped around
            ESH_INSTANCE->hist.tail = 0;
            init_buffer(ESH_INSTANCE->hist.hist);
            return true;
        }

        ESH_INSTANCE->hist.hist[i] = *s;

        if (*s) {
            ++s;
        } else {
            ESH_INSTANCE->hist.tail = i;
            return false;
        }
    }
}


void esh_hist_print(struct esh * esh, int offset)
{
    (void) esh;
    // Clear the line
    esh_puts_flash(ESH_INSTANCE, FSTR(ESC_ERASE_LINE "\r"));

    esh_print_prompt(ESH_INSTANCE);

    if (offset >= 0) {
        for_each_char(ESH_INSTANCE, offset, esh_putc);
    }
}


bool esh_hist_substitute(struct esh * esh)
{
    (void) esh;
    if (ESH_INSTANCE->hist.idx) {
        int offset = esh_hist_nth(ESH_INSTANCE, ESH_INSTANCE->hist.idx - 1);
        clobber_buffer(ESH_INSTANCE, offset);
        esh_restore(ESH_INSTANCE);
        ESH_INSTANCE->hist.idx = 0;
        return true;
    } else {
        return false;
    }
}

#endif // ESH_HIST_ALLOC

#if defined(ESH_HIST_ALLOC) && ESH_HIST_ALLOC == MANUAL

void esh_set_histbuf(struct esh * esh, char * buffer)
{
    ESH_INSTANCE->hist.hist = buffer;
    init_buffer(ESH_INSTANCE->hist.hist);
}

#else // ESH_HIST_ALLOC == MANUAL

void esh_set_histbuf(struct esh * esh, char * buffer)
{
    (void) esh;
    (void) buffer;
}

#endif // ESH_HIST_ALLOC == MANUAL


================================================
FILE: kernel/apps/esh/esh_hist.h
================================================
/*
 * esh - embedded shell
 * Copyright (C) 2017 Chris Pavlina
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License along
 * with this program; if not, write to the Free Software Foundation, Inc.,
 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 */

#ifndef ESH_HIST_H
#define ESH_HIST_H

#include <minos/types.h>

/*
 * esh history support. This provides either a full history implementation or
 * a placeholder, depending on whether history was enabled in configuration.
 * This allows the main esh code to not be conditionally compiled.
 */

struct esh;

#ifdef ESH_HIST_ALLOC
// Begin actual history implementation

struct esh_hist {
    char *hist;
    int tail;
    int idx;
};

/**
 * Initialize history.
 * @param esh - esh instance
 * @return true on error. Can only return error if the history buffer is to be
 * allocated on heap.
 */
bool esh_hist_init(struct esh *esh);

/**
 * Count back n strings from the current tail of the ring buffer and return the
 * index the string starts at.
 *
 * @param esh - esh instance
 * @param n - count to the nth string back, where 0 is the last string added
 * @return offset in the ring buffer where the nth string starts, or -1 if
 *  there are not n-1 strings in the buffer.
 */
int esh_hist_nth(struct esh *esh, int n);

/**
 * Add a string into the buffer. If the string doesn't fit, the buffer is
 * intentionally reset to avoid restoring a corrupted string later.
 * @param esh - esh instance
 * @param s - string to add
 * @return true iff the string didn't fit (this is destructive!)
 */
bool esh_hist_add(struct esh *esh, char const *s);

/**
 * Overwrite the prompt and print a history suggestion.
 * @param esh - esh instance
 * @param offset - offset into the ring buffer
 */
void esh_hist_print(struct esh *esh, int offset);

/**
 * If history is currently being browsed, substitute the selected history item
 * for the buffer and redraw the buffer for editing.
 * @param esh - esh instance
 * @return true iff the substitution was made (i.e. history was being browsed)
 */
bool esh_hist_substitute(struct esh *esh);

#else // ESH_HIST_ALLOC
// Begin placeholder implementation

struct esh_hist {
    size_t idx;
};

#define INL static inline __attribute__((always_inline))

INL bool esh_hist_init(struct esh *esh)
{
    (void) esh;
    return false;
}

INL int esh_hist_nth(struct esh *esh, int n)
{
    (void) esh;
    (void) n;
    return -1;
}

INL bool esh_hist_add(struct esh *esh, char const *s)
{
    (void) esh;
    (void) s;
    return true;
}

INL void esh_hist_for_each_char( struct esh *esh, int offset,
        bool (*callback)(struct esh * esh, char c))
{
    (void) esh;
    (void) offset;
    (void) callback;
}

INL void esh_hist_print(struct esh *esh, int offset)
{
    (void) esh;
    (void) offset;
}

INL void esh_hist_restore(struct esh *esh)
{
    (void) esh;
}

INL void esh_hist_clobber(struct esh *esh, int offset)
{
    (void) esh;
    (void) offset;
}

INL bool esh_hist_substitute(struct esh *esh)
{
    (void) esh;
    return false;
}

#undef INL

#endif // ESH_HIST_ALLOC

#endif // ESH_HIST_H


================================================
FILE: kernel/apps/esh/esh_incl_config.h
================================================
/*
 * esh - embedded shell
 * Copyright (C) 2017 Chris Pavlina
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License along
 * with this program; if not, write to the Free Software Foundation, Inc.,
 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 */

#ifndef ESH_INCL_CONFIG_H
#define ESH_INCL_CONFIG_H

#define STATIC 1
#define MANUAL 2
#define MALLOC 3
#include "esh_config.h"

#ifdef ESH_RUST
#define ESH_STATIC_CALLBACKS
#endif

#endif // ESH_INCL_CONFIG_H


================================================
FILE: kernel/apps/esh/esh_internal.h
================================================
/*
 * esh - embedded shell
 * Copyright (C) 2017 Chris Pavlina
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License along
 * with this program; if not, write to the Free Software Foundation, Inc.,
 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 */

#ifndef ESH_INTERNAL_H
#define ESH_INTERNAL_H

#include "esh_incl_config.h"
#include "esh_hist.h"
#include <minos/types.h>

struct tty;

/**
 * If we're building for Rust, we need to know the size of a &[u8] in order
 * to allocate space for it. This definition should be equivalent. Because the
 * internal representation of a slice has not been stabilized [1], this is not
 * guaranteed to remain constant in the future; the Rust bindings will check
 * sizeof(struct char_slice) against mem::size_of::<&[u8]>().
 *
 * [1] https://github.com/rust-lang/rust/issues/27751
 */

#ifdef ESH_RUST
struct char_slice {
    char *p;
    size_t sz;
};
#endif

/**
 * esh instance struct. This holds all of the state that needs to be saved
 * between calls to esh_rx().
 */
struct esh {
    /**
     * The config item ESH_BUFFER_LEN is only the number of characters to be
     * stored, not characters plus termination.
     */
    char buffer[ESH_BUFFER_LEN + 1];

    /**
     * The Rust bindings require space allocated for an argv array of &[u8],
     * which can share memory with C's char* array to save limited SRAM.
     */
#ifdef ESH_RUST
    union {
        char * argv[ESH_ARGC_MAX];
        struct char_slice rust_argv[ESH_ARGC_MAX];
    };
#else
    char * argv[ESH_ARGC_MAX];
#endif

    size_t cnt;             ///< Number of characters currently held in .buffer
    size_t ins;             ///< Position of the current insertion point
    uint8_t flags;          ///< State flags for escape sequence parser
    struct esh_hist hist;
#ifndef ESH_STATIC_CALLBACKS
    esh_cb_command cb_command;
    esh_cb_print print;
    esh_cb_overflow overflow;
#endif
    void *cb_command_arg;
    void *cb_print_arg;
    void *cb_overflow_arg;

    struct tty *tty;
};

/**
 * On AVR, a number of strings should be stored in and read from flash space.
 * Other architectures have linearized address spaces and don't require this.
 */
#ifdef __AVR_ARCH__
#   define FSTR(s) (__extension__({ \
            static const __flash char __c[] = (s); \
            &__c[0];}))
#   define AVR_ONLY(x) x
#else
#   define FSTR(s) (s)
#   define AVR_ONLY(x)
#endif // __AVR_ARCH__

/**
 * Print one character.
 * @return false (allows it to be an esh_hist_for_each_char callback)
 */
bool esh_putc(struct esh *esh, char c);

/**
 * @internal
 * Print a string located in RAM.
 */
bool esh_puts(struct esh *esh, char const *s);

/**
 * @internal
 * Print a string located in flash. On all but AVR this is an alias for
 * esh_puts().
 */
#ifdef __AVR_ARCH__
bool esh_puts_flash(struct esh *esh, char const __flash * s);
#else
#define esh_puts_flash esh_puts
#endif

/**
 * Print the prompt string
 */
void esh_print_prompt(struct esh *esh);

/**
 * Overwrite the prompt and restore the buffer.
 */
void esh_restore(struct esh *esh);

/**
 * Call the print callback. Wrapper to avoid ifdefs for static callback.
 */
void esh_do_print_callback(struct esh *esh, char c);

/**
 * Call the main callback. Wrapper to avoid ifdefs for static callback.
 */
void esh_do_callback(struct esh *esh, int argc, char **argv);

/**
 * Call the overflow callback. Wrapper to avoid ifdefs for the static
 * callback.
 */
void esh_do_overflow_callback(struct esh *esh, char const * buffer);

#ifdef ESH_RUST
/**
 * Return what we think the size of a Rust &[u8] slice is. This is used to
 * verify that the statically allocated slice array is long enough, and also
 * to make sure a linker error is produced if ESH_RUST wasn't enabled
 * (which would mean the slice array wasn't allocated at all).
 */
size_t esh_get_slice_size(void);
#endif

#define ESC_CURSOR_RIGHT    "\33[1C"
#define ESC_CURSOR_LEFT     "\33[1D"
#define ESC_ERASE_LINE      "\33[2K"

#define ESCCHAR_UP      'A'
#define ESCCHAR_DOWN    'B'
#define ESCCHAR_RIGHT   'C'
#define ESCCHAR_LEFT    'D'
#define ESCCHAR_HOME    'H'
#define ESCCHAR_END     'F'
#define ESCCHAR_CTRLLEFT    'd'
#define ESCCHAR_CTRLRIGHT   'c'

#if ESH_ALLOC == STATIC
extern struct esh g_esh_struct;
#define ESH_INSTANCE (&g_esh_struct)
#else
#define ESH_INSTANCE esh
#endif // ESH_ALLOC

#endif // ESH_INTERNAL_H


================================================
FILE: kernel/apps/esh/shell.c
================================================
/*
 * Copyright (C) 2020 Min Le (lemin9538@gmail.com)
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

#include <minos/console.h>
#include <minos/compiler.h>
#include <minos/shell_command.h>
#include <minos/tty.h>
#include <minos/print.h>
#include <minos/errno.h>
#include <minos/string.h>
#include <minos/bootarg.h>

#include "esh.h"
#include "esh_internal.h"

static struct esh *pesh;

static void __esh_putc(struct esh *esh, char c, void *arg)
{
	console_putc(c);
}

static void esh_excute_command(struct esh *esh,
		int argc, char **argv, void *arg)
{
	int ret;

	ret = excute_shell_command(argc, argv);
	if (ret == -ENOENT)
		printf("Command \'%s\' not found\n", argv[0]);
}

static void shell_detach_tty(void)
{
	close_tty(pesh->tty);
	printf("\nDetach tty: %s\n", pesh->tty->name);
	pesh->tty = NULL;
}

static int shell_cmd_tty(int argc, char **argv)
{
	if (argc > 2 && strcmp(argv[1], "attach") == 0) {
		printf("Attach tty: %s press any key to active the console\n",
				argv[2]);
		pesh->tty = open_tty(argv[2]);
		if (!pesh->tty) {
			printf("no such tty\n");
			return -EINVAL;
		}
	} else {
		printf("unsupport action now\n");
	}

	return 0;
}
DEFINE_SHELL_COMMAND(tty, "tty", "tty related command",
		shell_cmd_tty, 2);

int shell_task(void *data)
{
	char buf[32];
	char ch;
	int i, copy;
	char *tty = NULL;

	pesh = esh_init();
	esh_register_command(pesh, esh_excute_command);
	esh_register_print(pesh, __esh_putc);

	esh_rx(pesh, '\n');
	while (console_gets(buf, 32, 0) != 0);

	if ((long)data == 0) {
		i = bootarg_parse_string("tty", &tty);
		if (!i && tty && !strncmp(tty, "vm", 2)) {
			printf("\nAttach tty: %s\n", tty);
			pesh->tty = open_tty(tty);
		}
	}

	for (; ;) {
		copy = console_gets(buf, 32, -1);
		for (i = 0; i < copy; i++) {
			ch = buf[i];
			if (ch <= 0)
				continue;
			if (pesh->tty) {
				/*
				 * use Ctrl-\ to exit the vm tty
				 */
				if (ch == 28) {
					shell_detach_tty();
					esh_rx(pesh, '\n');
				} else {
					pesh->tty->ops->put_char(pesh->tty, ch);
				}
			} else {
				if (ch == '\r')
					ch = '\n';
				esh_rx(pesh, ch);
			}
		}
	}

	return 0;
}


================================================
FILE: kernel/apps/init.c
================================================
/*
 * Copyright (C) 2018 Min Le (lemin9538@gmail.com)
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

#include <minos/console.h>
#include <minos/shell_command.h>
#include <minos/bootarg.h>
#include <minos/print.h>
#include <minos/task.h>

#ifdef CONFIG_VIRT
#include <virt/virt.h>
#endif

#ifdef CONFIG_VIRT
static long __skip_vm_boot;
#else
static long __skip_vm_boot = 1;
#endif

static void skip_vm_boot(void)
{
#ifdef CONFIG_VIRT
#ifdef CONFIG_SHELL
	uint32_t wait;
	char str[8];
	int i;

	bootarg_parse_uint("bootwait", &wait);
	if (wait > 0) {
		printf("\nPress any key to stop vm startup: %d ", wait);
		for (i = 0; i < wait; i++) {
			printf("\b\b%d ", wait - i);
			if (console_gets(str, 8, 1000) > 0) {
				__skip_vm_boot = 1;
				break;
			}
		}
	}

	if (!__skip_vm_boot) {
		printf("\b\b ");
		printf("\n");
	}
#endif
	if (!__skip_vm_boot)
		start_all_vm();
#endif
}

static void start_shell_task(void)
{
#ifdef CONFIG_SHELL
	extern int shell_task(void *data);
	create_task("shell_task", shell_task, 0x2000, OS_PRIO_SYSTEM,
			-1, 0, (void *)__skip_vm_boot);
#endif
}

int init_task(void *data)
{
	skip_vm_boot();
	start_shell_task();

	return 0;
}


================================================
FILE: kernel/arch/aarch64/Kconfig
================================================
config ARCH_AARCH64
	def_bool y
	select DEVICE_TREE
	select 64BIT
	help
	  AARCH64 Minos support

config 64BIT
	def_bool y

source "arch/aarch64/core/Kconfig"

if VIRT
source "arch/aarch64/virt/Kconfig"
endif

source "core/Kconfig"
# source "virt/Kconfig"
source "drivers/Kconfig"
source "platform/Kconfig"
source "libs/Kconfig"
source "userspace/Kconfig"


================================================
FILE: kernel/arch/aarch64/Makefile
================================================
#
# arch/arm64/Makefile
#
# This file is included by the global makefile so that you can add your own
# architecture-specific flags and dependencies.
#
# This file is subject to the terms and conditions of the GNU General Public
# License.  See the file "COPYING" in the main directory of this archive
# for more details.
#
# Copyright (C) 1995-2001 by Russell King
#
ifeq ($(CONFIG_ARM64_LSE_ATOMICS), y)
  ifeq ($(lseinstr),)
$(warning LSE atomics not supported by binutils)
  endif
endif

ifeq ($(CONFIG_ARCH_AARCH64), y)
brokengasinst := $(call as-instr,1:\n.inst 0\n.rept . - 1b\n\nnop\n.endr\n,,-DCONFIG_BROKEN_GAS_INST=1)

  ifneq ($(brokengasinst),)
$(warning Detected assembler with broken .inst; disassembly will be unreliable)
  endif
endif

ifeq ($(CONFIG_ARM_ATOMIC_LSE), y)
	ARMV8_ARCH	= armv8.1-a
else
	ARMV8_ARCH	= armv8-a
endif

MBUILD_LDFLAGS	+= -X

MBUILD_CFLAGS	+= -mgeneral-regs-only $(lseinstr) $(brokengasinst)
MBUILD_CFLAGS	+= -fno-asynchronous-unwind-tables -march=$(ARMV8_ARCH) -ffixed-x18
MBUILD_AFLAGS	+= $(lseinstr) $(brokengasinst)

ifeq ($(CONFIG_CPU_BIG_ENDIAN), y)
MBUILD_CFLAGS	+= -mbig-endian
# Prefer the baremetal ELF build target, but not all toolchains include
# it so fall back to the standard linux version if needed.
MBUILD_LDFLAGS	+= -EB
else
MBUILD_CFLAGS	+= -mlittle-endian -mcmodel=large
MBUILD_LDFLAGS	+= -EL
endif

# Default value
head-y		:= arch/aarch64/core/boot.o

core-y			+= arch/aarch64/core/
core-y			+= arch/aarch64/lib/
core-y			+= arch/aarch64/lds/
core-y			+= arch/aarch64/userspace/
core-$(CONFIG_VIRT)	+= arch/aarch64/virt/


================================================
FILE: kernel/arch/aarch64/core/Kconfig
================================================
menu "Minos aarch64 Arch Feature"

config NR_CPUS_CLUSTER0
	int "cpu number in cluster0"
	default 4
	help
	  cpu count in SOC cluster0, this
	  will help to caculate the cpuid

config NR_CPUS_CLUSTER1
	int "cpu number in cluster1"
	default 0
	help
	  cpu count in SOC cluster1, this
	  will help to caculate the cpuid

config EXCEPTION_STACK_SIZE
	hex "the stack size of the exception vector"
	default 0x2000
	help
	  the stack size of the exception vector

config ARM_ATOMIC_LSE
	bool "use lse atomic instruction"
	default n
	help
	  this require at leaset armv8.1 soc

config ARM_ADDRESS_TAGGING
	bool
	default (VIRT && ARM_VHE) || (!VIRT)

config PTOV_MASK
	hex
	default 0xffffff8000000000 if ARM_ADDRESS_TAGGING
	default 0x0

config VTOP_MASK
	hex
	default 0x0000007fffffffff if ARM_ADDRESS_TAGGING
	default 0x0

endmenu


================================================
FILE: kernel/arch/aarch64/core/Makefile
================================================
obj-y += aarch64_IRQ.o
obj-y += aarch64.o
obj-y += aarch64_sync.o
obj-y += arch.o
obj-y += arm_arch_timer.o
obj-y += boot.o
obj-y += cache.o
obj-y += cpu.o
obj-y += entry.o
obj-y += mem_map.o
obj-y += vector.o
obj-y += cpu_feature.o
obj-y += stage1.o
obj-y += fpsimd.o


================================================
FILE: kernel/arch/aarch64/core/aarch64.S
================================================
/*
 * Copyright (C) 2018 Min Le (lemin9538@gmail.com)
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

#include <asm/aarch64_common.h>
#include <asm/asm_marco.S>
#include <config/config.h>

	.global arch_raw_smp_processor_id
	.global arch_get_fp
	.global arch_get_lr
	.global arch_get_sp
	.global smc_call
	.global hvc_call
	.global aarch64_task_exit

func arch_raw_smp_processor_id
	mrs 	x0, MPIDR_EL1
	ldr	x4, =(1 << 24)
	and	x5, x0, x4
	cbnz	x5, __shift_mpidr
	ubfx    x1, x0, #MPIDR_EL1_AFF0_LSB, #MPIDR_EL1_AFF_WIDTH
	ubfx    x2, x0, #MPIDR_EL1_AFF1_LSB, #MPIDR_EL1_AFF_WIDTH
	b	__out
__shift_mpidr:
	ubfx    x1, x0, #MPIDR_EL1_AFF1_LSB, #MPIDR_EL1_AFF_WIDTH
	ubfx    x2, x0, #MPIDR_EL1_AFF2_LSB, #MPIDR_EL1_AFF_WIDTH
__out:
	mov	x3, #CONFIG_NR_CPUS_CLUSTER0
	mul	x2, x2, x3
	add	x0, x2, x1
	dsb	sy
	ret
endfunc arch_raw_smp_processor_id

func arch_get_fp
	mov	x0, x29
	ret
endfunc arch_get_fp

func arch_get_lr
	mov	x0, x30
	ret
endfunc arch_get_lr

func arch_get_sp
	mov	x0, sp
	ret
endfunc arch_get_sp

func smc_call
	smc	#0
	ldr	x4, [sp]
	stp	x0, x1, [x4, #0]
	stp	x2, x3, [x4, #16]
	ret
endfunc smc_call

func hvc_call
	hvc	#0
	ldr	x4, [sp]
	stp	x0, x1, [x4, #0]
	stp	x2, x3, [x4, #16]
	ret
endfunc hvc_call

func aarch64_task_exit
	mov	x0, x0
	bl	task_exit
1:
	b	1b
endfunc aarch64_task_exit


================================================
FILE: kernel/arch/aarch64/core/aarch64_IRQ.c
================================================
/*
 * Copyright (C) 2018 Min Le (lemin9538@gmail.com)
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

#include <minos/minos.h>
#include <minos/irq.h>
#include <minos/sched.h>

static inline void irq_handler(gp_regs *regs)
{
	do_irq_handler();
}

void irq_from_lower_el(gp_regs *regs)
{
	irq_handler(regs);
}

void irq_from_current_el(gp_regs *regs)
{
	irq_handler(regs);
}


================================================
FILE: kernel/arch/aarch64/core/aarch64_sync.c
================================================
/*
 * Copyright (C) 2018 Min Le (lemin9538@gmail.com)
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

#include <asm/aarch64_helper.h>
#include <asm/trap.h>
#include <minos/minos.h>
#include <minos/smp.h>
#include <asm/reg.h>
#include <minos/sched.h>
#include <minos/irq.h>
#include <asm/svccc.h>
#include <asm/trap.h>

static char *mode_info[] = {
	"Sync taken from current EL with SP0",
	"IRQ taken from current EL with SP0",
	"FIQ taken from current EL with SP0",
	"Serr taken from current EL with SP0",
	"Sync taken from current EL with SPx",
	"IRQ taken from current EL with SPx",
	"FIQ taken from current EL with SPx",
	"Serr taken from current EL with SPx",
	"Sync taken from lower EL with AARCH32"
	"IRQ taken from lower EL with AARCH32"
	"FIQ taken from lower EL with AARCH32"
	"Serr taken from lower EL with AARCH32"
	"Sync taken from lower EL with AARCH64"
	"IRQ taken from lower EL with AARCH64"
	"FIQ taken from lower EL with AARCH64"
	"Serr taken from lower EL with AARCH64"
};

static const char *esr_class_str[] = {
	[0 ... ESR_ELx_EC_MAX]		= "UNRECOGNIZED EC",
	[ESR_ELx_EC_UNKNOWN]		= "Unknown/Uncategorized",
	[ESR_ELx_EC_WFx]		= "WFI/WFE",
	[ESR_ELx_EC_CP15_32]		= "CP15 MCR/MRC",
	[ESR_ELx_EC_CP15_64]		= "CP15 MCRR/MRRC",
	[ESR_ELx_EC_CP14_MR]		= "CP14 MCR/MRC",
	[ESR_ELx_EC_CP14_LS]		= "CP14 LDC/STC",
	[ESR_ELx_EC_FP_ASIMD]		= "ASIMD",
	[ESR_ELx_EC_CP10_ID]		= "CP10 MRC/VMRS",
	[ESR_ELx_EC_CP14_64]		= "CP14 MCRR/MRRC",
	[ESR_ELx_EC_ILL]		= "PSTATE.IL",
	[ESR_ELx_EC_SVC32]		= "SVC (AArch32)",
	[ESR_ELx_EC_HVC32]		= "HVC (AArch32)",
	[ESR_ELx_EC_SMC32]		= "SMC (AArch32)",
	[ESR_ELx_EC_SVC64]		= "SVC (AArch64)",
	[ESR_ELx_EC_HVC64]		= "HVC (AArch64)",
	[ESR_ELx_EC_SMC64]		= "SMC (AArch64)",
	[ESR_ELx_EC_SYS64]		= "MSR/MRS (AArch64)",
	[ESR_ELx_EC_SVE]		= "SVE",
	[ESR_ELx_EC_IMP_DEF]		= "EL3 IMP DEF",
	[ESR_ELx_EC_IABT_LOW]		= "IABT (lower EL)",
	[ESR_ELx_EC_IABT_CUR]		= "IABT (current EL)",
	[ESR_ELx_EC_PC_ALIGN]		= "PC Alignment",
	[ESR_ELx_EC_DABT_LOW]		= "DABT (lower EL)",
	[ESR_ELx_EC_DABT_CUR]		= "DABT (current EL)",
	[ESR_ELx_EC_SP_ALIGN]		= "SP Alignment",
	[ESR_ELx_EC_FP_EXC32]		= "FP (AArch32)",
	[ESR_ELx_EC_FP_EXC64]		= "FP (AArch64)",
	[ESR_ELx_EC_SERROR]		= "SError",
	[ESR_ELx_EC_BREAKPT_LOW]	= "Breakpoint (lower EL)",
	[ESR_ELx_EC_BREAKPT_CUR]	= "Breakpoint (current EL)",
	[ESR_ELx_EC_SOFTSTP_LOW]	= "Software Step (lower EL)",
	[ESR_ELx_EC_SOFTSTP_CUR]	= "Software Step (current EL)",
	[ESR_ELx_EC_WATCHPT_LOW]	= "Watchpoint (lower EL)",
	[ESR_ELx_EC_WATCHPT_CUR]	= "Watchpoint (current EL)",
	[ESR_ELx_EC_BKPT32]		= "BKPT (AArch32)",
	[ESR_ELx_EC_VECTOR32]		= "Vector catch (AArch32)",
	[ESR_ELx_EC_BRK64]		= "BRK (AArch64)",
};

void bad_mode(gp_regs *regs, int mode)
{
	pr_fatal("bad error: %s\n", mode_info[mode]);
	arch_dump_register(regs);
	panic("Bad error received\n");
}

static const char *get_ec_class_string(int ec)
{
	return esr_class_str[ec];
}

static int kernel_mem_fault(gp_regs *regs, int ec, uint32_t esr)
{
	__panic(regs, "Memory fault in kernel space\n");
}

static int unknown_trap_handler(gp_regs *regs, int ec, uint32_t esr)
{
	__panic(regs, "Unknown exception class: ESR: 0x%x -- %s\n",
			esr, get_ec_class_string(ec));

	return 0;
}

static inline int da_is_write_fault(uint32_t esr)
{
	return !!(esr & ESR_ELx_WNR);
}

static int __handle_user_page_fault(uint64_t addr, int is_write, unsigned long status)
{
	panic("Unsupport User Page Fault\n");

	return -EFAULT;
}
weak_alias(__handle_user_page_fault, handle_user_page_fault);

static int __handle_user_ia_fault(void)
{
	panic("Unsupport User IA Fault\n");

	return -EFAULT;
}
weak_alias(__handle_user_ia_fault, handle_user_ia_fault);

static int user_da_fault(gp_regs *regs, int ec, uint32_t esr)
{
	unsigned long fault_status;
	uint64_t far;
	int is_write;

	switch (esr & ESR_ELx_FSC) {
	case FSC_SEA:
	case FSC_SEA_TTW0:
	case FSC_SEA_TTW1:
	case FSC_SEA_TTW2:
	case FSC_SEA_TTW3:
	case FSC_SECC:
	case FSC_SECC_TTW0:
	case FSC_SECC_TTW1:
	case FSC_SECC_TTW2:
	case FSC_SECC_TTW3:
		panic("TBD\n");
		break;
	default:
		break;
	}

	if (esr & ESR_ELx_FnV) {
		pr_err("far is not vaild external abort ?\n");
		panic("TBD\n");
	}

	/*
	 * currently we only handle FSC_FAULT and FSC_PERM, Access fault
	 * will not support currently.
	 */
	fault_status = esr & ESR_ELx_FSC_TYPE;
	if (fault_status != FSC_FAULT && fault_status != FSC_PERM) {
                pr_err("Unsupported FSC: EC=%#x xFSC=%#lx ESR_EL1=%#lx\n",
				ec, fault_status, esr);
                panic("TBD\n");
        }

	far = read_sysreg(ARM64_FAR);
	is_write = da_is_write_fault(esr);

	return handle_user_page_fault(far, is_write, fault_status);
}

int user_ia_fault(gp_regs *regs, int ec, uint32_t esr)
{
	struct task *task = current;

	pr_err("User instruction abort pid:%d tid:%d ESR:0x%x IP:0x%x\n",
		task->pid, task->tid, esr, regs->pc);

	return handle_user_ia_fault();
}

int user_svc64(gp_regs *regs, int ec, uint32_t esr)
{
	extern int aarch64_do_syscall(gp_regs *regs);

	return aarch64_do_syscall(regs);
}

DEFINE_SYNC_DESC(trap_unknown, EC_TYPE_AARCH64, unknown_trap_handler, 1, 0);
DEFINE_SYNC_DESC(trap_kernel_da, EC_TYPE_AARCH64, kernel_mem_fault, 1, 0);
DEFINE_SYNC_DESC(trap_kernel_ia, EC_TYPE_AARCH64, kernel_mem_fault, 1, 0);
DEFINE_SYNC_DESC(trap_user_da, EC_TYPE_AARCH64, user_da_fault, 1, 0);
DEFINE_SYNC_DESC(trap_user_ia, EC_TYPE_AARCH64, user_ia_fault, 1, 0);
DEFINE_SYNC_DESC(trap_user_svc64, EC_TYPE_AARCH64, user_svc64, 1, 0);

static struct sync_desc *process_sync_descs[] = {
	[0 ... ESR_ELx_EC_MAX] 	= &sync_desc_trap_unknown,
	[ESR_ELx_EC_IABT_CUR]	= &sync_desc_trap_kernel_ia,
	[ESR_ELx_EC_DABT_CUR]	= &sync_desc_trap_kernel_da,
	[ESR_ELx_EC_IABT_LOW]	= &sync_desc_trap_user_ia,
	[ESR_ELx_EC_DABT_LOW]	= &sync_desc_trap_user_da,
	[ESR_ELx_EC_SVC64]	= &sync_desc_trap_user_svc64,
};

static inline uint32_t read_esr(void)
{
#ifdef CONFIG_VIRT
	return read_esr_el2();
#else
	return read_esr_el1();
#endif
}

static void handle_sync_exception(gp_regs *regs)
{
	uint32_t esr_value;
	uint32_t ec_type;
	struct sync_desc *ec;

	esr_value = read_esr();
	ec_type = ESR_ELx_EC(esr_value);
	if (ec_type >= ESR_ELx_EC_MAX)
		panic("unknown sync exception type from current EL %d\n", ec_type);

	/*
	 * for normal userspace process the return address shall
	 * be adjust
	 */
	ec = process_sync_descs[ec_type];
	regs->pc += ec->ret_addr_adjust;
	ec->handler(regs, ec_type, esr_value);
}

void sync_exception_from_current_el(gp_regs *regs)
{
	handle_sync_exception(regs);
}

void sync_exception_from_lower_el(gp_regs *regs)
{
#ifdef CONFIG_VIRT
	extern void handle_vcpu_sync_exception(gp_regs *regs);

	/*
	 * check whether this task is a vcpu task or a normal
	 * userspace task.
	 * 1 - TGE bit means a normal task
	 * 2 - current->flags
	 */
	if ((current->flags & TASK_FLAGS_VCPU) && !(read_hcr_el2() & HCR_EL2_TGE))
		handle_vcpu_sync_exception(regs);
	else
#endif
		handle_sync_exception(regs);
}


================================================
FILE: kernel/arch/aarch64/core/arch.c
================================================
/*
 * Copyright (C) 2018 Min Le (lemin9538@gmail.com)
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

#include <asm/aarch64_common.h>
#include <asm/aarch64_helper.h>
#include <asm/arch.h>
#include <minos/string.h>
#include <minos/print.h>
#include <minos/sched.h>
#include <minos/calltrace.h>
#include <minos/smp.h>
#include <minos/of.h>
#include <minos/platform.h>
#include <minos/task.h>
#include <minos/console.h>
#include <minos/ramdisk.h>
#include <asm/tcb.h>
#include <minos/mm.h>

#ifdef CONFIG_VIRT
#define read_esr()	read_esr_el2()
#else
#define read_esr()	read_esr_el1()
#endif

#ifdef CONFIG_VIRT
extern void vcpu_context_restore(struct task *task);
extern void vcpu_context_save(struct task *task);
#endif

#ifdef CONFIG_DEVICE_TREE
extern void of_parse_host_device_tree(void);
#endif

void arch_dump_register(gp_regs *regs)
{
	unsigned long spsr;

	if (!regs)
		return;

	spsr = regs->pstate;
	pr_fatal("SPSR:0x%x Mode:%d-%s F:%d I:%d A:%d D:%d NZCV:%x\n",
			spsr, (spsr & 0x7), (spsr & 0x8) ?
			"aarch64" : "aarch32", (spsr & (BIT(6))) >> 6,
			(spsr & (BIT(7))) >> 7, (spsr & (BIT(8))) >> 8,
			(spsr & (BIT(9))) >> 9, spsr >> 28);

	pr_fatal("x0:0x%p x1:0x%p x2:0x%p\n",
			regs->x0, regs->x1, regs->x2);
	pr_fatal("x3:0x%p x4:0x%p x5:0x%p\n",
			regs->x3, regs->x4, regs->x5);
	pr_fatal("x6:0x%p x7:0x%p x8:0x%p\n",
			regs->x6, regs->x7, regs->x8);
	pr_fatal("x9:0x%p x10:0x%p x11:0x%p\n",
			regs->x9, regs->x10, regs->x11);
	pr_fatal("x12:0x%p x13:0x%p x14:0x%p\n",
			regs->x12, regs->x13, regs->x14);
	pr_fatal("x15:0x%p x16:0x%p x17:0x%p\n",
			regs->x15, regs->x16, regs->x17);
	pr_fatal("x18:0x%p x19:0x%p x20:0x%p\n",
			regs->x18, regs->x19, regs->x20);
	pr_fatal("x21:0x%p x22:0x%p x23:0x%p\n",
			regs->x21, regs->x22, regs->x23);
	pr_fatal("x24:0x%p x25:0x%p x26:0x%p\n",
			regs->x24, regs->x25, regs->x26);
	pr_fatal("x27:0x%p x28:0x%p x29:0x%p\n",
			regs->x27, regs->x28, regs->x29);
	pr_fatal("lr:0x%p sp_el0:0x%p spsr:0x%p\n",
			regs->lr, regs->sp, regs->pstate);
	pr_fatal("pc:0x%p esr:0x%p\n", regs->pc, read_esr());
}

void arch_dump_stack(gp_regs *regs, unsigned long *stack)
{
	struct task *task = get_current_task();
	unsigned long fp, lr = 0;

	if ((task) && os_is_running()) {
		pr_fatal("current task: tid:%d prio:%d name:%s\n",
				get_task_tid(task), get_task_prio(task),
				task->name);
	}

	arch_dump_register(regs);

	if (!stack) {
		if (regs) {
			fp = regs->x29;
			lr = regs->pc;
		} else {
			fp = arch_get_fp();
			lr = arch_get_lr();
		}
	} else {
		fp = *stack;
	}

	pr_fatal("Call Trace :\n");
	pr_fatal("------------ cut here ------------\n");
	do {
		print_symbol(lr);

		if ((fp < (unsigned long)task->stack_bottom) ||
				(fp >= (unsigned long)task->stack_top))
				break;

		lr = *(unsigned long *)(fp + sizeof(unsigned long));
		lr -= 4;
		fp = *(unsigned long *)fp;
	} while (1);
}

int arch_taken_from_guest(gp_regs *regs)
{
	return !!((regs->pstate & 0xf) != (AARCH64_SPSR_EL2h));
}

int arch_is_exit_to_user(struct task *task)
{
	gp_regs *regs = (gp_regs *)task->stack_base;

	return !!((regs->pstate & 0xf) != (AARCH64_SPSR_EL2h));
}

static inline uint64_t task_ttbr_value(struct task *task)
{
	struct vspace *vs = task->vs;

	return (uint64_t)vtop(vs->pgdp) | ((uint64_t)vs->asid << 48);
}

static inline void user_task_sched_out(struct task *task)
{
	struct cpu_context *c = &task->cpu_context;
	extern void fpsimd_state_save(struct task *task,
		struct fpsimd_context *c);

	c->tpidr_el0 = read_sysreg(TPIDR_EL0);
	fpsimd_state_save(task, &c->fpsimd_state);
}

static inline void user_task_sched_in(struct task *task)
{
	struct cpu_context *c = &task->cpu_context;
	extern void fpsimd_state_restore(struct task *task,
		struct fpsimd_context *c);

	write_sysreg(c->tpidr_el0, TPIDR_EL0);
	write_sysreg(c->tpidrro_el0, TPIDRRO_EL0);
	fpsimd_state_restore(task, &c->fpsimd_state);

	write_sysreg(c->ttbr_el0, TTBR0_EL1);
}

void arch_task_sched_out(struct task *task)
{
	if (!(task->flags & TASK_FLAGS_KERNEL))
		user_task_sched_out(task);
}

void arch_task_sched_in(struct task *task)
{
	if (!(task->flags & TASK_FLAGS_KERNEL))
		user_task_sched_in(task);
}

void arch_init_task(struct task *task, void *entry, void *user_sp, void *arg)
{
	extern void aarch64_task_exit(void);
	gp_regs *regs = stack_to_gp_regs(task->stack_top);

	memset(regs, 0, sizeof(gp_regs));
	task->stack_base = (void *)regs;

	regs->pc = (uint64_t)entry;
	regs->sp = (uint64_t)user_sp;
	regs->x18 = (uint64_t)task;

	if (task->flags & TASK_FLAGS_KERNEL) {
		/*
		 * if the task is not a deadloop the task will exist
		 * by itself like below
		 * int main(int argc, char **argv)
		 * {
		 *	do_some_thing();
		 *	return 0;
		 * }
		 * then the lr register should store a function to
		 * handle the task's exist
		 *
		 * kernel task will not use fpsimd now, so kernel task
		 * do not need to save/restore it
		 */
		regs->lr = (uint64_t)aarch64_task_exit;
		regs->pstate = AARCH64_SPSR_EL1h;
	} else {
		regs->pstate = AARCH64_SPSR_EL0t;
		task->cpu_context.tpidr_el0 = 0;
		task->cpu_context.tpidrro_el0 = (uint64_t)task->pid << 32 | (task->tid);
		task->cpu_context.ttbr_el0 = task_ttbr_value(task);
	}
}

void arch_set_task_user_stack(struct task *task, unsigned long stack)
{
       gp_regs *regs = stack_to_gp_regs(task->stack_top);
       regs->sp = stack;
}

void arch_set_task_reg0(struct task *task, unsigned long data)
{
       gp_regs *regs = stack_to_gp_regs(task->stack_top);
       regs->x0 = data;
}

void arch_set_tls(struct task *task, unsigned long tls)
{
       struct cpu_context *ctx = &task->cpu_context;
       ctx->tpidr_el0 = tls;
}

void arch_set_task_entry_point(struct task *task, long entry)
{
       gp_regs *regs = stack_to_gp_regs(task->stack_top);
       regs->pc = entry;
}

pgd_t *arch_alloc_process_page_table(void)
{
       pgd_t *pgt;

       /*
	* - 3 levels page table.
	* - 4KB page size.
	* - 512G virtual memory space.
	* - 4KB PGD  
        */
       pgt = get_free_pages(1, GFP_KERNEL);
       if (!pgt)
               return NULL;

       memset(pgt, 0, PAGE_SIZE);
       return pgt;
}

int arch_get_asid_size(void)
{
       // TBD, get from the register
       return 256;
}

void arch_release_task(struct task *task)
{

}

static int __init_text aarch64_init_percpu(void)
{
	uint64_t reg;

	reg = read_CurrentEl();
	pr_notice("current EL is %d\n", GET_EL(reg));

	/*
	 * set IMO and FMO let physic irq and fiq taken to
	 * EL2, without this irq and fiq will not send to
	 * the cpu
	 */
#ifdef CONFIG_VIRT
	reg = read_sysreg64(HCR_EL2);
	reg |= HCR_EL2_IMO | HCR_EL2_FMO | HCR_EL2_AMO;
	write_sysreg64(reg, HCR_EL2);
	// write_sysreg64(0x3 << 20, CPACR_EL2);
	dsb();
	isb();
#else
	write_sysreg64(0x3 << 20, CPACR_EL1);
	dsb();
	isb();
#endif

	return 0;
}
arch_initcall_percpu(aarch64_init_percpu);

int arch_early_init(void)
{
#ifdef CONFIG_DEVICE_TREE
	/*
	 * set up the platform from the dtb file then get the spin
	 * table information if the platform is using spin table to
	 * wake up other cores
	 */
	of_setup_platform();
#endif
	return 0;
}

int __arch_init(void)
{
#ifdef CONFIG_DEVICE_TREE
	of_parse_host_device_tree();
#endif
	return 0;
}

uint64_t cpuid_to_affinity(int cpuid)
{
	int aff0, aff1;

	if (cpu_has_feature(ARM_FEATURE_MPIDR_SHIFT))  {
		if (cpuid < CONFIG_NR_CPUS_CLUSTER0)
			return (cpuid << MPIDR_EL1_AFF1_LSB);
		else {
			aff0 = cpuid - CONFIG_NR_CPUS_CLUSTER0;
			aff1 = 1;

			return (aff1 << MPIDR_EL1_AFF2_LSB) |
				(aff0 << MPIDR_EL1_AFF1_LSB);
		}
	} else {
		if (cpuid < CONFIG_NR_CPUS_CLUSTER0) {
			return cpuid;
		} else {
			aff0 = cpuid - CONFIG_NR_CPUS_CLUSTER0;
			aff1 = 1;

			return (aff1 << MPIDR_EL1_AFF1_LSB) + aff0;
		}
	}
}

int affinity_to_cpuid(unsigned long affinity)
{
	int aff0, aff1;

	if (cpu_has_feature(ARM_FEATURE_MPIDR_SHIFT))  {
		aff0 = (affinity >> MPIDR_EL1_AFF1_LSB) & 0xff;
		aff1 = (affinity >> MPIDR_EL1_AFF2_LSB) & 0xff;
	} else {
		aff0 = (affinity >> MPIDR_EL1_AFF0_LSB) & 0xff;
		aff1 = (affinity >> MPIDR_EL1_AFF1_LSB) & 0xff;
	}

	return (aff1 * CONFIG_NR_CPUS_CLUSTER0) + aff0;
}

void arch_smp_init(phy_addr_t *smp_h_addr)
{
#ifdef CONFIG_DEVICE_TREE
	of_spin_table_init(smp_h_addr);
#endif
}

static void *relocate_dtb_address(unsigned long dtb)
{
	unsigned long mem_end, relocated_base = dtb;
	extern unsigned long minos_end;
	size_t size;

	ASSERT(!fdt_check_header((void *)dtb));

	/*
	 * DTB image start address should bigger than minos_end, or
	 * DTB image should included in minos.bin.
	 */
	mem_end = PAGE_BALIGN(ptov(minos_end));
	size = fdt_totalsize(dtb);
	if ((dtb < minos_end) && ((dtb + size) > minos_end))
		panic("minos data overlaped by dtb image\n");

	if (dtb > mem_end) {
		pr_notice("relocate dtb from 0x%x to 0x%x\n", dtb, mem_end);
		memmove((void *)mem_end, (void *)dtb, size);

		/*
		 * call of init again to check and setup the new
		 * device tree memory address.
		 */
		relocated_base = mem_end;
		minos_end += PAGE_BALIGN(size);
	}

	return (void *)relocated_base;
}

void arch_main(void *dtb)
{
	extern void boot_main(void);
	char *name = NULL;

	pr_notice("Starting Minos AARCH64\n");
#ifdef CONFIG_DTB_LOAD_ADDRESS
	dtb = (void *)ptov(CONFIG_DTB_LOAD_ADDRESS);
#else
	dtb = (void *)ptov(dtb);
#endif
	pr_notice("DTB address [0x%x]\n", dtb);

	dtb = relocate_dtb_address((unsigned long)dtb);

	of_init(dtb);
	of_get_console_name(&name);
	console_init(name);

	/*
	 * here start the kernel
	 */
	boot_main();
}


================================================
FILE: kernel/arch/aarch64/core/arm_arch_timer.c
================================================
/*
 * Copyright (C) 2018 Min Le (lemin9538@gmail.com)
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

#include <minos/minos.h>
#include <minos/time.h>
#include <minos/init.h>
#include <asm/io.h>
#include <minos/stdlib.h>
#include <minos/softirq.h>
#include <minos/sched.h>
#include <minos/irq.h>
#include <minos/of.h>
#include <asm/reg.h>
#include <minos/platform.h>
#include <asm/aarch64_reg.h>

enum timer_type {
	SEC_PHY_TIMER,
	NONSEC_PHY_TIMER,
	VIRT_TIMER,
	HYP_TIMER,
	TIMER_MAX,
};

static char *timer_name[TIMER_MAX] = {
	"   sec_phy_timer ",
	"nonsec_phy_timer ",
	"      virt_timer ",
	"hypervisor_timer "
};

struct armv8_timer_info {
	uint32_t irq;
	unsigned long flags;
};

static struct armv8_timer_info timer_info[TIMER_MAX];

uint32_t cpu_khz = 0;
uint64_t boot_tick = 0;

extern unsigned long sched_tick_handler(unsigned long data);

void arch_enable_timer(unsigned long expires)
{
	uint64_t deadline;
	unsigned long ctl;

	if (expires == 0) {
		write_sysreg32(0, ARM64_CNTSCHED_CTL);
		return;
	}

	deadline = ns_to_ticks(expires);
	write_sysreg64(deadline, ARM64_CNTSCHED_CVAL);

	ctl = read_sysreg(ARM64_CNTSCHED_CTL);
	ctl |= CNT_CTL_ENABLE;
	ctl &= ~CNT_CTL_IMASK;
	write_sysreg(ctl, ARM64_CNTSCHED_CTL);
	isb();
}

unsigned long get_sys_ticks(void)
{
	isb();
	return read_sysreg64(CNTPCT_EL0);
}

unsigned long get_current_time(void)
{
	isb();
	return ticks_to_ns(read_sysreg64(CNTPCT_EL0) - boot_tick);
}

unsigned long get_sys_time(void)
{
	isb();
	return ticks_to_ns(read_sysreg64(CNTPCT_EL0));
}

static int __init_text timers_arch_init(void)
{
	int i, ret, from_dt;
	struct armv8_timer_info *info;
	struct device_node *node = NULL;

#ifdef CONFIG_DEVICE_TREE
	node = of_find_node_by_compatible(of_root_node, arm_arch_timer_match_table);
#endif
	if (!node) {
		pr_err("can not find arm-arch-timer\n");
		return -EINVAL;
	}

	for (i = 0; i < TIMER_MAX; i++) {
		info = &timer_info[i];
		ret = get_device_irq_index(node, &info->irq, &info->flags, i);
		if (ret) {
			pr_err("error found in arm timer config\n");
			return -ENOENT;
		}

		pr_notice("%s : %d\n", timer_name[i], info->irq);
	}

	ret = of_get_u32_array(node, "clock-frequency", &cpu_khz, 1);
	if (cpu_khz > 0) {
		cpu_khz = cpu_khz / 1000;
		from_dt = 1;
	} else {
		cpu_khz = read_sysreg32(CNTFRQ_EL0) / 1000;
		from_dt = 0;
	}

	isb();
	boot_tick = read_sysreg64(CNTPCT_EL0);
	pr_notice("clock freq from %s %d\n", from_dt ? "DTB" : "REG", cpu_khz);
	pr_notice("boot ticks is :0x%x\n", boot_tick);

	if (platform->time_init)
		platform->time_init();

#ifdef CONFIG_VIRT
	extern int arch_vtimer_init(uint32_t virtual_irq, uint32_t phy_irq);
	arch_vtimer_init(timer_info[VIRT_TIMER].irq,
			timer_info[NONSEC_PHY_TIMER].irq);
#endif

	return 0;
}

static int timer_interrupt_handler(uint32_t irq, void *data)
{
	extern void soft_timer_interrupt(void);
	unsigned long ctl;

	ctl = read_sysreg(ARM64_CNTSCHED_CTL);
	ctl |= CNT_CTL_IMASK;			// disable the interrupt.
	write_sysreg(ctl, ARM64_CNTSCHED_CTL);

	soft_timer_interrupt();

	return 0;
}

static int __init_text timers_init(void)
{
	struct armv8_timer_info *sched_timer_info = NULL;

#ifdef CONFIG_VIRT
	struct armv8_timer_info *info;
	extern int virtual_timer_irq_handler(uint32_t irq, void *data);

	write_sysreg64(0, CNTVOFF_EL2);

	/* el1/el0 can read CNTPCT_EL0 */
	write_sysreg32(1 << 0, CNTHCTL_EL2);

	/* disable hyper and phy timer */
	write_sysreg32(0, CNTP_CTL_EL0);
	write_sysreg32(0, CNTHP_CTL_EL2);
	isb();

	info = &timer_info[VIRT_TIMER];
	if (info->irq) {
		request_irq(info->irq, virtual_timer_irq_handler,
			info->flags & 0xf, "virt timer irq", NULL);
	}

	sched_timer_info = &timer_info[HYP_TIMER];
#else
	sched_timer_info = &timer_info[VIRT_TIMER];
#endif

	ASSERT(sched_timer_info && sched_timer_info->irq);
	request_irq(sched_timer_info->irq,
			timer_interrupt_handler,
			sched_timer_info->flags & 0xf,
			"sched_timer_int", NULL);

	return 0;
}

subsys_initcall_percpu(timers_init);
subsys_initcall(timers_arch_init);


================================================
FILE: kernel/arch/aarch64/core/asm-offset.c
================================================
/*
 * Copyright (C) 2019 Min Le (lemin9538@gmail.com)
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

#include <minos/kbuild.h>
#include <minos/percpu.h>
#include <minos/task_def.h>

#define __NO_STUBS	1

int main(void)
{
	DEFINE(TASK_INFO_SIZE, sizeof(struct task_info));
	DEFINE(TASK_INFO_FLAGS_OFFSET, offsetof(struct task_info, flags));
	DEFINE(PCPU_SIZE, sizeof(struct pcpu));
	DEFINE(PCPU_ID_OFFSET, offsetof(struct pcpu, pcpu_id));
	DEFINE(PCPU_STACK_OFFSET, offsetof(struct pcpu, stack));
	DEFINE(TASK_SIZE, sizeof(struct task));
	DEFINE(TASK_STACK_OFFSET, offsetof(struct task, stack_base));
	DEFINE(PCPU_CURRENT_TASK, offsetof(struct pcpu, running_task));
	DEFINE(GP_REGS_SIZE, sizeof(gp_regs));
	DEFINE(TASK_USER_REGS_OFFSET, offsetof(struct task, user_regs));

	return 0;
}


================================================
FILE: kernel/arch/aarch64/core/boot.S
================================================
/*
 * Copyright (C) 2018 Min Le (lemin9538@gmail.com)
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

#include <asm/aarch64_common.h>
#include <config/config.h>
#include <asm/asm-offset.h>
#include <asm/asm_marco.S>
#include <asm/aarch64_reg.h>

	.section __start_up, "ax"
	.balign 4

.macro clear_ttbr0
#ifdef CONFIG_VIRT
#ifdef CONFIG_ARM_VHE
	msr     ARM64_TTBR0, xzr
#endif
	tlbi	alle2
#else
	msr     ARM64_TTBR0, xzr
	tlbi	vmalle1
#endif
.endm

	// current task is store in the x18
.macro set_percpu_idle_task tsk, tsk_size, cpuid
	ldr	\tsk, =idle_tasks
	ldr	\tsk_size, =TASK_SIZE
	mul	\tsk_size, \tsk_size, \cpuid
	add	\tsk, \tsk, \tsk_size
	mov	x18, \tsk
.endm

	// TPIDR_ELx will store the pcpu data
.macro set_percpu_pcpu pcpu, pcpu_size, cpuid
	ldr	\pcpu, =pcpus
	ldr	\pcpu_size, =PCPU_SIZE
	mul	\pcpu_size, \pcpu_size, \cpuid
	add	\pcpu, \pcpu, \pcpu_size
	msr	ARM64_TPIDR, \pcpu
	asm_vtop \pcpu
	str	x19, [\pcpu, #PCPU_ID_OFFSET]
.endm

	.global _start
	.type _start, "function"
_start:
	/* interrupt disabled mmu/dcache/icache off */
	msr	daifset, #2
	b	do_start
	.quad   0				/* Image load offset from start of RAM */
        .quad   __code_end - _start		/* reserved */
        .quad   8				/* kernel flags */
        .quad   0				/* reserved */
        .quad   0				/* reserved */
        .quad   0				/* reserved */
        .byte   0x41				/* Magic number, "ARM\x64" */
        .byte   0x52
        .byte   0x4d
        .byte   0x64
        .long   0x0

do_start:
	mov	x27, x0				// save the dtb blob to x27

	// see which level we are now, minos currently can
	// support running on EL1 and EL2 but can not run
	// on EL3.
	mrs	x0, CurrentEl
	mov	x1, x0, lsr #2
	and	x1, x1, #3

	// can not run on EL3.
	cmp	x1, #3
	b.eq	minos_panic

	mov	x26, #0
	cmp	x1, #2

#ifdef CONFIG_VIRT
	b.ne	minos_panic

	mov	x0, 0
	msr	HCR_EL2, x0
	isb

#ifdef CONFIG_ARM_VHE
	// if VHE is enabled, check whether the soc has
	// implement this feature and enable it
	mrs	x0, ID_AA64MMFR1_EL1
	ubfx	x1, x0, #8, #4
	cbz	x1, minos_panic

	mrs	x0, HCR_EL2
	ldr	x1, =HCR_EL2_E2H
	orr	x0, x0, x1
	msr	HCR_EL2, x0
	isb
#endif
#else
	// if current EL is not EL2 then jump to EL1
	// directly, othewise set 1 to x26 indicate that
	// need to jump to EL1
	b.ne	minos_os_start
	mov	x26, #1

	mov	x0, 0
	msr	HCR_EL2, x0
	isb
#endif // CONFIG_VIRT

	// init the EL2 env
	mrs	x0, midr_el1
	mrs	x1, mpidr_el1
	msr	vpidr_el2, x0
	msr	vmpidr_el2, x1

	/*
	 * neither EL3 nor EL2 trap floating point or
	 * accesses to CPACR
	 */
	ldr	x0, =0x300000
	msr	CPTR_EL2, x0

	msr	VTTBR_EL2, xzr
	dsb	sy
	isb

	cmp	x26, #1
	b.ne	minos_os_start

	// drop to EL1
	mov	x1, #15
	msr	ICC_SRE_EL1, x1

	mrs	x1, HCR_EL2
	mov	x2, #HCR_EL2_RW
	orr	x2, x2, x1
	msr	HCR_EL2, x2
	isb

	msr	CPTR_EL2, xzr
	mov	x1, #0
	msr	SCTLR_EL2, x1

	mov	x1, #3
	msr	CNTHCTL_EL2, x1
	dsb	sy
	isb

drop_to_el1:
	adr	x1, minos_os_start
	msr	ELR_EL2, x1
	mov	x1, #(AARCH64_SPSR_EL1h | AARCH64_SPSR_F | AARCH64_SPSR_I | AARCH64_SPSR_A)
	msr	SPSR_EL2, x1
	eret
	dsb	nsh
	isb

minos_os_start:
	adr	x1, _start			// entry address must 4K align
	and	x0, x1, #0xfff
	cbnz	x0, minos_panic

	// minos_start to __code_start is the reserve memory
	// for minos
	ldr	x3, =0xffffffffffe00000
	and	x1, x1, x3
	adr	x2, minos_start
	str	x1, [x2]

	bl	arch_raw_smp_processor_id	// cpuid save to x19
	mov	x19, x0

	/* using current EL stack register */
	msr	spsel, #1
	dsb	nsh
	isb

	ldr	x1, =elx_vectors
	msr	ARM64_VBAR, x1

	/* enable Abort now for early system abort */
	msr	daifclr, #4
	dsb	nsh
	isb

	/* invalid the dcache and flush the tlb */
	bl	inv_dcache_all
	dsb	sy
	isb

#ifdef CONFG_VIRT
	tlbi	alle2
#else
	tlbi	vmalle1
#endif
	dsb	sy
	isb

	ldr	x1, =ARM64_SCTLR_VALUE
	msr	ARM64_SCTLR, x1
	dsb	nsh
	isb

	/* setup the el2 page table */
	ldr	x1, = __stage1_page_table
	asm_vtop x1
	msr     ARM64_TTBR0, x1
	msr     ARM64_TTBR1, x1
	dsb	nsh
	isb

	/*
	 * 0xff440c0400
	 * MT_DEVICE_NGNRNE	0
	 * MT_DEVICE_NGNRE	1
	 * MT_DEVICE_GRE	2
	 * MT_NORMAL_NC		3
	 * MT_NORMAL		4
	 * 0x00 - MT_DEVICE_NGNRNE
	 * 0x04 - MT_DEVICE_NGNRE
	 * 0x0c - MT_DEVICE_GRE
	 * 0x44 - MT_NORMAL_NC
	 * 0xff - MT_NORMAL
	 * 0xbb - MT_NORMAL_WT
	 */
	ldr	x1, =0xbbff440c0400
	msr	ARM64_MAIR, x1

	/* get the physical address range */
	mrs	x0, ID_AA64MMFR0_EL1
	and	x0, x0, #0xf
#if defined(CONFIG_VIRT) && !defined(CONFIG_ARM_VHE)
	mov	x2, x0, lsl #16
	ldr	x3, =0xfffffffffff8ffff
#else
	mov	x2, x0, lsl #32
	ldr	x3, =0xfffffff8ffffffff
#endif

	ldr	x1, =ARM64_TCR_VALUE		// load the value of TCR.
	and	x1, x1, x3			// update the IPA/PA for TCR_ELx.
	orr	x1, x1, x2

	msr     ARM64_TCR, x1			// set the TCR_ELx.
	dsb     sy
	isb

	// idle task is in Current_EL
	mov	x1, #ARM64_SPSR_VALUE
	msr	ARM64_SPSR, x1
	dsb	nsh

	cbnz	x19, secondary_start_up

	ldr	x0, =__minos_end
	asm_vtop x0
	adr	x1, minos_stack_top
	adr	x2, minos_bootmem_base
	adr	x3, minos_stack_bottom

	// store the bootmem base
	add	x0, x0, #4095
	mov	x4, #4095
	mvn	x5, x4
	and	x0, x0, x5
	str	x0, [x2]

	// store the minos stack bottom
	str	x0, [x3]

	// store the minos stack top
	mov	x4, #CONFIG_TASK_STACK_SIZE
	mov	x5, #CONFIG_NR_CPUS
	mul	x5, x4, x5
	add	x0, x0, x5
	str	x0, [x1]

	sub	x0, x0, x19, lsl #CONFIG_TASK_STACK_SHIFT
	asm_ptov x0
	mov	sp, x0

	ldr	x0, =__bss_start
	asm_vtop x0
	mov	x1, #0
	ldr	x2, =__bss_end
	asm_vtop x2
	sub	x2, x2, x0
	bl	memset

	ldr	x0, =__percpu_start
	asm_vtop x0
	mov	x1, #0
	ldr	x2, =__percpu_end
	asm_vtop x2
	sub	x2, x2, x0
	bl	memset

	// map the boot memory when booting
	bl	map_boot_mem
	dsb	ishst
	isb

	// current task is store in the x18
	// x18 will store the current task pointer
	set_percpu_idle_task x0, x1, x19

	// TPIDR_ELx will store the pcpu data
	set_percpu_pcpu x0, x1, x19

	ldr	x26, =mmu_on

	// enable the mmu and disable the aligment check
	mrs	x1, ARM64_SCTLR
	orr	x1, x1, #SCTLR_ELx_M
	orr	x1, x1, #SCTLR_ELx_C
	orr	x1, x1, #SCTLR_ELx_I
	bic	x1, x1, #SCTLR_ELx_SA
	bic	x1, x1, #SCTLR_ELx_A
	msr	ARM64_SCTLR, x1
	dsb	sy
	isb

	br	x26

mmu_on:
	ic	ialluis
	dsb	sy
	isb

	clear_ttbr0

	dsb	sy
	isb
	mov	x0, x27		// restore the dtb address.
	bl	arch_main	// never return.
dead_loop:
	b	dead_loop

secondary_start_up:
	// setup the idle task stack
	adr	x0, minos_stack_top
	ldr	x0, [x0]
	sub	x0, x0, x19, lsl #CONFIG_TASK_STACK_SHIFT
	asm_ptov x0
	mov	sp, x0

	// current task is store in the x18
	// x18 will store the current task pointer
	set_percpu_idle_task x0, x1, x19

	// TPIDR_ELx will store the pcpu data
	set_percpu_pcpu x0, x1, x19

	ldr	x1, =ARM64_SCTLR_VALUE
	msr	ARM64_SCTLR, x1
	dsb	sy
	isb

	ldr     x26, =mmu_on_secondary

	// enable the dcache and the icache
	mrs	x1, ARM64_SCTLR
	orr	x1, x1, #SCTLR_ELx_C
	orr	x1, x1, #SCTLR_ELx_I
	orr	x1, x1, #SCTLR_ELx_M
	bic	x1, x1, #SCTLR_ELx_SA
	bic	x1, x1, #SCTLR_ELx_A
	msr	ARM64_SCTLR, x1
	dsb	sy
	isb

	br	x26

mmu_on_secondary:
	ic	ialluis
	dsb	sy
	isb

	clear_ttbr0

	ldr	x1, =__smp_affinity_id
	add	x1, x1, x19, lsl #3
	mrs	x2, MPIDR_EL1
	ldr	x4, =0x000000ff00ffffff
	and	x2, x2, x4
	str	x2, [x1]
	dsb	sy
	isb

	/* here wait for boot cpu finish tht init work */
	/* pass the cpuid to the boot_secondary */
	mov	x0, x19
	bl	boot_secondary
	nop

minos_panic:
	nop
	b	minos_panic

	.data
	.global minos_start
	.global minos_bootmem_base
	.global minos_stack_top
	.global minos_stack_bottom
	.global minos_end
	.balignl 16, 0xdeadbeef

minos_start:		.quad	0x0
minos_bootmem_base:	.quad	0x0
minos_stack_top:	.quad	0x0
minos_stack_bottom:	.quad	0x0
minos_end:		.quad	0x0


================================================
FILE: kernel/arch/aarch64/core/cache.S
================================================
/*
 * Copyright (C) 2001 Deep Blue Solutions Ltd.
 * Copyright (C) 2012 ARM Ltd.
 * Copyright (C) 1996-2000 Russell King
 * Copyright (C) 2012 ARM Ltd.
 * Copyright (C) 2018 Min Le (lemin9538@gmail.com)
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

#include <asm/aarch64_common.h>
#include <asm/asm_marco.S>

	.global flush_dcache_range
	.global inv_dcache_range
	.global inv_dcache_all
	.global flush_dcache_all
	.global flush_cache_all

.macro	dcache_line_size  reg, tmp
	mrs	\tmp, ctr_el0
	ubfx	\tmp, \tmp, #16, #4
	mov	\reg, #4
	lsl	\reg, \reg, \tmp
.endm

.macro	icache_line_size  reg, tmp
	mrs	\tmp, ctr_el0
	and	\tmp, \tmp, #0xf
	mov	\reg, #4
	lsl	\reg, \reg, \tmp
.endm

.macro do_dcache_maintenance_by_mva op
	/* Exit early if size is zero */
	cbz	x1, exit_loop_\op
	dcache_line_size x2, x3
	add	x1, x0, x1
	sub	x3, x2, #1
	bic	x0, x0, x3
loop_\op:
	dc	\op, x0
	add	x0, x0, x2
	cmp	x0, x1
	b.lo    loop_\op
	dsb	sy
exit_loop_\op:
	ret
.endm

func flush_dcache_range
	do_dcache_maintenance_by_mva civac
endfunc flush_dcache_range

func inv_dcache_range
	do_dcache_maintenance_by_mva ivac
endfunc inv_dcache_range

func inv_dcache_all
	// From the ARM ARMv8-A Architecture Reference Manual
	dmb	ish                   // ensure all prior inner-shareable accesses have been observed
	mrs	x0, CLIDR_EL1
	and	w3, w0, #0x07000000   // get 2 x level of coherence
	lsr	w3, w3, #23
	cbz	w3, finished
	mov	w10, #0               // w10 = 2 x cache level
	mov	w8, #1                // w8 = constant 0b1
loop_level:
	add	w2, w10, w10, lsr #1  // calculate 3 x cache level
	lsr	w1, w0, w2            // extract 3-bit cache type for this level
	and	w1, w1, #0x7
	cmp	w1, #2
	b.lt	next_level            // no data or unified cache at this level
	msr	CSSELR_EL1, x10       // select this cache level
	isb			      // synchronize change of csselr
	mrs	x1, CCSIDR_EL1        // read ccsidr
	and	w2, w1, #7            // w2 = log2(linelen)-4
	add	w2, w2, #4            // w2 = log2(linelen)
	ubfx	w4, w1, #3, #10       // w4 = max way number, right aligned
	clz	w5, w4                // w5 = 32-log2(ways), bit position of way in dc operand
	lsl	w9, w4, w5            // w9 = max way number, aligned to position in dc operand
	lsl	w16, w8, w5           // w16 = amount to decrement way number per iteration
loop_way:
	ubfx	w7, w1, #13, #15      // w7 = max set number, right aligned
	lsl	w7, w7, w2            // w7 = max set number, aligned to position in dc operand
	lsl	w17, w8, w2           // w17 = amount to decrement set number per iteration
loop_set:
	orr	w11, w10, w9          // w11 = combine way number and cache number ...
	orr	w11, w11, w7          // ... and set number for dc operand
	dc	isw, x11              // do data cache invalidate by set and way
	subs	w7, w7, w17           // decrement set number
	b.ge	loop_set
	subs	x9, x9, x16           // decrement way number
	b.ge	loop_way
next_level:
	add	w10, w10, #2          // increment 2 x cache level
	cmp	w3, w10
	b.gt	loop_level
	dsb	sy                    // ensure completion of previous cache maintenance operation
	isb
finished:
	ret
endfunc inv_dcache_all

func flush_dcache_all
	dmb	sy				// ensure ordering with previous memory accesses
	mrs	x0, clidr_el1			// read clidr
	and	x3, x0, #0x7000000		// extract loc from clidr
	lsr	x3, x3, #23			// left align loc bit field
	cbz	x3, finish			// if loc is 0, then no need to clean
	mov	x10, #0				// start clean at cache level 0
loop4:
	add	x2, x10, x10, lsr #1		// work out 3x current cache level
	lsr	x1, x0, x2			// extract cache type bits from clidr
	and	x1, x1, #7			// mask of the bits for current cache only
	cmp	x1, #2				// see what cache we have at this level
	b.lt	skip				// skip if no cache, or just i-cache
	mrs	x9, daif
	msr	daifset, #2
	msr	csselr_el1, x10			// select current cache level in csselr
	isb					// isb to sych the new cssr&csidr
	mrs	x1, ccsidr_el1			// read the new ccsidr
	msr	daif, x9
	and	x2, x1, #7			// extract the length of the cache lines
	add	x2, x2, #4			// add 4 (line length offset)
	mov	x4, #0x3ff
	and	x4, x4, x1, lsr #3		// find maximum number on the way size
	clz	w5, w4				// find bit position of way size increment
	mov	x7, #0x7fff
	and	x7, x7, x1, lsr #13		// extract max number of the index size
loop2:
	mov	x9, x4				// create working copy of max way size
loop3:
	lsl	x6, x9, x5
	orr	x11, x10, x6			// factor way and cache number into x11
	lsl	x6, x7, x2
	orr	x11, x11, x6			// factor index number into x11
	dc	cisw, x11			// clean & invalidate by set/way
	subs	x9, x9, #1			// decrement the way
	b.ge	loop3
	subs	x7, x7, #1			// decrement the index
	b.ge	loop2
skip:
	add	x10, x10, #2			// increment cache number
	cmp	x3, x10
	b.gt	loop4
finish:
	mov	x10, #0				// swith back to cache level 0
	msr	csselr_el1, x10			// select current cache level in csselr
	dsb	sy
	isb
	ret
endfunc flush_dcache_all

/*
 *	flush_cache_all()
 *
 *	Flush the entire cache system.  The data cache flush is now achieved
 *	using atomic clean / invalidates working outwards from L1 cache. This
 *	is done using Set/Way based cache maintainance instructions.  The
 *	instruction cache can still be invalidated back to the point of
 *	unification in a single instruction.
 */
func flush_cache_all
	mov	x12, x30
	bl	flush_dcache_all
	mov	x0, #0
	ic	ialluis				// I+BTB cache invalidate
	ret	x12
endfunc flush_cache_all


================================================
FILE: kernel/arch/aarch64/core/cpu.c
================================================
/*
 * Copyright (C) 2018 Min Le (lemin9538@gmail.com)
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

#include <minos/minos.h>
#include <config/config.h>
#include <minos/arch.h>
#include <minos/of.h>
#include <asm/psci.h>
#include <asm/svccc.h>
#include <asm/cache.h>
#include <minos/mm.h>

extern unsigned char __smp_affinity_id;
extern phy_addr_t smp_holding_address[CONFIG_NR_CPUS];

static inline unsigned long psci_fn(uint32_t id, unsigned long a1,
		unsigned long a2, unsigned long a3)
{
	struct arm_smc_res res;

	smc_call(id, a1, a2, a3, 0, 0, 0, 0, &res);

	return res.a0;
}

static inline unsigned long psci_fn_hvc(uint32_t id, unsigned long a1,
		unsigned long a2, unsigned long a3)
{
	struct arm_smc_res res;

	hvc_call(id, a1, a2, a3, 0, 0, 0, 0, &res);

	return res.a0;
}

int psci_cpu_on(unsigned long cpu, unsigned long entry)
{
	return (int)psci_fn(PSCI_0_2_FN_CPU_ON, cpu, entry, 0);
}

int psci_cpu_off(unsigned long cpu)
{
	return (int)psci_fn(PSCI_0_2_FN_CPU_OFF, cpu, 0, 0);
}

void psci_system_reboot(int mode, const char *cmd)
{
	psci_fn(PSCI_0_2_FN_SYSTEM_RESET, 0, 0, 0);
}

void psci_system_shutdown(void)
{
	psci_fn(PSCI_0_2_FN_SYSTEM_OFF, 0, 0, 0);
}

int psci_cpu_on_hvc(unsigned long cpu, unsigned long entry)
{
	return (int)psci_fn_hvc(PSCI_0_2_FN_CPU_ON, cpu, entry, 0);
}

int psci_cpu_off_hvc(unsigned long cpu)
{
	return (int)psci_fn_hvc(PSCI_0_2_FN_CPU_OFF, cpu, 0, 0);
}

void psci_system_reboot_hvc(int mode, const char *cmd)
{
	psci_fn_hvc(PSCI_0_2_FN_SYSTEM_RESET, 0, 0, 0);
}

void psci_system_shutdown_hvc(void)
{
	psci_fn_hvc(PSCI_0_2_FN_SYSTEM_OFF, 0, 0, 0);
}

int spin_table_cpu_on(unsigned long affinity, unsigned long entry)
{
	void *addr;
	int cpu = affinity_to_cpuid(affinity);

	if (smp_holding_address[cpu] != 0) {
		addr = io_remap(smp_holding_address[cpu], sizeof(uint64_t));
		*(unsigned long *)addr = entry;

		/* flush the cache and send signal to other cpu */
		flush_dcache_range((unsigned long)addr, PAGE_SIZE);
		sev();
		io_unmap((virt_addr_t)addr, sizeof(unsigned long));
		return 0;
	}

	return -EINVAL;
}


================================================
FILE: kernel/arch/aarch64/core/cpu_feature.c
================================================
/*
 * Copyright (C) 2020 Min Le (lemin9538@gmail.com)
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

#include <minos/minos.h>
#include <asm/aarch64_helper.h>
#include <asm/arch.h>
#include <asm/cpu_feature.h>
#include <minos/mm.h>

#define CPU_FEATURE_BITS	128

#define CPU_FEATURE_VHE		0

static DEFINE_PER_CPU(unsigned long *, cpu_feature);

int cpu_has_feature(int feature)
{
	int ret;
	unsigned long *cf;

	if (feature >= CPU_FEATURE_BITS)
		return 0;

	cf = get_cpu_data(cpu_feature);
	ret = test_bit(feature, cf);
	put_cpu_data(cpu_feature);

	return ret;
}

int cpu_has_vhe(void)
{
	static int vhe_enable = -1;

	if (vhe_enable == -1) {
		vhe_enable = cpu_has_feature(CPU_FEATURE_VHE);
	}

	return vhe_enable;
}

static int arch_cpu_feature_init(void)
{
	unsigned long *cf;
	uint64_t value;

	cf = malloc(BITS_TO_LONGS(CPU_FEATURE_BITS));
	if (!cf)
		panic("can not allocate memory for cpu feature\n");

	memset(cf, 0, BITMAP_SIZE(CPU_FEATURE_BITS));
	get_cpu_var(cpu_feature) = cf;

	value = read_mpidr_el1();
	if (value & MPIDR_EL1_MT)
		set_bit(ARM_FEATURE_MPIDR_SHIFT, cf);

	return 0;
}
arch_initcall_percpu(arch_cpu_feature_init);


================================================
FILE: kernel/arch/aarch64/core/entry.S
================================================
/*
 * Copyright (C) 2004-2017 ARM Ltd. All rights reserved.
 * Copyright (C) 2018 Min Le (lemin9538@gmail.com)
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

#include <asm/aarch64_common.h>
#include <config/config.h>
#include <asm/asm_marco.S>

// .align n = align 2^n
// balign 0x80 = align with 0x80 boundary.

	.global elx_vectors

	.section __el2_vectors, "ax"
	.align 12

.macro BAD_MODE mode
	stp	x29, x30, [sp, #-16]
	mov	x29, #\mode
	b	__bad_mode
.endm

elx_vectors:
c0sync:		// Current EL with SP0
	BAD_MODE VECTOR_C0_SYNC
	.balign 0x80
c0irq:
	BAD_MODE VECTOR_C0_IRQ
	.balign 0x80
c0fiq:
	BAD_MODE VECTOR_C0_FIQ
	.balign 0x80
c0serr:
	BAD_MODE VECTOR_C0_SERR
	.balign 0x80	// Current EL with SPx
cxsync:
	b __sync_exception_from_current_el
	.balign 0x80
cxirq:
	b __irq_exception_from_current_el
	.balign 0x80
cxfiq:
	BAD_MODE VECTOR_CX_FIQ
	.balign 0x80
cxserr:
	BAD_MODE VECTOR_CX_SERR
	.balign 0x80	//Lower EL using AArch64
l64sync:
	b __sync_exception_from_lower_el
	.balign 0x80
l64irq:
	b __irq_exception_from_lower_el
	.balign 0x80
l64fiq:
	BAD_MODE VECTOR_L64_FIQ
	.balign 0x80
l64serr:
	BAD_MODE VECTOR_L64_SERR
	.balign 0x80	// Lower EL using AArch32
l32sync:
	b __sync_exception_from_lower_el
	.balign 0x80
l32irq:
	b __irq_exception_from_lower_el
	.balign 0x80
l32fiq:
	BAD_MODE VECTOR_L32_FIQ
	.balign 0x80
l32serr:
	BAD_MODE VECTOR_L32_SERR
	.balign 0x80


================================================
FILE: kernel/arch/aarch64/core/fpsimd.c
================================================
/*
 * Copyright (C) 2020 Min Le (lemin9538@gmail.com)
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

#include <minos/minos.h>
#include <asm/tcb.h>
#include <minos/task.h>

void fpsimd_state_save(struct task *task, struct fpsimd_context *c)
{
#ifdef CONFIG_VIRT
	if (task_is_vcpu(task) && task_is_32bit(task))
		c->fpexc32_el2 = read_sysreg32(FPEXC32_EL2);
#endif

	c->fpsr = read_sysreg32(FPSR);
	c->fpcr = read_sysreg32(FPCR);

	asm volatile("stp q0, q1, [%1, #16 * 0]\n\t"
		     "stp q2, q3, [%1, #16 * 2]\n\t"
		     "stp q4, q5, [%1, #16 * 4]\n\t"
                     "stp q6, q7, [%1, #16 * 6]\n\t"
                     "stp q8, q9, [%1, #16 * 8]\n\t"
                     "stp q10, q11, [%1, #16 * 10]\n\t"
                     "stp q12, q13, [%1, #16 * 12]\n\t"
                     "stp q14, q15, [%1, #16 * 14]\n\t"
                     "stp q16, q17, [%1, #16 * 16]\n\t"
                     "stp q18, q19, [%1, #16 * 18]\n\t"
                     "stp q20, q21, [%1, #16 * 20]\n\t"
                     "stp q22, q23, [%1, #16 * 22]\n\t"
                     "stp q24, q25, [%1, #16 * 24]\n\t"
                     "stp q26, q27, [%1, #16 * 26]\n\t"
                     "stp q28, q29, [%1, #16 * 28]\n\t"
                     "stp q30, q31, [%1, #16 * 30]\n\t"
                     : "=Q" (*c->regs) : "r" (c->regs));
}

void fpsimd_state_restore(struct task *task, struct fpsimd_context *c)
{
#ifdef CONFIG_VIRT
	if (task_is_vcpu(task) && task_is_32bit(task))
		write_sysreg(c->fpexc32_el2, FPEXC32_EL2);
#endif

	write_sysreg(c->fpsr, FPSR);
	write_sysreg(c->fpcr, FPCR);

	asm volatile("ldp q0, q1, [%1, #16 * 0]\n\t"
		     "ldp q2, q3, [%1, #16 * 2]\n\t"
                     "ldp q4, q5, [%1, #16 * 4]\n\t"
                     "ldp q6, q7, [%1, #16 * 6]\n\t"
                     "ldp q8, q9, [%1, #16 * 8]\n\t"
                     "ldp q10, q11, [%1, #16 * 10]\n\t"
                     "ldp q12, q13, [%1, #16 * 12]\n\t"
                     "ldp q14, q15, [%1, #16 * 14]\n\t"
                     "ldp q16, q17, [%1, #16 * 16]\n\t"
                     "ldp q18, q19, [%1, #16 * 18]\n\t"
                     "ldp q20, q21, [%1, #16 * 20]\n\t"
                     "ldp q22, q23, [%1, #16 * 22]\n\t"
                     "ldp q24, q25, [%1, #16 * 24]\n\t"
                     "ldp q26, q27, [%1, #16 * 26]\n\t"
                     "ldp q28, q29, [%1, #16 * 28]\n\t"
                     "ldp q30, q31, [%1, #16 * 30]\n\t"
                     : : "Q" (*c->regs), "r" (c->regs));

}


================================================
FILE: kernel/arch/aarch64/core/mem_map.S
================================================
/*
 * Copyright (C) 2018 Min Le (lemin9538@gmail.com)
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

#include <asm/aarch64_common.h>
#include <config/config.h>
#include <asm/asm_marco.S>
#include "stage1.h"
#include <asm/aarch64_reg.h>

	/*
	 * map the code memory VA->PA, if need to using
	 * dcache need to enable the MMU, first clear
	 * the page table, below is the var defination
	 * Note, this function will call memset, and memset
	 * will use x0 - x4, so need pay attention for x0-x4
	 * if there some value saved in these register
	 */
page_table	.req	x24
ttb0_pgd	.req	x20
ttb0_pud	.req	x21
ttb0_pmd	.req	x22

vaddr		.req	x5
paddr		.req	x6
size		.req	x7
pte_attr	.req	x8

tmp_const	.req	x9
pud_tmp		.req	x10
pmd_tmp		.req	x12
tmp		.req	x13
pte_value	.req	x14
pte_index	.req	x15
entry_size	.req	x16
entry_align	.req	x17
entry_mask	.req	x18
pagetable_base	.req	x23		// store the pagetable for page allocation

	.section __start_up, "ax"
	.balign 4

	.global	map_boot_mem

.macro asm_get_boot_page reg
	mov	\reg, pagetable_base
	add	pagetable_base, pagetable_base, #4096
.endm

#define HOST_TABLE_DES	(S1_DES_TABLE | S1_TABLE_UAP | S1_TABLE_UXN)

map_boot_mem:
	/* save the lr register */
	mov	x26, x30

	/* get the base address of free memory */
	adr	pagetable_base, minos_stack_top
	ldr	pagetable_base, [pagetable_base]

	/* kernel pgd is defined in lds */
	mov	x1, #0
	mov	x2, #4096
	ldr	page_table, = __stage1_page_table
	asm_vtop page_table
	mov	x0, page_table
	bl	memset

	// boot memory must at 0 - 4GB space, here will
	// alloc all the 4GB memory's PUD
	bl	build_page_table

	// map the reserve memory as rw
	adr	vaddr, minos_start
	ldr	vaddr, [vaddr]
	ldr	tmp, =__code_start
	asm_vtop tmp
	sub	size, tmp, vaddr
	cbz	size, __map_code_section
	mov	paddr, vaddr
	ldr	pte_attr, =BOOTMEM_DATA_ATTR
	bl	build_normal_pte_table

	// map the code section rx
__map_code_section:
	ldr	vaddr, =__code_start
	ldr	tmp, =__code_end
	sub	size, tmp, vaddr
	asm_vtop vaddr
	mov	paddr, vaddr
	ldr	pte_attr, =BOOTMEM_CODE_ATTR
	bl	build_normal_pte_table

	// map the init data section rwx, data section will
	// be freed after system is bootup
	ldr	vaddr, =__init_start
	ldr	tmp, =__init_end
	sub	size, tmp, vaddr
	asm_vtop vaddr
	mov	paddr, vaddr
	ldr	pte_attr, =BOOTMEM_INIT_ATTR
	bl	build_normal_pte_table

	// map the data section
	ldr	vaddr, =__data_start
	ldr	tmp, =__data_end
	sub	size, tmp, vaddr
	asm_vtop vaddr
	mov	paddr, vaddr
	ldr	pte_attr, =BOOTMEM_DATA_ATTR
	bl	build_normal_pte_table

	// map the RO data section like symbol and string
	// RO section is the last section in the dts, so the
	// the range is from __rodata_start to minos_bootmem_base
	ldr	vaddr, =__rodata_start
	asm_vtop vaddr
	adr	tmp, minos_bootmem_base
	ldr	tmp, [tmp]
	sub	size, tmp, vaddr
	mov	paddr, vaddr
	ldr	pte_attr, =BOOTMEM_DATA_RO_ATTR
	bl	build_normal_pte_table

	// map the left 4K pages
	adr	vaddr, minos_bootmem_base
	ldr	vaddr, [vaddr]
	mov	tmp, vaddr
	ldr	entry_mask, =0x1fffff
	add	tmp, tmp, entry_mask
	mvn	entry_align, entry_mask
	and	tmp, tmp, entry_align
	mov	paddr, vaddr
	sub	size, tmp, vaddr
	ldr	pte_attr, =BOOTMEM_DATA_ATTR
	bl	build_normal_pte_table

	// map the UART memory for early log rw-device
	ldr	vaddr, =CONFIG_UART_BASE
	mov	paddr, vaddr
	ldr	size, =CONFIG_UART_IO_SIZE
	ldr	pte_attr, =BOOTMEM_IO_ATTR
	bl	build_io_pte_table

	// update the pagetable base
	adr	x0, minos_end
	str	pagetable_base, [x0]

	ret	x26

build_normal_pmd_table:
	mov	x25, x30
	ldr	entry_mask, =0x1fffff
	ldr	entry_align, =0xffe00000

	ret	x25

build_io_pte_table:
	mov	x25, x30

	ldr	entry_size, =0x1000
	ldr	entry_mask, =0xfff
	ldr	entry_align, =0xfffffffffffff000

	// alloc one page to map 2M IO pmd
	mov	x0, pagetable_base
	add	pagetable_base, pagetable_base, #4096
	mov	pmd_tmp, x0
	mov	x1, #0
	mov	x2, #4096
	bl	memset

	// if the memory region is not in a 2M range ?
	add	x1, vaddr, size
	add	x1, x1, entry_mask
	and	x1, x1, entry_align

	and	vaddr, vaddr, entry_align
	and	paddr, paddr, entry_align
	sub	size, x1, vaddr

	ubfx	x0, vaddr, #21, #11
	ldr	x1, =HOST_TABLE_DES
	orr	x1, pmd_tmp, x1
	str	x1, [ttb0_pud, x0, lsl #3]

	ldr	entry_align, =0x1fffff
	and	x2, vaddr, entry_align
	lsr	x2, x2, #12
	orr	paddr, paddr, pte_attr

loop_io_pte:
	str	paddr, [pmd_tmp, x2, lsl #3]
	sub	size, size, entry_size
	add	paddr, paddr, entry_size
	add	x2, x2, #1
	cbnz	size, loop_io_pte
	ret	x25

build_normal_pte_table:
	ldr	entry_size, =0x1000
	ldr	entry_mask, =0xfff
	ldr	entry_align, =0xfffffffffffff000

	// the va and pa must page align, so the info
	// from lds must correct
	and	vaddr, vaddr, entry_align
	and	paddr, paddr, entry_align
	and	size, size, entry_align

	// get the va offset in bootmem
	adr	x0, minos_start
	ldr	x0, [x0]
	sub	x0, vaddr, x0
	ubfx	pte_index, x0, #12, #20
	mov	pmd_tmp, ttb0_pmd
	add	pmd_tmp, pmd_tmp, pte_index, lsl #3

	bic	paddr, paddr, entry_mask
	bic	paddr, paddr, #0xffff000000000000
	orr	paddr, paddr, pte_attr

loop_normal_pte:
	cbz	size, exit_loop
	str	paddr, [pmd_tmp]
	sub	size, size, entry_size
	add	pmd_tmp, pmd_tmp, #8
	add	paddr, paddr, entry_size
	b	loop_normal_pte
exit_loop:
	ret

build_page_table:
	mov	x25, x30

	// map first 4GB for minos boot memory, here
	// need 4 pages
	mov	x3, #4
	mov	ttb0_pud, pagetable_base
	ldr	x2, =(4096 << 2)
	add	pagetable_base, pagetable_base, x2
	mov	x0, ttb0_pud
	mov	x1, #0
	bl	memset

	mov	vaddr, #0x0
	mov	entry_size, #4
	mov	tmp, ttb0_pud
	mov	pte_index, 0
	ldr	x1, =HOST_TABLE_DES
loop_pud:
	orr	pte_value, tmp, x1
	str	pte_value, [page_table, pte_index, lsl #3]
	add	pte_index, pte_index, #1
	add	tmp, tmp, #0x1000
	sub	entry_size, entry_size, #1
	cbnz	entry_size, loop_pud

	// count how many memory is mapped as 4K page
	// other memory will mapped as PMD block
	adr	vaddr, minos_bootmem_base
	ldr	vaddr, [vaddr]
	mov	tmp, vaddr
	ldr	entry_mask, =0x1fffff
	add	tmp, tmp, entry_mask
	mvn	entry_align, entry_mask
	and	tmp, tmp, entry_align
	adr	pte_value, minos_start
	ldr	pte_value, [pte_value]

	// size record the 4K page size
	// tmp_const record the 2M block start address
	mov	tmp_const, tmp
	sub	size, tmp, pte_value

	lsr	x3, size, #21
	lsl	x2, x3, #12

	mov	ttb0_pmd, pagetable_base
	add	pagetable_base, pagetable_base, x2
	mov	x0, ttb0_pmd
	mov	x1, #0
	bl	memset

	// minos_start address 2M align minos_start
	// will set at boot stage correctly
	adr	vaddr, minos_start
	ldr	vaddr, [vaddr]

	lsr	pte_index, vaddr, #21
	mov	tmp, ttb0_pmd
	ldr	x1, =HOST_TABLE_DES
loop_pmd:
	orr	pte_value, tmp, x1
	str	pte_value, [ttb0_pud, pte_index, lsl #3]
	add	pte_index, pte_index, #1
	add	tmp, tmp, #4096
	sub	x3, x3, #1
	cbnz	x3, loop_pmd

	// continue map the pmd block memory
	ldr	x2, =CONFIG_MINOS_RAM_SIZE
	sub	size, x2, size
	lsr	size, size, #21
	ldr	entry_mask, =0x200000

	mov	paddr, tmp_const
	ldr	pte_attr, =BOOTMEM_DATA_BLK_ATTR
loop_pmd_blk:
	orr	pte_value, paddr, pte_attr
	str	pte_value, [ttb0_pud, pte_index, lsl #3]
	add	pte_index, pte_index, #1
	add	paddr, paddr, entry_mask
	sub	size, size, #1
	cbnz	size, loop_pmd_blk

	ret	x25


================================================
FILE: kernel/arch/aarch64/core/stage1.c
================================================
/*
 * Copyright (C) 2020 Min Le (lemin9538@gmail.com)
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

#include <minos/minos.h>
#include <minos/mm.h>
#include <asm/tlb.h>
#include <asm/cache.h>
#include "stage1.h"

/*
 * 40bit stage1 IPA use 3 levels page table, the pagetable
 * need 2 pages
 */
#define S1_PGTABLE_LEVELS		3
#define S1_PAGETABLE_SIZE		4096

#define S1_PGD_SHIFT			39
#define S1_PGD_SIZE			(1UL << S1_PGD_SHIFT)
#define S1_PGD_MASK			(~(S1_PGD_SIZE - 1))

#define S1_PUD_SHIFT			30
#define S1_PUD_SIZE			(1UL << S1_PUD_SHIFT)
#define S1_PUD_MASK			(~(S1_PUD_SIZE - 1))

#define S1_PMD_SHIFT			21
#define S1_PMD_SIZE			(1UL << S1_PMD_SHIFT)
#define S1_PMD_MASK			(~(S1_PMD_SIZE - 1))

#define S1_PTE_SHIFT			12
#define S1_PTE_SIZE			(1UL << S1_PTE_SHIFT)
#define S1_PTE_MASK			(~(S1_PTE_SIZE - 1))

#define S1_PHYSICAL_MASK		0x0000fffffffff000UL
#define S1_PHYSICAL_MAX			(1UL << 40)
#define S1_VIRT_MAX			(1UL << 39)

/*
 * The number of PTRS across all concatenated stage1 tables given by the
 * number of bits resolved at the initial level.
 *
 * since we use 3 level pagetable, and translation walk will from pud, the
 * PTRS in one pud is 1024
 */
#define PTRS_PER_S1_PGD			512
#define PTRS_PER_S1_PUD			512
#define PTRS_PER_S1_PMD			512
#define PTRS_PER_S1_PTE			512

#define stage1_pud_value(pudp)		(*(pudp))
#define stage1_pmd_value(pmdp)		(*(pmdp))
#define stage1_pte_value(ptep)		(*(ptep))

#define stage1_pgd_index(addr)		(((addr) >> S1_PGD_SHIFT) & (PTRS_PER_S1_PGD - 1))
#define stage1_pud_index(addr)		(((addr) >> S1_PUD_SHIFT) & (PTRS_PER_S1_PUD - 1))
#define stage1_pmd_index(addr)		(((addr) >> S1_PMD_SHIFT) & (PTRS_PER_S1_PMD - 1))
#define stage1_pte_index(addr)		(((addr) >> S1_PTE_SHIFT) & (PTRS_PER_S1_PTE - 1))

#define stage1_pgd_offset(pgdp, addr)		((pgd_t *)(pgdp) + stage1_pgd_index((unsigned long)addr))
#define stage1_pud_offset(pudp, addr)		((pud_t *)(pudp) + stage1_pud_index((unsigned long)addr))
#define stage1_pmd_offset(pmdp, addr)		((pmd_t *)(pmdp) + stage1_pmd_index((unsigned long)addr))
#define stage1_pte_offset(ptep, addr)		((pte_t *)(ptep) + stage1_pte_index((unsigned long)addr))

#define stage1_pud_huge(pud)			((pud) && ((pud) & 0x03) == S1_DES_BLOCK)
#define stage1_pmd_huge(pmd)			((pmd) && ((pmd) & 0x03) == S1_DES_BLOCK)

#define stage1_pud_table_addr(pgd)		(pud_t *)(unsigned long)((pgd) & S1_PHYSICAL_MASK)
#define stage1_pmd_table_addr(pud)		(pmd_t *)(unsigned long)((pud) & S1_PHYSICAL_MASK)
#define stage1_pte_table_addr(pmd)		(pte_t *)(unsigned long)((pmd) & S1_PHYSICAL_MASK)

#define stage1_pgd_none(pgd)			((pgd) == 0)
#define stage1_pud_none(pud)			((pud) == 0)
#define stage1_pmd_none(pmd)			((pmd) == 0)
#define stage1_pte_none(pte)			((pte) == 0)

#define stage1_phy_pte(pte)			(void *)((pte) & S1_PHYSICAL_MASK)
#define stage1_phy_pmd(pmd)			(void *)((pmd) & S1_PHYSICAL_MASK)

static void inline flush_tlb_va_range(unsigned long va, size_t size)
{
	flush_tlb_va_host(va, size);
}

static inlin
Download .txt
gitextract_nsoa8kf4/

├── .gitignore
├── Makefile
├── README.md
├── generic/
│   └── include/
│       └── uapi/
│           ├── bootdata.h
│           ├── gvm.h
│           ├── hypervisor.h
│           ├── ramdisk.h
│           ├── time.h
│           └── virtio_mmio.h
├── kernel/
│   ├── .gitignore
│   ├── Kconfig
│   ├── LICENSE
│   ├── Makefile
│   ├── VERSION
│   ├── apps/
│   │   ├── Kconfig
│   │   ├── Makefile
│   │   ├── esh/
│   │   │   ├── COPYING
│   │   │   ├── Kconfig
│   │   │   ├── Makefile
│   │   │   ├── README.md
│   │   │   ├── esh.c
│   │   │   ├── esh.h
│   │   │   ├── esh_argparser.c
│   │   │   ├── esh_argparser.h
│   │   │   ├── esh_config.h
│   │   │   ├── esh_hist.c
│   │   │   ├── esh_hist.h
│   │   │   ├── esh_incl_config.h
│   │   │   ├── esh_internal.h
│   │   │   └── shell.c
│   │   └── init.c
│   ├── arch/
│   │   └── aarch64/
│   │       ├── Kconfig
│   │       ├── Makefile
│   │       ├── core/
│   │       │   ├── Kconfig
│   │       │   ├── Makefile
│   │       │   ├── aarch64.S
│   │       │   ├── aarch64_IRQ.c
│   │       │   ├── aarch64_sync.c
│   │       │   ├── arch.c
│   │       │   ├── arm_arch_timer.c
│   │       │   ├── asm-offset.c
│   │       │   ├── boot.S
│   │       │   ├── cache.S
│   │       │   ├── cpu.c
│   │       │   ├── cpu_feature.c
│   │       │   ├── entry.S
│   │       │   ├── fpsimd.c
│   │       │   ├── mem_map.S
│   │       │   ├── stage1.c
│   │       │   ├── stage1.h
│   │       │   └── vector.S
│   │       ├── include/
│   │       │   └── asm/
│   │       │       ├── aarch64_common.h
│   │       │       ├── aarch64_el1_reg.h
│   │       │       ├── aarch64_el2_reg.h
│   │       │       ├── aarch64_el2_vhe_reg.h
│   │       │       ├── aarch64_helper.h
│   │       │       ├── aarch64_reg.h
│   │       │       ├── arch.h
│   │       │       ├── asm_current.h
│   │       │       ├── asm_marco.S
│   │       │       ├── asm_types.h
│   │       │       ├── atomic.h
│   │       │       ├── barrier.h
│   │       │       ├── bitops.h
│   │       │       ├── cache.h
│   │       │       ├── cmpxchg.h
│   │       │       ├── cpu_feature.h
│   │       │       ├── div64.h
│   │       │       ├── gic_reg.h
│   │       │       ├── io.h
│   │       │       ├── power.h
│   │       │       ├── psci.h
│   │       │       ├── reg.h
│   │       │       ├── svccc.h
│   │       │       ├── syscall.h
│   │       │       ├── tcb.h
│   │       │       ├── time.h
│   │       │       ├── tlb.h
│   │       │       ├── trap.h
│   │       │       ├── uaccess.h
│   │       │       ├── virt.h
│   │       │       └── vtcb.h
│   │       ├── lds/
│   │       │   ├── Makefile
│   │       │   └── minos.lds.S
│   │       ├── lib/
│   │       │   ├── Makefile
│   │       │   ├── atomic.S
│   │       │   ├── bitops.S
│   │       │   ├── memchr.S
│   │       │   ├── memcmp.S
│   │       │   ├── memcpy.S
│   │       │   ├── memmove.S
│   │       │   ├── memset.S
│   │       │   ├── spinlock.S
│   │       │   ├── strchr.S
│   │       │   ├── strcmp.S
│   │       │   ├── strcpy.S
│   │       │   ├── strlen.S
│   │       │   ├── strncmp.S
│   │       │   ├── strnlen.S
│   │       │   ├── strrchr.S
│   │       │   └── ticket_lock.S
│   │       ├── userspace/
│   │       │   ├── Makefile
│   │       │   └── asm_syscall.c
│   │       └── virt/
│   │           ├── Kconfig
│   │           ├── Makefile
│   │           ├── arch_virt.c
│   │           ├── smc_service.c
│   │           ├── stage2.c
│   │           ├── stage2.h
│   │           ├── svc_service.c
│   │           ├── trap.c
│   │           ├── vfp.c
│   │           ├── vmsa.c
│   │           └── vtimer.c
│   ├── configs/
│   │   ├── espressobin_defconfig
│   │   ├── fvp_a76_defconfig
│   │   ├── fvp_defconfig
│   │   ├── fvp_rtos_defconfig
│   │   ├── kvim3_defconfig
│   │   ├── qemu_arm64_defconfig
│   │   ├── r8a7795_defconfig
│   │   ├── rpi_3_defconfig
│   │   └── rpi_4_defconfig
│   ├── core/
│   │   ├── Kconfig
│   │   ├── Makefile
│   │   ├── bitmap.c
│   │   ├── bootarg.c
│   │   ├── calltrace.c
│   │   ├── delay.c
│   │   ├── event.c
│   │   ├── find_bit.c
│   │   ├── flag.c
│   │   ├── hook.c
│   │   ├── host_vspace.c
│   │   ├── hweight.c
│   │   ├── idle.c
│   │   ├── init.c
│   │   ├── iomem.c
│   │   ├── irq.c
│   │   ├── kmem.c
│   │   ├── mbox.c
│   │   ├── mem.c
│   │   ├── minos.c
│   │   ├── mutex.c
│   │   ├── page.c
│   │   ├── percpu.c
│   │   ├── print.c
│   │   ├── queue.c
│   │   ├── ramdisk.c
│   │   ├── sched.c
│   │   ├── sem.c
│   │   ├── slab.c
│   │   ├── smp.c
│   │   ├── stdlib.c
│   │   ├── string.c
│   │   ├── task.c
│   │   └── timer.c
│   ├── drivers/
│   │   ├── Kconfig
│   │   ├── Makefile
│   │   ├── console.c
│   │   ├── device_id.c
│   │   ├── iommu/
│   │   │   ├── Kconfig
│   │   │   ├── Makefile
│   │   │   ├── ipmmu-plat.c
│   │   │   └── ipmmu.c
│   │   ├── irq-chips/
│   │   │   ├── Kconfig
│   │   │   ├── Makefile
│   │   │   ├── gicv2.c
│   │   │   ├── gicv3.c
│   │   │   ├── irq-bcm2836.c
│   │   │   └── irqchip.c
│   │   ├── of/
│   │   │   ├── Kconfig
│   │   │   ├── Makefile
│   │   │   ├── of.c
│   │   │   └── of_mm.c
│   │   ├── serial/
│   │   │   ├── Kconfig
│   │   │   ├── Makefile
│   │   │   ├── pl011.h
│   │   │   ├── serial_bcm283x_mu.c
│   │   │   ├── serial_meson.c
│   │   │   ├── serial_mvebu_a3700.c
│   │   │   ├── serial_pl011.c
│   │   │   └── serial_scif.c
│   │   └── tty.c
│   ├── dtbs/
│   │   ├── Makefile
│   │   ├── armada-3720-community-v5.dts
│   │   ├── bcm2837-rpi-3-b-plus.dts
│   │   ├── bcm2838-rpi-4-b-32bit.dts
│   │   ├── bcm2838-rpi-4-b.dts
│   │   ├── foundation-v8-gicv2.dts
│   │   ├── foundation-v8-gicv3-zephyr.dts
│   │   ├── foundation-v8-gicv3.dts
│   │   ├── kvim3.dts
│   │   ├── qemu-arm64.dts
│   │   └── r8a7795.dts
│   ├── include/
│   │   ├── device/
│   │   │   ├── bcm_irq.h
│   │   │   ├── gicv2.h
│   │   │   └── gicv3.h
│   │   ├── libfdt/
│   │   │   ├── fdt.h
│   │   │   ├── libfdt.h
│   │   │   └── libfdt_env.h
│   │   ├── minos/
│   │   │   ├── arch.h
│   │   │   ├── atomic.h
│   │   │   ├── bitmap.h
│   │   │   ├── bitops.h
│   │   │   ├── bootarg.h
│   │   │   ├── calltrace.h
│   │   │   ├── channel.h
│   │   │   ├── compiler.h
│   │   │   ├── console.h
│   │   │   ├── const.h
│   │   │   ├── cpumask.h
│   │   │   ├── current.h
│   │   │   ├── device_id.h
│   │   │   ├── errno.h
│   │   │   ├── event.h
│   │   │   ├── flag.h
│   │   │   ├── hook.h
│   │   │   ├── init.h
│   │   │   ├── irq.h
│   │   │   ├── kbuild.h
│   │   │   ├── list.h
│   │   │   ├── math64.h
│   │   │   ├── mbox.h
│   │   │   ├── memattr.h
│   │   │   ├── memory.h
│   │   │   ├── minos.h
│   │   │   ├── mm.h
│   │   │   ├── mutex.h
│   │   │   ├── of.h
│   │   │   ├── os.h
│   │   │   ├── page.h
│   │   │   ├── percpu.h
│   │   │   ├── platform.h
│   │   │   ├── pm.h
│   │   │   ├── preempt.h
│   │   │   ├── print.h
│   │   │   ├── queue.h
│   │   │   ├── ramdisk.h
│   │   │   ├── raw_spinlock.h
│   │   │   ├── sched.h
│   │   │   ├── sem.h
│   │   │   ├── shell_command.h
│   │   │   ├── slab.h
│   │   │   ├── smp.h
│   │   │   ├── softirq.h
│   │   │   ├── spinlock.h
│   │   │   ├── stdlib.h
│   │   │   ├── string.h
│   │   │   ├── symbol.h
│   │   │   ├── task.h
│   │   │   ├── task_def.h
│   │   │   ├── task_info.h
│   │   │   ├── time.h
│   │   │   ├── timer.h
│   │   │   ├── tty.h
│   │   │   ├── types.h
│   │   │   └── varlist.h
│   │   ├── uapi/
│   │   │   ├── kobject_uapi.h
│   │   │   └── procinfo_uapi.h
│   │   ├── uspace/
│   │   │   ├── elf.h
│   │   │   ├── handle.h
│   │   │   ├── iqueue.h
│   │   │   ├── kobject.h
│   │   │   ├── poll.h
│   │   │   ├── proc.h
│   │   │   ├── procinfo.h
│   │   │   ├── socket.h
│   │   │   ├── syscall.h
│   │   │   ├── uaccess.h
│   │   │   └── vspace.h
│   │   └── virt/
│   │       ├── hypercall.h
│   │       ├── iommu.h
│   │       ├── os.h
│   │       ├── resource.h
│   │       ├── vdev.h
│   │       ├── virq.h
│   │       ├── virq_chip.h
│   │       ├── virt.h
│   │       ├── virtio.h
│   │       ├── vm.h
│   │       ├── vm_mmap.h
│   │       ├── vm_pm.h
│   │       ├── vmbox.h
│   │       ├── vmcs.h
│   │       ├── vmm.h
│   │       └── vmodule.h
│   ├── libs/
│   │   ├── Kconfig
│   │   ├── Makefile
│   │   ├── libfdt/
│   │   │   ├── Makefile
│   │   │   ├── fdt.c
│   │   │   ├── fdt_addresses.c
│   │   │   ├── fdt_empty_tree.c
│   │   │   ├── fdt_overlay.c
│   │   │   ├── fdt_ro.c
│   │   │   ├── fdt_rw.c
│   │   │   ├── fdt_strerror.c
│   │   │   ├── fdt_sw.c
│   │   │   ├── fdt_wip.c
│   │   │   └── libfdt_internal.h
│   │   └── shell_command/
│   │       ├── Kconfig
│   │       ├── Makefile
│   │       ├── clear.c
│   │       ├── help_cmd.c
│   │       ├── shell_command.c
│   │       └── task_cmd.c
│   ├── platform/
│   │   ├── Kconfig
│   │   ├── Makefile
│   │   ├── amlogic/
│   │   │   ├── Kconfig
│   │   │   ├── Makefile
│   │   │   ├── amlogic_smc.c
│   │   │   └── kvim3.c
│   │   ├── espressobin/
│   │   │   ├── Kconfig
│   │   │   ├── Makefile
│   │   │   └── espressobin.c
│   │   ├── fvp/
│   │   │   ├── Kconfig
│   │   │   ├── Makefile
│   │   │   └── fvp.c
│   │   ├── platform.c
│   │   ├── qemu/
│   │   │   ├── Kconfig
│   │   │   ├── Makefile
│   │   │   └── qemu.c
│   │   ├── r8a7795/
│   │   │   ├── Kconfig
│   │   │   ├── Makefile
│   │   │   └── r8a7795.c
│   │   ├── raspberry3/
│   │   │   ├── Kconfig
│   │   │   ├── Makefile
│   │   │   └── raspberry3.c
│   │   └── raspberry4/
│   │       ├── Kconfig
│   │       ├── Makefile
│   │       └── raspberry4.c
│   ├── scripts/
│   │   ├── Kconfiglib/
│   │   │   ├── LICENSE.txt
│   │   │   ├── MANIFEST.in
│   │   │   ├── README.rst
│   │   │   ├── alldefconfig.py
│   │   │   ├── allmodconfig.py
│   │   │   ├── allnoconfig.py
│   │   │   ├── allyesconfig.py
│   │   │   ├── defconfig.py
│   │   │   ├── examples/
│   │   │   │   ├── Kmenuconfig
│   │   │   │   ├── allnoconfig_walk.py
│   │   │   │   ├── defconfig_oldconfig.py
│   │   │   │   ├── dumpvars.py
│   │   │   │   ├── eval_expr.py
│   │   │   │   ├── find_symbol.py
│   │   │   │   ├── help_grep.py
│   │   │   │   ├── list_undefined.py
│   │   │   │   ├── menuconfig_example.py
│   │   │   │   ├── merge_config.py
│   │   │   │   ├── print_config_tree.py
│   │   │   │   ├── print_sym_info.py
│   │   │   │   └── print_tree.py
│   │   │   ├── genconfig.py
│   │   │   ├── guiconfig.py
│   │   │   ├── kconfiglib.py
│   │   │   ├── listnewconfig.py
│   │   │   ├── menuconfig.py
│   │   │   ├── oldconfig.py
│   │   │   ├── olddefconfig.py
│   │   │   ├── savedefconfig.py
│   │   │   ├── setconfig.py
│   │   │   ├── setup.cfg
│   │   │   ├── setup.py
│   │   │   ├── tests/
│   │   │   │   ├── Kappend
│   │   │   │   ├── Kassignable
│   │   │   │   ├── Kchoice
│   │   │   │   ├── Kdefconfig_existent
│   │   │   │   ├── Kdefconfig_existent_but_n
│   │   │   │   ├── Kdefconfig_nonexistent
│   │   │   │   ├── Kdefconfig_srctree
│   │   │   │   ├── Kdepcopy
│   │   │   │   ├── Kdeploop0
│   │   │   │   ├── Kdeploop1
│   │   │   │   ├── Kdeploop10
│   │   │   │   ├── Kdeploop2
│   │   │   │   ├── Kdeploop3
│   │   │   │   ├── Kdeploop4
│   │   │   │   ├── Kdeploop5
│   │   │   │   ├── Kdeploop6
│   │   │   │   ├── Kdeploop7
│   │   │   │   ├── Kdeploop8
│   │   │   │   ├── Kdeploop9
│   │   │   │   ├── Kdirdep
│   │   │   │   ├── Kescape
│   │   │   │   ├── Keval
│   │   │   │   ├── Kexpr_items
│   │   │   │   ├── Kheader
│   │   │   │   ├── Khelp
│   │   │   │   ├── Kifremoval
│   │   │   │   ├── Kimply
│   │   │   │   ├── Kinclude_path
│   │   │   │   ├── Kinclude_path_sourced_1
│   │   │   │   ├── Kinclude_path_sourced_2
│   │   │   │   ├── Kitemlists
│   │   │   │   ├── Klocation
│   │   │   │   ├── Klocation_sourced
│   │   │   │   ├── Kmainmenu
│   │   │   │   ├── Kmenuconfig
│   │   │   │   ├── Kmisc
│   │   │   │   ├── Kmissingrsource
│   │   │   │   ├── Kmissingsource
│   │   │   │   ├── Korder
│   │   │   │   ├── Kpreprocess
│   │   │   │   ├── Krange
│   │   │   │   ├── Krecursive1
│   │   │   │   ├── Krecursive2
│   │   │   │   ├── Kreferenced
│   │   │   │   ├── Krelation
│   │   │   │   ├── Krepr
│   │   │   │   ├── Kstr
│   │   │   │   ├── Kundef
│   │   │   │   ├── Kuserfunctions
│   │   │   │   ├── Kvisibility
│   │   │   │   ├── config_indented
│   │   │   │   ├── config_set_bool
│   │   │   │   ├── config_set_string
│   │   │   │   ├── defconfig_1
│   │   │   │   ├── defconfig_2
│   │   │   │   ├── empty
│   │   │   │   ├── kconfigfunctions.py
│   │   │   │   ├── reltest
│   │   │   │   └── sub/
│   │   │   │       ├── Kconfig_symlink_2
│   │   │   │       ├── Kconfig_symlink_3
│   │   │   │       ├── Klocation_grsourced1
│   │   │   │       ├── Klocation_grsourced2
│   │   │   │       ├── Klocation_gsourced1
│   │   │   │       ├── Klocation_gsourced2
│   │   │   │       ├── Klocation_rsourced
│   │   │   │       ├── defconfig_in_sub
│   │   │   │       └── sub/
│   │   │   │           └── Kconfig_symlink_1
│   │   │   └── testsuite.py
│   │   ├── Minos.build.mk
│   │   ├── Minos.clean.mk
│   │   ├── Minos.config.mk
│   │   └── generate_allsymbols.py
│   ├── userspace/
│   │   ├── Kconfig
│   │   ├── Makefile
│   │   ├── endpoint.c
│   │   ├── futex.c
│   │   ├── handle.c
│   │   ├── iqueue.c
│   │   ├── irq.c
│   │   ├── kobject.c
│   │   ├── kobject_copy.c
│   │   ├── kobject_copy.h
│   │   ├── notify.c
│   │   ├── pma.c
│   │   ├── poll.c
│   │   ├── port.c
│   │   ├── process.c
│   │   ├── procinfo.c
│   │   ├── root_service.c
│   │   ├── socket.c
│   │   ├── stdio.c
│   │   ├── syscall.c
│   │   ├── thread.c
│   │   ├── time.c
│   │   ├── uaccess.c
│   │   └── vspace.c
│   └── virt/
│       ├── Kconfig
│       ├── Makefile
│       ├── debug_console.c
│       ├── hypercall.c
│       ├── iommu.c
│       ├── os/
│       │   ├── Kconfig
│       │   ├── Makefile
│       │   ├── os.c
│       │   ├── os_linux.c
│       │   ├── os_other.c
│       │   └── os_xnu.c
│       ├── resource.c
│       ├── shmem.c
│       ├── varm_timer.c
│       ├── vdev.c
│       ├── vfault.c
│       ├── virq.c
│       ├── virq_chips/
│       │   ├── Kconfig
│       │   ├── Makefile
│       │   ├── bcm_virq.c
│       │   ├── vaic.c
│       │   ├── vgic.c
│       │   ├── vgic.h
│       │   ├── vgicv2.c
│       │   ├── vgicv3.c
│       │   └── virq_chip.c
│       ├── virtio_mmio.c
│       ├── vm.c
│       ├── vm_daemon.c
│       ├── vm_pm.c
│       ├── vmbox/
│       │   ├── Kconfig
│       │   ├── Makefile
│       │   ├── vmbox.c
│       │   └── vmbox_hvc.c
│       ├── vmcs.c
│       ├── vmm.c
│       ├── vmodule.c
│       ├── vrtc.c
│       └── vwdt.c
├── scripts/
│   ├── app_build.mk
│   └── lib_build.mk
├── tools/
│   ├── install.sh
│   ├── make_ramdisk.sh
│   ├── mkrmd/
│   │   ├── Makefile
│   │   └── mkrmd.c
│   ├── qemu.sh
│   └── u-boot.img
├── user.driver/
│   └── virtio-blk/
│       ├── Makefile
│       ├── main.c
│       ├── virtio-blk.c
│       ├── virtio.c
│       └── virtio.h
├── user.libc/
│   ├── .gitignore
│   ├── .mailmap
│   ├── COPYRIGHT
│   ├── INSTALL
│   ├── Makefile
│   ├── README
│   ├── VERSION
│   ├── WHATSNEW
│   ├── arch/
│   │   ├── aarch64/
│   │   │   ├── atomic_arch.h
│   │   │   ├── bits/
│   │   │   │   ├── alltypes.h.in
│   │   │   │   ├── fcntl.h
│   │   │   │   ├── fenv.h
│   │   │   │   ├── float.h
│   │   │   │   ├── hwcap.h
│   │   │   │   ├── posix.h
│   │   │   │   ├── reg.h
│   │   │   │   ├── setjmp.h
│   │   │   │   ├── signal.h
│   │   │   │   ├── stat.h
│   │   │   │   ├── stdint.h
│   │   │   │   ├── syscall.h.in
│   │   │   │   └── user.h
│   │   │   ├── crt_arch.h
│   │   │   ├── fp_arch.h
│   │   │   ├── kstat.h
│   │   │   ├── pthread_arch.h
│   │   │   ├── reloc.h
│   │   │   └── syscall_arch.h
│   │   ├── arm/
│   │   │   ├── arch.mak
│   │   │   ├── atomic_arch.h
│   │   │   ├── bits/
│   │   │   │   ├── alltypes.h.in
│   │   │   │   ├── fcntl.h
│   │   │   │   ├── fenv.h
│   │   │   │   ├── float.h
│   │   │   │   ├── hwcap.h
│   │   │   │   ├── ioctl_fix.h
│   │   │   │   ├── ipcstat.h
│   │   │   │   ├── msg.h
│   │   │   │   ├── posix.h
│   │   │   │   ├── ptrace.h
│   │   │   │   ├── reg.h
│   │   │   │   ├── sem.h
│   │   │   │   ├── setjmp.h
│   │   │   │   ├── shm.h
│   │   │   │   ├── signal.h
│   │   │   │   ├── stat.h
│   │   │   │   ├── stdint.h
│   │   │   │   ├── syscall.h.in
│   │   │   │   └── user.h
│   │   │   ├── crt_arch.h
│   │   │   ├── kstat.h
│   │   │   ├── pthread_arch.h
│   │   │   ├── reloc.h
│   │   │   └── syscall_arch.h
│   │   ├── generic/
│   │   │   ├── bits/
│   │   │   │   ├── dirent.h
│   │   │   │   ├── errno.h
│   │   │   │   ├── fcntl.h
│   │   │   │   ├── fenv.h
│   │   │   │   ├── hwcap.h
│   │   │   │   ├── io.h
│   │   │   │   ├── ioctl.h
│   │   │   │   ├── ioctl_fix.h
│   │   │   │   ├── ipc.h
│   │   │   │   ├── ipcstat.h
│   │   │   │   ├── kd.h
│   │   │   │   ├── limits.h
│   │   │   │   ├── link.h
│   │   │   │   ├── mman.h
│   │   │   │   ├── msg.h
│   │   │   │   ├── poll.h
│   │   │   │   ├── ptrace.h
│   │   │   │   ├── resource.h
│   │   │   │   ├── sem.h
│   │   │   │   ├── shm.h
│   │   │   │   ├── socket.h
│   │   │   │   ├── soundcard.h
│   │   │   │   ├── statfs.h
│   │   │   │   ├── termios.h
│   │   │   │   └── vt.h
│   │   │   └── fp_arch.h
│   │   ├── i386/
│   │   │   ├── arch.mak
│   │   │   ├── atomic_arch.h
│   │   │   ├── bits/
│   │   │   │   ├── alltypes.h.in
│   │   │   │   ├── fenv.h
│   │   │   │   ├── float.h
│   │   │   │   ├── io.h
│   │   │   │   ├── ipcstat.h
│   │   │   │   ├── limits.h
│   │   │   │   ├── mman.h
│   │   │   │   ├── msg.h
│   │   │   │   ├── posix.h
│   │   │   │   ├── ptrace.h
│   │   │   │   ├── reg.h
│   │   │   │   ├── sem.h
│   │   │   │   ├── setjmp.h
│   │   │   │   ├── shm.h
│   │   │   │   ├── signal.h
│   │   │   │   ├── stat.h
│   │   │   │   ├── stdint.h
│   │   │   │   ├── syscall.h.in
│   │   │   │   └── user.h
│   │   │   ├── crt_arch.h
│   │   │   ├── kstat.h
│   │   │   ├── pthread_arch.h
│   │   │   ├── reloc.h
│   │   │   └── syscall_arch.h
│   │   ├── m68k/
│   │   │   ├── arch.mak
│   │   │   ├── atomic_arch.h
│   │   │   ├── bits/
│   │   │   │   ├── alltypes.h.in
│   │   │   │   ├── fcntl.h
│   │   │   │   ├── fenv.h
│   │   │   │   ├── float.h
│   │   │   │   ├── ipcstat.h
│   │   │   │   ├── msg.h
│   │   │   │   ├── posix.h
│   │   │   │   ├── ptrace.h
│   │   │   │   ├── reg.h
│   │   │   │   ├── sem.h
│   │   │   │   ├── setjmp.h
│   │   │   │   ├── shm.h
│   │   │   │   ├── signal.h
│   │   │   │   ├── stat.h
│   │   │   │   ├── stdint.h
│   │   │   │   ├── syscall.h.in
│   │   │   │   └── user.h
│   │   │   ├── crt_arch.h
│   │   │   ├── kstat.h
│   │   │   ├── pthread_arch.h
│   │   │   ├── reloc.h
│   │   │   └── syscall_arch.h
│   │   ├── microblaze/
│   │   │   ├── arch.mak
│   │   │   ├── atomic_arch.h
│   │   │   ├── bits/
│   │   │   │   ├── alltypes.h.in
│   │   │   │   ├── float.h
│   │   │   │   ├── ipcstat.h
│   │   │   │   ├── msg.h
│   │   │   │   ├── posix.h
│   │   │   │   ├── reg.h
│   │   │   │   ├── sem.h
│   │   │   │   ├── setjmp.h
│   │   │   │   ├── shm.h
│   │   │   │   ├── signal.h
│   │   │   │   ├── stat.h
│   │   │   │   ├── stdint.h
│   │   │   │   ├── syscall.h.in
│   │   │   │   └── user.h
│   │   │   ├── crt_arch.h
│   │   │   ├── kstat.h
│   │   │   ├── pthread_arch.h
│   │   │   ├── reloc.h
│   │   │   └── syscall_arch.h
│   │   ├── mips/
│   │   │   ├── arch.mak
│   │   │   ├── atomic_arch.h
│   │   │   ├── bits/
│   │   │   │   ├── alltypes.h.in
│   │   │   │   ├── errno.h
│   │   │   │   ├── fcntl.h
│   │   │   │   ├── fenv.h
│   │   │   │   ├── float.h
│   │   │   │   ├── hwcap.h
│   │   │   │   ├── ioctl.h
│   │   │   │   ├── ipcstat.h
│   │   │   │   ├── mman.h
│   │   │   │   ├── msg.h
│   │   │   │   ├── poll.h
│   │   │   │   ├── posix.h
│   │   │   │   ├── ptrace.h
│   │   │   │   ├── reg.h
│   │   │   │   ├── resource.h
│   │   │   │   ├── sem.h
│   │   │   │   ├── setjmp.h
│   │   │   │   ├── shm.h
│   │   │   │   ├── signal.h
│   │   │   │   ├── socket.h
│   │   │   │   ├── stat.h
│   │   │   │   ├── statfs.h
│   │   │   │   ├── stdint.h
│   │   │   │   ├── syscall.h.in
│   │   │   │   ├── termios.h
│   │   │   │   └── user.h
│   │   │   ├── crt_arch.h
│   │   │   ├── ksigaction.h
│   │   │   ├── kstat.h
│   │   │   ├── pthread_arch.h
│   │   │   ├── reloc.h
│   │   │   └── syscall_arch.h
│   │   ├── mips64/
│   │   │   ├── atomic_arch.h
│   │   │   ├── bits/
│   │   │   │   ├── alltypes.h.in
│   │   │   │   ├── errno.h
│   │   │   │   ├── fcntl.h
│   │   │   │   ├── fenv.h
│   │   │   │   ├── float.h
│   │   │   │   ├── hwcap.h
│   │   │   │   ├── ioctl.h
│   │   │   │   ├── ipc.h
│   │   │   │   ├── mman.h
│   │   │   │   ├── poll.h
│   │   │   │   ├── posix.h
│   │   │   │   ├── ptrace.h
│   │   │   │   ├── reg.h
│   │   │   │   ├── resource.h
│   │   │   │   ├── setjmp.h
│   │   │   │   ├── signal.h
│   │   │   │   ├── socket.h
│   │   │   │   ├── stat.h
│   │   │   │   ├── statfs.h
│   │   │   │   ├── stdint.h
│   │   │   │   ├── syscall.h.in
│   │   │   │   ├── termios.h
│   │   │   │   └── user.h
│   │   │   ├── crt_arch.h
│   │   │   ├── ksigaction.h
│   │   │   ├── kstat.h
│   │   │   ├── pthread_arch.h
│   │   │   ├── reloc.h
│   │   │   └── syscall_arch.h
│   │   ├── mipsn32/
│   │   │   ├── arch.mak
│   │   │   ├── atomic_arch.h
│   │   │   ├── bits/
│   │   │   │   ├── alltypes.h.in
│   │   │   │   ├── errno.h
│   │   │   │   ├── fcntl.h
│   │   │   │   ├── fenv.h
│   │   │   │   ├── float.h
│   │   │   │   ├── hwcap.h
│   │   │   │   ├── ioctl.h
│   │   │   │   ├── ipcstat.h
│   │   │   │   ├── mman.h
│   │   │   │   ├── msg.h
│   │   │   │   ├── poll.h
│   │   │   │   ├── posix.h
│   │   │   │   ├── ptrace.h
│   │   │   │   ├── reg.h
│   │   │   │   ├── resource.h
│   │   │   │   ├── sem.h
│   │   │   │   ├── setjmp.h
│   │   │   │   ├── shm.h
│   │   │   │   ├── signal.h
│   │   │   │   ├── socket.h
│   │   │   │   ├── stat.h
│   │   │   │   ├── statfs.h
│   │   │   │   ├── stdint.h
│   │   │   │   ├── syscall.h.in
│   │   │   │   ├── termios.h
│   │   │   │   └── user.h
│   │   │   ├── crt_arch.h
│   │   │   ├── ksigaction.h
│   │   │   ├── kstat.h
│   │   │   ├── pthread_arch.h
│   │   │   ├── reloc.h
│   │   │   └── syscall_arch.h
│   │   ├── or1k/
│   │   │   ├── arch.mak
│   │   │   ├── atomic_arch.h
│   │   │   ├── bits/
│   │   │   │   ├── alltypes.h.in
│   │   │   │   ├── float.h
│   │   │   │   ├── ipcstat.h
│   │   │   │   ├── limits.h
│   │   │   │   ├── msg.h
│   │   │   │   ├── posix.h
│   │   │   │   ├── reg.h
│   │   │   │   ├── sem.h
│   │   │   │   ├── setjmp.h
│   │   │   │   ├── shm.h
│   │   │   │   ├── signal.h
│   │   │   │   ├── stat.h
│   │   │   │   ├── stdint.h
│   │   │   │   ├── syscall.h.in
│   │   │   │   └── user.h
│   │   │   ├── crt_arch.h
│   │   │   ├── kstat.h
│   │   │   ├── pthread_arch.h
│   │   │   ├── reloc.h
│   │   │   └── syscall_arch.h
│   │   ├── powerpc/
│   │   │   ├── arch.mak
│   │   │   ├── atomic_arch.h
│   │   │   ├── bits/
│   │   │   │   ├── alltypes.h.in
│   │   │   │   ├── errno.h
│   │   │   │   ├── fcntl.h
│   │   │   │   ├── fenv.h
│   │   │   │   ├── float.h
│   │   │   │   ├── hwcap.h
│   │   │   │   ├── ioctl.h
│   │   │   │   ├── ipc.h
│   │   │   │   ├── ipcstat.h
│   │   │   │   ├── mman.h
│   │   │   │   ├── msg.h
│   │   │   │   ├── posix.h
│   │   │   │   ├── ptrace.h
│   │   │   │   ├── reg.h
│   │   │   │   ├── sem.h
│   │   │   │   ├── setjmp.h
│   │   │   │   ├── shm.h
│   │   │   │   ├── signal.h
│   │   │   │   ├── socket.h
│   │   │   │   ├── stat.h
│   │   │   │   ├── stdint.h
│   │   │   │   ├── syscall.h.in
│   │   │   │   ├── termios.h
│   │   │   │   └── user.h
│   │   │   ├── crt_arch.h
│   │   │   ├── kstat.h
│   │   │   ├── pthread_arch.h
│   │   │   ├── reloc.h
│   │   │   └── syscall_arch.h
│   │   ├── powerpc64/
│   │   │   ├── atomic_arch.h
│   │   │   ├── bits/
│   │   │   │   ├── alltypes.h.in
│   │   │   │   ├── errno.h
│   │   │   │   ├── fcntl.h
│   │   │   │   ├── fenv.h
│   │   │   │   ├── float.h
│   │   │   │   ├── hwcap.h
│   │   │   │   ├── ioctl.h
│   │   │   │   ├── ipc.h
│   │   │   │   ├── mman.h
│   │   │   │   ├── posix.h
│   │   │   │   ├── ptrace.h
│   │   │   │   ├── reg.h
│   │   │   │   ├── setjmp.h
│   │   │   │   ├── shm.h
│   │   │   │   ├── signal.h
│   │   │   │   ├── socket.h
│   │   │   │   ├── stat.h
│   │   │   │   ├── stdint.h
│   │   │   │   ├── syscall.h.in
│   │   │   │   ├── termios.h
│   │   │   │   └── user.h
│   │   │   ├── crt_arch.h
│   │   │   ├── kstat.h
│   │   │   ├── pthread_arch.h
│   │   │   ├── reloc.h
│   │   │   └── syscall_arch.h
│   │   ├── riscv64/
│   │   │   ├── atomic_arch.h
│   │   │   ├── bits/
│   │   │   │   ├── alltypes.h.in
│   │   │   │   ├── fenv.h
│   │   │   │   ├── float.h
│   │   │   │   ├── posix.h
│   │   │   │   ├── reg.h
│   │   │   │   ├── setjmp.h
│   │   │   │   ├── signal.h
│   │   │   │   ├── stat.h
│   │   │   │   ├── stdint.h
│   │   │   │   ├── syscall.h.in
│   │   │   │   └── user.h
│   │   │   ├── crt_arch.h
│   │   │   ├── kstat.h
│   │   │   ├── pthread_arch.h
│   │   │   ├── reloc.h
│   │   │   └── syscall_arch.h
│   │   ├── s390x/
│   │   │   ├── atomic_arch.h
│   │   │   ├── bits/
│   │   │   │   ├── alltypes.h.in
│   │   │   │   ├── fcntl.h
│   │   │   │   ├── fenv.h
│   │   │   │   ├── float.h
│   │   │   │   ├── hwcap.h
│   │   │   │   ├── ioctl_fix.h
│   │   │   │   ├── limits.h
│   │   │   │   ├── link.h
│   │   │   │   ├── posix.h
│   │   │   │   ├── ptrace.h
│   │   │   │   ├── reg.h
│   │   │   │   ├── setjmp.h
│   │   │   │   ├── signal.h
│   │   │   │   ├── stat.h
│   │   │   │   ├── statfs.h
│   │   │   │   ├── stdint.h
│   │   │   │   ├── syscall.h.in
│   │   │   │   └── user.h
│   │   │   ├── crt_arch.h
│   │   │   ├── kstat.h
│   │   │   ├── pthread_arch.h
│   │   │   ├── reloc.h
│   │   │   └── syscall_arch.h
│   │   ├── sh/
│   │   │   ├── arch.mak
│   │   │   ├── atomic_arch.h
│   │   │   ├── bits/
│   │   │   │   ├── alltypes.h.in
│   │   │   │   ├── fenv.h
│   │   │   │   ├── float.h
│   │   │   │   ├── hwcap.h
│   │   │   │   ├── ioctl.h
│   │   │   │   ├── ipcstat.h
│   │   │   │   ├── limits.h
│   │   │   │   ├── msg.h
│   │   │   │   ├── posix.h
│   │   │   │   ├── ptrace.h
│   │   │   │   ├── sem.h
│   │   │   │   ├── setjmp.h
│   │   │   │   ├── shm.h
│   │   │   │   ├── signal.h
│   │   │   │   ├── stat.h
│   │   │   │   ├── stdint.h
│   │   │   │   ├── syscall.h.in
│   │   │   │   └── user.h
│   │   │   ├── crt_arch.h
│   │   │   ├── ksigaction.h
│   │   │   ├── kstat.h
│   │   │   ├── pthread_arch.h
│   │   │   ├── reloc.h
│   │   │   └── syscall_arch.h
│   │   ├── x32/
│   │   │   ├── atomic_arch.h
│   │   │   ├── bits/
│   │   │   │   ├── alltypes.h.in
│   │   │   │   ├── fcntl.h
│   │   │   │   ├── fenv.h
│   │   │   │   ├── float.h
│   │   │   │   ├── io.h
│   │   │   │   ├── ioctl_fix.h
│   │   │   │   ├── ipc.h
│   │   │   │   ├── limits.h
│   │   │   │   ├── mman.h
│   │   │   │   ├── msg.h
│   │   │   │   ├── posix.h
│   │   │   │   ├── ptrace.h
│   │   │   │   ├── reg.h
│   │   │   │   ├── sem.h
│   │   │   │   ├── setjmp.h
│   │   │   │   ├── shm.h
│   │   │   │   ├── signal.h
│   │   │   │   ├── socket.h
│   │   │   │   ├── stat.h
│   │   │   │   ├── statfs.h
│   │   │   │   ├── stdint.h
│   │   │   │   ├── syscall.h.in
│   │   │   │   └── user.h
│   │   │   ├── crt_arch.h
│   │   │   ├── ksigaction.h
│   │   │   ├── kstat.h
│   │   │   ├── pthread_arch.h
│   │   │   ├── reloc.h
│   │   │   └── syscall_arch.h
│   │   └── x86_64/
│   │       ├── atomic_arch.h
│   │       ├── bits/
│   │       │   ├── alltypes.h.in
│   │       │   ├── fenv.h
│   │       │   ├── float.h
│   │       │   ├── io.h
│   │       │   ├── limits.h
│   │       │   ├── mman.h
│   │       │   ├── posix.h
│   │       │   ├── ptrace.h
│   │       │   ├── reg.h
│   │       │   ├── sem.h
│   │       │   ├── setjmp.h
│   │       │   ├── signal.h
│   │       │   ├── stat.h
│   │       │   ├── stdint.h
│   │       │   ├── syscall.h.in
│   │       │   └── user.h
│   │       ├── crt_arch.h
│   │       ├── ksigaction.h
│   │       ├── kstat.h
│   │       ├── pthread_arch.h
│   │       ├── reloc.h
│   │       └── syscall_arch.h
│   ├── build.sh
│   ├── compat/
│   │   └── time32/
│   │       ├── __xstat.c
│   │       ├── adjtime32.c
│   │       ├── adjtimex_time32.c
│   │       ├── aio_suspend_time32.c
│   │       ├── clock_adjtime32.c
│   │       ├── clock_getres_time32.c
│   │       ├── clock_gettime32.c
│   │       ├── clock_nanosleep_time32.c
│   │       ├── clock_settime32.c
│   │       ├── cnd_timedwait_time32.c
│   │       ├── ctime32.c
│   │       ├── ctime32_r.c
│   │       ├── difftime32.c
│   │       ├── fstat_time32.c
│   │       ├── fstatat_time32.c
│   │       ├── ftime32.c
│   │       ├── futimens_time32.c
│   │       ├── futimes_time32.c
│   │       ├── futimesat_time32.c
│   │       ├── getitimer_time32.c
│   │       ├── getrusage_time32.c
│   │       ├── gettimeofday_time32.c
│   │       ├── gmtime32.c
│   │       ├── gmtime32_r.c
│   │       ├── localtime32.c
│   │       ├── localtime32_r.c
│   │       ├── lstat_time32.c
│   │       ├── lutimes_time32.c
│   │       ├── mktime32.c
│   │       ├── mq_timedreceive_time32.c
│   │       ├── mq_timedsend_time32.c
│   │       ├── mtx_timedlock_time32.c
│   │       ├── nanosleep_time32.c
│   │       ├── ppoll_time32.c
│   │       ├── pselect_time32.c
│   │       ├── pthread_cond_timedwait_time32.c
│   │       ├── pthread_mutex_timedlock_time32.c
│   │       ├── pthread_rwlock_timedrdlock_time32.c
│   │       ├── pthread_rwlock_timedwrlock_time32.c
│   │       ├── pthread_timedjoin_np_time32.c
│   │       ├── recvmmsg_time32.c
│   │       ├── sched_rr_get_interval_time32.c
│   │       ├── select_time32.c
│   │       ├── sem_timedwait_time32.c
│   │       ├── semtimedop_time32.c
│   │       ├── setitimer_time32.c
│   │       ├── settimeofday_time32.c
│   │       ├── sigtimedwait_time32.c
│   │       ├── stat_time32.c
│   │       ├── stime32.c
│   │       ├── thrd_sleep_time32.c
│   │       ├── time32.c
│   │       ├── time32.h
│   │       ├── time32gm.c
│   │       ├── timer_gettime32.c
│   │       ├── timer_settime32.c
│   │       ├── timerfd_gettime32.c
│   │       ├── timerfd_settime32.c
│   │       ├── timespec_get_time32.c
│   │       ├── utime_time32.c
│   │       ├── utimensat_time32.c
│   │       ├── utimes_time32.c
│   │       ├── wait3_time32.c
│   │       └── wait4_time32.c
│   ├── configure
│   ├── crt/
│   │   ├── Scrt1.c
│   │   ├── crt1.c
│   │   ├── crti.c
│   │   ├── crtn.c
│   │   └── rcrt1.c
│   ├── dynamic.list
│   ├── include/
│   │   ├── aio.h
│   │   ├── alloca.h
│   │   ├── alltypes.h.in
│   │   ├── ar.h
│   │   ├── arpa/
│   │   │   ├── ftp.h
│   │   │   ├── inet.h
│   │   │   ├── nameser.h
│   │   │   ├── nameser_compat.h
│   │   │   ├── telnet.h
│   │   │   └── tftp.h
│   │   ├── assert.h
│   │   ├── bitmap.h
│   │   ├── bitops.h
│   │   ├── byteswap.h
│   │   ├── complex.h
│   │   ├── cpio.h
│   │   ├── crypt.h
│   │   ├── ctype.h
│   │   ├── dirent.h
│   │   ├── dlfcn.h
│   │   ├── elf.h
│   │   ├── endian.h
│   │   ├── err.h
│   │   ├── errno.h
│   │   ├── fcntl.h
│   │   ├── features.h
│   │   ├── fenv.h
│   │   ├── float.h
│   │   ├── fmtmsg.h
│   │   ├── fnmatch.h
│   │   ├── ftw.h
│   │   ├── getopt.h
│   │   ├── glob.h
│   │   ├── grp.h
│   │   ├── iconv.h
│   │   ├── ifaddrs.h
│   │   ├── inttypes.h
│   │   ├── iso646.h
│   │   ├── langinfo.h
│   │   ├── lastlog.h
│   │   ├── libgen.h
│   │   ├── libintl.h
│   │   ├── limits.h
│   │   ├── link.h
│   │   ├── locale.h
│   │   ├── malloc.h
│   │   ├── math.h
│   │   ├── memory.h
│   │   ├── minos/
│   │   │   ├── barrier.h
│   │   │   ├── compiler.h
│   │   │   ├── debug.h
│   │   │   ├── device.h
│   │   │   ├── kobject.h
│   │   │   ├── kobject_uapi.h
│   │   │   ├── libc.h
│   │   │   ├── list.h
│   │   │   ├── mutex.h
│   │   │   ├── poll.h
│   │   │   ├── procinfo.h
│   │   │   ├── procinfo_uapi.h
│   │   │   ├── proto.h
│   │   │   ├── sched.h
│   │   │   ├── service.h
│   │   │   ├── spinlock.h
│   │   │   ├── thread.h
│   │   │   └── types.h
│   │   ├── mntent.h
│   │   ├── monetary.h
│   │   ├── mqueue.h
│   │   ├── net/
│   │   │   ├── ethernet.h
│   │   │   ├── if.h
│   │   │   ├── if_arp.h
│   │   │   └── route.h
│   │   ├── netdb.h
│   │   ├── netinet/
│   │   │   ├── ether.h
│   │   │   ├── icmp6.h
│   │   │   ├── if_ether.h
│   │   │   ├── igmp.h
│   │   │   ├── in.h
│   │   │   ├── in_systm.h
│   │   │   ├── ip.h
│   │   │   ├── ip6.h
│   │   │   ├── ip_icmp.h
│   │   │   ├── tcp.h
│   │   │   └── udp.h
│   │   ├── netpacket/
│   │   │   └── packet.h
│   │   ├── nl_types.h
│   │   ├── paths.h
│   │   ├── poll.h
│   │   ├── pthread.h
│   │   ├── pty.h
│   │   ├── pwd.h
│   │   ├── regex.h
│   │   ├── resolv.h
│   │   ├── sched.h
│   │   ├── scsi/
│   │   │   ├── scsi.h
│   │   │   ├── scsi_ioctl.h
│   │   │   └── sg.h
│   │   ├── search.h
│   │   ├── semaphore.h
│   │   ├── setjmp.h
│   │   ├── shadow.h
│   │   ├── signal.h
│   │   ├── spawn.h
│   │   ├── stdalign.h
│   │   ├── stdarg.h
│   │   ├── stdbool.h
│   │   ├── stdc-predef.h
│   │   ├── stddef.h
│   │   ├── stdint.h
│   │   ├── stdio.h
│   │   ├── stdio_ext.h
│   │   ├── stdlib.h
│   │   ├── stdnoreturn.h
│   │   ├── string.h
│   │   ├── strings.h
│   │   ├── stropts.h
│   │   ├── sys/
│   │   │   ├── acct.h
│   │   │   ├── auxv.h
│   │   │   ├── cachectl.h
│   │   │   ├── dir.h
│   │   │   ├── epoll.h
│   │   │   ├── errno.h
│   │   │   ├── eventfd.h
│   │   │   ├── fanotify.h
│   │   │   ├── fcntl.h
│   │   │   ├── file.h
│   │   │   ├── fsuid.h
│   │   │   ├── inotify.h
│   │   │   ├── io.h
│   │   │   ├── ioctl.h
│   │   │   ├── ipc.h
│   │   │   ├── kd.h
│   │   │   ├── klog.h
│   │   │   ├── membarrier.h
│   │   │   ├── mman.h
│   │   │   ├── msg.h
│   │   │   ├── mtio.h
│   │   │   ├── param.h
│   │   │   ├── personality.h
│   │   │   ├── poll.h
│   │   │   ├── prctl.h
│   │   │   ├── procfs.h
│   │   │   ├── ptrace.h
│   │   │   ├── quota.h
│   │   │   ├── random.h
│   │   │   ├── reboot.h
│   │   │   ├── reg.h
│   │   │   ├── resource.h
│   │   │   ├── select.h
│   │   │   ├── sem.h
│   │   │   ├── sendfile.h
│   │   │   ├── shm.h
│   │   │   ├── signal.h
│   │   │   ├── signalfd.h
│   │   │   ├── socket.h
│   │   │   ├── soundcard.h
│   │   │   ├── stat.h
│   │   │   ├── statfs.h
│   │   │   ├── statvfs.h
│   │   │   ├── stropts.h
│   │   │   ├── swap.h
│   │   │   ├── syscall.h
│   │   │   ├── sysinfo.h
│   │   │   ├── syslog.h
│   │   │   ├── sysmacros.h
│   │   │   ├── termios.h
│   │   │   ├── time.h
│   │   │   ├── timeb.h
│   │   │   ├── timerfd.h
│   │   │   ├── times.h
│   │   │   ├── timex.h
│   │   │   ├── ttydefaults.h
│   │   │   ├── types.h
│   │   │   ├── ucontext.h
│   │   │   ├── uio.h
│   │   │   ├── un.h
│   │   │   ├── user.h
│   │   │   ├── utsname.h
│   │   │   ├── vfs.h
│   │   │   ├── vt.h
│   │   │   ├── wait.h
│   │   │   └── xattr.h
│   │   ├── syscall.h
│   │   ├── sysexits.h
│   │   ├── syslog.h
│   │   ├── tar.h
│   │   ├── termios.h
│   │   ├── tgmath.h
│   │   ├── threads.h
│   │   ├── time.h
│   │   ├── uchar.h
│   │   ├── ucontext.h
│   │   ├── ulimit.h
│   │   ├── unistd.h
│   │   ├── utime.h
│   │   ├── utmp.h
│   │   ├── utmpx.h
│   │   ├── values.h
│   │   ├── wait.h
│   │   ├── wchar.h
│   │   ├── wctype.h
│   │   └── wordexp.h
│   ├── ldso/
│   │   ├── dlstart.c
│   │   └── dynlink.c
│   ├── src/
│   │   ├── bitmap/
│   │   │   ├── bitmap.c
│   │   │   ├── find_bit.c
│   │   │   └── hweight.c
│   │   ├── complex/
│   │   │   ├── __cexp.c
│   │   │   ├── __cexpf.c
│   │   │   ├── cabs.c
│   │   │   ├── cabsf.c
│   │   │   ├── cabsl.c
│   │   │   ├── cacos.c
│   │   │   ├── cacosf.c
│   │   │   ├── cacosh.c
│   │   │   ├── cacoshf.c
│   │   │   ├── cacoshl.c
│   │   │   ├── cacosl.c
│   │   │   ├── carg.c
│   │   │   ├── cargf.c
│   │   │   ├── cargl.c
│   │   │   ├── casin.c
│   │   │   ├── casinf.c
│   │   │   ├── casinh.c
│   │   │   ├── casinhf.c
│   │   │   ├── casinhl.c
│   │   │   ├── casinl.c
│   │   │   ├── catan.c
│   │   │   ├── catanf.c
│   │   │   ├── catanh.c
│   │   │   ├── catanhf.c
│   │   │   ├── catanhl.c
│   │   │   ├── catanl.c
│   │   │   ├── ccos.c
│   │   │   ├── ccosf.c
│   │   │   ├── ccosh.c
│   │   │   ├── ccoshf.c
│   │   │   ├── ccoshl.c
│   │   │   ├── ccosl.c
│   │   │   ├── cexp.c
│   │   │   ├── cexpf.c
│   │   │   ├── cexpl.c
│   │   │   ├── cimag.c
│   │   │   ├── cimagf.c
│   │   │   ├── cimagl.c
│   │   │   ├── clog.c
│   │   │   ├── clogf.c
│   │   │   ├── clogl.c
│   │   │   ├── conj.c
│   │   │   ├── conjf.c
│   │   │   ├── conjl.c
│   │   │   ├── cpow.c
│   │   │   ├── cpowf.c
│   │   │   ├── cpowl.c
│   │   │   ├── cproj.c
│   │   │   ├── cprojf.c
│   │   │   ├── cprojl.c
│   │   │   ├── creal.c
│   │   │   ├── crealf.c
│   │   │   ├── creall.c
│   │   │   ├── csin.c
│   │   │   ├── csinf.c
│   │   │   ├── csinh.c
│   │   │   ├── csinhf.c
│   │   │   ├── csinhl.c
│   │   │   ├── csinl.c
│   │   │   ├── csqrt.c
│   │   │   ├── csqrtf.c
│   │   │   ├── csqrtl.c
│   │   │   ├── ctan.c
│   │   │   ├── ctanf.c
│   │   │   ├── ctanh.c
│   │   │   ├── ctanhf.c
│   │   │   ├── ctanhl.c
│   │   │   └── ctanl.c
│   │   ├── crypt/
│   │   │   ├── crypt.c
│   │   │   ├── crypt_blowfish.c
│   │   │   ├── crypt_des.c
│   │   │   ├── crypt_des.h
│   │   │   ├── crypt_md5.c
│   │   │   ├── crypt_r.c
│   │   │   ├── crypt_sha256.c
│   │   │   ├── crypt_sha512.c
│   │   │   └── encrypt.c
│   │   ├── ctype/
│   │   │   ├── __ctype_b_loc.c
│   │   │   ├── __ctype_get_mb_cur_max.c
│   │   │   ├── __ctype_tolower_loc.c
│   │   │   ├── __ctype_toupper_loc.c
│   │   │   ├── alpha.h
│   │   │   ├── casemap.h
│   │   │   ├── isalnum.c
│   │   │   ├── isalpha.c
│   │   │   ├── isascii.c
│   │   │   ├── isblank.c
│   │   │   ├── iscntrl.c
│   │   │   ├── isdigit.c
│   │   │   ├── isgraph.c
│   │   │   ├── islower.c
│   │   │   ├── isprint.c
│   │   │   ├── ispunct.c
│   │   │   ├── isspace.c
│   │   │   ├── isupper.c
│   │   │   ├── iswalnum.c
│   │   │   ├── iswalpha.c
│   │   │   ├── iswblank.c
│   │   │   ├── iswcntrl.c
│   │   │   ├── iswctype.c
│   │   │   ├── iswdigit.c
│   │   │   ├── iswgraph.c
│   │   │   ├── iswlower.c
│   │   │   ├── iswprint.c
│   │   │   ├── iswpunct.c
│   │   │   ├── iswspace.c
│   │   │   ├── iswupper.c
│   │   │   ├── iswxdigit.c
│   │   │   ├── isxdigit.c
│   │   │   ├── nonspacing.h
│   │   │   ├── punct.h
│   │   │   ├── toascii.c
│   │   │   ├── tolower.c
│   │   │   ├── toupper.c
│   │   │   ├── towctrans.c
│   │   │   ├── wcswidth.c
│   │   │   ├── wctrans.c
│   │   │   ├── wcwidth.c
│   │   │   └── wide.h
│   │   ├── dirent/
│   │   │   ├── __dirent.h
│   │   │   ├── alphasort.c
│   │   │   ├── closedir.c
│   │   │   ├── dirfd.c
│   │   │   ├── fdopendir.c
│   │   │   ├── opendir.c
│   │   │   ├── readdir.c
│   │   │   ├── readdir_r.c
│   │   │   ├── rewinddir.c
│   │   │   ├── scandir.c
│   │   │   ├── seekdir.c
│   │   │   ├── telldir.c
│   │   │   └── versionsort.c
│   │   ├── env/
│   │   │   ├── __environ.c
│   │   │   ├── __init_tls.c
│   │   │   ├── __libc_start_main.c
│   │   │   ├── __reset_tls.c
│   │   │   ├── __stack_chk_fail.c
│   │   │   ├── clearenv.c
│   │   │   ├── getenv.c
│   │   │   ├── putenv.c
│   │   │   ├── secure_getenv.c
│   │   │   ├── setenv.c
│   │   │   └── unsetenv.c
│   │   ├── errno/
│   │   │   ├── __errno_location.c
│   │   │   ├── __strerror.h
│   │   │   └── strerror.c
│   │   ├── exit/
│   │   │   ├── _Exit.c
│   │   │   ├── abort.c
│   │   │   ├── abort_lock.c
│   │   │   ├── arm/
│   │   │   │   └── __aeabi_atexit.c
│   │   │   ├── assert.c
│   │   │   ├── at_quick_exit.c
│   │   │   ├── atexit.c
│   │   │   ├── exit.c
│   │   │   └── quick_exit.c
│   │   ├── fcntl/
│   │   │   ├── creat.c
│   │   │   ├── fcntl.c
│   │   │   ├── open.c
│   │   │   ├── openat.c
│   │   │   ├── posix_fadvise.c
│   │   │   └── posix_fallocate.c
│   │   ├── fenv/
│   │   │   ├── __flt_rounds.c
│   │   │   ├── arm/
│   │   │   │   └── fenv.c
│   │   │   ├── fegetexceptflag.c
│   │   │   ├── feholdexcept.c
│   │   │   ├── fenv.c
│   │   │   ├── fesetexceptflag.c
│   │   │   ├── fesetround.c
│   │   │   ├── feupdateenv.c
│   │   │   ├── m68k/
│   │   │   │   └── fenv.c
│   │   │   ├── mips/
│   │   │   │   └── fenv-sf.c
│   │   │   ├── mips64/
│   │   │   │   └── fenv-sf.c
│   │   │   ├── mipsn32/
│   │   │   │   └── fenv-sf.c
│   │   │   ├── powerpc/
│   │   │   │   └── fenv-sf.c
│   │   │   ├── powerpc64/
│   │   │   │   └── fenv.c
│   │   │   ├── riscv64/
│   │   │   │   └── fenv-sf.c
│   │   │   ├── s390x/
│   │   │   │   └── fenv.c
│   │   │   └── sh/
│   │   │       └── fenv-nofpu.c
│   │   ├── include/
│   │   │   ├── arpa/
│   │   │   │   └── inet.h
│   │   │   ├── crypt.h
│   │   │   ├── errno.h
│   │   │   ├── features.h
│   │   │   ├── langinfo.h
│   │   │   ├── pthread.h
│   │   │   ├── resolv.h
│   │   │   ├── signal.h
│   │   │   ├── stdio.h
│   │   │   ├── stdlib.h
│   │   │   ├── string.h
│   │   │   ├── sys/
│   │   │   │   ├── auxv.h
│   │   │   │   ├── membarrier.h
│   │   │   │   ├── mman.h
│   │   │   │   ├── sysinfo.h
│   │   │   │   └── time.h
│   │   │   ├── time.h
│   │   │   ├── unistd.h
│   │   │   └── wchar.h
│   │   ├── internal/
│   │   │   ├── aio_impl.h
│   │   │   ├── asm.inc
│   │   │   ├── atomic.h
│   │   │   ├── complex_impl.h
│   │   │   ├── defsysinfo.c
│   │   │   ├── dynlink.h
│   │   │   ├── fdpic_crt.h
│   │   │   ├── floatscan.c
│   │   │   ├── floatscan.h
│   │   │   ├── fork_impl.h
│   │   │   ├── futex.h
│   │   │   ├── intscan.c
│   │   │   ├── intscan.h
│   │   │   ├── ksigaction.h
│   │   │   ├── libc.c
│   │   │   ├── libc.h
│   │   │   ├── libm.h
│   │   │   ├── locale_impl.h
│   │   │   ├── lock.h
│   │   │   ├── procfdname.c
│   │   │   ├── pthread_impl.h
│   │   │   ├── sh/
│   │   │   │   └── __shcall.c
│   │   │   ├── shgetc.c
│   │   │   ├── shgetc.h
│   │   │   ├── stdio_impl.h
│   │   │   ├── syscall.h
│   │   │   ├── syscall_ret.c
│   │   │   ├── vdso.c
│   │   │   └── version.c
│   │   ├── ldso/
│   │   │   ├── __dlsym.c
│   │   │   ├── arm/
│   │   │   │   └── find_exidx.c
│   │   │   ├── dl_iterate_phdr.c
│   │   │   ├── dladdr.c
│   │   │   ├── dlclose.c
│   │   │   ├── dlerror.c
│   │   │   ├── dlinfo.c
│   │   │   ├── dlopen.c
│   │   │   ├── dlsym.c
│   │   │   └── tlsdesc.c
│   │   ├── legacy/
│   │   │   ├── cuserid.c
│   │   │   ├── daemon.c
│   │   │   ├── err.c
│   │   │   ├── euidaccess.c
│   │   │   ├── ftw.c
│   │   │   ├── futimes.c
│   │   │   ├── getdtablesize.c
│   │   │   ├── getloadavg.c
│   │   │   ├── getpagesize.c
│   │   │   ├── getpass.c
│   │   │   ├── getusershell.c
│   │   │   ├── isastream.c
│   │   │   ├── lutimes.c
│   │   │   ├── ulimit.c
│   │   │   ├── utmpx.c
│   │   │   └── valloc.c
│   │   ├── locale/
│   │   │   ├── __lctrans.c
│   │   │   ├── __mo_lookup.c
│   │   │   ├── big5.h
│   │   │   ├── bind_textdomain_codeset.c
│   │   │   ├── c_locale.c
│   │   │   ├── catclose.c
│   │   │   ├── catgets.c
│   │   │   ├── catopen.c
│   │   │   ├── codepages.h
│   │   │   ├── dcngettext.c
│   │   │   ├── duplocale.c
│   │   │   ├── freelocale.c
│   │   │   ├── gb18030.h
│   │   │   ├── hkscs.h
│   │   │   ├── iconv.c
│   │   │   ├── iconv_close.c
│   │   │   ├── jis0208.h
│   │   │   ├── ksc.h
│   │   │   ├── langinfo.c
│   │   │   ├── legacychars.h
│   │   │   ├── locale_map.c
│   │   │   ├── localeconv.c
│   │   │   ├── newlocale.c
│   │   │   ├── pleval.c
│   │   │   ├── pleval.h
│   │   │   ├── revjis.h
│   │   │   ├── setlocale.c
│   │   │   ├── strcoll.c
│   │   │   ├── strfmon.c
│   │   │   ├── strxfrm.c
│   │   │   ├── textdomain.c
│   │   │   ├── uselocale.c
│   │   │   ├── wcscoll.c
│   │   │   └── wcsxfrm.c
│   │   ├── malloc/
│   │   │   ├── calloc.c
│   │   │   ├── free.c
│   │   │   ├── libc_calloc.c
│   │   │   ├── lite_malloc.c
│   │   │   ├── mallocng/
│   │   │   │   ├── aligned_alloc.c
│   │   │   │   ├── donate.c
│   │   │   │   ├── free.c
│   │   │   │   ├── glue.h
│   │   │   │   ├── malloc.c
│   │   │   │   ├── malloc_usable_size.c
│   │   │   │   ├── meta.h
│   │   │   │   └── realloc.c
│   │   │   ├── memalign.c
│   │   │   ├── oldmalloc/
│   │   │   │   ├── aligned_alloc.c
│   │   │   │   ├── malloc.c
│   │   │   │   ├── malloc_impl.h
│   │   │   │   └── malloc_usable_size.c
│   │   │   ├── posix_memalign.c
│   │   │   ├── realloc.c
│   │   │   ├── reallocarray.c
│   │   │   └── replaced.c
│   │   ├── math/
│   │   │   ├── __cos.c
│   │   │   ├── __cosdf.c
│   │   │   ├── __cosl.c
│   │   │   ├── __expo2.c
│   │   │   ├── __expo2f.c
│   │   │   ├── __fpclassify.c
│   │   │   ├── __fpclassifyf.c
│   │   │   ├── __fpclassifyl.c
│   │   │   ├── __invtrigl.c
│   │   │   ├── __invtrigl.h
│   │   │   ├── __math_divzero.c
│   │   │   ├── __math_divzerof.c
│   │   │   ├── __math_invalid.c
│   │   │   ├── __math_invalidf.c
│   │   │   ├── __math_invalidl.c
│   │   │   ├── __math_oflow.c
│   │   │   ├── __math_oflowf.c
│   │   │   ├── __math_uflow.c
│   │   │   ├── __math_uflowf.c
│   │   │   ├── __math_xflow.c
│   │   │   ├── __math_xflowf.c
│   │   │   ├── __polevll.c
│   │   │   ├── __rem_pio2.c
│   │   │   ├── __rem_pio2_large.c
│   │   │   ├── __rem_pio2f.c
│   │   │   ├── __rem_pio2l.c
│   │   │   ├── __signbit.c
│   │   │   ├── __signbitf.c
│   │   │   ├── __signbitl.c
│   │   │   ├── __sin.c
│   │   │   ├── __sindf.c
│   │   │   ├── __sinl.c
│   │   │   ├── __tan.c
│   │   │   ├── __tandf.c
│   │   │   ├── __tanl.c
│   │   │   ├── aarch64/
│   │   │   │   ├── ceil.c
│   │   │   │   ├── ceilf.c
│   │   │   │   ├── fabs.c
│   │   │   │   ├── fabsf.c
│   │   │   │   ├── floor.c
│   │   │   │   ├── floorf.c
│   │   │   │   ├── fma.c
│   │   │   │   ├── fmaf.c
│   │   │   │   ├── fmax.c
│   │   │   │   ├── fmaxf.c
│   │   │   │   ├── fmin.c
│   │   │   │   ├── fminf.c
│   │   │   │   ├── llrint.c
│   │   │   │   ├── llrintf.c
│   │   │   │   ├── llround.c
│   │   │   │   ├── llroundf.c
│   │   │   │   ├── lrint.c
│   │   │   │   ├── lrintf.c
│   │   │   │   ├── lround.c
│   │   │   │   ├── lroundf.c
│   │   │   │   ├── nearbyint.c
│   │   │   │   ├── nearbyintf.c
│   │   │   │   ├── rint.c
│   │   │   │   ├── rintf.c
│   │   │   │   ├── round.c
│   │   │   │   ├── roundf.c
│   │   │   │   ├── sqrt.c
│   │   │   │   ├── sqrtf.c
│   │   │   │   ├── trunc.c
│   │   │   │   └── truncf.c
│   │   │   ├── acos.c
│   │   │   ├── acosf.c
│   │   │   ├── acosh.c
│   │   │   ├── acoshf.c
│   │   │   ├── acoshl.c
│   │   │   ├── acosl.c
│   │   │   ├── arm/
│   │   │   │   ├── fabs.c
│   │   │   │   ├── fabsf.c
│   │   │   │   ├── fma.c
│   │   │   │   ├── fmaf.c
│   │   │   │   ├── sqrt.c
│   │   │   │   └── sqrtf.c
│   │   │   ├── asin.c
│   │   │   ├── asinf.c
│   │   │   ├── asinh.c
│   │   │   ├── asinhf.c
│   │   │   ├── asinhl.c
│   │   │   ├── asinl.c
│   │   │   ├── atan.c
│   │   │   ├── atan2.c
│   │   │   ├── atan2f.c
│   │   │   ├── atan2l.c
│   │   │   ├── atanf.c
│   │   │   ├── atanh.c
│   │   │   ├── atanhf.c
│   │   │   ├── atanhl.c
│   │   │   ├── atanl.c
│   │   │   ├── cbrt.c
│   │   │   ├── cbrtf.c
│   │   │   ├── cbrtl.c
│   │   │   ├── ceil.c
│   │   │   ├── ceilf.c
│   │   │   ├── ceill.c
│   │   │   ├── copysign.c
│   │   │   ├── copysignf.c
│   │   │   ├── copysignl.c
│   │   │   ├── cos.c
│   │   │   ├── cosf.c
│   │   │   ├── cosh.c
│   │   │   ├── coshf.c
│   │   │   ├── coshl.c
│   │   │   ├── cosl.c
│   │   │   ├── erf.c
│   │   │   ├── erff.c
│   │   │   ├── erfl.c
│   │   │   ├── exp.c
│   │   │   ├── exp10.c
│   │   │   ├── exp10f.c
│   │   │   ├── exp10l.c
│   │   │   ├── exp2.c
│   │   │   ├── exp2f.c
│   │   │   ├── exp2f_data.c
│   │   │   ├── exp2f_data.h
│   │   │   ├── exp2l.c
│   │   │   ├── exp_data.c
│   │   │   ├── exp_data.h
│   │   │   ├── expf.c
│   │   │   ├── expl.c
│   │   │   ├── expm1.c
│   │   │   ├── expm1f.c
│   │   │   ├── expm1l.c
│   │   │   ├── fabs.c
│   │   │   ├── fabsf.c
│   │   │   ├── fabsl.c
│   │   │   ├── fdim.c
│   │   │   ├── fdimf.c
│   │   │   ├── fdiml.c
│   │   │   ├── finite.c
│   │   │   ├── finitef.c
│   │   │   ├── floor.c
│   │   │   ├── floorf.c
│   │   │   ├── floorl.c
│   │   │   ├── fma.c
│   │   │   ├── fmaf.c
│   │   │   ├── fmal.c
│   │   │   ├── fmax.c
│   │   │   ├── fmaxf.c
│   │   │   ├── fmaxl.c
│   │   │   ├── fmin.c
│   │   │   ├── fminf.c
│   │   │   ├── fminl.c
│   │   │   ├── fmod.c
│   │   │   ├── fmodf.c
│   │   │   ├── fmodl.c
│   │   │   ├── frexp.c
│   │   │   ├── frexpf.c
│   │   │   ├── frexpl.c
│   │   │   ├── hypot.c
│   │   │   ├── hypotf.c
│   │   │   ├── hypotl.c
│   │   │   ├── i386/
│   │   │   │   ├── fabs.c
│   │   │   │   ├── fabsf.c
│   │   │   │   ├── fabsl.c
│   │   │   │   ├── fmod.c
│   │   │   │   ├── fmodf.c
│   │   │   │   ├── fmodl.c
│   │   │   │   ├── llrint.c
│   │   │   │   ├── llrintf.c
│   │   │   │   ├── llrintl.c
│   │   │   │   ├── lrint.c
│   │   │   │   ├── lrintf.c
│   │   │   │   ├── lrintl.c
│   │   │   │   ├── remainder.c
│   │   │   │   ├── remainderf.c
│   │   │   │   ├── remainderl.c
│   │   │   │   ├── rint.c
│   │   │   │   ├── rintf.c
│   │   │   │   ├── rintl.c
│   │   │   │   ├── sqrt.c
│   │   │   │   ├── sqrtf.c
│   │   │   │   └── sqrtl.c
│   │   │   ├── ilogb.c
│   │   │   ├── ilogbf.c
│   │   │   ├── ilogbl.c
│   │   │   ├── j0.c
│   │   │   ├── j0f.c
│   │   │   ├── j1.c
│   │   │   ├── j1f.c
│   │   │   ├── jn.c
│   │   │   ├── jnf.c
│   │   │   ├── ldexp.c
│   │   │   ├── ldexpf.c
│   │   │   ├── ldexpl.c
│   │   │   ├── lgamma.c
│   │   │   ├── lgamma_r.c
│   │   │   ├── lgammaf.c
│   │   │   ├── lgammaf_r.c
│   │   │   ├── lgammal.c
│   │   │   ├── llrint.c
│   │   │   ├── llrintf.c
│   │   │   ├── llrintl.c
│   │   │   ├── llround.c
│   │   │   ├── llroundf.c
│   │   │   ├── llroundl.c
│   │   │   ├── log.c
│   │   │   ├── log10.c
│   │   │   ├── log10f.c
│   │   │   ├── log10l.c
│   │   │   ├── log1p.c
│   │   │   ├── log1pf.c
│   │   │   ├── log1pl.c
│   │   │   ├── log2.c
│   │   │   ├── log2_data.c
│   │   │   ├── log2_data.h
│   │   │   ├── log2f.c
│   │   │   ├── log2f_data.c
│   │   │   ├── log2f_data.h
│   │   │   ├── log2l.c
│   │   │   ├── log_data.c
│   │   │   ├── log_data.h
│   │   │   ├── logb.c
│   │   │   ├── logbf.c
│   │   │   ├── logbl.c
│   │   │   ├── logf.c
│   │   │   ├── logf_data.c
│   │   │   ├── logf_data.h
│   │   │   ├── logl.c
│   │   │   ├── lrint.c
│   │   │   ├── lrintf.c
│   │   │   ├── lrintl.c
│   │   │   ├── lround.c
│   │   │   ├── lroundf.c
│   │   │   ├── lroundl.c
│   │   │   ├── m68k/
│   │   │   │   └── sqrtl.c
│   │   │   ├── mips/
│   │   │   │   ├── fabs.c
│   │   │   │   ├── fabsf.c
│   │   │   │   ├── sqrt.c
│   │   │   │   └── sqrtf.c
│   │   │   ├── modf.c
│   │   │   ├── modff.c
│   │   │   ├── modfl.c
│   │   │   ├── nan.c
│   │   │   ├── nanf.c
│   │   │   ├── nanl.c
│   │   │   ├── nearbyint.c
│   │   │   ├── nearbyintf.c
│   │   │   ├── nearbyintl.c
│   │   │   ├── nextafter.c
│   │   │   ├── nextafterf.c
│   │   │   ├── nextafterl.c
│   │   │   ├── nexttoward.c
│   │   │   ├── nexttowardf.c
│   │   │   ├── nexttowardl.c
│   │   │   ├── pow.c
│   │   │   ├── pow_data.c
│   │   │   ├── pow_data.h
│   │   │   ├── powerpc/
│   │   │   │   ├── fabs.c
│   │   │   │   ├── fabsf.c
│   │   │   │   ├── fma.c
│   │   │   │   ├── fmaf.c
│   │   │   │   ├── sqrt.c
│   │   │   │   └── sqrtf.c
│   │   │   ├── powerpc64/
│   │   │   │   ├── ceil.c
│   │   │   │   ├── ceilf.c
│   │   │   │   ├── fabs.c
│   │   │   │   ├── fabsf.c
│   │   │   │   ├── floor.c
│   │   │   │   ├── floorf.c
│   │   │   │   ├── fma.c
│   │   │   │   ├── fmaf.c
│   │   │   │   ├── fmax.c
│   │   │   │   ├── fmaxf.c
│   │   │   │   ├── fmin.c
│   │   │   │   ├── fminf.c
│   │   │   │   ├── lrint.c
│   │   │   │   ├── lrintf.c
│   │   │   │   ├── lround.c
│   │   │   │   ├── lroundf.c
│   │   │   │   ├── round.c
│   │   │   │   ├── roundf.c
│   │   │   │   ├── sqrt.c
│   │   │   │   ├── sqrtf.c
│   │   │   │   ├── trunc.c
│   │   │   │   └── truncf.c
│   │   │   ├── powf.c
│   │   │   ├── powf_data.c
│   │   │   ├── powf_data.h
│   │   │   ├── powl.c
│   │   │   ├── remainder.c
│   │   │   ├── remainderf.c
│   │   │   ├── remainderl.c
│   │   │   ├── remquo.c
│   │   │   ├── remquof.c
│   │   │   ├── remquol.c
│   │   │   ├── rint.c
│   │   │   ├── rintf.c
│   │   │   ├── rintl.c
│   │   │   ├── riscv64/
│   │   │   │   ├── copysign.c
│   │   │   │   ├── copysignf.c
│   │   │   │   ├── fabs.c
│   │   │   │   ├── fabsf.c
│   │   │   │   ├── fma.c
│   │   │   │   ├── fmaf.c
│   │   │   │   ├── fmax.c
│   │   │   │   ├── fmaxf.c
│   │   │   │   ├── fmin.c
│   │   │   │   ├── fminf.c
│   │   │   │   ├── sqrt.c
│   │   │   │   └── sqrtf.c
│   │   │   ├── round.c
│   │   │   ├── roundf.c
│   │   │   ├── roundl.c
│   │   │   ├── s390x/
│   │   │   │   ├── ceil.c
│   │   │   │   ├── ceilf.c
│   │   │   │   ├── ceill.c
│   │   │   │   ├── fabs.c
│   │   │   │   ├── fabsf.c
│   │   │   │   ├── fabsl.c
│   │   │   │   ├── floor.c
│   │   │   │   ├── floorf.c
│   │   │   │   ├── floorl.c
│   │   │   │   ├── fma.c
│   │   │   │   ├── fmaf.c
│   │   │   │   ├── nearbyint.c
│   │   │   │   ├── nearbyintf.c
│   │   │   │   ├── nearbyintl.c
│   │   │   │   ├── rint.c
│   │   │   │   ├── rintf.c
│   │   │   │   ├── rintl.c
│   │   │   │   ├── round.c
│   │   │   │   ├── roundf.c
│   │   │   │   ├── roundl.c
│   │   │   │   ├── sqrt.c
│   │   │   │   ├── sqrtf.c
│   │   │   │   ├── sqrtl.c
│   │   │   │   ├── trunc.c
│   │   │   │   ├── truncf.c
│   │   │   │   └── truncl.c
│   │   │   ├── scalb.c
│   │   │   ├── scalbf.c
│   │   │   ├── scalbln.c
│   │   │   ├── scalblnf.c
│   │   │   ├── scalblnl.c
│   │   │   ├── scalbn.c
│   │   │   ├── scalbnf.c
│   │   │   ├── scalbnl.c
│   │   │   ├── signgam.c
│   │   │   ├── significand.c
│   │   │   ├── significandf.c
│   │   │   ├── sin.c
│   │   │   ├── sincos.c
│   │   │   ├── sincosf.c
│   │   │   ├── sincosl.c
│   │   │   ├── sinf.c
│   │   │   ├── sinh.c
│   │   │   ├── sinhf.c
│   │   │   ├── sinhl.c
│   │   │   ├── sinl.c
│   │   │   ├── sqrt.c
│   │   │   ├── sqrt_data.c
│   │   │   ├── sqrt_data.h
│   │   │   ├── sqrtf.c
│   │   │   ├── sqrtl.c
│   │   │   ├── tan.c
│   │   │   ├── tanf.c
│   │   │   ├── tanh.c
│   │   │   ├── tanhf.c
│   │   │   ├── tanhl.c
│   │   │   ├── tanl.c
│   │   │   ├── tgamma.c
│   │   │   ├── tgammaf.c
│   │   │   ├── tgammal.c
│   │   │   ├── trunc.c
│   │   │   ├── truncf.c
│   │   │   ├── truncl.c
│   │   │   ├── x32/
│   │   │   │   ├── fma.c
│   │   │   │   └── fmaf.c
│   │   │   └── x86_64/
│   │   │       ├── fabs.c
│   │   │       ├── fabsf.c
│   │   │       ├── fabsl.c
│   │   │       ├── fma.c
│   │   │       ├── fmaf.c
│   │   │       ├── fmodl.c
│   │   │       ├── llrint.c
│   │   │       ├── llrintf.c
│   │   │       ├── llrintl.c
│   │   │       ├── lrint.c
│   │   │       ├── lrintf.c
│   │   │       ├── lrintl.c
│   │   │       ├── remainderl.c
│   │   │       ├── remquol.c
│   │   │       ├── rintl.c
│   │   │       ├── sqrt.c
│   │   │       ├── sqrtf.c
│   │   │       └── sqrtl.c
│   │   ├── minos/
│   │   │   ├── aarch64/
│   │   │   │   ├── aarch64_kobject.c
│   │   │   │   ├── aarch64_svc.S
│   │   │   │   └── aarch64_svc.h
│   │   │   ├── brk.c
│   │   │   ├── device.c
│   │   │   ├── grant.c
│   │   │   ├── kobject.c
│   │   │   ├── map.c
│   │   │   ├── poll.c
│   │   │   ├── procinfo.c
│   │   │   ├── proto.c
│   │   │   ├── service.c
│   │   │   ├── sys.c
│   │   │   ├── thread.c
│   │   │   └── yield.c
│   │   ├── misc/
│   │   │   ├── a64l.c
│   │   │   ├── basename.c
│   │   │   ├── dirname.c
│   │   │   ├── ffs.c
│   │   │   ├── ffsl.c
│   │   │   ├── ffsll.c
│   │   │   ├── fmtmsg.c
│   │   │   ├── forkpty.c
│   │   │   ├── get_current_dir_name.c
│   │   │   ├── getauxval.c
│   │   │   ├── getdomainname.c
│   │   │   ├── getentropy.c
│   │   │   ├── gethostid.c
│   │   │   ├── getopt.c
│   │   │   ├── getopt_long.c
│   │   │   ├── getsubopt.c
│   │   │   ├── initgroups.c
│   │   │   ├── issetugid.c
│   │   │   ├── lockf.c
│   │   │   ├── login_tty.c
│   │   │   ├── mntent.c
│   │   │   ├── nftw.c
│   │   │   ├── openpty.c
│   │   │   ├── ptsname.c
│   │   │   ├── realpath.c
│   │   │   ├── syscall.c
│   │   │   ├── syslog.c
│   │   │   └── wordexp.c
│   │   ├── mman/
│   │   │   ├── madvise.c
│   │   │   ├── mmap.c
│   │   │   ├── mprotect.c
│   │   │   ├── munmap.c
│   │   │   └── posix_madvise.c
│   │   ├── multibyte/
│   │   │   ├── btowc.c
│   │   │   ├── c16rtomb.c
│   │   │   ├── c32rtomb.c
│   │   │   ├── internal.c
│   │   │   ├── internal.h
│   │   │   ├── mblen.c
│   │   │   ├── mbrlen.c
│   │   │   ├── mbrtoc16.c
│   │   │   ├── mbrtoc32.c
│   │   │   ├── mbrtowc.c
│   │   │   ├── mbsinit.c
│   │   │   ├── mbsnrtowcs.c
│   │   │   ├── mbsrtowcs.c
│   │   │   ├── mbstowcs.c
│   │   │   ├── mbtowc.c
│   │   │   ├── wcrtomb.c
│   │   │   ├── wcsnrtombs.c
│   │   │   ├── wcsrtombs.c
│   │   │   ├── wcstombs.c
│   │   │   ├── wctob.c
│   │   │   └── wctomb.c
│   │   ├── passwd/
│   │   │   ├── fgetgrent.c
│   │   │   ├── fgetpwent.c
│   │   │   ├── fgetspent.c
│   │   │   ├── getgr_a.c
│   │   │   ├── getgr_r.c
│   │   │   ├── getgrent.c
│   │   │   ├── getgrent_a.c
│   │   │   ├── getgrouplist.c
│   │   │   ├── getpw_a.c
│   │   │   ├── getpw_r.c
│   │   │   ├── getpwent.c
│   │   │   ├── getpwent_a.c
│   │   │   ├── getspent.c
│   │   │   ├── getspnam.c
│   │   │   ├── getspnam_r.c
│   │   │   ├── lckpwdf.c
│   │   │   ├── nscd.h
│   │   │   ├── nscd_query.c
│   │   │   ├── putgrent.c
│   │   │   ├── putpwent.c
│   │   │   ├── putspent.c
│   │   │   └── pwf.h
│   │   ├── prng/
│   │   │   ├── __rand48_step.c
│   │   │   ├── __seed48.c
│   │   │   ├── drand48.c
│   │   │   ├── lcong48.c
│   │   │   ├── lrand48.c
│   │   │   ├── mrand48.c
│   │   │   ├── rand.c
│   │   │   ├── rand48.h
│   │   │   ├── rand_r.c
│   │   │   ├── random.c
│   │   │   ├── seed48.c
│   │   │   └── srand48.c
│   │   ├── process/
│   │   │   ├── execv.c
│   │   │   ├── wait.c
│   │   │   ├── waitid.c
│   │   │   └── waitpid.c
│   │   ├── regex/
│   │   │   ├── fnmatch.c
│   │   │   ├── glob.c
│   │   │   ├── regcomp.c
│   │   │   ├── regerror.c
│   │   │   ├── regexec.c
│   │   │   ├── tre-mem.c
│   │   │   └── tre.h
│   │   ├── search/
│   │   │   ├── hsearch.c
│   │   │   ├── insque.c
│   │   │   ├── lsearch.c
│   │   │   ├── tdelete.c
│   │   │   ├── tdestroy.c
│   │   │   ├── tfind.c
│   │   │   ├── tsearch.c
│   │   │   ├── tsearch.h
│   │   │   └── twalk.c
│   │   ├── setjmp/
│   │   │   ├── longjmp.c
│   │   │   └── setjmp.c
│   │   ├── stdio/
│   │   │   ├── __fclose_ca.c
│   │   │   ├── __fdopen.c
│   │   │   ├── __fmodeflags.c
│   │   │   ├── __fopen_rb_ca.c
│   │   │   ├── __lockfile.c
│   │   │   ├── __overflow.c
│   │   │   ├── __stdio_close.c
│   │   │   ├── __stdio_exit.c
│   │   │   ├── __stdio_read.c
│   │   │   ├── __stdio_seek.c
│   │   │   ├── __stdio_write.c
│   │   │   ├── __stdout_write.c
│   │   │   ├── __toread.c
│   │   │   ├── __towrite.c
│   │   │   ├── __uflow.c
│   │   │   ├── asprintf.c
│   │   │   ├── clearerr.c
│   │   │   ├── dprintf.c
│   │   │   ├── ext.c
│   │   │   ├── ext2.c
│   │   │   ├── fclose.c
│   │   │   ├── feof.c
│   │   │   ├── ferror.c
│   │   │   ├── fflush.c
│   │   │   ├── fgetc.c
│   │   │   ├── fgetln.c
│   │   │   ├── fgetpos.c
│   │   │   ├── fgets.c
│   │   │   ├── fgetwc.c
│   │   │   ├── fgetws.c
│   │   │   ├── fileno.c
│   │   │   ├── flockfile.c
│   │   │   ├── fmemopen.c
│   │   │   ├── fopen.c
│   │   │   ├── fopencookie.c
│   │   │   ├── fprintf.c
│   │   │   ├── fputc.c
│   │   │   ├── fputs.c
│   │   │   ├── fputwc.c
│   │   │   ├── fputws.c
│   │   │   ├── fread.c
│   │   │   ├── freopen.c
│   │   │   ├── fscanf.c
│   │   │   ├── fseek.c
│   │   │   ├── fsetpos.c
│   │   │   ├── ftell.c
│   │   │   ├── ftrylockfile.c
│   │   │   ├── funlockfile.c
│   │   │   ├── fwide.c
│   │   │   ├── fwprintf.c
│   │   │   ├── fwrite.c
│   │   │   ├── fwscanf.c
│   │   │   ├── getc.c
│   │   │   ├── getc.h
│   │   │   ├── getc_unlocked.c
│   │   │   ├── getchar.c
│   │   │   ├── getchar_unlocked.c
│   │   │   ├── getdelim.c
│   │   │   ├── getline.c
│   │   │   ├── gets.c
│   │   │   ├── getw.c
│   │   │   ├── getwc.c
│   │   │   ├── getwchar.c
│   │   │   ├── ofl.c
│   │   │   ├── ofl_add.c
│   │   │   ├── open_memstream.c
│   │   │   ├── open_wmemstream.c
│   │   │   ├── perror.c
│   │   │   ├── popen.c
│   │   │   ├── printf.c
│   │   │   ├── putc.c
│   │   │   ├── putc.h
│   │   │   ├── putc_unlocked.c
│   │   │   ├── putchar.c
│   │   │   ├── putchar_unlocked.c
│   │   │   ├── puts.c
│   │   │   ├── putw.c
│   │   │   ├── putwc.c
│   │   │   ├── putwchar.c
│   │   │   ├── rewind.c
│   │   │   ├── scanf.c
│   │   │   ├── setbuf.c
│   │   │   ├── setbuffer.c
│   │   │   ├── setlinebuf.c
│   │   │   ├── setvbuf.c
│   │   │   ├── snprintf.c
│   │   │   ├── sprintf.c
│   │   │   ├── sscanf.c
│   │   │   ├── stderr.c
│   │   │   ├── stdin.c
│   │   │   ├── stdout.c
│   │   │   ├── swprintf.c
│   │   │   ├── swscanf.c
│   │   │   ├── ungetc.c
│   │   │   ├── ungetwc.c
│   │   │   ├── vasprintf.c
│   │   │   ├── vdprintf.c
│   │   │   ├── vfprintf.c
│   │   │   ├── vfscanf.c
│   │   │   ├── vfwprintf.c
│   │   │   ├── vfwscanf.c
│   │   │   ├── vprintf.c
│   │   │   ├── vscanf.c
│   │   │   ├── vsnprintf.c
│   │   │   ├── vsprintf.c
│   │   │   ├── vsscanf.c
│   │   │   ├── vswprintf.c
│   │   │   ├── vswscanf.c
│   │   │   ├── vwprintf.c
│   │   │   ├── vwscanf.c
│   │   │   ├── wprintf.c
│   │   │   └── wscanf.c
│   │   ├── stdlib/
│   │   │   ├── abs.c
│   │   │   ├── atof.c
│   │   │   ├── atoi.c
│   │   │   ├── atol.c
│   │   │   ├── atoll.c
│   │   │   ├── bsearch.c
│   │   │   ├── div.c
│   │   │   ├── ecvt.c
│   │   │   ├── fcvt.c
│   │   │   ├── gcvt.c
│   │   │   ├── imaxabs.c
│   │   │   ├── imaxdiv.c
│   │   │   ├── labs.c
│   │   │   ├── ldiv.c
│   │   │   ├── llabs.c
│   │   │   ├── lldiv.c
│   │   │   ├── qsort.c
│   │   │   ├── strtod.c
│   │   │   ├── strtol.c
│   │   │   ├── wcstod.c
│   │   │   └── wcstol.c
│   │   ├── string/
│   │   │   ├── bcmp.c
│   │   │   ├── bcopy.c
│   │   │   ├── bzero.c
│   │   │   ├── explicit_bzero.c
│   │   │   ├── index.c
│   │   │   ├── memccpy.c
│   │   │   ├── memchr.c
│   │   │   ├── memcmp.c
│   │   │   ├── memcpy.c
│   │   │   ├── memmem.c
│   │   │   ├── memmove.c
│   │   │   ├── mempcpy.c
│   │   │   ├── memrchr.c
│   │   │   ├── memset.c
│   │   │   ├── rindex.c
│   │   │   ├── stpcpy.c
│   │   │   ├── stpncpy.c
│   │   │   ├── strcasecmp.c
│   │   │   ├── strcasestr.c
│   │   │   ├── strcat.c
│   │   │   ├── strchr.c
│   │   │   ├── strchrnul.c
│   │   │   ├── strcmp.c
│   │   │   ├── strcpy.c
│   │   │   ├── strcspn.c
│   │   │   ├── strdup.c
│   │   │   ├── strerror_r.c
│   │   │   ├── strlcat.c
│   │   │   ├── strlcpy.c
│   │   │   ├── strlen.c
│   │   │   ├── strncasecmp.c
│   │   │   ├── strncat.c
│   │   │   ├── strncmp.c
│   │   │   ├── strncpy.c
│   │   │   ├── strndup.c
│   │   │   ├── strnlen.c
│   │   │   ├── strpbrk.c
│   │   │   ├── strrchr.c
│   │   │   ├── strsep.c
│   │   │   ├── strsignal.c
│   │   │   ├── strspn.c
│   │   │   ├── strstr.c
│   │   │   ├── strtok.c
│   │   │   ├── strtok_r.c
│   │   │   ├── strverscmp.c
│   │   │   ├── swab.c
│   │   │   ├── wcpcpy.c
│   │   │   ├── wcpncpy.c
│   │   │   ├── wcscasecmp.c
│   │   │   ├── wcscasecmp_l.c
│   │   │   ├── wcscat.c
│   │   │   ├── wcschr.c
│   │   │   ├── wcscmp.c
│   │   │   ├── wcscpy.c
│   │   │   ├── wcscspn.c
│   │   │   ├── wcsdup.c
│   │   │   ├── wcslen.c
│   │   │   ├── wcsncasecmp.c
│   │   │   ├── wcsncasecmp_l.c
│   │   │   ├── wcsncat.c
│   │   │   ├── wcsncmp.c
│   │   │   ├── wcsncpy.c
│   │   │   ├── wcsnlen.c
│   │   │   ├── wcspbrk.c
│   │   │   ├── wcsrchr.c
│   │   │   ├── wcsspn.c
│   │   │   ├── wcsstr.c
│   │   │   ├── wcstok.c
│   │   │   ├── wcswcs.c
│   │   │   ├── wmemchr.c
│   │   │   ├── wmemcmp.c
│   │   │   ├── wmemcpy.c
│   │   │   ├── wmemmove.c
│   │   │   └── wmemset.c
│   │   ├── temp/
│   │   │   ├── __randname.c
│   │   │   ├── mkdtemp.c
│   │   │   ├── mkostemp.c
│   │   │   ├── mkostemps.c
│   │   │   ├── mkstemp.c
│   │   │   ├── mkstemps.c
│   │   │   └── mktemp.c
│   │   ├── termios/
│   │   │   ├── cfgetospeed.c
│   │   │   ├── cfmakeraw.c
│   │   │   ├── cfsetospeed.c
│   │   │   ├── tcdrain.c
│   │   │   ├── tcflow.c
│   │   │   ├── tcflush.c
│   │   │   ├── tcgetattr.c
│   │   │   ├── tcgetsid.c
│   │   │   ├── tcgetwinsize.c
│   │   │   ├── tcsendbreak.c
│   │   │   ├── tcsetattr.c
│   │   │   └── tcsetwinsize.c
│   │   ├── thread/
│   │   │   ├── __lock.c
│   │   │   ├── __set_thread_area.c
│   │   │   ├── __syscall_cp.c
│   │   │   ├── __timedwait.c
│   │   │   ├── __tls_get_addr.c
│   │   │   ├── __unmapself.c
│   │   │   ├── __wait.c
│   │   │   ├── aarch64/
│   │   │   │   ├── __set_thread_area.S
│   │   │   │   ├── __unmapself.S
│   │   │   │   ├── clone.S
│   │   │   │   └── syscall_cp.S
│   │   │   ├── arm/
│   │   │   │   └── __set_thread_area.c
│   │   │   ├── call_once.c
│   │   │   ├── clone.c
│   │   │   ├── cnd_broadcast.c
│   │   │   ├── cnd_destroy.c
│   │   │   ├── cnd_init.c
│   │   │   ├── cnd_signal.c
│   │   │   ├── cnd_timedwait.c
│   │   │   ├── cnd_wait.c
│   │   │   ├── default_attr.c
│   │   │   ├── lock_ptc.c
│   │   │   ├── mtx_destroy.c
│   │   │   ├── mtx_init.c
│   │   │   ├── mtx_lock.c
│   │   │   ├── mtx_timedlock.c
│   │   │   ├── mtx_trylock.c
│   │   │   ├── mtx_unlock.c
│   │   │   ├── pthread_atfork.c
│   │   │   ├── pthread_attr_destroy.c
│   │   │   ├── pthread_attr_get.c
│   │   │   ├── pthread_attr_init.c
│   │   │   ├── pthread_attr_setdetachstate.c
│   │   │   ├── pthread_attr_setguardsize.c
│   │   │   ├── pthread_attr_setinheritsched.c
│   │   │   ├── pthread_attr_setschedparam.c
│   │   │   ├── pthread_attr_setschedpolicy.c
│   │   │   ├── pthread_attr_setscope.c
│   │   │   ├── pthread_attr_setstack.c
│   │   │   ├── pthread_attr_setstacksize.c
│   │   │   ├── pthread_barrier_destroy.c
│   │   │   ├── pthread_barrier_init.c
│   │   │   ├── pthread_barrier_wait.c
│   │   │   ├── pthread_barrierattr_destroy.c
│   │   │   ├── pthread_barrierattr_init.c
│   │   │   ├── pthread_barrierattr_setpshared.c
│   │   │   ├── pthread_cancel.c
│   │   │   ├── pthread_cleanup_push.c
│   │   │   ├── pthread_cond_broadcast.c
│   │   │   ├── pthread_cond_destroy.c
│   │   │   ├── pthread_cond_init.c
│   │   │   ├── pthread_cond_signal.c
│   │   │   ├── pthread_cond_timedwait.c
│   │   │   ├── pthread_cond_wait.c
│   │   │   ├── pthread_condattr_destroy.c
│   │   │   ├── pthread_condattr_init.c
│   │   │   ├── pthread_condattr_setclock.c
│   │   │   ├── pthread_condattr_setpshared.c
│   │   │   ├── pthread_create.c
│   │   │   ├── pthread_detach.c
│   │   │   ├── pthread_equal.c
│   │   │   ├── pthread_getattr_np.c
│   │   │   ├── pthread_getconcurrency.c
│   │   │   ├── pthread_getcpuclockid.c
│   │   │   ├── pthread_getschedparam.c
│   │   │   ├── pthread_getspecific.c
│   │   │   ├── pthread_join.c
│   │   │   ├── pthread_key_create.c
│   │   │   ├── pthread_kill.c
│   │   │   ├── pthread_mutex_consistent.c
│   │   │   ├── pthread_mutex_destroy.c
│   │   │   ├── pthread_mutex_getprioceiling.c
│   │   │   ├── pthread_mutex_init.c
│   │   │   ├── pthread_mutex_lock.c
│   │   │   ├── pthread_mutex_setprioceiling.c
│   │   │   ├── pthread_mutex_timedlock.c
│   │   │   ├── pthread_mutex_trylock.c
│   │   │   ├── pthread_mutex_unlock.c
│   │   │   ├── pthread_mutexattr_destroy.c
│   │   │   ├── pthread_mutexattr_init.c
│   │   │   ├── pthread_mutexattr_setprotocol.c
│   │   │   ├── pthread_mutexattr_setpshared.c
│   │   │   ├── pthread_mutexattr_setrobust.c
│   │   │   ├── pthread_mutexattr_settype.c
│   │   │   ├── pthread_once.c
│   │   │   ├── pthread_rwlock_destroy.c
│   │   │   ├── pthread_rwlock_init.c
│   │   │   ├── pthread_rwlock_rdlock.c
│   │   │   ├── pthread_rwlock_timedrdlock.c
│   │   │   ├── pthread_rwlock_timedwrlock.c
│   │   │   ├── pthread_rwlock_tryrdlock.c
│   │   │   ├── pthread_rwlock_trywrlock.c
│   │   │   ├── pthread_rwlock_unlock.c
│   │   │   ├── pthread_rwlock_wrlock.c
│   │   │   ├── pthread_rwlockattr_destroy.c
│   │   │   ├── pthread_rwlockattr_init.c
│   │   │   ├── pthread_rwlockattr_setpshared.c
│   │   │   ├── pthread_self.c
│   │   │   ├── pthread_setattr_default_np.c
│   │   │   ├── pthread_setcancelstate.c
│   │   │   ├── pthread_setcanceltype.c
│   │   │   ├── pthread_setconcurrency.c
│   │   │   ├── pthread_setname_np.c
│   │   │   ├── pthread_setschedparam.c
│   │   │   ├── pthread_setschedprio.c
│   │   │   ├── pthread_setspecific.c
│   │   │   ├── pthread_sigmask.c
│   │   │   ├── pthread_spin_destroy.c
│   │   │   ├── pthread_spin_init.c
│   │   │   ├── pthread_spin_lock.c
│   │   │   ├── pthread_spin_trylock.c
│   │   │   ├── pthread_spin_unlock.c
│   │   │   ├── pthread_testcancel.c
│   │   │   ├── sem_destroy.c
│   │   │   ├── sem_getvalue.c
│   │   │   ├── sem_init.c
│   │   │   ├── sem_open.c
│   │   │   ├── sem_post.c
│   │   │   ├── sem_timedwait.c
│   │   │   ├── sem_trywait.c
│   │   │   ├── sem_unlink.c
│   │   │   ├── sem_wait.c
│   │   │   ├── sh/
│   │   │   │   ├── __set_thread_area.c
│   │   │   │   └── __unmapself.c
│   │   │   ├── synccall.c
│   │   │   ├── syscall_cp.c
│   │   │   ├── thrd_create.c
│   │   │   ├── thrd_exit.c
│   │   │   ├── thrd_join.c
│   │   │   ├── thrd_sleep.c
│   │   │   ├── thrd_yield.c
│   │   │   ├── tls.c
│   │   │   ├── tss_create.c
│   │   │   ├── tss_delete.c
│   │   │   ├── tss_set.c
│   │   │   └── vmlock.c
│   │   ├── time/
│   │   │   ├── __month_to_secs.c
│   │   │   ├── __secs_to_tm.c
│   │   │   ├── __tm_to_secs.c
│   │   │   ├── __year_to_secs.c
│   │   │   ├── asctime.c
│   │   │   ├── asctime_r.c
│   │   │   ├── clock.c
│   │   │   ├── clock_getres.c
│   │   │   ├── clock_gettime.c
│   │   │   ├── clock_nanosleep.c
│   │   │   ├── clock_settime.c
│   │   │   ├── ctime.c
│   │   │   ├── ctime_r.c
│   │   │   ├── difftime.c
│   │   │   ├── ftime.c
│   │   │   ├── getdate.c
│   │   │   ├── gettimeofday.c
│   │   │   ├── gmtime.c
│   │   │   ├── gmtime_r.c
│   │   │   ├── localtime.c
│   │   │   ├── localtime_r.c
│   │   │   ├── mktime.c
│   │   │   ├── nanosleep.c
│   │   │   ├── strptime.c
│   │   │   ├── time.c
│   │   │   ├── time_impl.h
│   │   │   ├── timegm.c
│   │   │   ├── times.c
│   │   │   ├── timespec_get.c
│   │   │   ├── utime.c
│   │   │   └── wcsftime.c
│   │   └── unistd/
│   │       ├── aarch64/
│   │       │   └── __unistd.c
│   │       ├── access.c
│   │       ├── chdir.c
│   │       ├── close.c
│   │       ├── getpid.c
│   │       ├── gettid.c
│   │       ├── read.c
│   │       └── write.c
│   ├── stat/
│   │   └── stat.c
│   └── tools/
│       ├── add-cfi.common.awk
│       ├── add-cfi.i386.awk
│       ├── add-cfi.x86_64.awk
│       ├── install.sh
│       ├── ld.musl-clang.in
│       ├── mkalltypes.sed
│       ├── musl-clang.in
│       ├── musl-gcc.specs.sh
│       └── version.sh
├── user.libs/
│   ├── libfdt/
│   │   ├── Makefile
│   │   ├── include/
│   │   │   └── libfdt/
│   │   │       ├── fdt.h
│   │   │       ├── libfdt.h
│   │   │       └── libfdt_env.h
│   │   └── src/
│   │       ├── fdt.c
│   │       ├── fdt_addresses.c
│   │       ├── fdt_empty_tree.c
│   │       ├── fdt_overlay.c
│   │       ├── fdt_ro.c
│   │       ├── fdt_rw.c
│   │       ├── fdt_strerror.c
│   │       ├── fdt_sw.c
│   │       ├── fdt_wip.c
│   │       └── libfdt_internal.h
│   ├── liblwext4/
│   │   ├── Makefile
│   │   ├── ext4_mem.c
│   │   ├── ext4_server.c
│   │   ├── include/
│   │   │   └── lwext4/
│   │   │       ├── ext4.h
│   │   │       ├── ext4_balloc.h
│   │   │       ├── ext4_bcache.h
│   │   │       ├── ext4_bitmap.h
│   │   │       ├── ext4_blkdev.h
│   │   │       ├── ext4_block_group.h
│   │   │       ├── ext4_blockdev.h
│   │   │       ├── ext4_config.h
│   │   │       ├── ext4_crc32.h
│   │   │       ├── ext4_debug.h
│   │   │       ├── ext4_dir.h
│   │   │       ├── ext4_dir_idx.h
│   │   │       ├── ext4_errno.h
│   │   │       ├── ext4_extent.h
│   │   │       ├── ext4_fs.h
│   │   │       ├── ext4_hash.h
│   │   │       ├── ext4_ialloc.h
│   │   │       ├── ext4_inode.h
│   │   │       ├── ext4_journal.h
│   │   │       ├── ext4_mbr.h
│   │   │       ├── ext4_misc.h
│   │   │       ├── ext4_mkfs.h
│   │   │       ├── ext4_oflags.h
│   │   │       ├── ext4_super.h
│   │   │       ├── ext4_trans.h
│   │   │       ├── ext4_types.h
│   │   │       ├── ext4_xattr.h
│   │   │       └── misc/
│   │   │           ├── queue.h
│   │   │           └── tree.h
│   │   └── src/
│   │       ├── ext4.c
│   │       ├── ext4_balloc.c
│   │       ├── ext4_bcache.c
│   │       ├── ext4_bitmap.c
│   │       ├── ext4_block_group.c
│   │       ├── ext4_blockdev.c
│   │       ├── ext4_crc32.c
│   │       ├── ext4_debug.c
│   │       ├── ext4_dir.c
│   │       ├── ext4_dir_idx.c
│   │       ├── ext4_extent.c
│   │       ├── ext4_fs.c
│   │       ├── ext4_hash.c
│   │       ├── ext4_ialloc.c
│   │       ├── ext4_inode.c
│   │       ├── ext4_journal.c
│   │       ├── ext4_mbr.c
│   │       ├── ext4_mkfs.c
│   │       ├── ext4_super.c
│   │       ├── ext4_trans.c
│   │       └── ext4_xattr.c
│   └── libmisc/
│       ├── Makefile
│       ├── include/
│       │   └── misc.h
│       └── misc.c
└── user.sbin/
    ├── chiyou/
    │   ├── Makefile
    │   ├── chiyou.c
    │   ├── of.c
    │   └── of.h
    ├── fuxi/
    │   ├── Makefile
    │   └── fuxi.c
    ├── nvwa/
    │   ├── Makefile
    │   ├── elf.h
    │   ├── elf_std.c
    │   └── nvwa.c
    └── pangu/
        ├── .gitignore
        ├── Makefile
        ├── include/
        │   └── pangu/
        │       ├── bootarg.h
        │       ├── elf.h
        │       ├── kmalloc.h
        │       ├── mm.h
        │       ├── proc.h
        │       └── ramdisk.h
        └── src/
            ├── bootarg.c
            ├── elf_ramdisk.c
            ├── kmalloc.c
            ├── mm.c
            ├── of.c
            ├── pangu.c
            ├── process.c
            ├── procinfo.c
            └── ramdisk.c
Download .txt
Showing preview only (674K chars total). Download the full file or copy to clipboard to get everything.
SYMBOL INDEX (8440 symbols across 1826 files)

FILE: generic/include/uapi/bootdata.h
  type bootdata (line 15) | struct bootdata {

FILE: generic/include/uapi/hypervisor.h
  type vmtag (line 33) | struct vmtag {
  type vm_ring (line 66) | struct vm_ring {

FILE: generic/include/uapi/ramdisk.h
  type ramdisk_inode (line 16) | struct ramdisk_inode {
  type ramdisk_sb (line 22) | struct ramdisk_sb {
  type ramdisk_file (line 30) | struct ramdisk_file {

FILE: generic/include/uapi/time.h
  type timespec (line 4) | struct timespec {

FILE: kernel/apps/esh/esh.c
  type esh_flags (line 25) | enum esh_flags {
  type esh (line 31) | struct esh
  type esh (line 32) | struct esh
  type esh (line 33) | struct esh
  type esh (line 34) | struct esh
  type esh (line 35) | struct esh
  type esh (line 36) | struct esh
  type esh (line 37) | struct esh
  type esh (line 38) | struct esh
  type esh (line 39) | struct esh
  type esh (line 40) | struct esh
  type esh (line 41) | struct esh
  type esh (line 42) | struct esh
  type esh (line 43) | struct esh
  type esh (line 44) | struct esh
  type esh (line 46) | struct esh
  type esh (line 49) | struct esh
  type esh (line 51) | struct esh
  function ESH_OVERFLOW_CALLBACK (line 52) | __attribute__((weak))
  function esh_register_command (line 59) | void esh_register_command(struct esh * esh, esh_cb_command callback)
  function esh_register_print (line 66) | void esh_register_print(struct esh * esh, esh_cb_print callback)
  function esh_register_overflow (line 73) | void esh_register_overflow(struct esh * esh, esh_cb_overflow overflow)
  function esh_set_command_arg (line 81) | void esh_set_command_arg(struct esh * esh, void * arg)
  function esh_set_print_arg (line 88) | void esh_set_print_arg(struct esh * esh, void * arg)
  function esh_set_overflow_arg (line 95) | void esh_set_overflow_arg(struct esh * esh, void * arg)
  function do_print_callback (line 101) | static void do_print_callback(struct esh * esh, char c)
  function do_command (line 112) | static void do_command(struct esh * esh, int argc, char ** argv)
  function do_overflow_callback (line 123) | static void do_overflow_callback(struct esh * esh, char const * buffer)
  type esh (line 140) | struct esh
  type esh (line 147) | struct esh
  type esh (line 157) | struct esh
  function free_last_allocated (line 168) | static void free_last_allocated(struct esh *esh)
  type esh (line 180) | struct esh
  type esh (line 182) | struct esh
  function esh_rx (line 199) | void esh_rx(struct esh * esh, char c)
  function handle_char (line 227) | static void handle_char(struct esh * esh, char c)
  function handle_ctrl (line 252) | static void handle_ctrl(struct esh * esh, char c)
  function handle_esc (line 284) | static void handle_esc(struct esh * esh, char esc)
  function command_is_nop (line 362) | static bool command_is_nop(struct esh * esh)
  function execute_command (line 380) | static void execute_command(struct esh * esh)
  function esh_print_prompt (line 415) | void esh_print_prompt(struct esh * esh)
  function esh_default_overflow (line 426) | void esh_default_overflow(struct esh * esh, char const * buffer, void * ...
  function esh_putc (line 435) | bool esh_putc(struct esh * esh, char c)
  function esh_puts (line 444) | bool esh_puts(struct esh * esh, char const * s)
  function esh_puts_flash (line 457) | bool esh_puts_flash(struct esh * esh, char const __flash * s)
  function esh_restore (line 470) | void esh_restore(struct esh * esh)
  function esh_get_slice_size (line 485) | size_t esh_get_slice_size(void)
  function term_cursor_move (line 495) | static void term_cursor_move(struct esh * esh, int n)
  function cursor_move (line 513) | static void cursor_move(struct esh * esh, int n)
  function word_move (line 536) | static void word_move(struct esh * esh, int dir)
  function ins_del (line 564) | static void ins_del(struct esh * esh, char c)

FILE: kernel/apps/esh/esh.h
  type esh (line 160) | struct esh
  type esh (line 189) | struct esh
  type esh (line 194) | struct esh
  type esh (line 210) | struct esh
  type esh (line 219) | struct esh
  type esh (line 227) | struct esh
  type esh (line 233) | struct esh
  type esh (line 238) | struct esh
  type esh (line 244) | struct esh
  type esh (line 257) | struct esh
  type esh (line 262) | struct esh
  type esh (line 267) | struct esh
  type esh (line 272) | struct esh

FILE: kernel/apps/esh/esh_argparser.c
  function consume_quoted (line 39) | static void consume_quoted(struct esh *esh, size_t *src_i, size_t *dest_i)
  function esh_parse_args (line 57) | int esh_parse_args(struct esh *esh)

FILE: kernel/apps/esh/esh_argparser.h
  type esh (line 27) | struct esh
  type esh (line 53) | struct esh

FILE: kernel/apps/esh/esh_hist.c
  function init_buffer (line 40) | static void init_buffer(char * buffer)
  function modulo (line 50) | static int modulo(int n, int modulus)
  function for_each_char (line 71) | static void for_each_char(struct esh * esh, int offset,
  function clobber_cb (line 94) | static bool clobber_cb(struct esh * esh, char c)
  function clobber_buffer (line 110) | static void clobber_buffer(struct esh * esh, int offset)
  function esh_hist_init (line 123) | bool esh_hist_init(struct esh * esh)
  function esh_hist_nth (line 146) | int esh_hist_nth(struct esh * esh, int n)
  function esh_hist_add (line 165) | bool esh_hist_add(struct esh * esh, char const * s)
  function esh_hist_print (line 192) | void esh_hist_print(struct esh * esh, int offset)
  function esh_hist_substitute (line 206) | bool esh_hist_substitute(struct esh * esh)
  function esh_set_histbuf (line 224) | void esh_set_histbuf(struct esh * esh, char * buffer)
  function esh_set_histbuf (line 232) | void esh_set_histbuf(struct esh * esh, char * buffer)

FILE: kernel/apps/esh/esh_hist.h
  type esh (line 31) | struct esh
  type esh_hist (line 36) | struct esh_hist {
  type esh (line 48) | struct esh
  type esh (line 59) | struct esh
  type esh (line 68) | struct esh
  type esh (line 75) | struct esh
  type esh (line 83) | struct esh
  type esh_hist (line 88) | struct esh_hist {
  function INL (line 94) | INL bool esh_hist_init(struct esh *esh)
  function INL (line 100) | INL int esh_hist_nth(struct esh *esh, int n)
  function INL (line 107) | INL bool esh_hist_add(struct esh *esh, char const *s)
  function INL (line 114) | INL void esh_hist_for_each_char( struct esh *esh, int offset,
  function INL (line 122) | INL void esh_hist_print(struct esh *esh, int offset)
  function INL (line 128) | INL void esh_hist_restore(struct esh *esh)
  function INL (line 133) | INL void esh_hist_clobber(struct esh *esh, int offset)
  function INL (line 139) | INL bool esh_hist_substitute(struct esh *esh)

FILE: kernel/apps/esh/esh_internal.h
  type tty (line 27) | struct tty
  type char_slice (line 40) | struct char_slice {
  type esh (line 50) | struct esh {
  type esh (line 104) | struct esh
  type esh (line 110) | struct esh
  type esh (line 118) | struct esh
  type esh (line 126) | struct esh
  type esh (line 131) | struct esh
  type esh (line 136) | struct esh
  type esh (line 141) | struct esh
  type esh (line 147) | struct esh
  type esh (line 173) | struct esh

FILE: kernel/apps/esh/shell.c
  type esh (line 29) | struct esh
  function __esh_putc (line 31) | static void __esh_putc(struct esh *esh, char c, void *arg)
  function esh_excute_command (line 36) | static void esh_excute_command(struct esh *esh,
  function shell_detach_tty (line 46) | static void shell_detach_tty(void)
  function shell_cmd_tty (line 53) | static int shell_cmd_tty(int argc, char **argv)
  function shell_task (line 72) | int shell_task(void *data)

FILE: kernel/apps/init.c
  function skip_vm_boot (line 33) | static void skip_vm_boot(void)
  function start_shell_task (line 63) | static void start_shell_task(void)
  function init_task (line 72) | int init_task(void *data)

FILE: kernel/arch/aarch64/core/aarch64_IRQ.c
  function irq_handler (line 21) | static inline void irq_handler(gp_regs *regs)
  function irq_from_lower_el (line 26) | void irq_from_lower_el(gp_regs *regs)
  function irq_from_current_el (line 31) | void irq_from_current_el(gp_regs *regs)

FILE: kernel/arch/aarch64/core/aarch64_sync.c
  function bad_mode (line 87) | void bad_mode(gp_regs *regs, int mode)
  function kernel_mem_fault (line 99) | static int kernel_mem_fault(gp_regs *regs, int ec, uint32_t esr)
  function unknown_trap_handler (line 104) | static int unknown_trap_handler(gp_regs *regs, int ec, uint32_t esr)
  function da_is_write_fault (line 112) | static inline int da_is_write_fault(uint32_t esr)
  function __handle_user_page_fault (line 117) | static int __handle_user_page_fault(uint64_t addr, int is_write, unsigne...
  function __handle_user_ia_fault (line 125) | static int __handle_user_ia_fault(void)
  function user_da_fault (line 133) | static int user_da_fault(gp_regs *regs, int ec, uint32_t esr)
  function user_ia_fault (line 178) | int user_ia_fault(gp_regs *regs, int ec, uint32_t esr)
  function user_svc64 (line 188) | int user_svc64(gp_regs *regs, int ec, uint32_t esr)
  type sync_desc (line 202) | struct sync_desc
  function read_esr (line 211) | static inline uint32_t read_esr(void)
  function handle_sync_exception (line 220) | static void handle_sync_exception(gp_regs *regs)
  function sync_exception_from_current_el (line 240) | void sync_exception_from_current_el(gp_regs *regs)
  function sync_exception_from_lower_el (line 245) | void sync_exception_from_lower_el(gp_regs *regs)

FILE: kernel/arch/aarch64/core/arch.c
  type task (line 40) | struct task
  type task (line 41) | struct task
  function arch_dump_register (line 48) | void arch_dump_register(gp_regs *regs)
  function arch_dump_stack (line 87) | void arch_dump_stack(gp_regs *regs, unsigned long *stack)
  function arch_taken_from_guest (line 127) | int arch_taken_from_guest(gp_regs *regs)
  function arch_is_exit_to_user (line 132) | int arch_is_exit_to_user(struct task *task)
  function task_ttbr_value (line 139) | static inline uint64_t task_ttbr_value(struct task *task)
  function user_task_sched_out (line 146) | static inline void user_task_sched_out(struct task *task)
  function user_task_sched_in (line 156) | static inline void user_task_sched_in(struct task *task)
  function arch_task_sched_out (line 169) | void arch_task_sched_out(struct task *task)
  function arch_task_sched_in (line 175) | void arch_task_sched_in(struct task *task)
  function arch_init_task (line 181) | void arch_init_task(struct task *task, void *entry, void *user_sp, void ...
  function arch_set_task_user_stack (line 218) | void arch_set_task_user_stack(struct task *task, unsigned long stack)
  function arch_set_task_reg0 (line 224) | void arch_set_task_reg0(struct task *task, unsigned long data)
  function arch_set_tls (line 230) | void arch_set_tls(struct task *task, unsigned long tls)
  function arch_set_task_entry_point (line 236) | void arch_set_task_entry_point(struct task *task, long entry)
  function pgd_t (line 242) | pgd_t *arch_alloc_process_page_table(void)
  function arch_get_asid_size (line 260) | int arch_get_asid_size(void)
  function arch_release_task (line 266) | void arch_release_task(struct task *task)
  function aarch64_init_percpu (line 271) | aarch64_init_percpu(void)
  function arch_early_init (line 300) | int arch_early_init(void)
  function __arch_init (line 313) | int __arch_init(void)
  function cpuid_to_affinity (line 321) | uint64_t cpuid_to_affinity(int cpuid)
  function affinity_to_cpuid (line 347) | int affinity_to_cpuid(unsigned long affinity)
  function arch_smp_init (line 362) | void arch_smp_init(phy_addr_t *smp_h_addr)
  function arch_main (line 401) | void arch_main(void *dtb)

FILE: kernel/arch/aarch64/core/arm_arch_timer.c
  type timer_type (line 30) | enum timer_type {
  type armv8_timer_info (line 45) | struct armv8_timer_info {
  type armv8_timer_info (line 50) | struct armv8_timer_info
  function arch_enable_timer (line 57) | void arch_enable_timer(unsigned long expires)
  function get_sys_ticks (line 77) | unsigned long get_sys_ticks(void)
  function get_current_time (line 83) | unsigned long get_current_time(void)
  function get_sys_time (line 89) | unsigned long get_sys_time(void)
  function timers_arch_init (line 95) | timers_arch_init(void)
  function timer_interrupt_handler (line 146) | static int timer_interrupt_handler(uint32_t irq, void *data)
  function timers_init (line 160) | timers_init(void)

FILE: kernel/arch/aarch64/core/asm-offset.c
  function main (line 23) | int main(void)

FILE: kernel/arch/aarch64/core/cpu.c
  function psci_fn (line 29) | static inline unsigned long psci_fn(uint32_t id, unsigned long a1,
  function psci_fn_hvc (line 39) | static inline unsigned long psci_fn_hvc(uint32_t id, unsigned long a1,
  function psci_cpu_on (line 49) | int psci_cpu_on(unsigned long cpu, unsigned long entry)
  function psci_cpu_off (line 54) | int psci_cpu_off(unsigned long cpu)
  function psci_system_reboot (line 59) | void psci_system_reboot(int mode, const char *cmd)
  function psci_system_shutdown (line 64) | void psci_system_shutdown(void)
  function psci_cpu_on_hvc (line 69) | int psci_cpu_on_hvc(unsigned long cpu, unsigned long entry)
  function psci_cpu_off_hvc (line 74) | int psci_cpu_off_hvc(unsigned long cpu)
  function psci_system_reboot_hvc (line 79) | void psci_system_reboot_hvc(int mode, const char *cmd)
  function psci_system_shutdown_hvc (line 84) | void psci_system_shutdown_hvc(void)
  function spin_table_cpu_on (line 89) | int spin_table_cpu_on(unsigned long affinity, unsigned long entry)

FILE: kernel/arch/aarch64/core/cpu_feature.c
  function cpu_has_feature (line 29) | int cpu_has_feature(int feature)
  function cpu_has_vhe (line 44) | int cpu_has_vhe(void)
  function arch_cpu_feature_init (line 55) | static int arch_cpu_feature_init(void)

FILE: kernel/arch/aarch64/core/fpsimd.c
  function fpsimd_state_save (line 21) | void fpsimd_state_save(struct task *task, struct fpsimd_context *c)
  function fpsimd_state_restore (line 50) | void fpsimd_state_restore(struct task *task, struct fpsimd_context *c)

FILE: kernel/arch/aarch64/core/stage1.c
  function flush_tlb_va_range (line 91) | static void inline flush_tlb_va_range(unsigned long va, size_t size)
  function flush_dcache_pte (line 96) | static inline void flush_dcache_pte(unsigned long addr)
  function flush_dcache_pmd (line 101) | static inline void flush_dcache_pmd(unsigned long addr)
  function stage1_pgd_clear (line 106) | static void inline stage1_pgd_clear(pud_t *pgdp)
  function stage1_pud_clear (line 113) | static void inline stage1_pud_clear(pud_t *pudp)
  function stage1_pmd_clear (line 120) | static void inline stage1_pmd_clear(pmd_t *pmdp)
  function stage1_xxx_addr_end (line 132) | static unsigned long stage1_xxx_addr_end(unsigned long start, unsigned l...
  function stage1_set_pte (line 148) | static inline void stage1_set_pte(pte_t *ptep, pte_t new_pte)
  function stage1_set_pmd (line 154) | static inline void stage1_set_pmd(pmd_t *pmdp, pmd_t new_pmd)
  function stage1_set_pud (line 160) | static inline void stage1_set_pud(pud_t *pudp, pud_t new_pud)
  function stage1_set_pgd (line 166) | static inline void stage1_set_pgd(pgd_t *pgdp, pgd_t new_pgd)
  function stage1_pgd_populate (line 172) | static inline void stage1_pgd_populate(pgd_t *pgdp, unsigned long addr, ...
  function stage1_pud_populate (line 181) | static inline void stage1_pud_populate(pud_t *pudp, unsigned long addr, ...
  function stage1_pmd_populate (line 190) | static inline void stage1_pmd_populate(pmd_t *pmdp, unsigned long addr, ...
  function pmd_t (line 199) | static inline pmd_t stage1_pmd_attr(unsigned long phy, unsigned long flags)
  function pte_t (line 247) | static inline pte_t stage1_pte_attr(unsigned long phy, unsigned long flags)
  function add_release_page (line 294) | static void add_release_page(struct vspace *vs, unsigned long addr)
  function stage1_unmap_pte_range (line 303) | static void stage1_unmap_pte_range(struct vspace *vs, pte_t *ptep,
  function stage1_unmap_pmd_range (line 322) | static void stage1_unmap_pmd_range(struct vspace *vs, pmd_t *pmdp,
  function stage1_unmap_pud_range (line 349) | static int stage1_unmap_pud_range(struct vspace *vs,
  function stage1_map_pte_range (line 375) | static int stage1_map_pte_range(struct vspace *vs, pte_t *ptep, unsigned...
  function stage1_pmd_huge_page (line 395) | static inline bool stage1_pmd_huge_page(pmd_t old_pmd, unsigned long start,
  function stage1_map_pmd_range (line 407) | static int stage1_map_pmd_range(struct vspace *vs, pmd_t *pmdp, unsigned...
  function stage1_map_pud_range (line 450) | static int stage1_map_pud_range(struct vspace *vs, unsigned long start,
  function stage1_get_leaf_entry (line 482) | static int stage1_get_leaf_entry(struct vspace *vs,
  function arch_host_change_map (line 508) | int arch_host_change_map(struct vspace *vs, unsigned long vir,
  function phy_addr_t (line 533) | static inline phy_addr_t stage1_va_to_pa(struct vspace *vs, unsigned lon...
  function phy_addr_t (line 563) | phy_addr_t arch_translate_va_to_pa(struct vspace *vs, unsigned long va)
  function arch_host_map (line 568) | int arch_host_map(struct vspace *vs, unsigned long start, unsigned long ...
  function arch_host_unmap (line 581) | int arch_host_unmap(struct vspace *vs, unsigned long start, unsigned lon...
  function arch_kernel_pgd_base (line 587) | unsigned long arch_kernel_pgd_base(void)

FILE: kernel/arch/aarch64/include/asm/arch.h
  function affinity_to_logic_cpu (line 80) | static inline int affinity_to_logic_cpu(uint32_t aff3, uint32_t aff2,
  function va_to_pa (line 86) | static inline unsigned long va_to_pa(unsigned long va)
  function guest_va_to_pa (line 99) | static inline unsigned long guest_va_to_pa(unsigned long va, int read)
  function guest_va_to_ipa (line 115) | static inline unsigned long guest_va_to_ipa(unsigned long va, int read)
  function cpu_relax (line 131) | static inline void cpu_relax(void)
  function arch_get_virtual_address_size (line 136) | static inline unsigned long arch_get_virtual_address_size(void)
  type task (line 141) | struct task
  type task (line 144) | struct task
  type task (line 144) | struct task
  type task (line 154) | struct task
  type task (line 156) | struct task
  type task (line 158) | struct task

FILE: kernel/arch/aarch64/include/asm/asm_current.h
  function asm_set_current_task (line 22) | static inline void asm_set_current_task(void *task)
  function arch_set_pcpu_data (line 28) | static inline void arch_set_pcpu_data(void *pcpu)
  function __smp_processor_id (line 40) | static inline int __smp_processor_id(void)
  function arch_set_pcpu_data (line 56) | static inline void arch_set_pcpu_data(void *pcpu)
  function __smp_processor_id (line 68) | static inline int __smp_processor_id(void)
  function arch_sys_sched (line 85) | static inline void arch_sys_sched(void)

FILE: kernel/arch/aarch64/include/asm/asm_types.h
  type __u64 (line 6) | typedef unsigned long		__u64;
  type __u32 (line 7) | typedef unsigned int		__u32;
  type __u16 (line 8) | typedef unsigned short		__u16;
  type __u8 (line 9) | typedef unsigned char		__u8;
  type __s64 (line 10) | typedef signed long		__s64;
  type __s32 (line 11) | typedef signed int		__s32;
  type __s16 (line 12) | typedef signed short		__s16;
  type __s8 (line 13) | typedef signed char		__s8;

FILE: kernel/arch/aarch64/include/asm/atomic.h
  function atomic_read (line 8) | static inline int atomic_read(atomic_t *t)
  function atomic_set (line 14) | static inline void atomic_set(int i, atomic_t *t)
  function atomic_add (line 22) | static inline void atomic_add(int i, atomic_t *v)
  function atomic_add_return (line 37) | static inline int atomic_add_return(int i, atomic_t *v)
  function atomic_add_return_old (line 56) | static inline int atomic_add_return_old(int i, atomic_t *v)
  function atomic_sub (line 76) | static inline void atomic_sub(int i, atomic_t *v)
  function atomic_sub_return (line 91) | static inline int atomic_sub_return(int i, atomic_t *v)
  function atomic_sub_return_old (line 110) | static inline int atomic_sub_return_old(int i, atomic_t *v)
  function atomic_cmpxchg (line 129) | static inline int atomic_cmpxchg(atomic_t *t, int old, int new)
  function atomic_inc_if_postive (line 152) | static inline int atomic_inc_if_postive(atomic_t *t)
  function atomic_dec_set_negtive_if_zero (line 177) | static inline int atomic_dec_set_negtive_if_zero(atomic_t *t)
  function atomic_cmpsub (line 206) | static inline int atomic_cmpsub(atomic_t *t, int old, int value)
  function atomic_add_return_old (line 268) | static inline int atomic_add_return_old(int i, atomic_t *v)
  function atomic_sub (line 289) | static inline void atomic_sub(int i, atomic_t *v)
  function atomic_sub_return_old (line 325) | static inline int atomic_sub_return_old(int i, atomic_t *v)

FILE: kernel/arch/aarch64/include/asm/bitops.h
  function __ffs (line 12) | static inline unsigned long __ffs(unsigned long word)
  function __fls (line 43) | static inline unsigned long __fls(unsigned long word)
  function fls (line 75) | static inline int fls(int x)
  function fls64 (line 105) | static inline int fls64(__u64 x)
  function fls64 (line 113) | static inline int fls64(__u64 x)

FILE: kernel/arch/aarch64/include/asm/cache.h
  function inv_icache_local (line 10) | static inline void inv_icache_local(void)
  function inv_icache_all (line 17) | static inline void inv_icache_all(void)

FILE: kernel/arch/aarch64/include/asm/io.h
  function __raw_writeb (line 29) | static inline void __raw_writeb(uint8_t val, volatile void *addr)
  function __raw_writew (line 35) | static inline void __raw_writew(uint16_t val, volatile void *addr)
  function __raw_writel (line 41) | static inline void __raw_writel(uint32_t val, volatile void *addr)
  function __raw_writeq (line 47) | static inline void __raw_writeq(uint64_t val, volatile void *addr)
  function __raw_readb (line 53) | static inline uint8_t __raw_readb(const volatile void *addr)
  function __raw_readw (line 61) | static inline uint16_t __raw_readw(const volatile void *addr)
  function __raw_readl (line 69) | static inline uint32_t __raw_readl(const volatile void *addr)
  function __raw_readq (line 77) | static inline uint64_t __raw_readq(const volatile void *addr)

FILE: kernel/arch/aarch64/include/asm/svccc.h
  type svc_desc (line 71) | struct svc_desc {
  type arm_smc_res (line 96) | struct arm_smc_res {
  type arm_smc_res (line 105) | struct arm_smc_res
  type arm_smc_res (line 109) | struct arm_smc_res

FILE: kernel/arch/aarch64/include/asm/syscall.h
  type syscall_regs (line 35) | struct syscall_regs {

FILE: kernel/arch/aarch64/include/asm/tcb.h
  type aarch64_regs (line 6) | struct aarch64_regs {
  type gp_regs (line 45) | typedef struct aarch64_regs gp_regs;
  type fpsimd_context (line 47) | struct fpsimd_context {
  type cpu_context (line 57) | struct cpu_context {

FILE: kernel/arch/aarch64/include/asm/tlb.h
  function flush_tlb_asid_all (line 6) | static inline void flush_tlb_asid_all(uint16_t asid)
  function flush_all_tlb_host (line 23) | static inline void flush_all_tlb_host(void)
  function flush_local_tlb_host (line 44) | static inline void flush_local_tlb_host(void)
  function flush_tlb_va_host (line 65) | static inline void flush_tlb_va_host(unsigned long va, unsigned long size)
  function flush_local_tlb_va_host (line 89) | static inline void flush_local_tlb_va_host(unsigned long va, unsigned lo...
  function flush_local_tlb_guest (line 113) | static inline void flush_local_tlb_guest(void)
  function flush_all_tlb_guest (line 125) | static inline void flush_all_tlb_guest(void)
  function flush_tlb_ipa_guest (line 137) | static inline void flush_tlb_ipa_guest(unsigned long ipa, size_t size)
  type vspace (line 159) | struct vspace
  type vspace (line 160) | struct vspace

FILE: kernel/arch/aarch64/include/asm/trap.h
  type sync_desc (line 9) | struct sync_desc {
  type esr (line 25) | struct esr {
  type esr_cond (line 32) | struct esr_cond {
  type esr_wfi_wfe (line 40) | struct esr_wfi_wfe {
  type esr_cp32 (line 50) | struct esr_cp32 {
  type esr_cp64 (line 63) | struct esr_cp64 {
  type esr_cp (line 76) | struct esr_cp {
  type esr_smc32 (line 95) | struct esr_smc32 {
  type esr_sysreg (line 104) | struct esr_sysreg {
  type esr_iabt (line 117) | struct esr_iabt {
  type esr_dabt (line 129) | struct esr_dabt {
  type esr_xabt (line 152) | struct esr_xabt {
  type esr_brk (line 165) | struct esr_brk {

FILE: kernel/arch/aarch64/include/asm/uaccess.h
  function user_ranges_ok (line 7) | static inline unsigned long user_ranges_ok(const void __user *addr, unsi...

FILE: kernel/arch/aarch64/include/asm/virt.h
  type vcpu (line 6) | struct vcpu
  type arm_virt_data (line 8) | struct arm_virt_data {
  type vcpu (line 23) | struct vcpu
  type vcpu (line 29) | struct vcpu

FILE: kernel/arch/aarch64/include/asm/vtcb.h
  type vcpu_sysreg (line 8) | enum vcpu_sysreg {
  type vcpu_context (line 59) | struct vcpu_context {

FILE: kernel/arch/aarch64/userspace/asm_syscall.c
  type aarch64_syscall_reg (line 25) | struct aarch64_syscall_reg {
  function aarch64_syscall_unsupport (line 31) | static void aarch64_syscall_unsupport(gp_regs *regs)
  function __sys_kobject_close (line 37) | static void __sys_kobject_close(gp_regs *regs)
  function __sys_kobject_create (line 42) | static void __sys_kobject_create(gp_regs *regs)
  function __sys_kobject_recv (line 47) | static void __sys_kobject_recv(gp_regs *regs)
  function __sys_kobject_send (line 64) | static void __sys_kobject_send(gp_regs *regs)
  function __sys_kobject_reply (line 75) | static void __sys_kobject_reply(gp_regs *regs)
  function __sys_kobject_ctl (line 85) | static void __sys_kobject_ctl(gp_regs *regs)
  function __sys_kobject_mmap (line 92) | static void __sys_kobject_mmap(gp_regs *regs)
  function __sys_kobject_munmap (line 102) | static void __sys_kobject_munmap(gp_regs *regs)
  function __sys_kobject_open (line 107) | static void __sys_kobject_open(gp_regs *regs)
  function __sys_map (line 112) | static void __sys_map(gp_regs *regs)
  function __sys_unmap (line 121) | static void __sys_unmap(gp_regs *regs)
  function __sys_yield (line 129) | static void __sys_yield(gp_regs *regs)
  function __sys_futex (line 134) | static void __sys_futex(gp_regs *regs)
  function __sys_grant (line 145) | static void __sys_grant(gp_regs *regs)
  function __sys_mtrans (line 153) | static void __sys_mtrans(gp_regs *regs)
  function __sys_clock_gettime (line 158) | static void __sys_clock_gettime(gp_regs *regs)
  function __sys_clock_nanosleep (line 164) | static void __sys_clock_nanosleep(gp_regs *regs)
  function __sys_exit (line 171) | static void __sys_exit(gp_regs *regs)
  function __sys_exitgroup (line 176) | static void __sys_exitgroup(gp_regs *regs)
  function __sys_clone (line 181) | static void __sys_clone(gp_regs *regs)
  function aarch64_do_syscall (line 221) | void aarch64_do_syscall(gp_regs *regs)

FILE: kernel/arch/aarch64/virt/arch_virt.c
  function flush_all_tlb_mm (line 38) | void flush_all_tlb_mm(struct mm_struct *mm)
  function arch_set_virq_flag (line 67) | void arch_set_virq_flag(void)
  function arch_set_vfiq_flag (line 77) | void arch_set_vfiq_flag(void)
  function arch_clear_virq_flag (line 87) | void arch_clear_virq_flag(void)
  function arch_clear_vfiq_flag (line 98) | void arch_clear_vfiq_flag(void)
  function arch_vcpu_init (line 108) | void arch_vcpu_init(struct vcpu *vcpu, void *entry, void *arg)
  function generate_vtcr_el2 (line 131) | static inline uint64_t generate_vtcr_el2(void)
  function generate_vttbr_el2 (line 158) | static inline uint64_t generate_vttbr_el2(uint32_t vmid, unsigned long b...
  function arch_vcpu_state_init (line 163) | void arch_vcpu_state_init(struct vcpu *vcpu, void *c)
  function arch_vcpu_state_save (line 239) | static void arch_vcpu_state_save(struct vcpu *vcpu, void *c)
  function arch_vcpu_state_restore (line 284) | static void arch_vcpu_state_restore(struct vcpu *vcpu, void *c)
  function arch_vcpu_state_dump (line 329) | static void arch_vcpu_state_dump(struct vcpu *vcpu, void *context)
  function aarch64_vcpu_context_init (line 351) | static int aarch64_vcpu_context_init(struct vmodule *vmodule)
  function arm_create_vm (line 364) | static int arm_create_vm(void *item, void *context)
  function arm_virt_init (line 377) | static int arm_virt_init(void)

FILE: kernel/arch/aarch64/virt/smc_service.c
  function std_smc_handler (line 24) | static int std_smc_handler(gp_regs *c,

FILE: kernel/arch/aarch64/virt/stage2.c
  function flush_tlb_va_range (line 36) | static void inline flush_tlb_va_range(unsigned long va, size_t size)
  function stage2_pgd_clear (line 41) | static void inline stage2_pgd_clear(pud_t *pgdp)
  function stage2_pud_clear (line 48) | static void inline stage2_pud_clear(pud_t *pudp)
  function stage2_pmd_clear (line 55) | static void inline stage2_pmd_clear(pmd_t *pmdp)
  function stage2_xxx_addr_end (line 67) | static unsigned long stage2_xxx_addr_end(unsigned long start, unsigned l...
  function stage2_set_pte (line 83) | static inline void stage2_set_pte(pte_t *ptep, pte_t new_pte)
  function stage2_set_pmd (line 89) | static inline void stage2_set_pmd(pmd_t *pmdp, pmd_t new_pmd)
  function stage2_set_pud (line 95) | static inline void stage2_set_pud(pud_t *pudp, pud_t new_pud)
  function stage2_set_pgd (line 101) | static inline void stage2_set_pgd(pgd_t *pgdp, pgd_t new_pgd)
  function stage2_pgd_populate (line 107) | static inline void stage2_pgd_populate(pgd_t *pgdp, unsigned long addr, ...
  function stage2_pud_populate (line 114) | static inline void stage2_pud_populate(pud_t *pudp, unsigned long addr, ...
  function stage2_pmd_populate (line 121) | static inline void stage2_pmd_populate(pmd_t *pmdp, unsigned long addr, ...
  function stage2_block_attr (line 128) | static inline uint64_t stage2_block_attr(unsigned long flags)
  function stage2_page_attr (line 177) | static inline uint64_t stage2_page_attr(unsigned long flags)
  function stage2_unmap_pte_range (line 226) | static void stage2_unmap_pte_range(struct mm_struct *vs, pte_t *ptep,
  function is_pmd_range (line 239) | static inline bool is_pmd_range(unsigned long start, unsigned long end)
  function is_pud_range (line 246) | static inline bool is_pud_range(unsigned long start, unsigned long end)
  function stage2_unmap_pmd_range (line 253) | static void stage2_unmap_pmd_range(struct mm_struct *vs, pmd_t *pmdp,
  function stage2_unmap_pud_range (line 279) | static int stage2_unmap_pud_range(struct mm_struct *vs, unsigned long ad...
  function stage2_map_pte_range (line 303) | static int stage2_map_pte_range(struct mm_struct *vs, pte_t *ptep, unsig...
  function stage2_pmd_huge_page (line 325) | static inline bool stage2_pmd_huge_page(pmd_t old_pmd, unsigned long start,
  function stage2_map_pmd_range (line 337) | static int stage2_map_pmd_range(struct mm_struct *vs, pmd_t *pmdp, unsig...
  function stage2_pud_huge_page (line 385) | static inline int stage2_pud_huge_page(pud_t old_pud, unsigned long start,
  function stage2_map_pud_range (line 397) | static int stage2_map_pud_range(struct mm_struct *vs, unsigned long start,
  function stage2_ipa_to_pa (line 441) | static inline int stage2_ipa_to_pa(struct mm_struct *vs,
  function arch_translate_guest_ipa (line 474) | int arch_translate_guest_ipa(struct mm_struct *vs,
  function arch_guest_map (line 480) | int arch_guest_map(struct mm_struct *vs, unsigned long start, unsigned l...
  function arch_guest_unmap (line 493) | int arch_guest_unmap(struct mm_struct *vs, unsigned long start, unsigned...

FILE: kernel/arch/aarch64/virt/svc_service.c
  type svc_desc (line 26) | struct svc_desc
  type svc_desc (line 27) | struct svc_desc
  function do_svc_handler (line 29) | int do_svc_handler(gp_regs *regs, uint32_t svc_id, uint64_t *args, int smc)
  function parse_svc_desc (line 59) | static void parse_svc_desc(unsigned long start, unsigned long end,
  function svc_service_init (line 77) | svc_service_init(void)

FILE: kernel/arch/aarch64/virt/trap.c
  function taken_from_el1 (line 28) | static inline int taken_from_el1(uint64_t spsr)
  function inject_virtual_data_abort (line 33) | static inline void inject_virtual_data_abort(uint32_t esr_value)
  function unknown_handler (line 42) | static int unknown_handler(gp_regs *reg, int ec, uint32_t esr_value)
  function wfi_wfe_handler (line 47) | static int wfi_wfe_handler(gp_regs *reg, int ec, uint32_t esr_value)
  function mcr_mrc_cp15_handler (line 53) | static int mcr_mrc_cp15_handler(gp_regs *reg, int ec, uint32_t esr_value)
  function mcrr_mrrc_cp15_handler (line 66) | static int mcrr_mrrc_cp15_handler(gp_regs *reg, int ec, uint32_t esr_value)
  function mcr_mrc_cp14_handler (line 94) | static int mcr_mrc_cp14_handler(gp_regs *reg, int ec, uint32_t esr_value)
  function ldc_stc_cp14_handler (line 99) | static int ldc_stc_cp14_handler(gp_regs *reg, int ec, uint32_t esr_value)
  function access_simd_reg_handler (line 104) | static int access_simd_reg_handler(gp_regs *reg, int ec, uint32_t esr_va...
  function mcr_mrc_cp10_handler (line 109) | static int mcr_mrc_cp10_handler(gp_regs *reg, int ec, uint32_t esr_value)
  function mrrc_cp14_handler (line 114) | static int mrrc_cp14_handler(gp_regs *reg, int ec, uint32_t esr_value)
  function illegal_exe_state_handler (line 119) | static int illegal_exe_state_handler(gp_regs *reg, int ec, uint32_t esr_...
  function __arm_svc_handler (line 124) | static int __arm_svc_handler(gp_regs *reg, int smc)
  function access_system_reg_handler (line 143) | static int access_system_reg_handler(gp_regs *reg, int ec, uint32_t esr_...
  function insabort_tfl_handler (line 193) | static int insabort_tfl_handler(gp_regs *reg, int ec, uint32_t esr_value)
  function misaligned_pc_handler (line 199) | static int misaligned_pc_handler(gp_regs *reg, int ec, uint32_t esr_value)
  function dabt_isextabt (line 205) | static inline bool dabt_isextabt(uint32_t dfsc)
  function get_faulting_ipa (line 224) | static inline unsigned long get_faulting_ipa(unsigned long vaddr)
  function dabt_iswrite (line 235) | static inline bool dabt_iswrite(uint32_t esr_value)
  function dataabort_tfl_handler (line 241) | static int dataabort_tfl_handler(gp_regs *regs, int ec, uint32_t esr_value)
  function stack_misalign_handler (line 296) | static int stack_misalign_handler(gp_regs *reg, int ec, uint32_t esr_value)
  function floating_aarch32_handler (line 302) | static int floating_aarch32_handler(gp_regs *reg, int ec, uint32_t esr_v...
  function floating_aarch64_handler (line 308) | static int floating_aarch64_handler(gp_regs *reg, int ec, uint32_t esr_v...
  function serror_handler (line 314) | static int serror_handler(gp_regs *reg, int ec, uint32_t esr_value)
  function aarch64_hypercall_handler (line 320) | int aarch64_hypercall_handler(gp_regs *reg, int ec, uint32_t esr_value)
  function aarch64_smccall_handler (line 331) | int aarch64_smccall_handler(gp_regs *reg, int ec, uint32_t esr_value)
  type sync_desc (line 367) | struct sync_desc
  function handle_vcpu_sync_exception (line 392) | void handle_vcpu_sync_exception(gp_regs *regs)

FILE: kernel/arch/aarch64/virt/vfp.c
  type vfp_context (line 25) | struct vfp_context {
  function vfp_state_init (line 36) | static void vfp_state_init(struct vcpu *vcpu, void *c)
  function vfp_state_save (line 44) | static void vfp_state_save(struct vcpu *vcpu, void *context)
  function vfp_state_restore (line 77) | static void vfp_state_restore(struct vcpu *vcpu, void *context)
  function vfp_vmodule_init (line 107) | static int vfp_vmodule_init(struct vmodule *vmodule)

FILE: kernel/arch/aarch64/virt/vmsa.c
  type aa64mmfr0 (line 21) | struct aa64mmfr0 {
  function el2_stage2_init (line 33) | el2_stage2_init(void)

FILE: kernel/arch/aarch64/virt/vtimer.c
  type vtimer (line 48) | struct vtimer {
  type vtimer_context (line 57) | struct vtimer_context {
  type vcpu (line 63) | struct vcpu
  function phys_timer_expire_function (line 73) | static void phys_timer_expire_function(unsigned long data)
  function virt_timer_expire_function (line 84) | static void virt_timer_expire_function(unsigned long data)
  function vtimer_state_restore (line 97) | static void vtimer_state_restore(struct vcpu *vcpu, void *context)
  function vtimer_state_save (line 110) | static void vtimer_state_save(struct vcpu *vcpu, void *context)
  function vtimer_state_init (line 132) | static void vtimer_state_init(struct vcpu *vcpu, void *context)
  function vtimer_state_stop (line 162) | static void vtimer_state_stop(struct vcpu *vcpu, void *context)
  function asoc_handle_cntp_ctl (line 170) | static inline void
  function vtimer_handle_cntp_ctl (line 186) | static void vtimer_handle_cntp_ctl(struct vcpu *vcpu, int access,
  function vtimer_handle_cntp_tval (line 219) | static void vtimer_handle_cntp_tval(struct vcpu *vcpu,
  function vtimer_handle_cntp_cval (line 246) | static void vtimer_handle_cntp_cval(struct vcpu *vcpu,
  function arm_phy_timer_trap (line 268) | static int arm_phy_timer_trap(struct vcpu *vcpu,
  function vtimer_vmodule_init (line 288) | static int vtimer_vmodule_init(struct vmodule *vmodule)
  function arch_vtimer_init (line 301) | int arch_vtimer_init(uint32_t virtual_irq, uint32_t phy_irq)
  function virtual_timer_irq_handler (line 306) | int virtual_timer_irq_handler(uint32_t irq, void *data)

FILE: kernel/core/bitmap.c
  function __bitmap_weight (line 68) | int __bitmap_weight(const unsigned long *bitmap, unsigned int bits)
  function bitmap_set (line 82) | void bitmap_set(unsigned long *map, unsigned int start, int len)
  function bitmap_clear (line 102) | void bitmap_clear(unsigned long *map, unsigned int start, int len)
  function bitmap_find_next_zero_area_off (line 135) | unsigned long bitmap_find_next_zero_area_off(unsigned long *map,
  function bitmap_find_next_zero_area_align (line 160) | unsigned long bitmap_find_next_zero_area_align(unsigned long *map,

FILE: kernel/core/bootarg.c
  type boot_option (line 21) | struct boot_option {
  type boot_option (line 31) | struct boot_option
  function __get_boot_option (line 33) | int __get_boot_option(char *name, void *value,
  function __parse_hex32 (line 48) | static int __parse_hex32(char *args, void *value)
  function __parse_hex64 (line 57) | static int __parse_hex64(char *args, void *value)
  function __parse_uint (line 66) | static int __parse_uint(char *args, void *value)
  function __parse_bool (line 75) | static int __parse_bool(char *args, void *value)
  function __parse_string (line 81) | static int __parse_string(char *args, void *value)
  function bootarg_parse_hex32 (line 91) | int bootarg_parse_hex32(char *name, uint32_t *v)
  function bootarg_parse_hex64 (line 96) | int bootarg_parse_hex64(char *name, uint64_t *v)
  function bootarg_parse_uint (line 101) | int bootarg_parse_uint(char *name, uint32_t *v)
  function bootarg_parse_bool (line 106) | int bootarg_parse_bool(char *name, int *v)
  function bootarg_parse_string (line 112) | int bootarg_parse_string(char *name, char **v)
  function bootarg_init_one (line 117) | static void bootarg_init_one(char *str)
  function bootargs_init (line 136) | int __init_text bootargs_init(const char *str, int len)

FILE: kernel/core/calltrace.c
  function dump_stack (line 31) | void dump_stack(gp_regs *regs, unsigned long *stack)
  function panic_other_cpu (line 48) | static void panic_other_cpu(void *data)
  function __panic (line 57) | void __panic(gp_regs *regs, char *fmt, ...)
  function locate_symbol_pos (line 92) | static int locate_symbol_pos(unsigned long addr)
  function print_symbol (line 121) | void print_symbol(unsigned long addr)
  function allsymbols_init (line 147) | int allsymbols_init(void)

FILE: kernel/core/delay.c
  function udelay (line 23) | void udelay(uint32_t us)
  function mdelay (line 34) | void mdelay(uint32_t ms)
  function msleep (line 45) | void msleep(uint32_t ms)

FILE: kernel/core/event.c
  function new_event_token (line 27) | uint32_t new_event_token(void)
  function event_init (line 42) | void event_init(struct event *event, int type, void *pdata)
  function __wait_event (line 51) | void __wait_event(void *ev, int mode, uint32_t to)
  function remove_event_waiter (line 83) | static inline void remove_event_waiter(struct event *ev, struct task *task)
  type task (line 96) | struct task
  type event (line 96) | struct event
  type task (line 98) | struct task
  function __wake_up_event_waiter (line 113) | int __wake_up_event_waiter(struct event *ev, long msg, int pend_state, i...
  type task (line 136) | struct task
  type event (line 136) | struct event
  type task (line 139) | struct task
  function event_pend_down (line 150) | void event_pend_down(void)
  function __wake (line 160) | long __wake(struct event *ev, int pend_state, long retcode)
  function do_wait_event (line 172) | long do_wait_event(struct event *ev)

FILE: kernel/core/find_bit.c
  function _find_next_bit (line 27) | static unsigned long _find_next_bit(const unsigned long *addr,
  function find_next_bit (line 55) | unsigned long find_next_bit(const unsigned long *addr, unsigned long size,
  function find_next_zero_bit (line 61) | unsigned long find_next_zero_bit(const unsigned long *addr, unsigned lon...
  function _find_next_bit_loop (line 67) | unsigned long _find_next_bit_loop(const unsigned long *addr, unsigned lo...
  function find_next_bit_loop (line 84) | unsigned long find_next_bit_loop(const unsigned long *addr, unsigned lon...
  function find_next_zero_bit_loop (line 90) | unsigned long find_next_zero_bit_loop(const unsigned long *addr, unsigne...
  function find_first_bit (line 99) | unsigned long find_first_bit(const unsigned long *addr, unsigned long size)
  function find_first_zero_bit (line 114) | unsigned long find_first_zero_bit(const unsigned long *addr, unsigned lo...
  function find_last_bit (line 126) | unsigned long find_last_bit(const unsigned long *addr, unsigned long size)

FILE: kernel/core/flag.c
  type flag_node (line 25) | struct flag_node {
  function flag_t (line 33) | static inline flag_t flag_wait_set_all(struct flag_grp *grp,
  function flag_t (line 48) | static inline flag_t flag_wait_set_any(struct flag_grp *grp,
  function flag_t (line 60) | static inline flag_t flag_wait_clr_all(struct flag_grp *grp,
  function flag_t (line 75) | static inline flag_t flag_wait_clr_any(struct flag_grp *grp,
  function flag_t (line 87) | flag_t flag_accept(struct flag_grp *grp, flag_t flags, int wait_type)
  function flag_task_ready (line 125) | static void flag_task_ready(struct flag_node *node, flag_t flags)
  function flag_block (line 132) | static void flag_block(struct flag_grp *grp, struct flag_node *pnode,
  function flag_t (line 147) | flag_t flag_pend(struct flag_grp *grp, flag_t flags,
  function flag_t (line 240) | flag_t flag_pend_get_flags_ready(void)
  function flag_t (line 245) | flag_t flag_post(struct flag_grp *grp, flag_t flags, int opt)

FILE: kernel/core/hook.c
  type list_head (line 20) | struct list_head
  function hooks_init (line 22) | static int hooks_init(void)
  function register_hook (line 33) | int register_hook(hook_func_t fn, enum hook_type type)
  function do_hooks (line 54) | int do_hooks(void *item, void *context, enum hook_type type)

FILE: kernel/core/host_vspace.c
  type vspace (line 21) | struct vspace
  function create_host_mapping (line 23) | int create_host_mapping(unsigned long vir, unsigned long phy,
  function destroy_host_mapping (line 40) | int destroy_host_mapping(unsigned long vir, size_t size)
  function change_host_mapping (line 55) | int change_host_mapping(unsigned long vir, unsigned long phy,
  function translate_va_to_pa (line 68) | unsigned long translate_va_to_pa(struct vspace *vs, unsigned long va)
  function io_unmap (line 94) | int io_unmap(virt_addr_t vir, size_t size)
  function release_vspace_pages (line 110) | void release_vspace_pages(struct vspace *vs)
  function host_unmap_range (line 124) | static void host_unmap_range(struct vspace *vs, unsigned long start,
  type mm_notifier_ops (line 130) | struct mm_notifier_ops
  function kernel_vspace_init (line 134) | int kernel_vspace_init(void)

FILE: kernel/core/hweight.c
  function sw_hweight32 (line 26) | unsigned int sw_hweight32(unsigned int w)
  function sw_hweight16 (line 42) | unsigned int sw_hweight16(unsigned int w)
  function sw_hweight8 (line 50) | unsigned int sw_hweight8(unsigned int w)
  function sw_hweight64 (line 57) | unsigned long sw_hweight64(__u64 w)

FILE: kernel/core/idle.c
  function system_reboot (line 34) | void system_reboot(void)
  function system_shutdown (line 42) | void system_shutdown(void)
  function system_suspend (line 50) | int system_suspend(void)
  function pcpu_can_idle (line 60) | static inline bool pcpu_can_idle(struct pcpu *pcpu)
  function pcpu_release_task (line 66) | static void pcpu_release_task(struct pcpu *pcpu)
  function kworker_task (line 82) | static int kworker_task(void *data)
  function __init_task (line 105) | static int __init_task(void *main)
  function start_system_task (line 117) | static void start_system_task(void)
  function cpu_idle (line 136) | void cpu_idle(void)

FILE: kernel/core/init.c
  function call_init_func (line 38) | static void call_init_func(unsigned long fn_start, unsigned long fn_end)
  function early_init (line 56) | void early_init(void)
  function arch_init (line 65) | void arch_init(void)
  function subsys_init (line 73) | void subsys_init(void)
  function module_init (line 79) | void module_init(void)
  function device_init (line 85) | void device_init(void)
  function early_init_percpu (line 91) | void early_init_percpu(void)
  function arch_init_percpu (line 97) | void arch_init_percpu(void)
  function subsys_init_percpu (line 103) | void subsys_init_percpu(void)
  function module_init_percpu (line 109) | void module_init_percpu(void)
  function device_init_percpu (line 115) | void device_init_percpu(void)

FILE: kernel/core/iomem.c
  type io_block (line 21) | struct io_block {
  type io_block (line 28) | struct io_block
  type io_block (line 31) | struct io_block
  type io_block (line 48) | struct io_block
  type io_block (line 54) | struct io_block
  type io_block (line 60) | struct io_block
  type io_block (line 78) | struct io_block
  function free_io_pages (line 105) | void free_io_pages(void *addr)

FILE: kernel/core/irq.c
  type irq_chip (line 28) | struct irq_chip
  type irq_desc (line 32) | struct irq_desc
  type irq_desc (line 38) | struct irq_desc
  function send_sgi (line 44) | void send_sgi(uint32_t sgi, int cpu)
  function default_irq_handler (line 60) | static int default_irq_handler(uint32_t irq, void *data)
  function do_handle_host_irq (line 66) | static int do_handle_host_irq(int cpuid, struct irq_desc *irq_desc)
  type irq_desc (line 90) | struct irq_desc
  type irq_desc (line 109) | struct irq_desc
  function __irq_enable (line 114) | void __irq_enable(uint32_t irq, int enable)
  function irq_dir (line 140) | void irq_dir(uint32_t irq)
  function irq_clear_pending (line 145) | void irq_clear_pending(uint32_t irq)
  function irq_set_affinity (line 151) | void irq_set_affinity(uint32_t irq, int cpu)
  function irq_set_type (line 172) | void irq_set_type(uint32_t irq, int type)
  function do_irq_handler (line 195) | int do_irq_handler(void)
  function irq_xlate (line 220) | int irq_xlate(struct device_node *node, uint32_t *intspec,
  function request_irq_percpu (line 231) | int request_irq_percpu(uint32_t irq, irq_handle_t handler,
  function request_irq (line 265) | int request_irq(uint32_t irq, irq_handle_t handler,
  type device_node (line 305) | struct device_node
  type irq_chip (line 310) | struct irq_chip
  type irq_chip (line 318) | struct irq_chip
  function irq_init (line 329) | int irq_init(void)
  function irq_secondary_init (line 349) | int irq_secondary_init(void)

FILE: kernel/core/kmem.c
  type kmem_section (line 22) | struct kmem_section {
  type kmem_section (line 35) | struct kmem_section
  type kmem_section (line 36) | struct kmem_section
  function add_kmem_section (line 96) | void add_kmem_section(struct memory_region *region)
  function kmem_init (line 131) | void kmem_init(void)

FILE: kernel/core/mbox.c
  function mbox_is_pending (line 35) | int mbox_is_pending(mbox_t *m)
  function __mbox_post_opt (line 63) | static int __mbox_post_opt(mbox_t *m, void *pmsg, int pend_state, int opt)
  function mobox_post_abort (line 91) | int mobox_post_abort(mbox_t *m)
  function mbox_post (line 97) | int mbox_post(mbox_t *m, void *pmsg)

FILE: kernel/core/mem.c
  type memory_region (line 24) | struct memory_region
  type memory_region (line 28) | struct memory_region
  function add_memory_region (line 34) | int add_memory_region(uint64_t base, uint64_t size, int type, int vmid)
  function split_memory_region (line 70) | int split_memory_region(uint64_t base, size_t size, int type, int vmid)
  function dump_memory_info (line 133) | void dump_memory_info(void)
  function handle_normal_memory_region (line 156) | static void handle_normal_memory_region(struct memory_region *region)
  function map_all_memory (line 169) | static void map_all_memory(void)
  function prepare_memory_region (line 189) | static void prepare_memory_region(struct memory_region *re)
  function in_os_memory_range (line 223) | static inline int in_os_memory_range(unsigned long addr, size_t size)
  function mm_init (line 228) | void mm_init(void)

FILE: kernel/core/minos.c
  function boot_main (line 43) | void boot_main(void)
  function boot_secondary (line 96) | void boot_secondary(int cpuid)

FILE: kernel/core/mutex.c
  function mutex_accept (line 23) | int mutex_accept(mutex_t *mutex)
  function mutex_pend (line 40) | int mutex_pend(mutex_t *m, uint32_t timeout)
  function mutex_post (line 64) | int mutex_post(mutex_t *m)

FILE: kernel/core/page.c
  type mem_section (line 53) | struct mem_section {
  type mem_section (line 82) | struct mem_section
  function add_kernel_page_section (line 85) | void add_kernel_page_section(phy_addr_t base, size_t size, int type)
  function add_page_section (line 119) | int add_page_section(phy_addr_t base, size_t size, int type)
  function alloc_pages_in_block (line 183) | static void alloc_pages_in_block(struct page *page, struct mem_section *ms)
  function free_pages_in_block (line 194) | static void free_pages_in_block(struct page *page, struct mem_section *ms)
  type mem_section (line 237) | struct mem_section
  type mem_section (line 239) | struct mem_section
  type page (line 251) | struct page
  type mem_section (line 251) | struct mem_section
  type page (line 254) | struct page
  type page (line 290) | struct page
  type page (line 292) | struct page
  type mem_section (line 293) | struct mem_section
  function bzero_pages (line 317) | static void bzero_pages(struct page *page, int pages)
  type page (line 322) | struct page
  type page (line 324) | struct page
  type page (line 340) | struct page
  type page (line 351) | struct page
  type mem_section (line 351) | struct mem_section
  type page (line 358) | struct page
  type mem_section (line 360) | struct mem_section
  function free_pages_in_section (line 371) | static int free_pages_in_section(struct page *page, struct mem_section *ms)
  function __free_pages (line 410) | int __free_pages(struct page *page)
  function free_pages (line 427) | int free_pages(void *addr)
  type mem_section (line 467) | struct mem_section
  type page (line 469) | struct page
  type mem_section (line 522) | struct mem_section
  function free_block (line 545) | void free_block(void *addr)

FILE: kernel/core/percpu.c
  type pcpu (line 22) | struct pcpu
  function percpu_init (line 28) | void percpu_init(int cpuid)
  function percpu_subsystem_init (line 48) | static int percpu_subsystem_init(void)

FILE: kernel/core/print.c
  function get_print_time (line 36) | static int get_print_time(char *buffer)
  function change_log_level (line 74) | void change_log_level(unsigned int level)
  function level_print (line 79) | int level_print(int level, char *fmt, ...)
  function printf (line 144) | int printf(char *fmt, ...)
  function puts (line 164) | int puts(char *buf, size_t size)

FILE: kernel/core/queue.c
  function queue_init (line 23) | int queue_init(queue_t *qt, int size, char *name)
  function queue_free (line 48) | static inline void queue_free(queue_t *qt)
  type queue (line 59) | struct queue
  function queue_push (line 71) | static inline void queue_push(struct queue *q, void *pmsg)
  function queue_push_front (line 79) | static inline void queue_push_front(struct queue *q, void *pmsg)
  type queue (line 91) | struct queue
  type queue (line 96) | struct queue
  function queue_flush (line 105) | int queue_flush(queue_t *qt)
  type queue (line 123) | struct queue
  type queue (line 129) | struct queue
  function __queue_post (line 142) | static int __queue_post(queue_t *qt, void *pmsg, int front)
  function queue_post_abort (line 171) | int queue_post_abort(queue_t *qt, int opt)
  function queue_post (line 176) | int queue_post(queue_t *qt, void *pmsg)
  function queue_post_front (line 181) | int queue_post_front(queue_t *qt, void *pmsg)

FILE: kernel/core/ramdisk.c
  type ramdisk_inode (line 22) | struct ramdisk_inode
  type ramdisk_sb (line 23) | struct ramdisk_sb
  function set_ramdisk_address (line 26) | void set_ramdisk_address(void *start, void *end)
  function ramdisk_init (line 32) | int ramdisk_init(void)
  type ramdisk_file (line 77) | struct ramdisk_file
  function ramdisk_file_size (line 82) | unsigned long ramdisk_file_size(struct ramdisk_file *file)
  function ramdisk_file_base (line 87) | unsigned long ramdisk_file_base(struct ramdisk_file *file)
  type ramdisk_inode (line 92) | struct ramdisk_inode
  type ramdisk_inode (line 94) | struct ramdisk_inode
  function ramdisk_read (line 104) | int ramdisk_read(struct ramdisk_file *file, void *buf,
  function ramdisk_open (line 117) | int ramdisk_open(char *name, struct ramdisk_file *file)

FILE: kernel/core/sched.c
  type pcpu (line 33) | struct pcpu
  type task (line 35) | struct task
  function __might_sleep (line 43) | void __might_sleep(const char *file, int line, int preempt_offset)
  function sched_update_sched_timer (line 59) | static inline void sched_update_sched_timer(void)
  function add_task_to_ready_list (line 74) | static void add_task_to_ready_list(struct pcpu *pcpu,
  function remove_task_from_ready_list (line 102) | static void remove_task_from_ready_list(struct pcpu *pcpu, struct task *...
  function pcpu_resched (line 121) | void pcpu_resched(int pcpu_id)
  function pcpu_irqwork (line 126) | void pcpu_irqwork(int pcpu_id)
  function select_task_run_cpu (line 131) | static int select_task_run_cpu(void)
  function percpu_task_ready (line 139) | static void percpu_task_ready(struct pcpu *pcpu, struct task *task, int ...
  function smp_percpu_task_ready (line 148) | static inline void smp_percpu_task_ready(struct pcpu *pcpu,
  function task_ready (line 164) | int task_ready(struct task *task, int preempt)
  function task_sleep (line 193) | void task_sleep(uint32_t delay)
  function task_stop (line 213) | static inline void task_stop(int state)
  function task_suspend (line 228) | void task_suspend(void)
  function task_die (line 233) | void task_die(void)
  type task (line 238) | struct task
  type pcpu (line 238) | struct pcpu
  type list_head (line 240) | struct list_head
  type task (line 241) | struct task
  function switch_to_task (line 279) | static void switch_to_task(struct task *cur, struct task *next)
  function sched_tick_handler (line 330) | static void sched_tick_handler(unsigned long data)
  function sys_sched (line 342) | static void inline sys_sched(void)
  function sched (line 348) | void sched(void)
  function sched_allowed (line 361) | static inline int sched_allowed(void)
  function cond_resched (line 366) | void cond_resched(void)
  function task_exit (line 372) | void task_exit(int errno)
  function __exception_return_handler (line 378) | static inline int __exception_return_handler(void)
  function exception_return_handler (line 415) | void exception_return_handler(void)
  function irqwork_handler (line 423) | static int irqwork_handler(uint32_t irq, void *data)
  function resched_handler (line 469) | static int resched_handler(uint32_t irq, void *data)
  function local_sched_init (line 475) | int local_sched_init(void)
  function pcpu_sched_init (line 488) | static void pcpu_sched_init(struct pcpu *pcpu)
  function sched_init (line 503) | int sched_init(void)
  function wake_up_interrupted (line 513) | static int wake_up_interrupted(struct task *task,
  function wake_up_common (line 564) | static int wake_up_common(struct task *task, long pend_state, unsigned l...
  function __wake_up (line 623) | int __wake_up(struct task *task, long pend_state, unsigned long data)

FILE: kernel/core/sem.c
  function sem_accept (line 23) | uint32_t sem_accept(sem_t *sem)
  function sem_pend (line 37) | int sem_pend(sem_t *sem, uint32_t timeout)
  function sem_post_opt (line 55) | static int sem_post_opt(sem_t *sem, int pend_state, int opt)
  function sem_pend_abort (line 80) | int sem_pend_abort(sem_t *sem, int opt)
  function sem_post (line 86) | int sem_post(sem_t *sem)

FILE: kernel/core/slab.c
  type slab_header (line 24) | struct slab_header {
  type slab_type (line 44) | struct slab_type {
  type list_head (line 55) | struct list_head
  function is_slab_memory (line 63) | static int inline is_slab_memory(void *addr)
  function get_slab_alloc_size (line 69) | static size_t inline get_slab_alloc_size(size_t size)
  type slab_type (line 77) | struct slab_type
  type slab_header (line 78) | struct slab_header
  type slab_header (line 104) | struct slab_header
  type slab_header (line 134) | struct slab_header
  function free_slab (line 144) | static void free_slab(void *addr)
  function free (line 188) | void free(void *addr)
  function slab_init (line 232) | void slab_init(void)

FILE: kernel/core/smp.c
  type smp_call (line 36) | struct smp_call {
  type smp_call_data (line 42) | struct smp_call_data {
  type smp_call_data (line 46) | struct smp_call_data
  function smp_call_wait (line 48) | static void inline smp_call_wait(struct smp_call *call)
  function smp_call_lock (line 55) | static void inline smp_call_lock(struct smp_call *call)
  function smp_call_unlock (line 64) | static void inline smp_call_unlock(struct smp_call *call)
  function is_cpus_all_up (line 70) | int is_cpus_all_up(void)
  function smp_function_call (line 75) | int smp_function_call(int cpu, smp_function fn, void *data, int wait)
  function irqreturn_t (line 115) | static irqreturn_t smp_function_call_handler(uint32_t irq, void *data)
  function smp_cpu_up (line 136) | int smp_cpu_up(unsigned long cpu, unsigned long entry)
  function smp_cpus_up (line 145) | void smp_cpus_up(void)
  function smp_init (line 182) | void smp_init(void)

FILE: kernel/core/stdlib.c
  function div64_u64 (line 26) | uint64_t div64_u64(uint64_t dividend, uint64_t divisor)
  function muldiv64 (line 50) | uint64_t muldiv64(uint64_t a, uint32_t b, uint32_t c)

FILE: kernel/core/string.c
  function absolute (line 35) | long absolute(long num)
  function num_to_str (line 42) | long num_to_str(char *buf, unsigned long num, int b)
  function ltoa (line 90) | long ltoa(char *buf, long num)
  function itoa (line 95) | long itoa(char *buf, int num)
  function ultoa (line 100) | long ultoa(char *buf, unsigned long num)
  function uitoa (line 105) | long uitoa(char *buf, unsigned int num)
  function hextoa (line 110) | long hextoa(char *buf, unsigned long num)
  function octtoa (line 115) | long octtoa(char *buf, unsigned long num)
  function bintoa (line 120) | long bintoa(char *buf, unsigned long num)
  function ptoa (line 125) | long ptoa(char *buf, unsigned long num)
  function numbric (line 145) | int numbric(char *buf, unsigned long num, int flag)
  function vsprintf (line 207) | int vsprintf(char *buf, const char *fmt, va_list arg)
  function sprintf (line 316) | int sprintf(char *str, const char *format, ...)
  function strlen (line 332) | int strlen(char *buf)
  function strcmp (line 358) | int strcmp(const char *src, const char *dst)
  function memcmp (line 374) | int memcmp(const char *src, const char *dst, size_t size)
  function strncmp (line 395) | int strncmp(const char *src, const char *dst, int n)
  function memcpy (line 420) | int memcpy(void *target, void *source, int size)
  function memset (line 435) | void memset(char *base, char ch, int size)
  function strtoul (line 450) | unsigned long strtoul(const char *cp, char **endp, unsigned int base)

FILE: kernel/core/task.c
  type task (line 25) | struct task
  type task (line 29) | struct task
  type task (line 30) | struct task
  function alloc_tid (line 38) | static int alloc_tid(void)
  function request_tid (line 55) | static int request_tid(int tid)
  function release_tid (line 61) | static void release_tid(int tid)
  function tid_early_init (line 69) | static int tid_early_init(void)
  function task_timeout_handler (line 80) | static void task_timeout_handler(unsigned long data)
  function task_init (line 88) | static void task_init(struct task *task, char *name,
  type task (line 126) | struct task
  type task (line 136) | struct task
  type task (line 142) | struct task
  function task_create_hook (line 160) | static void task_create_hook(struct task *task, void *pdata)
  function task_exit_from_user (line 165) | void task_exit_from_user(gp_regs *regs)
  function task_return_to_user (line 174) | void task_return_to_user(gp_regs *regs)
  function do_release_task (line 197) | void do_release_task(struct task *task)
  type task (line 212) | struct task
  type task (line 221) | struct task
  type task (line 268) | struct task
  function create_idle_task (line 290) | int create_idle_task(void)
  function os_for_all_task (line 326) | void os_for_all_task(void (*hdl)(struct task *task))
  function task_early_init (line 344) | task_early_init(void)
  function create_percpu_tasks (line 360) | int create_percpu_tasks(char *name, task_func_t func,
  type task (line 376) | struct task
  type task (line 385) | struct task

FILE: kernel/core/timer.c
  type raw_timer (line 28) | struct raw_timer
  function soft_timer_interrupt (line 32) | void soft_timer_interrupt(void)
  function timer_pending (line 111) | static inline int timer_pending(const struct timer * timer)
  function detach_timer (line 116) | static int detach_timer(struct raw_timer *timers, struct timer *timer)
  function __mod_timer (line 128) | static int __mod_timer(struct timer *timer)
  function mod_timer (line 171) | int mod_timer(struct timer *timer, uint64_t cval)
  function __start_delay_timer (line 183) | static int __start_delay_timer(struct timer *timer)
  function init_timer (line 192) | void init_timer(struct timer *timer, timer_func_t fn, unsigned long data)
  function start_timer (line 205) | int start_timer(struct timer *timer)
  function setup_timer (line 210) | void setup_timer(struct timer *timer, uint64_t tval)
  function setup_and_start_timer (line 215) | void setup_and_start_timer(struct timer *timer, uint64_t tval)
  function stop_timer (line 221) | int stop_timer(struct timer *timer)
  function init_raw_timers (line 247) | static int init_raw_timers(void)

FILE: kernel/drivers/console.c
  function mem_console_putc (line 38) | static void mem_console_putc(char ch)
  function mem_console_getc (line 43) | static char mem_console_getc(void)
  type console (line 50) | struct console
  type console (line 52) | struct console
  type console (line 56) | struct console
  function console_init (line 69) | void console_init(char *name)
  function console_putc (line 85) | void console_putc(char ch)
  function console_getc (line 90) | char console_getc(void)
  function console_recv (line 95) | void console_recv(const char *buf, int cnt)
  function console_puts (line 112) | void console_puts(char *buf, int len)
  function console_gets (line 117) | int console_gets(char *buf, int max, uint32_t timeout)

FILE: kernel/drivers/iommu/ipmmu-plat.c
  type rcar_sysc_ch (line 52) | struct rcar_sysc_ch {
  type rcar_sysc_ch (line 67) | struct rcar_sysc_ch
  function rcar_sysc_init (line 82) | static int rcar_sysc_init(void)
  function rcar_sysc_power_is_off (line 118) | static bool rcar_sysc_power_is_off(const struct rcar_sysc_ch *sysc_ch)
  function rcar_sysc_power_on (line 129) | static int rcar_sysc_power_on(const struct rcar_sysc_ch *sysc_ch)
  function ipmmu_get_mmu_pd (line 177) | static uint32_t ipmmu_get_mmu_pd(struct device_node *node)
  function ipmmu_power_on (line 195) | int ipmmu_power_on(struct device_node *node)
  function ipmmu_is_mmu_tlb_disable_needed (line 237) | bool ipmmu_is_mmu_tlb_disable_needed(struct device_node *node)

FILE: kernel/drivers/iommu/ipmmu.c
  type device_node (line 9) | struct device_node
  type device_node (line 10) | struct device_node
  type iommu_domain (line 17) | struct iommu_domain {
  type vm_ipmmu (line 27) | struct vm_ipmmu {
  type ipmmu_device (line 45) | struct ipmmu_device {
  type ipmmu_domain (line 57) | struct ipmmu_domain {
  type ipmmu_utlb (line 71) | struct ipmmu_utlb {
  type node_ipmmu (line 83) | struct node_ipmmu {
  function ipmmu_is_root (line 160) | static bool ipmmu_is_root(struct ipmmu_device *mmu)
  type ipmmu_device (line 166) | struct ipmmu_device
  type ipmmu_device (line 166) | struct ipmmu_device
  type ipmmu_device (line 168) | struct ipmmu_device
  function u32 (line 188) | static u32 ipmmu_read(struct ipmmu_device *mmu, unsigned int offset)
  function ipmmu_write (line 193) | static void ipmmu_write(struct ipmmu_device *mmu, unsigned int offset, u...
  function u32 (line 198) | static u32 ipmmu_ctx_read_root(struct ipmmu_domain *domain, unsigned int...
  function ipmmu_ctx_write_root (line 203) | static void ipmmu_ctx_write_root(struct ipmmu_domain *domain, unsigned i...
  function ipmmu_ctx_write_cache (line 210) | static void ipmmu_ctx_write_cache(struct ipmmu_domain *domain, unsigned ...
  function ipmmu_ctx_write_all (line 224) | static void ipmmu_ctx_write_all(struct ipmmu_domain *domain, unsigned in...
  function ipmmu_tlb_sync (line 241) | static void ipmmu_tlb_sync(struct ipmmu_domain *domain)
  function ipmmu_tlb_invalidate (line 256) | static void ipmmu_tlb_invalidate(struct ipmmu_domain *domain)
  function ipmmu_utlb_enable (line 268) | static void ipmmu_utlb_enable(struct ipmmu_domain *domain,
  function ipmmu_domain_allocate_context (line 292) | static int ipmmu_domain_allocate_context(struct ipmmu_device *mmu,
  function ipmmu_domain_init_context (line 312) | static int ipmmu_domain_init_context(struct ipmmu_domain *domain)
  function ipmmu_domain_free_context (line 381) | static void ipmmu_domain_free_context(struct ipmmu_device *mmu,
  function ipmmu_domain_destroy_context (line 394) | static void ipmmu_domain_destroy_context(struct ipmmu_domain *domain)
  function ipmmu_domain_irq (line 421) | static int ipmmu_domain_irq(struct ipmmu_domain *domain)
  function ipmmu_irq (line 470) | static int ipmmu_irq(uint32_t irq, void *dev)
  function ipmmus_are_equal (line 492) | bool ipmmus_are_equal(struct ipmmu_domain *domain,
  function ipmmu_attach_node (line 508) | static int ipmmu_attach_node(struct iommu_domain *io_domain,
  function ipmmu_find_utlbs (line 588) | static int ipmmu_find_utlbs(struct device_node *node, struct ipmmu_utlb ...
  function ipmmu_node_init (line 630) | static int ipmmu_node_init(struct device_node *node)
  function ipmmu_device_reset (line 707) | static void ipmmu_device_reset(struct ipmmu_device *mmu)
  function ipmmu_probe (line 720) | static int ipmmu_probe(struct device_node *node)
  function ipmmu_iotlb_flush_all (line 824) | static int ipmmu_iotlb_flush_all(struct vm *vm)
  type iommu_domain (line 837) | struct iommu_domain
  type vm (line 837) | struct vm
  type device_node (line 838) | struct device_node
  type vm_ipmmu (line 840) | struct vm_ipmmu
  type iommu_domain (line 841) | struct iommu_domain
  function ipmmu_destroy_domain (line 859) | static void ipmmu_destroy_domain(struct iommu_domain *io_domain)
  type vm (line 882) | struct vm
  function ipmmu_assign_node (line 884) | static int ipmmu_assign_node(struct vm *vm, struct device_node *node)
  function ipmmu_alloc_page_table (line 952) | static int ipmmu_alloc_page_table(struct vm *vm)
  function ipmmu_vm_init (line 991) | static int ipmmu_vm_init(struct vm *vm)
  type device_node (line 1007) | struct device_node
  type device_node (line 1009) | struct device_node
  function ipmmu_init (line 1025) | static int ipmmu_init(struct device_node *node)
  type iommu_ops (line 1051) | struct iommu_ops

FILE: kernel/drivers/irq-chips/gicv2.c
  type device_node (line 75) | struct device_node
  function writeb_gicd (line 82) | static inline void writeb_gicd(uint8_t val, unsigned int offset)
  function writel_gicd (line 87) | static inline void writel_gicd(uint32_t val, unsigned int offset)
  function readl_gicd (line 92) | static inline uint32_t readl_gicd(unsigned int offset)
  function writel_gicc (line 97) | static inline void writel_gicc(uint32_t val, unsigned int offset)
  function readl_gicc (line 102) | static inline uint32_t readl_gicc(unsigned int offset)
  function writel_gich (line 107) | static inline void writel_gich(uint32_t val, unsigned int offset)
  function readl_gich (line 112) | static inline uint32_t readl_gich(int unsigned offset)
  function gicv2_eoi_irq (line 117) | static void gicv2_eoi_irq(uint32_t irq)
  function gicv2_dir_irq (line 123) | static void gicv2_dir_irq(uint32_t irq)
  function gicv2_read_irq (line 129) | static uint32_t gicv2_read_irq(void)
  function gicv2_set_irq_type (line 140) | static int gicv2_set_irq_type(uint32_t irq, uint32_t type)
  function gicv2_clear_pending (line 163) | static void __used gicv2_clear_pending(uint32_t irq)
  function gicv2_set_irq_priority (line 169) | static int gicv2_set_irq_priority(uint32_t irq, uint32_t pr)
  function gicv2_set_irq_affinity (line 180) | static int gicv2_set_irq_affinity(uint32_t irq, uint32_t pcpu)
  function gicv2_send_sgi (line 192) | static void gicv2_send_sgi(uint32_t sgi, enum sgi_mode mode, cpumask_t *...
  function gicv2_mask_irq (line 218) | static void gicv2_mask_irq(uint32_t irq)
  function gicv2_unmask_irq (line 228) | static void gicv2_unmask_irq(uint32_t irq)
  function gicv2_mask_irq_cpu (line 238) | static void gicv2_mask_irq_cpu(uint32_t irq, int cpu)
  function gicv2_unmask_irq_cpu (line 243) | static void gicv2_unmask_irq_cpu(uint32_t irq, int cpu)
  function gicv2_is_aliased (line 248) | static int __init_text gicv2_is_aliased(unsigned long base, unsigned lon...
  function gicv2_cpu_init (line 262) | gicv2_cpu_init(void)
  function gicv2_hyp_init (line 301) | gicv2_hyp_init(void)
  function gicv2_dist_init (line 307) | gicv2_dist_init(void)
  function gicv2_init (line 358) | static int __init_text gicv2_init(struct device_node *node)
  function gicv2_secondary_init (line 410) | gicv2_secondary_init(void)
  type irq_chip (line 422) | struct irq_chip

FILE: kernel/drivers/irq-chips/gicv3.c
  type device_node (line 44) | struct device_node
  function gicv3_gicd_wait_for_rwp (line 48) | static void gicv3_gicd_wait_for_rwp(void)
  function gicv3_gicr_wait_for_rwp (line 53) | static void gicv3_gicr_wait_for_rwp(void)
  function gicv3_eoi_irq (line 58) | static void gicv3_eoi_irq(uint32_t irq)
  function gicv3_dir_irq (line 64) | static void gicv3_dir_irq(uint32_t irq)
  function gicv3_read_irq (line 70) | static uint32_t gicv3_read_irq(void)
  function gicv3_set_irq_type (line 79) | static int gicv3_set_irq_type(uint32_t irq, uint32_t type)
  function gicv3_clear_pending (line 110) | static void gicv3_clear_pending(uint32_t irq)
  function gicv3_set_irq_priority (line 129) | static int gicv3_set_irq_priority(uint32_t irq, uint32_t pr)
  function gicv3_set_irq_affinity (line 143) | static int gicv3_set_irq_affinity(uint32_t irq, uint32_t pcpu)
  function __gicv3_send_sgi_list (line 157) | static inline void __gicv3_send_sgi_list(uint32_t sgi, cpumask_t *mask)
  function __gicv3_send_sgi_list_shif_mpidr (line 186) | static inline void __gicv3_send_sgi_list_shif_mpidr(uint32_t sgi, cpumas...
  function gicv3_send_sgi_list (line 199) | static void gicv3_send_sgi_list(uint32_t sgi, cpumask_t *mask)
  function gicv3_send_sgi (line 207) | static void gicv3_send_sgi(uint32_t sgi, enum sgi_mode mode, cpumask_t *...
  function gicv3_mask_irq (line 235) | static void gicv3_mask_irq(uint32_t irq)
  function gicv3_unmask_irq (line 250) | static void gicv3_unmask_irq(uint32_t irq)
  function gicv3_mask_irq_cpu (line 267) | static void gicv3_mask_irq_cpu(uint32_t irq, int cpu)
  function gicv3_unmask_irq_cpu (line 288) | static void gicv3_unmask_irq_cpu(uint32_t irq, int cpu)
  function gicv3_wakeup_gicr (line 309) | static void gicv3_wakeup_gicr(void)
  function read_icc_sre (line 321) | static inline uint64_t read_icc_sre(void)
  function write_icc_sre (line 330) | static inline void write_icc_sre(uint64_t val)
  function gicv3_gicc_init (line 339) | gicv3_gicc_init(void)
  function gicv3_hyp_init (line 374) | gicv3_hyp_init(void)
  function gicv3_gicr_init (line 384) | gicv3_gicr_init(void)
  function gicv3_icc_sre_init (line 413) | gicv3_icc_sre_init(void)
  function gicv3_init (line 421) | static int __init_text gicv3_init(struct device_node *node)
  function gicv3_secondary_init (line 517) | gicv3_secondary_init(void)
  type irq_chip (line 531) | struct irq_chip

FILE: kernel/drivers/irq-chips/irq-bcm2836.c
  type armctrl_ic (line 42) | struct armctrl_ic {
  type armctrl_ic (line 51) | struct armctrl_ic
  type device_node (line 54) | struct device_node
  function bcm2835_mask_irq (line 58) | static void bcm2835_mask_irq(uint32_t irq)
  function bcm2835_unmask_irq (line 64) | static void bcm2835_unmask_irq(uint32_t irq)
  function armctrl_translate_bank (line 70) | static uint32_t armctrl_translate_bank(int bank)
  function armctrl_translate_shortcut (line 77) | static uint32_t armctrl_translate_shortcut(int bank, u32 stat)
  function bcm2835_get_pending (line 82) | static uint32_t bcm2835_get_pending(void)
  function bcm2836_get_pending (line 102) | static uint32_t bcm2836_get_pending(void)
  function bcm2836_mask_per_cpu_irq (line 152) | static void bcm2836_mask_per_cpu_irq(unsigned int reg_offset,
  function bcm2836_unmask_per_cpu_irq (line 161) | static void bcm2836_unmask_per_cpu_irq(unsigned int reg_offset,
  function __bcm2836_mask_irq (line 170) | static void inline __bcm2836_mask_irq(uint32_t irq, int cpu)
  function __bcm2836_unmask_irq (line 200) | static void inline __bcm2836_unmask_irq(uint32_t irq, int cpu)
  function bcm2836_set_irq_priority (line 229) | static int bcm2836_set_irq_priority(uint32_t irq, uint32_t pr)
  function bcm2836_mask_irq (line 234) | static void bcm2836_mask_irq(uint32_t irq)
  function bcm2836_unmask_irq (line 239) | static void bcm2836_unmask_irq(uint32_t irq)
  function bcm2836_mask_irq_cpu (line 244) | static void bcm2836_mask_irq_cpu(uint32_t irq, int cpu)
  function bcm2836_unmask_irq_cpu (line 249) | static void bcm2836_unmask_irq_cpu(uint32_t irq, int cpu)
  function bcm2836_send_sgi (line 254) | static void bcm2836_send_sgi(uint32_t sgi, enum sgi_mode mode, cpumask_t...
  function bcm2836_set_irq_affinity (line 286) | static int bcm2836_set_irq_affinity(uint32_t irq, uint32_t pcpu)
  function bcm2836_set_irq_type (line 291) | static int bcm2836_set_irq_type(uint32_t irq, uint32_t type)
  function bcm2836_dir_irq (line 296) | static void bcm2836_dir_irq(uint32_t irq)
  function bcm2836_eoi_irq (line 302) | static void bcm2836_eoi_irq(uint32_t irq)
  function bcm2835_irq_handler (line 308) | static int bcm2835_irq_handler(uint32_t irq, void *data)
  function bcm2836_irq_init (line 335) | static int __init_text bcm2836_irq_init(struct device_node *node)
  function bcm2836_secondary_init (line 382) | bcm2836_secondary_init(void)
  type irq_chip (line 387) | struct irq_chip

FILE: kernel/drivers/irq-chips/irqchip.c
  function bcm2836_xlate_irq (line 22) | int bcm2836_xlate_irq(struct device_node *node,
  function gic_xlate_irq (line 62) | int gic_xlate_irq(struct device_node *node,

FILE: kernel/drivers/of/of.c
  type device_node (line 28) | struct device_node
  function of_spin_table_init (line 30) | int of_spin_table_init(phy_addr_t *smp_holding)
  function fdt_n_size_cells (line 85) | int fdt_n_size_cells(void *dtb, int node)
  function fdt_n_addr_cells (line 105) | int fdt_n_addr_cells(void *dtb, int node)
  type device_node (line 144) | struct device_node
  function __of_get_node_by_name (line 149) | static int __of_get_node_by_name(void *data, int pnode,
  function of_get_node_by_name (line 177) | int of_get_node_by_name(void *data, int pnode, char *str)
  function __of_get_bool (line 197) | int __of_get_bool(void *dtb, int node, char *attr)
  function of_get_bool (line 206) | int of_get_bool(struct device_node *node, char *attr)
  function __of_get_string (line 211) | int __of_get_string(void *dtb, int node, char *attr, char *str, int len)
  function __of_get_u16_array (line 240) | int __of_get_u16_array(void *dtb, int node, char *attr,
  function __of_get_u32_array (line 265) | int __of_get_u32_array(void *dtb, int node, char *attr,
  function __of_get_u64_array (line 290) | int __of_get_u64_array(void *dtb, int node, char *attr,
  type device_node (line 317) | struct device_node
  type device_node (line 319) | struct device_node
  type device_node (line 321) | struct device_node
  function of_parse_dt_class (line 330) | static int of_parse_dt_class(struct device_node *node)
  function of_device_match (line 396) | int of_device_match(struct device_node *node, char **comp)
  function __of_parse_device_node (line 412) | static int __of_parse_device_node(struct device_node *root,
  type device_node (line 453) | struct device_node
  type device_node (line 456) | struct device_node
  type device_node (line 477) | struct device_node
  type device_node (line 483) | struct device_node
  type device_node (line 489) | struct device_node
  type device_node (line 499) | struct device_node
  type device_node (line 507) | struct device_node
  type device_node (line 508) | struct device_node
  type device_node (line 510) | struct device_node
  type device_node (line 514) | struct device_node
  type device_node (line 515) | struct device_node
  type device_node (line 517) | struct device_node
  function of_n_addr_cells (line 521) | int of_n_addr_cells(struct device_node *node)
  function of_n_size_cells (line 538) | int of_n_size_cells(struct device_node *node)
  function of_get_phandle (line 555) | int of_get_phandle(struct device_node *node)
  function of_n_interrupt_cells (line 568) | int of_n_interrupt_cells(struct device_node *node)
  function of_n_addr_count (line 599) | int of_n_addr_count(struct device_node *node)
  function of_data (line 616) | int of_data(void *data)
  function u64 (line 621) | static inline u64 of_read_number(const fdt32_t *cell, int size)
  function of_check_counts (line 631) | static inline int of_check_counts(int na, int ns)
  type of_bus (line 637) | struct of_bus {
  function of_bus_default_count_cells (line 648) | static void of_bus_default_count_cells(void *blob,
  function of_bus_default_map (line 670) | static uint64_t of_bus_default_map(fdt32_t *addr,
  function of_bus_default_translate (line 687) | static int of_bus_default_translate(u32 *addr, u64 offset, int na)
  type of_bus (line 703) | struct of_bus
  function of_translate_one (line 714) | static int of_translate_one(void * blob, int parent, struct of_bus *bus,
  function __of_translate_address (line 774) | static uint64_t __of_translate_address(struct device_node *node,
  function of_translate_address_index (line 845) | int of_translate_address_index(struct device_node *np,
  function of_translate_address (line 894) | int of_translate_address(struct device_node *node,
  function get_device_irq_index (line 900) | int get_device_irq_index(struct device_node *node, uint32_t *irq,
  function of_init_bootargs (line 933) | int of_init_bootargs(void)
  type device_node (line 952) | struct device_node
  type module_id (line 955) | struct module_id
  type module_id (line 960) | struct module_id
  type module_id (line 965) | struct module_id
  type module_id (line 969) | struct module_id
  function of_release_all_node (line 975) | void of_release_all_node(struct device_node *node)
  type device_node (line 990) | struct device_node
  type device_node (line 992) | struct device_node
  function of_parse_host_device_tree (line 1018) | void of_parse_host_device_tree(void)
  function of_get_console_name (line 1040) | int of_get_console_name(char **name)
  function of_get_chosen_prop32 (line 1058) | static int of_get_chosen_prop32(const char *name, uint32_t *value)
  function of_get_chosen_prop64 (line 1068) | static int __used of_get_chosen_prop64(const char *name, uint64_t *value)
  function of_get_ramdisk_address (line 1078) | int of_get_ramdisk_address(unsigned long *start, unsigned long *end)
  function of_setup_platform (line 1096) | void of_setup_platform(void)
  function of_init (line 1116) | int of_init(void *dtb)
  function get_system_setup_info (line 1127) | int get_system_setup_info(unsigned long *addr, size_t *size)

FILE: kernel/drivers/of/of_mm.c
  function __fdt_parse_memory_info (line 24) | static int __fdt_parse_memory_info(int node, char *attr)
  function __fdt_parse_memreserve (line 76) | static void __fdt_parse_memreserve(void)
  function __fdt_parse_vm_mem (line 106) | static void __fdt_parse_vm_mem(void)
  function __fdt_parse_kernel_mem (line 150) | static void __fdt_parse_kernel_mem(void)
  function __fdt_parse_ramdisk_mem (line 156) | static void __fdt_parse_ramdisk_mem(void)
  function of_parse_memory_info (line 185) | int of_parse_memory_info(void)
  function of_mm_init (line 211) | int of_mm_init(void)

FILE: kernel/drivers/serial/serial_bcm283x_mu.c
  function __bcm283x_mu_putc (line 42) | static inline void __bcm283x_mu_putc(char c)
  function bcm283x_mu_putc (line 50) | void bcm283x_mu_putc(char c)
  function bcm283x_mu_getc (line 58) | char bcm283x_mu_getc(void)
  function bcm283x_mu_init (line 67) | int bcm283x_mu_init(char *arg)

FILE: kernel/drivers/serial/serial_meson.c
  type meson_uart (line 21) | struct meson_uart {
  type meson_uart (line 47) | struct meson_uart
  type meson_uart (line 47) | struct meson_uart
  function meson_serial_init (line 49) | static int meson_serial_init(char *arg)
  function meson_serial_getc (line 66) | static char meson_serial_getc(void)
  function __meson_serial_putc (line 74) | static inline void __meson_serial_putc(char c)
  function meson_serial_putc (line 81) | static void meson_serial_putc(char c)

FILE: kernel/drivers/serial/serial_mvebu_a3700.c
  function __serial_putc (line 39) | static inline void __serial_putc(char ch)
  function serial_mvebu_putc (line 46) | static void serial_mvebu_putc(char ch)
  function serial_mvebu_getc (line 54) | static char serial_mvebu_getc(void)
  function mvebu_serial_setbrg (line 61) | static int mvebu_serial_setbrg(int baudrate)
  function mvebu_serial_probe (line 78) | static int mvebu_serial_probe(char *addr)

FILE: kernel/drivers/serial/serial_pl011.c
  function __pl011_init (line 27) | static int __pl011_init(void *addr, int clock, int baudrate)
  function pl011_irq_handler (line 62) | static int pl011_irq_handler(uint32_t irq, void *data)
  function pl011_irq_init (line 92) | static int pl011_irq_init(void)
  function pl011_init (line 98) | static int pl011_init(char *arg)
  function serial_pl011_putc (line 103) | static void serial_pl011_putc(char c)
  function serial_pl011_getc (line 113) | static char serial_pl011_getc(void)

FILE: kernel/drivers/serial/serial_scif.c
  function __scif_serial_putc (line 18) | static inline void __scif_serial_putc(char c)
  function scif_serial_putc (line 30) | static void scif_serial_putc(char c)
  function scif_serial_getc (line 38) | static char scif_serial_getc(void)

FILE: kernel/drivers/tty.c
  type tty (line 24) | struct tty
  type tty (line 26) | struct tty
  type tty (line 35) | struct tty
  function register_tty (line 46) | int register_tty(struct tty *tty)
  function release_tty (line 60) | int release_tty(struct tty *tty)
  type tty (line 76) | struct tty
  type tty (line 78) | struct tty
  function close_tty (line 97) | void close_tty(struct tty *tty)

FILE: kernel/include/device/gicv2.h
  type gicv2_context (line 150) | struct gicv2_context {
  type gich_lr (line 157) | struct gich_lr {

FILE: kernel/include/device/gicv3.h
  type gicv3_context (line 126) | struct gicv3_context {
  type gic_lr (line 154) | struct gic_lr {

FILE: kernel/include/libfdt/fdt.h
  type fdt_header (line 57) | struct fdt_header {
  type fdt_reserve_entry (line 76) | struct fdt_reserve_entry {
  type fdt_node_header (line 81) | struct fdt_node_header {
  type fdt_property (line 86) | struct fdt_property {

FILE: kernel/include/libfdt/libfdt.h
  function fdt32_ld (line 164) | static inline uint32_t fdt32_ld(const fdt32_t *p)
  function fdt64_ld (line 172) | static inline uint64_t fdt64_ld(const fdt64_t *p)
  function fdt_header_size (line 275) | static inline size_t fdt_header_size(const void *fdt)
  type fdt_property (line 601) | struct fdt_property
  type fdt_property (line 617) | struct fdt_property
  type fdt_property (line 651) | struct fdt_property
  type fdt_property (line 653) | struct fdt_property
  type fdt_property (line 657) | struct fdt_property
  function fdt_setprop_inplace_u32 (line 1248) | static inline int fdt_setprop_inplace_u32(void *fdt, int nodeoffset,
  function fdt_setprop_inplace_u64 (line 1283) | static inline int fdt_setprop_inplace_u64(void *fdt, int nodeoffset,
  function fdt_setprop_inplace_cell (line 1295) | static inline int fdt_setprop_inplace_cell(void *fdt, int nodeoffset,
  function fdt_property_u32 (line 1361) | static inline int fdt_property_u32(void *fdt, const char *name, uint32_t...
  function fdt_property_u64 (line 1366) | static inline int fdt_property_u64(void *fdt, const char *name, uint64_t...
  function fdt_property_cell (line 1373) | static inline int fdt_property_cell(void *fdt, const char *name, uint32_...
  function fdt_setprop_u32 (line 1571) | static inline int fdt_setprop_u32(void *fdt, int nodeoffset, const char ...
  function fdt_setprop_u64 (line 1606) | static inline int fdt_setprop_u64(void *fdt, int nodeoffset, const char ...
  function fdt_setprop_cell (line 1618) | static inline int fdt_setprop_cell(void *fdt, int nodeoffset, const char...
  function fdt_appendprop_u32 (line 1743) | static inline int fdt_appendprop_u32(void *fdt, int nodeoffset,
  function fdt_appendprop_u64 (line 1778) | static inline int fdt_appendprop_u64(void *fdt, int nodeoffset,
  function fdt_appendprop_cell (line 1790) | static inline int fdt_appendprop_cell(void *fdt, int nodeoffset,
  function fdt32_to_cpu64 (line 1960) | static inline uint64_t fdt32_to_cpu64(fdt32_t high, fdt32_t low)

FILE: kernel/include/libfdt/libfdt_env.h
  type FDT_BITWISE (line 66) | typedef uint16_t FDT_BITWISE fdt16_t;
  type FDT_BITWISE (line 67) | typedef uint32_t FDT_BITWISE fdt32_t;
  type FDT_BITWISE (line 68) | typedef uint64_t FDT_BITWISE fdt64_t;
  function fdt16_to_cpu (line 79) | static inline uint16_t fdt16_to_cpu(fdt16_t x)
  function fdt16_t (line 83) | static inline fdt16_t cpu_to_fdt16(uint16_t x)
  function fdt32_to_cpu (line 88) | static inline uint32_t fdt32_to_cpu(fdt32_t x)
  function fdt32_t (line 92) | static inline fdt32_t cpu_to_fdt32(uint32_t x)
  function fdt64_to_cpu (line 97) | static inline uint64_t fdt64_to_cpu(fdt64_t x)
  function fdt64_t (line 101) | static inline fdt64_t cpu_to_fdt64(uint64_t x)
  function fdt_strnlen (line 126) | static inline size_t fdt_strnlen(const char *string, size_t max_count)

FILE: kernel/include/minos/arch.h
  type vspace (line 6) | struct vspace
  type task (line 7) | struct task
  type vspace (line 13) | struct vspace
  type vspace (line 15) | struct vspace
  type vspace (line 18) | struct vspace
  type vspace (line 25) | struct vspace
  type task (line 30) | struct task
  type task (line 31) | struct task
  type task (line 33) | struct task
  type task (line 34) | struct task
  type task (line 35) | struct task
  type task (line 36) | struct task
  type mm_struct (line 39) | struct mm_struct
  type mm_struct (line 43) | struct mm_struct
  type mm_struct (line 45) | struct mm_struct
  type mm_struct (line 48) | struct mm_struct

FILE: kernel/include/minos/atomic.h
  function atomic_inc (line 9) | static inline void atomic_inc(atomic_t *t)
  function atomic_dec (line 14) | static inline void atomic_dec(atomic_t *t)
  function atomic_inc_return (line 19) | static inline int atomic_inc_return(atomic_t *t)
  function atomic_dec_return (line 24) | static inline int atomic_dec_return(atomic_t *t)
  function atomic_inc_return_old (line 29) | static inline int atomic_inc_return_old(atomic_t *t)
  function atomic_dec_return_old (line 34) | static inline int atomic_dec_return_old(atomic_t *t)
  function atomic_inc_and_test (line 39) | static inline int atomic_inc_and_test(atomic_t *t)
  function atomic_dec_and_test (line 44) | static inline int atomic_dec_and_test(atomic_t *t)
  function atomic_add_negative (line 49) | static inline int atomic_add_negative(int i, atomic_t *t)

FILE: kernel/include/minos/bitmap.h
  function bitmap_find_next_zero_area (line 65) | static inline unsigned long
  function bitmap_zero (line 88) | static inline void bitmap_zero(unsigned long *dst, int nbits)
  function bitmap_fill (line 98) | static inline void bitmap_fill(unsigned long *dst, int nbits)

FILE: kernel/include/minos/bitops.h
  function get_bitmask_order (line 57) | static inline int get_bitmask_order(unsigned int count)
  function get_count_order (line 65) | static inline int get_count_order(unsigned int count)
  function hweight_long (line 75) | static inline unsigned long hweight_long(unsigned long w)
  function __u64 (line 85) | static inline __u64 rol64(__u64 word, unsigned int shift)
  function __u64 (line 95) | static inline __u64 ror64(__u64 word, unsigned int shift)
  function __u32 (line 105) | static inline __u32 rol32(__u32 word, unsigned int shift)
  function __u32 (line 115) | static inline __u32 ror32(__u32 word, unsigned int shift)
  function __u16 (line 125) | static inline __u16 rol16(__u16 word, unsigned int shift)
  function __u16 (line 135) | static inline __u16 ror16(__u16 word, unsigned int shift)
  function __u8 (line 145) | static inline __u8 rol8(__u8 word, unsigned int shift)
  function __u8 (line 155) | static inline __u8 ror8(__u8 word, unsigned int shift)
  function __s32 (line 167) | static inline __s32 sign_extend32(__u32 value, int index)
  function __s64 (line 178) | static inline __s64 sign_extend64(__u64 value, int index)
  function fls_long (line 184) | static inline unsigned fls_long(unsigned long l)
  function __ffs64 (line 199) | static inline unsigned long __ffs64(__u64 word)

FILE: kernel/include/minos/channel.h
  type object (line 26) | struct object {
  type vma_handle (line 30) | struct vma_handle {
  type pmo (line 34) | struct pmo {
  type channel (line 40) | struct channel {
  function 收到了vmo (line 45) | 收到了vmo,调用vmo_map()map到自己的内存区域,然后可以进行读写。

FILE: kernel/include/minos/console.h
  type console (line 6) | struct console {

FILE: kernel/include/minos/cpumask.h
  type cpumask_t (line 7) | typedef struct cpumask {
  function cpumask_check (line 15) | static inline unsigned int cpumask_check(unsigned int cpu)
  function cpumask_set_cpu (line 23) | static inline void cpumask_set_cpu(int cpu, cpumask_t *dstp)
  function __cpumask_set_cpu (line 28) | static inline void __cpumask_set_cpu(int cpu, cpumask_t *dstp)
  function cpumask_clear_cpu (line 33) | static inline void cpumask_clear_cpu(int cpu, cpumask_t *dstp)
  function __cpumask_clear_cpu (line 38) | static inline void __cpumask_clear_cpu(int cpu, cpumask_t *dstp)
  function cpumask_setall (line 43) | static inline void cpumask_setall(cpumask_t *dstp)
  function cpumask_clearall (line 48) | static inline void cpumask_clearall(cpumask_t *dstp)
  function cpumask_first (line 53) | static inline int cpumask_first(const cpumask_t *srcp)
  function cpumask_next (line 58) | static inline int cpumask_next(int n, const cpumask_t *srcp)

FILE: kernel/include/minos/device_id.h
  type device_class_t (line 7) | typedef enum __device_class {
  type device_node (line 34) | struct device_node {
  type module_id (line 49) | struct module_id {

FILE: kernel/include/minos/event.h
  type task (line 27) | struct task
  type event (line 29) | struct event {
  type event (line 41) | struct event
  type event (line 45) | struct event
  type event (line 47) | struct event
  type event (line 49) | struct event
  type task (line 52) | struct task
  type event (line 52) | struct event
  type event (line 94) | struct event

FILE: kernel/include/minos/flag.h
  type flag_grp (line 21) | struct flag_grp {
  function flag_init (line 27) | static void inline flag_init(struct flag_grp *fg, flag_t flags)
  type flag_grp (line 34) | struct flag_grp
  type flag_grp (line 36) | struct flag_grp
  type flag_grp (line 40) | struct flag_grp

FILE: kernel/include/minos/hook.h
  type hook_type (line 8) | enum hook_type {
  type hook (line 29) | struct hook {
  type hook_type (line 34) | enum hook_type
  type hook_type (line 35) | enum hook_type

FILE: kernel/include/minos/init.h
  type cmdline (line 12) | struct cmdline {

FILE: kernel/include/minos/irq.h
  type sgi_mode_t (line 46) | typedef enum sgi_mode {
  type irq_desc (line 52) | struct irq_desc
  type virq_desc (line 53) | struct virq_desc
  type kobject (line 54) | struct kobject
  type poll_event_kernel (line 55) | struct poll_event_kernel
  type irq_chip (line 59) | struct irq_chip {
  type irq_desc (line 83) | struct irq_desc {
  type device_node (line 113) | struct device_node
  type irq_desc (line 116) | struct irq_desc
  function irq_unmask (line 121) | static inline void irq_unmask(uint32_t irq)
  function irq_mask (line 126) | static inline void irq_mask(uint32_t irq)

FILE: kernel/include/minos/list.h
  type list_head (line 4) | struct list_head
  type list_head (line 6) | struct list_head{
  function init_list (line 16) | static void inline init_list(struct list_head *list)
  function list_add (line 22) | static void inline list_add(struct list_head *head,
  function list_add_tail (line 31) | static void inline list_add_tail(struct list_head *head,
  function list_insert_before (line 40) | static void inline list_insert_before(struct list_head *head,
  function list_del (line 49) | static void inline list_del(struct list_head *list)
  function list_del_tail (line 57) | static void inline list_del_tail(struct list_head *head)
  function is_list_empty (line 63) | static int inline is_list_empty(struct list_head *head)
  function is_list_last (line 68) | static int inline is_list_last(struct list_head *head,
  type list_head (line 74) | struct list_head
  type list_head (line 74) | struct list_head
  type list_head (line 79) | struct list_head
  type list_head (line 79) | struct list_head

FILE: kernel/include/minos/math64.h
  function u64 (line 18) | static inline u64 div_u64_rem(u64 dividend, u32 divisor, u32 *remainder)
  function s64 (line 27) | static inline s64 div_s64_rem(s64 dividend, s32 divisor, s32 *remainder)
  function u64 (line 36) | static inline u64 div64_u64(u64 dividend, u64 divisor)
  function s64 (line 44) | static inline s64 div64_s64(s64 dividend, s64 divisor)
  function u64 (line 55) | static inline u64 div_u64_rem(u64 dividend, u32 divisor, u32 *remainder)
  function u64 (line 84) | static inline u64 div_u64(u64 dividend, u32 divisor)
  function s64 (line 95) | static inline s64 div_s64(s64 dividend, s32 divisor)
  function u32 (line 104) | static inline u32

FILE: kernel/include/minos/mbox.h
  type mbox_t (line 6) | typedef struct event mbox_t;
  function mbox_init (line 19) | static void inline mbox_init(mbox_t *mbox, void *pmsg)

FILE: kernel/include/minos/memory.h
  type list_head (line 23) | struct list_head
  type memory_region (line 28) | struct memory_region {
  type memory_region (line 44) | struct memory_region

FILE: kernel/include/minos/mm.h
  type vspace (line 11) | struct vspace
  type mm_notifier_ops (line 13) | struct mm_notifier_ops {
  type vspace (line 18) | struct vspace {
  type vspace (line 34) | struct vspace

FILE: kernel/include/minos/mutex.h
  type mutex_t (line 6) | typedef struct event mutex_t;
  function mutex_init (line 29) | static void inline mutex_init(mutex_t *mutex)

FILE: kernel/include/minos/of.h
  type fdt16_t (line 7) | typedef fdt16_t of16_t;
  type fdt32_t (line 8) | typedef fdt32_t of32_t;
  type fdt64_t (line 9) | typedef fdt64_t of64_t;
  type device_node (line 16) | struct device_node
  type device_node (line 18) | struct device_node
  function fdt32_t (line 24) | static fdt32_t inline cpu_to_of32(uint32_t v)
  function of16_to_cpu (line 29) | static uint32_t inline of16_to_cpu(of16_t v)
  function of32_to_cpu (line 34) | static uint32_t inline of32_to_cpu(of32_t v)
  function of32_to_cpu64 (line 39) | static uint64_t inline of32_to_cpu64(of32_t high, of32_t low)
  type device_node (line 52) | struct device_node
  type device_node (line 53) | struct device_node
  type device_node (line 56) | struct device_node
  type device_node (line 58) | struct device_node
  type device_node (line 60) | struct device_node
  type device_node (line 63) | struct device_node
  type device_node (line 63) | struct device_node
  type device_node (line 65) | struct device_node
  type device_node (line 66) | struct device_node
  type device_node (line 67) | struct device_node
  type device_node (line 68) | struct device_node
  type device_node (line 71) | struct device_node
  type device_node (line 73) | struct device_node
  type device_node (line 76) | struct device_node
  type device_node (line 77) | struct device_node
  type device_node (line 78) | struct device_node
  type device_node (line 79) | struct device_node
  type device_node (line 81) | struct device_node
  type device_node (line 82) | struct device_node
  function of_get_u64_array (line 87) | static inline int of_get_u64_array(struct device_node *node,
  function of_get_u32_array (line 97) | static inline int of_get_u32_array(struct device_node *node,
  function of_get_u16_array (line 107) | static inline int of_get_u16_array(struct device_node *node,
  function of_get_string (line 117) | static inline int of_get_string(struct device_node *node,
  function device_node_is_root (line 127) | static int inline device_node_is_root(struct device_node *node)
  function translate_device_address_index (line 132) | static int inline translate_device_address_index(struct device_node *node,
  function translate_device_address (line 141) | static inline int translate_device_address(struct device_node *node,
  type device_node (line 147) | struct device_node

FILE: kernel/include/minos/os.h
  function os_is_running (line 10) | static inline int os_is_running(void)
  function set_os_running (line 15) | static inline void set_os_running(void)

FILE: kernel/include/minos/page.h
  type page (line 27) | struct page {
  type page (line 40) | struct page
  type page (line 48) | struct page
  type page (line 49) | struct page
  type page (line 51) | struct page

FILE: kernel/include/minos/percpu.h
  type pcpu_state_t (line 10) | typedef enum {
  type task (line 16) | struct task
  type pcpu (line 18) | struct pcpu {
  type pcpu (line 59) | struct pcpu
  function smp_processor_id (line 63) | static inline int smp_processor_id(void)

FILE: kernel/include/minos/platform.h
  type vm (line 7) | struct vm
  type platform (line 10) | struct platform {
  type platform (line 26) | struct platform

FILE: kernel/include/minos/preempt.h
  function preempt_allowed (line 8) | static inline int preempt_allowed(void)
  function preempt_enable (line 13) | static inline void preempt_enable(void)
  function preempt_disable (line 20) | static void inline preempt_disable(void)

FILE: kernel/include/minos/queue.h
  type queue_t (line 6) | typedef struct event queue_t;
  type queue (line 8) | struct queue {

FILE: kernel/include/minos/ramdisk.h
  type ramdisk_file (line 12) | struct ramdisk_file
  type ramdisk_file (line 15) | struct ramdisk_file
  type ramdisk_file (line 17) | struct ramdisk_file
  type ramdisk_file (line 19) | struct ramdisk_file
  type ramdisk_file (line 21) | struct ramdisk_file

FILE: kernel/include/minos/raw_spinlock.h
  function spin_lock_init (line 24) | static void inline spin_lock_init(spinlock_t *lock)
  function raw_spin_lock (line 30) | static void inline raw_spin_lock(spinlock_t *lock)
  function raw_spin_unlock (line 35) | static void inline raw_spin_unlock(spinlock_t *lock)
  function raw_spin_trylock (line 40) | static int inline raw_spin_trylock(spinlock_t *lock)
  function spin_lock_init (line 49) | static void inline spin_lock_init(spinlock_t *lock)
  function raw_spin_lock (line 54) | static void inline raw_spin_lock(spinlock_t *lock)
  function raw_spin_unlock (line 59) | static void inline raw_spin_unlock(spinlock_t *lock)
  function raw_spin_trylock (line 64) | static void inline raw_spin_trylock(spinlock_t *lock)

FILE: kernel/include/minos/sched.h
  type pcpu (line 9) | struct pcpu
  type process (line 11) | struct process
  type task (line 20) | struct task
  type task (line 24) | struct task
  function wake_up (line 26) | static inline int wake_up(struct task *task, long retcode)
  function wake_up_timeout (line 32) | static inline int wake_up_timeout(struct task *task)
  function wake_up_abort (line 37) | static inline int wake_up_abort(struct task *task)

FILE: kernel/include/minos/sem.h
  type sem_t (line 6) | typedef struct event sem_t;
  function sem_init (line 18) | static void inline sem_init(sem_t *sem, uint32_t cnt)

FILE: kernel/include/minos/shell_command.h
  type shell_command (line 6) | struct shell_command {

FILE: kernel/include/minos/softirq.h
  type softirq_action (line 17) | struct softirq_action {
  type softirq_action (line 22) | struct softirq_action

FILE: kernel/include/minos/string.h
  function is_digit (line 34) | static inline int is_digit(char ch)
  function isalpha (line 39) | static inline int isalpha(char ch)

FILE: kernel/include/minos/task.h
  function task_is_idle (line 17) | static int inline task_is_idle(struct task *task)
  function get_task_tid (line 22) | static inline int get_task_tid(struct task *task)
  function get_task_prio (line 27) | static inline uint8_t get_task_prio(struct task *task)
  function task_is_suspend (line 32) | static inline int task_is_suspend(struct task *task)
  function task_is_running (line 37) | static inline int task_is_running(struct task *task)
  function task_is_vcpu (line 42) | static inline int task_is_vcpu(struct task *task)
  function task_is_32bit (line 47) | static inline int task_is_32bit(struct task *task)
  function task_set_resched (line 52) | static inline void task_set_resched(struct task *task)
  function task_clear_resched (line 57) | static inline void task_clear_resched(struct task *task)
  function task_need_resched (line 62) | static inline int task_need_resched(struct task *task)
  function task_need_stop (line 67) | static inline void task_need_stop(struct task *task)
  function task_need_freeze (line 73) | static inline void task_need_freeze(struct task *task)
  function is_task_need_stop (line 79) | static inline int is_task_need_stop(struct task *task)
  type task (line 107) | struct task
  type task (line 109) | struct task
  type task (line 118) | struct task
  type task (line 121) | struct task
  type task (line 124) | struct task

FILE: kernel/include/minos/task_def.h
  type vspace (line 78) | struct vspace
  type task (line 80) | struct task {

FILE: kernel/include/minos/task_info.h
  type task_info (line 40) | struct task_info {
  type task (line 45) | struct task
  type task (line 47) | struct task
  type task_info (line 50) | struct task_info
  type task_info (line 52) | struct task_info
  function set_current_task (line 55) | static inline void set_current_task(struct task *task)
  function set_need_resched (line 60) | static inline void set_need_resched(void)
  function clear_need_resched (line 66) | static inline void clear_need_resched(void)
  function clear_do_not_preempt (line 72) | static inline void clear_do_not_preempt(void)
  function need_resched (line 78) | static inline int need_resched(void)
  function do_not_preempt (line 83) | static inline void do_not_preempt(void)
  function in_interrupt (line 89) | static inline int in_interrupt(void)

FILE: kernel/include/minos/time.h
  type timespec (line 26) | struct timespec {
  function ticks_to_ns (line 31) | static inline unsigned long ticks_to_ns(uint64_t ticks)
  function ns_to_ticks (line 36) | static inline uint64_t ns_to_ticks(unsigned long ns)
  function enable_timer (line 41) | static inline void enable_timer(unsigned long e)

FILE: kernel/include/minos/timer.h
  type timer (line 13) | struct timer {
  type raw_timer (line 28) | struct raw_timer {
  type timer (line 35) | struct timer
  type timer (line 38) | struct timer
  type timer (line 39) | struct timer
  type timer (line 40) | struct timer
  type timer (line 41) | struct timer
  type timer (line 42) | struct timer
  type timer (line 43) | struct timer

FILE: kernel/include/minos/tty.h
  type tty (line 7) | struct tty
  type tty_ops (line 11) | struct tty_ops {
  type tty (line 18) | struct tty {
  type tty (line 28) | struct tty
  type tty (line 29) | struct tty
  type tty (line 30) | struct tty
  type tty (line 31) | struct tty
  type tty (line 32) | struct tty

FILE: kernel/include/minos/types.h
  type __u32 (line 10) | typedef __u32	u32;
  type __s32 (line 11) | typedef __s32	s32;
  type __u16 (line 12) | typedef __u16	u16;
  type __s16 (line 13) | typedef __s16	s16;
  type __u8 (line 14) | typedef __u8	u8;
  type __s8 (line 15) | typedef __s8	s8;
  type __u64 (line 16) | typedef __u64	u64;
  type __s64 (line 17) | typedef __s64	s64;
  type __u32 (line 19) | typedef __u32	uint32_t;
  type __s32 (line 20) | typedef __s32	int32_t;
  type __u16 (line 21) | typedef __u16	uint16_t;
  type __s16 (line 22) | typedef __s16	int16_t;
  type __u8 (line 23) | typedef __u8	uint8_t;
  type __s8 (line 24) | typedef __s8	int8_t;
  type __u64 (line 25) | typedef __u64	uint64_t;
  type __s64 (line 26) | typedef __s64	int64_t;
  type phy_addr_t (line 31) | typedef unsigned long phy_addr_t;
  type virt_addr_t (line 32) | typedef unsigned long virt_addr_t;
  type paddr_t (line 33) | typedef unsigned long paddr_t;
  type vaddr_t (line 34) | typedef unsigned long vaddr_t;
  type handle_t (line 36) | typedef int16_t handle_t;
  type right_t (line 37) | typedef uint32_t right_t;
  type tid_t (line 39) | typedef int16_t tid_t;
  type pid_t (line 40) | typedef int16_t pid_t;
  type irqreturn_t (line 43) | typedef int irqreturn_t;
  type pgd_t (line 47) | typedef uint64_t pgd_t;
  type pud_t (line 48) | typedef uint64_t pud_t;
  type pmd_t (line 49) | typedef uint64_t pmd_t;
  type pte_t (line 50) | typedef uint64_t pte_t;
  type flag_t (line 180) | typedef uint32_t flag_t;
  type atomic_t (line 182) | typedef struct {
  type spinlock_t (line 190) | typedef struct spinlock {
  function __write_once_size (line 197) | static inline void __write_once_size(volatile void *p, void *res, int size)

FILE: kernel/include/uapi/kobject_uapi.h
  type process_create_arg (line 51) | struct process_create_arg {
  type pma_create_arg (line 77) | struct pma_create_arg {

FILE: kernel/include/uapi/procinfo_uapi.h
  type task_stat (line 6) | struct task_stat {

FILE: kernel/include/uspace/elf.h
  type Elf_Byte (line 6) | typedef uint8_t     Elf_Byte;
  type Elf32_Addr (line 8) | typedef uint32_t    Elf32_Addr;
  type Elf32_Off (line 9) | typedef uint32_t    Elf32_Off;
  type Elf32_Sword (line 10) | typedef int32_t     Elf32_Sword;
  type Elf32_Word (line 11) | typedef uint32_t    Elf32_Word;
  type Elf32_Half (line 12) | typedef uint16_t    Elf32_Half;
  type Elf64_Addr (line 14) | typedef uint64_t    Elf64_Addr;
  type Elf64_Off (line 15) | typedef uint64_t    Elf64_Off;
  type Elf64_Shalf (line 16) | typedef int32_t     Elf64_Shalf;
  type Elf64_Sword (line 19) | typedef int64_t     Elf64_Sword;
  type Elf64_Word (line 20) | typedef uint64_t    Elf64_Word;
  type Elf64_Sword (line 22) | typedef int32_t     Elf64_Sword;
  type Elf64_Word (line 23) | typedef uint32_t    Elf64_Word;
  type Elf64_Sxword (line 26) | typedef int64_t     Elf64_Sxword;
  type Elf64_Xword (line 27) | typedef uint64_t    Elf64_Xword;
  type Elf64_Half (line 29) | typedef uint32_t    Elf64_Half;
  type Elf64_Quarter (line 30) | typedef uint16_t    Elf64_Quarter;
  type Elf32_Ehdr (line 116) | typedef struct {
  type Elf64_Ehdr (line 134) | typedef struct {
  type Elf32_Shdr (line 200) | typedef struct {
  type Elf64_Shdr (line 214) | typedef struct {
  type Elf32_Sym (line 288) | typedef struct elf32_sym {
  type Elf64_Sym (line 297) | typedef struct {
  type Elf32_Rel (line 337) | typedef struct {
  type Elf32_Rela (line 343) | typedef struct {
  type Elf64_Rel (line 354) | typedef struct {
  type Elf64_Rela (line 359) | typedef struct {
  type Elf32_Phdr (line 384) | typedef struct {
  type Elf64_Phdr (line 395) | typedef struct {
  type Elf32_Dyn (line 432) | typedef struct {
  type Elf64_Dyn (line 440) | typedef struct {
  type Elf32_Note (line 507) | typedef struct {
  type Elf64_Note (line 513) | typedef struct {

FILE: kernel/include/uspace/handle.h
  type kobject (line 7) | struct kobject
  type handle_desc (line 9) | struct handle_desc {
  type handle_table_desc (line 15) | struct handle_table_desc {
  type process (line 29) | struct process
  type kobject (line 30) | struct kobject
  type process (line 32) | struct process
  type kobject (line 32) | struct kobject
  type kobject (line 34) | struct kobject
  type process (line 36) | struct process
  type kobject (line 37) | struct kobject
  type kobject (line 39) | struct kobject
  type kobject (line 41) | struct kobject
  type process (line 43) | struct process
  type process (line 45) | struct process
  type process (line 47) | struct process
  type process (line 49) | struct process
  type process (line 49) | struct process

FILE: kernel/include/uspace/iqueue.h
  type kobject (line 8) | struct kobject
  type task (line 9) | struct task
  type imsg (line 15) | struct imsg {
  type iqueue (line 25) | struct iqueue {
  function imsg_init (line 38) | static void inline imsg_init(struct imsg *imsg, struct task *task)
  type iqueue (line 48) | struct iqueue
  type iqueue (line 52) | struct iqueue
  type iqueue (line 55) | struct iqueue
  type iqueue (line 58) | struct iqueue
  type process (line 58) | struct process
  type iqueue (line 60) | struct iqueue
  type kobject (line 60) | struct kobject

FILE: kernel/include/uspace/kobject.h
  type task (line 10) | struct task
  type process (line 11) | struct process
  type kobject_ops (line 12) | struct kobject_ops
  type poll_struct (line 13) | struct poll_struct
  type kobject (line 27) | struct kobject {
  type kobject_ops (line 43) | struct kobject_ops {
  type kobject (line 71) | struct kobject
  type kobject_desc (line 73) | struct kobject_desc {
  type kobject_ops (line 86) | struct kobject_ops
  type kobject (line 90) | struct kobject
  type kobject (line 92) | struct kobject
  type kobject (line 94) | struct kobject
  type kobject (line 97) | struct kobject
  type process (line 97) | struct process
  type kobject (line 99) | struct kobject
  type kobject (line 102) | struct kobject
  type kobject (line 103) | struct kobject
  type kobject (line 105) | struct kobject
  type kobject (line 110) | struct kobject
  type kobject (line 114) | struct kobject
  type kobject (line 118) | struct kobject
  type kobject (line 120) | struct kobject
  type kobject (line 123) | struct kobject
  type kobject (line 126) | struct kobject
  type kobject (line 128) | struct kobject
  type pma_create_arg (line 129) | struct pma_create_arg

FILE: kernel/include/uspace/poll.h
  type poll_hub (line 44) | struct poll_hub {
  type pevent_item (line 51) | struct pevent_item {
  type poll_struct (line 57) | struct poll_struct {
  type poll_data (line 61) | struct poll_data {
  type poll_event (line 73) | struct poll_event {
  type poll_event_kernel (line 78) | struct poll_event_kernel {
  function event_is_polled (line 84) | static inline int event_is_polled(struct poll_struct *ps, int ev)
  type pevent_item (line 89) | struct pevent_item
  type poll_event_kernel (line 89) | struct poll_event_kernel
  type poll_struct (line 91) | struct poll_struct
  type poll_struct (line 93) | struct poll_struct
  type poll_event (line 96) | struct poll_event
  type kobject (line 98) | struct kobject

FILE: kernel/include/uspace/proc.h
  type task (line 12) | struct task
  type process (line 19) | struct process {
  function proc_is_root (line 46) | static inline int proc_is_root(struct process *proc)
  function proc_can_vmctl (line 51) | static inline int proc_can_vmctl(struct process *proc)
  function proc_can_hwctl (line 56) | static inline int proc_can_hwctl(struct process *proc)
  type process (line 61) | struct process
  type process (line 66) | struct process
  type pcpu (line 68) | struct pcpu
  type process (line 70) | struct process
  type process (line 72) | struct process

FILE: kernel/include/uspace/procinfo.h
  type task (line 7) | struct task
  type task (line 9) | struct task
  type task (line 11) | struct task
  type task_stat (line 12) | struct task_stat

FILE: kernel/include/uspace/socket.h
  type socket (line 6) | struct socket {

FILE: kernel/include/uspace/syscall.h
  type timespec (line 26) | struct timespec
  type timespec (line 46) | struct timespec
  type timespec (line 49) | struct timespec

FILE: kernel/include/uspace/uaccess.h
  type vspace (line 7) | struct vspace
  type vspace (line 10) | struct vspace
  type vspace (line 11) | struct vspace
  type vspace (line 15) | struct vspace
  type vspace (line 16) | struct vspace

FILE: kernel/include/uspace/vspace.h
  type process (line 46) | struct process
  type process (line 48) | struct process
  type process (line 50) | struct process
  type process (line 56) | struct process
  type vspace (line 59) | struct vspace
  type vspace (line 61) | struct vspace
  type vspace (line 66) | struct vspace
  type vspace (line 67) | struct vspace
  type vspace (line 68) | struct vspace

FILE: kernel/include/virt/iommu.h
  type vm (line 6) | struct vm
  type device_node (line 7) | struct device_node
  type iommu_ops (line 9) | struct iommu_ops {
  type vm (line 18) | struct vm
  type vm (line 20) | struct vm
  type vm (line 22) | struct vm
  type vm (line 24) | struct vm
  type device_node (line 24) | struct device_node
  type vm (line 26) | struct vm
  type device_node (line 26) | struct device_node

FILE: kernel/include/virt/os.h
  type vcpu (line 4) | struct vcpu
  type vm (line 5) | struct vm
  type os_ops (line 17) | struct os_ops {
  type os (line 26) | struct os {
  type os_ops (line 32) | struct os_ops
  type os (line 33) | struct os
  type os (line 34) | struct os
  type vm (line 35) | struct vm
  type vm (line 36) | struct vm
  type vcpu (line 37) | struct vcpu
  type vcpu (line 38) | struct vcpu
  type vm (line 39) | struct vm
  type vm (line 40) | struct vm

FILE: kernel/include/virt/resource.h
  type vm (line 6) | struct vm
  type device_node (line 8) | struct device_node
  type vmtag (line 8) | struct vmtag
  type vm (line 9) | struct vm
  type vm (line 10) | struct vm
  type vm (line 11) | struct vm
  type device_node (line 11) | struct device_node

FILE: kernel/include/virt/vdev.h
  type vm (line 12) | struct vm
  type device_node (line 12) | struct device_node
  type vdev (line 14) | struct vdev {
  type vdev (line 31) | struct vdev
  type vm (line 31) | struct vm
  type vdev (line 33) | struct vdev
  type vm (line 35) | struct vm
  type vdev (line 35) | struct vdev
  type vdev (line 40) | struct vdev
  type vmm_area (line 43) | struct vmm_area
  type vdev (line 43) | struct vdev
  type vmm_area (line 46) | struct vmm_area
  type vdev (line 46) | struct vdev
  type vdev (line 48) | struct vdev
  function vdev_notify_gvm (line 50) | static int inline vdev_notify_gvm(struct vdev *vdev, uint32_t irq)
  function vdev_notify_hvm (line 55) | static int inline vdev_notify_hvm(struct vdev *vdev, uint32_t irq)

FILE: kernel/include/virt/virq.h
  type irqtag (line 8) | struct irqtag
  type virq_desc (line 76) | struct virq_desc {
  type virq_struct (line 92) | struct virq_struct {
  function vm_irq_count (line 103) | static inline int vm_irq_count(struct vm *vm)
  function virq_set_enable (line 108) | static void inline virq_set_enable(struct virq_desc *d)
  function virq_clear_enable (line 113) | static void inline virq_clear_enable(struct virq_desc *d)
  function virq_is_enabled (line 118) | static int inline virq_is_enabled(struct virq_desc *d)
  function virq_set_wakeup (line 123) | static void inline virq_set_wakeup(struct virq_desc *d)
  function virq_clear_wakeup (line 128) | static void inline virq_clear_wakeup(struct virq_desc *d)
  function virq_can_wakeup (line 133) | static int inline virq_can_wakeup(struct virq_desc *d)
  function virq_set_suspend (line 138) | static void inline virq_set_suspend(struct virq_desc *d)
  function virq_clear_suspend (line 143) | static void inline virq_clear_suspend(struct virq_desc *d)
  function virq_is_suspend (line 148) | static int inline virq_is_suspend(struct virq_desc *d)
  function virq_set_hw (line 153) | static void inline virq_set_hw(struct virq_desc *d)
  function virq_clear_hw (line 158) | static void inline virq_clear_hw(struct virq_desc *d)
  function virq_is_hw (line 163) | static int inline virq_is_hw(struct virq_desc *d)
  function virq_is_requested (line 168) | static int inline virq_is_requested(struct virq_desc *d)
  function __virq_set_fiq (line 173) | static void inline __virq_set_fiq(struct virq_desc *d)
  function virq_is_fiq (line 178) | static int inline virq_is_fiq(struct virq_desc *d)
  function virq_clear_fiq (line 183) | static void inline virq_clear_fiq(struct virq_desc *d)
  type vcpu (line 188) | struct vcpu
  type vcpu (line 189) | struct vcpu
  type vcpu (line 190) | struct vcpu
  type vcpu (line 191) | struct vcpu
  type vm (line 193) | struct vm
  type vcpu (line 194) | struct vcpu
  type vcpu (line 196) | struct vcpu
  type vcpu (line 198) | struct vcpu
  type vcpu (line 199) | struct vcpu
  type vcpu (line 200) | struct vcpu
  type vcpu (line 201) | struct vcpu
  type vcpu (line 202) | struct vcpu
  type vcpu (line 203) | struct vcpu
  type vcpu (line 204) | struct vcpu
  type vcpu (line 205) | struct vcpu
  type vcpu (line 206) | struct vcpu
  type vcpu (line 207) | struct vcpu
  type vcpu (line 209) | struct vcpu
  type vm (line 210) | struct vm
  type vcpu (line 212) | struct vcpu
  type vm (line 214) | struct vm
  type vm (line 215) | struct vm
  type vm (line 217) | struct vm
  type vm (line 219) | struct vm
  type vm (line 221) | struct vm
  type vm (line 223) | struct vm
  type virq_desc (line 225) | struct virq_desc
  type vcpu (line 225) | struct vcpu
  function alloc_hvm_virq (line 227) | static inline int alloc_hvm_virq(void)
  function alloc_gvm_virq (line 232) | static inline int alloc_gvm_virq(struct vm *vm)
  function release_hvm_virq (line 237) | static void inline release_hvm_virq(int virq)
  function release_gvm_virq (line 242) | static void inline release_gvm_virq(struct vm *vm, int virq)
  type virq_chip (line 247) | struct virq_chip
  type vcpu (line 248) | struct vcpu
  type virq_desc (line 248) | struct virq_desc
  type vcpu (line 249) | struct vcpu
  type virq_desc (line 249) | struct virq_desc
  type vcpu (line 250) | struct vcpu
  type virq_desc (line 251) | struct virq_desc

FILE: kernel/include/virt/virq_chip.h
  type vcpu (line 7) | struct vcpu
  type virq_chip (line 11) | struct virq_chip {
  type virq_chip (line 27) | struct virq_chip
  type vcpu (line 28) | struct vcpu
  type virq_desc (line 28) | struct virq_desc
  type vcpu (line 29) | struct vcpu
  type virq_desc (line 29) | struct virq_desc
  type vcpu (line 30) | struct vcpu
  type virq_desc (line 31) | struct virq_desc

FILE: kernel/include/virt/virt.h
  type mm_struct (line 6) | struct mm_struct
  type mm_struct (line 11) | struct mm_struct

FILE: kernel/include/virt/virtio.h
  type vm (line 6) | struct vm
  type virtio_device (line 8) | struct virtio_device {
  type vm (line 13) | struct vm

FILE: kernel/include/virt/vm.h
  type os (line 34) | struct os
  type vm (line 35) | struct vm
  type virq_struct (line 36) | struct virq_struct
  type virq_chip (line 37) | struct virq_chip
  type device_node (line 38) | struct device_node
  type list_head (line 40) | struct list_head
  type list_head (line 41) | struct list_head
  type vcpu (line 55) | struct vcpu {
  type vm (line 80) | struct vm {
  type vm (line 126) | struct vm
  function get_vcpu_id (line 137) | static int inline get_vcpu_id(struct vcpu *vcpu)
  function get_vmid (line 142) | static int inline get_vmid(struct vcpu *vcpu)
  function vcpu_affinity (line 147) | static int inline vcpu_affinity(struct vcpu *vcpu)
  type vm (line 152) | struct vm
  type vcpu (line 152) | struct vcpu
  type vcpu (line 157) | struct vcpu
  type task (line 157) | struct task
  type vcpu (line 159) | struct vcpu
  type vcpu (line 162) | struct vcpu
  type vm (line 167) | struct vm
  type task (line 167) | struct task
  type vcpu (line 169) | struct vcpu
  type vcpu (line 169) | struct vcpu
  type vm (line 174) | struct vm
  type vcpu (line 179) | struct vcpu
  type vm (line 179) | struct vm
  type vcpu (line 180) | struct vcpu
  type vcpu (line 182) | struct vcpu
  type vm (line 183) | struct vm
  type vcpu (line 185) | struct vcpu
  type vcpu (line 186) | struct vcpu
  type vcpu (line 188) | struct vcpu
  type vcpu (line 189) | struct vcpu
  type vcpu (line 191) | struct vcpu
  type vcpu (line 192) | struct vcpu
  type vm (line 194) | struct vm
  type vmtag (line 194) | struct vmtag
  type device_node (line 194) | struct device_node
  type vmtag (line 195) | struct vmtag
  type vm (line 196) | struct vm
  type vm (line 198) | struct vm
  type vm (line 200) | struct vm
  function vm_is_host_vm (line 207) | static inline int vm_is_host_vm(struct vm *vm)
  function vm_is_32bit (line 212) | static inline int vm_is_32bit(struct vm *vm)
  function vm_is_native (line 217) | static inline int vm_is_native(struct vm *vm)
  function vm_id (line 222) | static inline int vm_id(struct vm *vm)
  type vm (line 229) | struct vm
  type vm (line 230) | struct vm
  type vcpu (line 232) | struct vcpu
  function check_vcpu_state (line 234) | static inline int check_vcpu_state(struct vcpu *vcpu, int state)
  function check_vm_state (line 239) | static inline int check_vm_state(struct vm *vm, int state)
  type vm (line 244) | struct vm
  type vm (line 246) | struct vm
  type vcpu (line 248) | struct vcpu
  type vcpu (line 250) | struct vcpu

FILE: kernel/include/virt/vm_pm.h
  type vm (line 12) | struct vm
  type vm (line 15) | struct vm
  function pm_action_by_self (line 19) | static inline bool pm_action_by_self(int flags)
  function pm_action_by_mvm (line 24) | static inline bool pm_action_by_mvm(int flags)
  function pm_action_by_host (line 29) | static inline bool pm_action_by_host(int flags)
  type vm (line 44) | struct vm
  type vm (line 45) | struct vm
  type vm (line 49) | struct vm

FILE: kernel/include/virt/vmbox.h
  type vmbox_device (line 13) | struct vmbox_device {
  type vmbox (line 37) | struct vmbox {
  type vmbox_hook_ops (line 53) | struct vmbox_hook_ops {
  type vmbox_controller (line 61) | struct vmbox_controller {
  type vm (line 114) | struct vm
  type vmbox_hook_ops (line 115) | struct vmbox_hook_ops
  type device_node (line 116) | struct device_node
  type vmbox_device (line 117) | struct vmbox_device
  type vm (line 120) | struct vm

FILE: kernel/include/virt/vmcs.h
  type vmcs (line 6) | struct vmcs {
  type vm_trap_type (line 21) | enum vm_trap_type {
  type vm_trap_reason (line 27) | enum vm_trap_reason {
  type vm (line 40) | struct vm
  type vm (line 41) | struct vm
  function trap_vcpu (line 46) | static inline int trap_vcpu(uint32_t type, uint32_t reason,
  function trap_vcpu_nonblock (line 52) | static inline int trap_vcpu_nonblock(uint32_t type, uint32_t reason,
  function trap_mmio_read (line 58) | static inline int
  function trap_mmio_read_nonblock (line 65) | static inline int
  function trap_mmio_write (line 72) | static inline int
  function trap_mmio_write_nonblock (line 79) | static inline int

FILE: kernel/include/virt/vmm.h
  type vm (line 10) | struct vm
  type mem_block (line 12) | struct mem_block {
  type vm_iommu (line 17) | struct vm_iommu {
  type vmm_area (line 31) | struct vmm_area {
  type mm_struct (line 45) | struct mm_struct {
  type vm (line 58) | struct vm
  type vm (line 59) | struct vm
  type vm (line 63) | struct vm
  type vm (line 64) | struct vm
  type mm_struct (line 66) | struct mm_struct
  type vmm_area (line 69) | struct vmm_area
  type vm (line 69) | struct vm
  type vm (line 72) | struct vm
  type vm (line 74) | struct vm
  type vmm_area (line 80) | struct vmm_area
  type mm_struct (line 80) | struct mm_struct
  type vmm_area (line 83) | struct vmm_area
  type mm_struct (line 83) | struct mm_struct
  type mm_struct (line 87) | struct mm_struct
  type vmm_area (line 88) | struct vmm_area
  type vmm_area (line 90) | struct vmm_area
  type mm_struct (line 90) | struct mm_struct
  type mm_struct (line 93) | struct mm_struct
  type vmm_area (line 93) | struct vmm_area
  type mem_block (line 95) | struct mem_block
  type mem_block (line 96) | struct mem_block
  type mm_struct (line 99) | struct mm_struct
  type vmm_area (line 99) | struct vmm_area
  type mm_struct (line 101) | struct mm_struct

FILE: kernel/include/virt/vmodule.h
  type vcpu (line 8) | struct vcpu
  type vmodule (line 12) | struct vmodule {
  type vmodule (line 41) | struct vmodule
  type vcpu (line 43) | struct vcpu
  type vcpu (line 44) | struct vcpu
  type vcpu (line 46) | struct vcpu
  type vcpu (line 47) | struct vcpu
  type vcpu (line 48) | struct vcpu
  type vcpu (line 49) | struct vcpu
  type vcpu (line 50) | struct vcpu
  type vcpu (line 51) | struct vcpu
  type vcpu (line 52) | struct vcpu
  type vcpu (line 54) | struct vcpu

FILE: kernel/libs/libfdt/fdt.c
  function fdt_ro_probe_ (line 63) | int fdt_ro_probe_(const void *fdt)
  function check_off_ (line 82) | static int check_off_(uint32_t hdrsize, uint32_t totalsize, uint32_t off)
  function check_block_ (line 87) | static int check_block_(uint32_t hdrsize, uint32_t totalsize,
  function fdt_header_size_ (line 99) | size_t fdt_header_size_(uint32_t version)
  function fdt_check_header (line 113) | int fdt_check_header(const void *fdt)
  function fdt_next_tag (line 171) | uint32_t fdt_next_tag(const void *fdt, int startoffset, int *nextoffset)
  function fdt_check_node_offset_ (line 224) | int fdt_check_node_offset_(const void *fdt, int offset)
  function fdt_check_prop_offset_ (line 233) | int fdt_check_prop_offset_(const void *fdt, int offset)
  function fdt_next_node (line 242) | int fdt_next_node(const void *fdt, int offset, int *depth)
  function fdt_first_subnode (line 282) | int fdt_first_subnode(const void *fdt, int offset)
  function fdt_next_subnode (line 293) | int fdt_next_subnode(const void *fdt, int offset)
  function fdt_move (line 322) | int fdt_move(const void *fdt, void *buf, int bufsize)

FILE: kernel/libs/libfdt/fdt_addresses.c
  function fdt_cells (line 59) | static int fdt_cells(const void *fdt, int nodeoffset, const char *name)
  function fdt_address_cells (line 79) | int fdt_address_cells(const void *fdt, int nodeoffset)
  function fdt_size_cells (line 84) | int fdt_size_cells(const void *fdt, int nodeoffset)

FILE: kernel/libs/libfdt/fdt_empty_tree.c
  function fdt_create_empty_tree (line 58) | int fdt_create_empty_tree(void *buf, int bufsize)

FILE: kernel/libs/libfdt/fdt_overlay.c
  function overlay_get_target_phandle (line 73) | static uint32_t overlay_get_target_phandle(const void *fdto, int fragment)
  function overlay_get_target (line 103) | static int overlay_get_target(const void *fdt, const void *fdto,
  function overlay_phandle_add_offset (line 161) | static int overlay_phandle_add_offset(void *fdt, int node,
  function overlay_adjust_node_phandles (line 201) | static int overlay_adjust_node_phandles(void *fdto, int node,
  function overlay_adjust_local_phandles (line 238) | static int overlay_adjust_local_phandles(void *fdto, uint32_t delta)
  function overlay_update_local_node_references (line 265) | static int overlay_update_local_node_references(void *fdto,
  function overlay_update_local_references (line 369) | static int overlay_update_local_references(void *fdto, uint32_t delta)
  function overlay_fixup_one_phandle (line 412) | static int overlay_fixup_one_phandle(void *fdt, void *fdto,
  function overlay_fixup_phandle (line 472) | static int overlay_fixup_phandle(void *fdt, void *fdto, int symbols_off,
  function overlay_fixup_phandles (line 554) | static int overlay_fixup_phandles(void *fdt, void *fdto)
  function overlay_apply_node (line 601) | static int overlay_apply_node(void *fdt, int target,
  function overlay_merge (line 663) | static int overlay_merge(void *fdt, void *fdto)
  function get_path_len (line 695) | static int get_path_len(const void *fdt, int nodeoffset)
  function overlay_symbol_update (line 739) | static int overlay_symbol_update(void *fdt, void *fdto)
  function fdt_overlay_apply (line 864) | int fdt_overlay_apply(void *fdt, void *fdto)

FILE: kernel/libs/libfdt/fdt_ro.c
  function fdt_nodename_eq_ (line 58) | static int fdt_nodename_eq_(const void *fdt, int offset,
  function fdt_string_eq_ (line 138) | static int fdt_string_eq_(const void *fdt, int stroffset,
  function fdt_get_max_phandle (line 147) | uint32_t fdt_get_max_phandle(const void *fdt)
  type fdt_reserve_entry (line 173) | struct fdt_reserve_entry
  type fdt_reserve_entry (line 175) | struct fdt_reserve_entry
  type fdt_reserve_entry (line 180) | struct fdt_reserve_entry
  function fdt_get_mem_rsv (line 185) | int fdt_get_mem_rsv(const void *fdt, int n, uint64_t *address, uint64_t ...
  function fdt_num_mem_rsv (line 199) | int fdt_num_mem_rsv(const void *fdt)
  function nextprop_ (line 211) | static int nextprop_(const void *fdt, int offset)
  function fdt_subnode_offset_namelen (line 235) | int fdt_subnode_offset_namelen(const void *fdt, int offset,
  function fdt_subnode_offset (line 254) | int fdt_subnode_offset(const void *fdt, int parentoffset,
  function fdt_path_offset_namelen (line 260) | int fdt_path_offset_namelen(const void *fdt, const char *path, int namelen)
  function fdt_path_offset (line 305) | int fdt_path_offset(const void *fdt, const char *path)
  type fdt_node_header (line 312) | struct fdt_node_header
  function fdt_first_property_offset (line 348) | int fdt_first_property_offset(const void *fdt, int nodeoffset)
  function fdt_next_property_offset (line 358) | int fdt_next_property_offset(const void *fdt, int offset)
  type fdt_property (line 366) | struct fdt_property
  type fdt_property (line 371) | struct fdt_property
  type fdt_property (line 387) | struct fdt_property
  type fdt_property (line 403) | struct fdt_property
  type fdt_property (line 413) | struct fdt_property
  type fdt_property (line 433) | struct fdt_property
  type fdt_property (line 451) | struct fdt_property
  type fdt_property (line 463) | struct fdt_property
  type fdt_property (line 480) | struct fdt_property
  function fdt_get_phandle (line 511) | uint32_t fdt_get_phandle(const void *fdt, int nodeoffset)
  function fdt_get_path (line 545) | int fdt_get_path(const void *fdt, int nodeoffset, char *buf, int buflen)
  function fdt_supernode_atdepth_offset (line 597) | int fdt_supernode_atdepth_offset(const void *fdt, int nodeoffset,
  function fdt_node_depth (line 633) | int fdt_node_depth(const void *fdt, int nodeoffset)
  function fdt_parent_offset (line 644) | int fdt_parent_offset(const void *fdt, int nodeoffset)
  function fdt_node_offset_by_prop_value (line 654) | int fdt_node_offset_by_prop_value(const void *fdt, int startoffset,
  function fdt_node_offset_by_phandle (line 681) | int fdt_node_offset_by_phandle(const void *fdt, uint32_t phandle)
  function fdt_stringlist_contains (line 706) | int fdt_stringlist_contains(const char *strlist, int listlen, const char...
  function fdt_stringlist_count (line 723) | int fdt_stringlist_count(const void *fdt, int nodeoffset, const char *pr...
  function fdt_stringlist_search (line 748) | int fdt_stringlist_search(const void *fdt, int nodeoffset, const char *p...
  function fdt_node_check_compatible (line 823) | int fdt_node_check_compatible(const void *fdt, int nodeoffset,
  function fdt_node_offset_by_compatible (line 836) | int fdt_node_offset_by_compatible(const void *fdt, int startoffset,
  function fdt_check_full (line 861) | int fdt_check_full(const void *fdt, size_t bufsize)

FILE: kernel/libs/libfdt/fdt_rw.c
  function fdt_blocks_misordered_ (line 58) | static int fdt_blocks_misordered_(const void *fdt,
  function fdt_rw_probe_ (line 70) | static int fdt_rw_probe_(void *fdt)
  function fdt_data_size_ (line 92) | static inline int fdt_data_size_(void *fdt)
  function fdt_splice_ (line 97) | static int fdt_splice_(void *fdt, void *splicepoint, int oldlen, int new...
  function fdt_splice_mem_rsv_ (line 112) | static int fdt_splice_mem_rsv_(void *fdt, struct fdt_reserve_entry *p,
  function fdt_splice_struct_ (line 125) | static int fdt_splice_struct_(void *fdt, void *p,
  function fdt_splice_string_ (line 139) | static int fdt_splice_string_(void *fdt, int newlen)
  function fdt_find_add_string_ (line 152) | static int fdt_find_add_string_(void *fdt, const char *s)
  function fdt_add_mem_rsv (line 174) | int fdt_add_mem_rsv(void *fdt, uint64_t address, uint64_t size)
  function fdt_del_mem_rsv (line 191) | int fdt_del_mem_rsv(void *fdt, int n)
  function fdt_resize_property_ (line 203) | static int fdt_resize_property_(void *fdt, int nodeoffset, const char *n...
  function fdt_add_property_ (line 221) | static int fdt_add_property_(void *fdt, int nodeoffset, const char *name,
  function fdt_set_name (line 249) | int fdt_set_name(void *fdt, int nodeoffset, const char *name)
  function fdt_setprop_placeholder (line 272) | int fdt_setprop_placeholder(void *fdt, int nodeoffset, const char *name,
  function fdt_setprop (line 290) | int fdt_setprop(void *fdt, int nodeoffset, const char *name,
  function fdt_appendprop (line 305) | int fdt_appendprop(void *fdt, int nodeoffset, const char *name,
  function fdt_delprop (line 332) | int fdt_delprop(void *fdt, int nodeoffset, const char *name)
  function fdt_add_subnode_namelen (line 347) | int fdt_add_subnode_namelen(void *fdt, int parentoffset,
  function fdt_add_subnode (line 388) | int fdt_add_subnode(void *fdt, int parentoffset, const char *name)
  function fdt_del_node (line 393) | int fdt_del_node(void *fdt, int nodeoffset)
  function fdt_packblocks_ (line 407) | static void fdt_packblocks_(const char *old, char *new,
  function fdt_open_into (line 429) | int fdt_open_into(const void *fdt, void *buf, int bufsize)
  function fdt_pack (line 493) | int fdt_pack(void *fdt)
  function fdt_set_node_reg (line 507) | int fdt_set_node_reg(void *dtb, int node,

FILE: kernel/libs/libfdt/fdt_strerror.c
  type fdt_errtabent (line 58) | struct fdt_errtabent {
  type fdt_errtabent (line 65) | struct fdt_errtabent

FILE: kernel/libs/libfdt/fdt_sw.c
  function fdt_sw_probe_ (line 58) | static int fdt_sw_probe_(void *fdt)
  function fdt_sw_probe_memrsv_ (line 80) | static int fdt_sw_probe_memrsv_(void *fdt)
  function fdt_sw_probe_struct_ (line 106) | static int fdt_sw_probe_struct_(void *fdt)
  function fdt_create (line 144) | int fdt_create(void *buf, int bufsize)
  function fdt_resize (line 167) | int fdt_resize(void *fdt, void *buf, int bufsize)
  function fdt_add_reservemap_entry (line 203) | int fdt_add_reservemap_entry(void *fdt, uint64_t addr, uint64_t size)
  function fdt_finish_reservemap (line 223) | int fdt_finish_reservemap(void *fdt)
  function fdt_begin_node (line 234) | int fdt_begin_node(void *fdt, const char *name)
  function fdt_end_node (line 251) | int fdt_end_node(void *fdt)
  function fdt_find_add_string_ (line 265) | static int fdt_find_add_string_(void *fdt, const char *s)
  function fdt_property_placeholder (line 288) | int fdt_property_placeholder(void *fdt, const char *name, int len, void ...
  function fdt_property (line 310) | int fdt_property(void *fdt, const char *name, const void *val, int len)
  function fdt_finish (line 322) | int fdt_finish(void *fdt)

FILE: kernel/libs/libfdt/fdt_wip.c
  function fdt_setprop_inplace_namelen_partial (line 59) | int fdt_setprop_inplace_namelen_partial(void *fdt, int nodeoffset,
  function fdt_setprop_inplace (line 79) | int fdt_setprop_inplace(void *fdt, int nodeoffset, const char *name,
  function fdt_nop_region_ (line 97) | static void fdt_nop_region_(void *start, int len)
  function fdt_nop_property (line 105) | int fdt_nop_property(void *fdt, int nodeoffset, const char *name)
  function fdt_node_end_offset_ (line 119) | int fdt_node_end_offset_(void *fdt, int offset)
  function fdt_nop_node (line 129) | int fdt_nop_node(void *fdt, int nodeoffset)

FILE: kernel/libs/libfdt/libfdt_internal.h
  type fdt_reserve_entry (line 81) | struct fdt_reserve_entry
  type fdt_reserve_entry (line 83) | struct fdt_reserve_entry
  type fdt_reserve_entry (line 84) | struct fdt_reserve_entry
  type fdt_reserve_entry (line 89) | struct fdt_reserve_entry

FILE: kernel/libs/shell_command/clear.c
  function clear_cmd (line 20) | static int clear_cmd(int argc, char **argv)

FILE: kernel/libs/shell_command/help_cmd.c
  function help_cmd (line 9) | static int help_cmd(int argc, char **argv)

FILE: kernel/libs/shell_command/shell_command.c
  function excute_shell_command (line 20) | int excute_shell_command(int argc, char **argv)

FILE: kernel/libs/shell_command/task_cmd.c
  type task (line 31) | struct task
  function dump_task_info (line 51) | static void dump_task_info(struct task *task)
  function ps_cmd (line 65) | static int ps_cmd(int argc, char **argv)

FILE: kernel/platform/amlogic/amlogic_smc.c
  function amlogic_unknown_smc (line 56) | static int amlogic_unknown_smc(gp_regs *c, uint32_t id, unsigned long *a...
  function sip_smc_handler (line 66) | static int sip_smc_handler(gp_regs *c, uint32_t id, unsigned long *args)
  function amlogic_install_smc (line 86) | static int inline amlogic_install_smc(svc_handler_t fn, uint32_t id)
  function amlogic_smc_call (line 95) | static inline int amlogic_smc_call(gp_regs *c, uint32_t id)
  function amlogic_smc_call2 (line 105) | static inline int
  function secmon_in_base (line 116) | static int secmon_in_base(gp_regs *c, uint32_t id, unsigned long *args)
  function secmon_out_base (line 121) | static int secmon_out_base(gp_regs *c, uint32_t id, unsigned long *args)
  function seckey_storage_query (line 126) | static int seckey_storage_query(gp_regs *c, uint32_t id, unsigned long *...
  function seckey_storage_read (line 131) | static int seckey_storage_read(gp_regs *c, uint32_t id, unsigned long *a...
  function seckey_storage_write (line 136) | static int seckey_storage_write(gp_regs *c, uint32_t id, unsigned long *...
  function seckey_storage_tell (line 141) | static int seckey_storage_tell(gp_regs *c, uint32_t id, unsigned long *a...
  function seckey_storage_verify (line 146) | static int seckey_storage_verify(gp_regs *c, uint32_t id, unsigned long ...
  function seckey_storage_status (line 151) | static int seckey_storage_status(gp_regs *c, uint32_t id, unsigned long ...
  function seckey_storage_list (line 156) | static int seckey_storage_list(gp_regs *c, uint32_t id, unsigned long *a...
  function seckey_storage_remove (line 161) | static int seckey_storage_remove(gp_regs *c, uint32_t id, unsigned long ...
  function seckey_storage_in_func (line 166) | static int seckey_storage_in_func(gp_regs *c, uint32_t id, unsigned long...
  function seckey_storage_out_func (line 171) | static int seckey_storage_out_func(gp_regs *c, uint32_t id, unsigned lon...
  function seckey_storage_block_func (line 176) | static int seckey_storage_block_func(gp_regs *c, uint32_t id, unsigned l...
  function seckey_storage_size_func (line 181) | static int seckey_storage_size_func(gp_regs *c, uint32_t id, unsigned lo...
  function seckey_storage_get_enctype (line 186) | static int seckey_storage_get_enctype(gp_regs *c, uint32_t id, unsigned ...
  function seckey_storage_set_enctype (line 191) | static int seckey_storage_set_enctype(gp_regs *c, uint32_t id, unsigned ...
  function seckey_storage_version (line 196) | static int seckey_storage_version(gp_regs *c, uint32_t id, unsigned long...
  function efuse_read_cmd (line 201) | static int efuse_read_cmd(gp_regs *c, uint32_t id, unsigned long *args)
  function efuse_write_cmd (line 211) | static int efuse_write_cmd(gp_regs *c, uint32_t id, unsigned long *args)
  function efuse_get_max_cmd (line 221) | static int efuse_get_max_cmd(gp_regs *c, uint32_t id, unsigned long *args)
  function cpuinfo_cmd (line 226) | static int cpuinfo_cmd(gp_regs *c, uint32_t id, unsigned long *args)
  function audio_query_license_cmd (line 236) | static int audio_query_license_cmd(gp_regs *c, uint32_t id, unsigned lon...
  function amlogic_smc_init (line 246) | amlogic_smc_init(void)

FILE: kernel/platform/amlogic/kvim3.c
  function kvim3_setup_hvm (line 29) | static int kvim3_setup_hvm(struct vm *vm, void *data)
  type platform (line 36) | struct platform

FILE: kernel/platform/espressobin/espressobin.c
  function espressobin_setup_vm0 (line 24) | static int espressobin_setup_vm0(struct vm *vm, void *dtb)
  type platform (line 35) | struct platform

FILE: kernel/platform/fvp/fvp.c
  function fvp_setup_hvm_of (line 28) | static int inline fvp_setup_hvm_of(struct vm *vm, void *data)
  function fvp_setup_hvm (line 50) | static int fvp_setup_hvm(struct vm *vm, void *data)
  type platform (line 59) | struct platform

FILE: kernel/platform/platform.c
  type platform (line 24) | struct platform
  function platform_set_to (line 26) | void platform_set_to(const char *name)
  function platform_iomem_valid (line 40) | int platform_iomem_valid(unsigned long addr)
  function platform_init (line 48) | void platform_init(void)
  function platform_early_init (line 54) | platform_early_init(void)

FILE: kernel/platform/qemu/qemu.c
  function qemu_setup_hvm (line 28) | static int qemu_setup_hvm(void *item, void *data)
  function qemu_platform_init (line 62) | static int qemu_platform_init(void)
  type platform (line 71) | struct platform

FILE: kernel/platform/r8a7795/r8a7795.c
  type platform (line 6) | struct platform

FILE: kernel/platform/raspberry3/raspberry3.c
  function raspberry3_setup_hvm (line 32) | static int raspberry3_setup_hvm(struct vm *vm, void *dtb)
  function raspberry3_system_reboot (line 91) | static void raspberry3_system_reboot(int mode, const char *cmd)
  function raspberry3_system_shutdown (line 96) | static void raspberry3_system_shutdown(void)
  function raspberry4_iomem_valid (line 101) | static int raspberry4_iomem_valid(unsigned long addr)
  function raspberry3_parse_mem_info (line 109) | static void raspberry3_parse_mem_info(void)
  type platform (line 116) | struct platform

FILE: kernel/platform/raspberry4/raspberry4.c
  function bcm2838_fake_scu_read (line 34) | static int bcm2838_fake_scu_read(struct vdev *vdev, gp_regs *regs,
  function bcm2838_bootup_secondary (line 40) | static int inline bcm2838_bootup_secondary(struct vm *vm,
  function bcm2838_fake_64bit_scu_write (line 55) | static int bcm2838_fake_64bit_scu_write(struct vdev *vdev, gp_regs *regs,
  function bcm2838_fake_32bit_scu_write (line 71) | static int bcm2838_fake_32bit_scu_write(struct vdev *vdev, gp_regs *regs,
  function raspberry4_setup_hvm (line 81) | static int raspberry4_setup_hvm(struct vm *vm, void *dtb)
  function raspberry4_iomem_valid (line 148) | static int raspberry4_iomem_valid(unsigned long addr)
  function raspberry4_system_reboot (line 173) | static void raspberry4_system_reboot(int mode, const char *cmd)
  function raspberry4_system_shutdown (line 178) | static void raspberry4_system_shutdown(void)
  function raspberry4_parse_mem_info (line 203) | static void raspberry4_parse_mem_info(void)
  type platform (line 243) | struct platform

FILE: kernel/scripts/Kconfiglib/alldefconfig.py
  function main (line 20) | def main():

FILE: kernel/scripts/Kconfiglib/allmodconfig.py
  function main (line 19) | def main():

FILE: kernel/scripts/Kconfiglib/allnoconfig.py
  function main (line 22) | def main():

FILE: kernel/scripts/Kconfiglib/allyesconfig.py
  function main (line 19) | def main():

FILE: kernel/scripts/Kconfiglib/defconfig.py
  function main (line 20) | def main():

FILE: kernel/scripts/Kconfiglib/examples/allnoconfig_walk.py
  function do_allnoconfig (line 17) | def do_allnoconfig(node):

FILE: kernel/scripts/Kconfiglib/examples/list_undefined.py
  function all_arch_srcarch_pairs (line 51) | def all_arch_srcarch_pairs():
  function all_arch_srcarch_kconfigs (line 76) | def all_arch_srcarch_kconfigs():
  function referencing_nodes (line 125) | def referencing_nodes(kconf, name):

FILE: kernel/scripts/Kconfiglib/examples/menuconfig_example.py
  function indent_print (line 138) | def indent_print(s, indent):
  function value_str (line 142) | def value_str(sc):
  function node_str (line 176) | def node_str(node):
  function print_menuconfig_nodes (line 227) | def print_menuconfig_nodes(node, indent):
  function print_menuconfig (line 243) | def print_menuconfig(kconf):
  function get_value_from_user (line 255) | def get_value_from_user(sc):

FILE: kernel/scripts/Kconfiglib/examples/print_config_tree.py
  function indent_print (line 66) | def indent_print(s, indent):
  function value_str (line 70) | def value_str(sc):
  function node_str (line 104) | def node_str(node):
  function print_menuconfig_nodes (line 157) | def print_menuconfig_nodes(node, indent):
  function print_menuconfig (line 173) | def print_menuconfig(kconf):

FILE: kernel/scripts/Kconfiglib/examples/print_tree.py
  function indent_print (line 49) | def indent_print(s, indent):
  function print_items (line 53) | def print_items(node, indent):

FILE: kernel/scripts/Kconfiglib/genconfig.py
  function main (line 45) | def main():
  function _open_write (line 144) | def _open_write(path):

FILE: kernel/scripts/Kconfiglib/guiconfig.py
  function _main (line 97) | def _main():
  function menuconfig (line 157) | def menuconfig(kconf):
  function _load_config (line 235) | def _load_config():
  function _needs_save (line 249) | def _needs_save():
  function _create_id_to_node (line 274) | def _create_id_to_node():
  function _create_ui (line 280) | def _create_ui():
  function _load_images (line 325) | def _load_images():
  function _fix_treeview_issues (line 364) | def _fix_treeview_issues():
  function _init_misc_ui (line 393) | def _init_misc_ui():
  function _create_top_widgets (line 412) | def _create_top_widgets():
  function _create_kconfig_tree_and_desc (line 491) | def _create_kconfig_tree_and_desc(parent):
  function _create_kconfig_tree (line 535) | def _create_kconfig_tree(parent):
  function _create_kconfig_desc (line 581) | def _create_kconfig_desc(parent):
  function _add_vscrollbar (line 602) | def _add_vscrollbar(parent, widget):
  function _create_status_bar (line 622) | def _create_status_bar():
  function _set_status (line 631) | def _set_status(s):
  function _set_conf_changed (line 637) | def _set_conf_changed(changed):
  function _update_tree (line 647) | def _update_tree():
  function _build_full_tree (line 672) | def _build_full_tree(menu):
  function _shown_full_nodes (line 695) | def _shown_full_nodes(menu):
  function _build_menu_tree (line 727) | def _build_menu_tree():
  function _shown_menu_nodes (line 734) | def _shown_menu_nodes(menu):
  function _visible (line 762) | def _visible(node):
  function _add_to_tree (line 770) | def _add_to_tree(node, top):
  function _node_str (line 788) | def _node_str(node):
  function _img_tag (line 853) | def _img_tag(node):
  function _is_y_mode_choice_sym (line 884) | def _is_y_mode_choice_sym(item):
  function _tree_click (line 891) | def _tree_click(event):
  function _tree_double_click (line 904) | def _tree_double_click(event):
  function _in_heading (line 913) | def _in_heading(event):
  function _tree_enter (line 921) | def _tree_enter(event):
  function _tree_toggle (line 940) | def _tree_toggle(event):
  function _tree_left_key (line 959) | def _tree_left_key(_):
  function _tree_right_key (line 970) | def _tree_right_key(_):
  function _single_menu_mode_menu (line 984) | def _single_menu_mode_menu(node, tree):
  function _changeable (line 992) | def _changeable(node):
  function _tree_toggle_open (line 1010) | def _tree_toggle_open(item):
  function _tree_set_val (line 1023) | def _tree_set_val(tri_val):
  function _tree_open (line 1039) | def _tree_open(_):
  function _update_menu_path (line 1056) | def _update_menu_path(_):
  function _item_row (line 1064) | def _item_row(item):
  function _n_rows (line 1085) | def _n_rows(item):
  function _attached (line 1098) | def _attached(item):
  function _change_node (line 1106) | def _change_node(node, parent):
  function _set_val (line 1140) | def _set_val(sc, val):
  function _set_val_dialog (line 1172) | def _set_val_dialog(node, parent):
  function _center_on_root (line 1257) | def _center_on_root(dialog):
  function _check_valid (line 1289) | def _check_valid(dialog, entry, sym, s):
  function _range_info (line 1327) | def _range_info(sym):
  function _save (line 1339) | def _save(_=None):
  function _save_as (line 1348) | def _save_as():
  function _save_minimal (line 1371) | def _save_minimal():
  function _open (line 1397) | def _open(_=None):
  function _toggle_showname (line 1439) | def _toggle_showname(_):
  function _do_showname (line 1446) | def _do_showname():
  function _toggle_showall (line 1468) | def _toggle_showall(_):
  function _do_showall (line 1475) | def _do_showall():
  function _nothing_shown (line 1514) | def _nothing_shown():
  function _toggle_tree_mode (line 1525) | def _toggle_tree_mode(_):
  function _do_tree_mode (line 1532) | def _do_tree_mode():
  function _enter_menu_and_select_first (line 1547) | def _enter_menu_and_select_first(menu):
  function _enter_menu (line 1555) | def _enter_menu(menu):
  function _leave_menu (line 1566) | def _leave_menu():
  function _select (line 1585) | def _select(tree, item):
  function _loc_ref_item (line 1593) | def _loc_ref_item():
  function _vis_loc_ref_item (line 1609) | def _vis_loc_ref_item():
  function _vis_before (line 1627) | def _vis_before(item):
  function _vis_after (line 1641) | def _vis_after(item):
  function _on_quit (line 1661) | def _on_quit(_=None):
  function _quit (line 1684) | def _quit(msg=None):
  function _try_save (line 1693) | def _try_save(save_fn, filename, description):
  function _try_load (line 1718) | def _try_load(filename):
  function _jump_to_dialog (line 1738) | def _jump_to_dialog(_=None):
  function _update_jump_to_matches (line 1845) | def _update_jump_to_matches(msglabel, search_string):
  function _update_jump_to_display (line 1914) | def _update_jump_to_display():
  function _jump_to (line 1933) | def _jump_to(node):
  function _sorted_sc_nodes (line 1946) | def _sorted_sc_nodes(cached_nodes=[]):
  function _sorted_menu_comment_nodes (line 1972) | def _sorted_menu_comment_nodes(cached_nodes=[]):
  function _load_parents (line 1986) | def _load_parents(node):
  function _parent_menu (line 2011) | def _parent_menu(node):
  function _trace_write (line 2022) | def _trace_write(var, fn):
  function _info_str (line 2033) | def _info_str(node):
  function _name_info (line 2068) | def _name_info(sc):
  function _value_info (line 2075) | def _value_info(sym):
  function _choice_syms_info (line 2085) | def _choice_syms_info(choice):
  function _help_info (line 2100) | def _help_info(sc):
  function _direct_dep_info (line 2114) | def _direct_dep_info(sc):
  function _defaults_info (line 2126) | def _defaults_info(sc):
  function _split_expr_info (line 2163) | def _split_expr_info(expr, indent):
  function _select_imply_info (line 2195) | def _select_imply_info(sym):
  function _kconfig_def_info (line 2232) | def _kconfig_def_info(item):
  function _include_path_info (line 2256) | def _include_path_info(node):
  function _menu_path_info (line 2266) | def _menu_path_info(node):
  function _name_and_val_str (line 2283) | def _name_and_val_str(sc):
  function _expr_str (line 2301) | def _expr_str(expr):
  function _is_num (line 2306) | def _is_num(name):

FILE: kernel/scripts/Kconfiglib/kconfiglib.py
  class Kconfig (line 575) | class Kconfig(object):
    method __init__ (line 867) | def __init__(self, filename="Kconfig", warn=True, warn_to_stderr=True,
    method _init (line 959) | def _init(self, filename, warn, warn_to_stderr, encoding):
    method mainmenu_text (line 1127) | def mainmenu_text(self):
    method defconfig_filename (line 1134) | def defconfig_filename(self):
    method load_config (line 1149) | def load_config(self, filename=None, replace=True, verbose=None):
    method _load_config (line 1247) | def _load_config(self, filename, replace):
    method _undef_assign (line 1368) | def _undef_assign(self, name, val, filename, linenr):
    method _assigned_twice (line 1377) | def _assigned_twice(self, sym, new_val, filename, linenr):
    method load_allconfig (line 1395) | def load_allconfig(self, filename):
    method write_autoconf (line 1417) | def write_autoconf(self, filename=None, header=None):
    method _autoconf_contents (line 1454) | def _autoconf_contents(self, header):
    method write_config (line 1497) | def write_config(self, filename=None, header=None, save_old=True,
    method _config_contents (line 1577) | def _config_contents(self, header):
    method write_min_config (line 1652) | def write_min_config(self, filename, header=None):
    method _min_config_contents (line 1693) | def _min_config_contents(self, header):
    method sync_deps (line 1730) | def sync_deps(self, path):
    method _load_old_vals (line 1839) | def _load_old_vals(self, path):
    method _write_old_vals (line 1882) | def _write_old_vals(self, path):
    method _old_vals_contents (line 1896) | def _old_vals_contents(self):
    method node_iter (line 1905) | def node_iter(self, unique_syms=False):
    method eval_string (line 1956) | def eval_string(self, s):
    method unset_values (line 1988) | def unset_values(self):
    method enable_warnings (line 2006) | def enable_warnings(self):
    method disable_warnings (line 2013) | def disable_warnings(self):
    method enable_stderr_warnings (line 2020) | def enable_stderr_warnings(self):
    method disable_stderr_warnings (line 2027) | def disable_stderr_warnings(self):
    method enable_undef_warnings (line 2034) | def enable_undef_warnings(self):
    method disable_undef_warnings (line 2041) | def disable_undef_warnings(self):
    method enable_override_warnings (line 2048) | def enable_override_warnings(self):
    method disable_override_warnings (line 2055) | def disable_override_warnings(self):
    method enable_redun_warnings (line 2062) | def enable_redun_warnings(self):
    method disable_redun_warnings (line 2069) | def disable_redun_warnings(self):
    method __repr__ (line 2076) | def __repr__(self):
    method _open_config (line 2109) | def _open_config(self, filename):
    method _enter_file (line 2135) | def _enter_file(self, filename):
    method _leave_file (line 2199) | def _leave_file(self):
    method _next_line (line 2209) | def _next_line(self):
    method _line_after_help (line 2241) | def _line_after_help(self, line):
    method _write_if_changed (line 2258) | def _write_if_changed(self, filename, contents):
    method _contents_eq (line 2272) | def _contents_eq(self, filename, contents):
    method _lookup_sym (line 2290) | def _lookup_sym(self, name):
    method _lookup_const_sym (line 2311) | def _lookup_const_sym(self, name):
    method _tokenize (line 2328) | def _tokenize(self, s):
    method _expect_sym (line 2540) | def _expect_sym(self):
    method _expect_nonconst_sym (line 2549) | def _expect_nonconst_sym(self):
    method _expect_str_and_eol (line 2560) | def _expect_str_and_eol(self):
    method _expect_expr_and_eol (line 2572) | def _expect_expr_and_eol(self):
    method _check_token (line 2580) | def _check_token(self, token):
    method _parse_assignment (line 2592) | def _parse_assignment(self, s):
    method _expand_whole (line 2653) | def _expand_whole(self, s, args):
    method _expand_name (line 2668) | def _expand_name(self, s, i):
    method _expand_name_iter (line 2689) | def _expand_name_iter(self, s, i):
    method _expand_str (line 2702) | def _expand_str(self, s, i):
    method _expand_macro (line 2735) | def _expand_macro(self, s, i, args):
    method _fn_val (line 2797) | def _fn_val(self, args):
    method _make_and (line 2856) | def _make_and(self, e1, e2):
    method _make_or (line 2870) | def _make_or(self, e1, e2):
    method _parse_block (line 2884) | def _parse_block(self, end_token, parent, prev):
    method _parse_cond (line 3102) | def _parse_cond(self):
    method _parse_props (line 3113) | def _parse_props(self, node):
    method _set_type (line 3270) | def _set_type(self, sc, new_type):
    method _parse_prompt (line 3280) | def _parse_prompt(self, node):
    method _parse_help (line 3305) | def _parse_help(self, node):
    method _empty_help (line 3362) | def _empty_help(self, node, line):
    method _parse_expr (line 3369) | def _parse_expr(self, transform_m):
    method _parse_and_expr (line 3410) | def _parse_and_expr(self, transform_m):
    method _parse_factor (line 3419) | def _parse_factor(self, transform_m):
    method _build_dep (line 3459) | def _build_dep(self):
    method _add_choice_deps (line 3520) | def _add_choice_deps(self):
    method _invalidate_all (line 3534) | def _invalidate_all(self):
    method _finalize_node (line 3549) | def _finalize_node(self, node, visible_if):
    method _propagate_deps (line 3630) | def _propagate_deps(self, node, visible_if):
    method _add_props_to_sym (line 3682) | def _add_props_to_sym(self, node):
    method _check_sym_sanity (line 3719) | def _check_sym_sanity(self):
    method _check_choice_sanity (line 3809) | def _check_choice_sanity(self):
    method _parse_error (line 3871) | def _parse_error(self, msg):
    method _trailing_tokens_error (line 3877) | def _trailing_tokens_error(self):
    method _open (line 3880) | def _open(self, filename, mode):
    method _check_undef_syms (line 3917) | def _check_undef_syms(self):
    method _warn (line 3962) | def _warn(self, msg, filename=None, linenr=None):
  class Symbol (line 3977) | class Symbol(object):
    method type (line 4267) | def type(self):
    method str_value (line 4280) | def str_value(self):
    method tri_value (line 4421) | def tri_value(self):
    method assignable (line 4501) | def assignable(self):
    method visibility (line 4510) | def visibility(self):
    method config_string (line 4519) | def config_string(self):
    method name_and_loc (line 4545) | def name_and_loc(self):
    method set_value (line 4551) | def set_value(self, value):
    method unset_value (line 4640) | def unset_value(self):
    method referenced (line 4650) | def referenced(self):
    method orig_defaults (line 4657) | def orig_defaults(self):
    method orig_selects (line 4664) | def orig_selects(self):
    method orig_implies (line 4671) | def orig_implies(self):
    method orig_ranges (line 4678) | def orig_ranges(self):
    method __repr__ (line 4684) | def __repr__(self):
    method __str__ (line 4737) | def __str__(self):
    method custom_str (line 4753) | def custom_str(self, sc_expr_str_fn):
    method __init__ (line 4765) | def __init__(self):
    method _assignable (line 4806) | def _assignable(self):
    method _invalidate (line 4852) | def _invalidate(self):
    method _rec_invalidate (line 4858) | def _rec_invalidate(self):
    method _rec_invalidate_if_has_prompt (line 4889) | def _rec_invalidate_if_has_prompt(self):
    method _str_default (line 4911) | def _str_default(self):
    method _warn_select_unsatisfied_deps (line 4946) | def _warn_select_unsatisfied_deps(self):
  class Choice (line 4985) | class Choice(object):
    method type (line 5167) | def type(self):
    method str_value (line 5176) | def str_value(self):
    method tri_value (line 5183) | def tri_value(self):
    method assignable (line 5203) | def assignable(self):
    method visibility (line 5212) | def visibility(self):
    method name_and_loc (line 5221) | def name_and_loc(self):
    method selection (line 5229) | def selection(self):
    method set_value (line 5237) | def set_value(self, value):
    method unset_value (line 5278) | def unset_value(self):
    method referenced (line 5288) | def referenced(self):
    method orig_defaults (line 5295) | def orig_defaults(self):
    method __repr__ (line 5301) | def __repr__(self):
    method __str__ (line 5341) | def __str__(self):
    method custom_str (line 5354) | def custom_str(self, sc_expr_str_fn):
    method __init__ (line 5366) | def __init__(self):
    method _assignable (line 5398) | def _assignable(self):
    method _selection (line 5417) | def _selection(self):
    method _selection_from_defaults (line 5433) | def _selection_from_defaults(self):
    method _invalidate (line 5448) | def _invalidate(self):
    method _rec_invalidate (line 5452) | def _rec_invalidate(self):
  class MenuNode (line 5462) | class MenuNode(object):
    method __init__ (line 5626) | def __init__(self):
    method orig_prompt (line 5636) | def orig_prompt(self):
    method orig_defaults (line 5645) | def orig_defaults(self):
    method orig_selects (line 5653) | def orig_selects(self):
    method orig_implies (line 5661) | def orig_implies(self):
    method orig_ranges (line 5669) | def orig_ranges(self):
    method referenced (line 5677) | def referenced(self):
    method __repr__ (line 5710) | def __repr__(self):
    method __str__ (line 5758) | def __str__(self):
    method custom_str (line 5777) | def custom_str(self, sc_expr_str_fn):
    method _menu_comment_node_str (line 5786) | def _menu_comment_node_str(self, sc_expr_str_fn):
    method _sym_choice_node_str (line 5799) | def _sym_choice_node_str(self, sc_expr_str_fn):
    method _strip_dep (line 5874) | def _strip_dep(self, expr):
  class Variable (line 5890) | class Variable(object):
    method expanded_value (line 5923) | def expanded_value(self):
    method expanded_value_w_args (line 5929) | def expanded_value_w_args(self, *args):
    method __repr__ (line 5938) | def __repr__(self):
  class KconfigError (line 5945) | class KconfigError(Exception):
  class InternalError (line 5956) | class InternalError(Exception):
  class _KconfigIOError (line 5966) | class _KconfigIOError(IOError):
    method __init__ (line 5967) | def __init__(self, ioerror, msg):
    method __str__ (line 5972) | def __str__(self):
  function expr_value (line 5981) | def expr_value(expr):
  function standard_sc_expr_str (line 6038) | def standard_sc_expr_str(sc):
  function expr_str (line 6053) | def expr_str(expr, sc_expr_str_fn=standard_sc_expr_str):
  function expr_items (line 6097) | def expr_items(expr):
  function split_expr (line 6124) | def split_expr(expr, op):
  function escape (line 6169) | def escape(s):
  function unescape (line 6179) | def unescape(s):
  function standard_kconfig (line 6190) | def standard_kconfig(description=None):
  function standard_config_filename (line 6218) | def standard_config_filename():
  function load_allconfig (line 6229) | def load_allconfig(kconf, filename):
  function _visibility (line 6279) | def _visibility(sc):
  function _depend_on (line 6309) | def _depend_on(sc, expr):
  function _parenthesize (line 6328) | def _parenthesize(expr, type_, sc_expr_str_fn):
  function _ordered_unique (line 6336) | def _ordered_unique(lst):
  function _is_base_n (line 6346) | def _is_base_n(s, n):
  function _strcmp (line 6354) | def _strcmp(s1, s2):
  function _sym_to_num (line 6360) | def _sym_to_num(sym):
  function _touch_dep_file (line 6371) | def _touch_dep_file(path, sym_name):
  function _save_old (line 6385) | def _save_old(path):
  function _locs (line 6417) | def _locs(sc):
  function _expr_depends_on (line 6432) | def _expr_depends_on(expr, sym):
  function _auto_menu_dep (line 6460) | def _auto_menu_dep(node1, node2):
  function _flatten (line 6469) | def _flatten(node):
  function _remove_ifs (line 6498) | def _remove_ifs(node):
  function _finalize_choice (line 6524) | def _finalize_choice(node):
  function _check_dep_loop_sym (line 6552) | def _check_dep_loop_sym(sym, ignore_choice):
  function _check_dep_loop_choice (line 6627) | def _check_dep_loop_choice(choice, skip):
  function _found_dep_loop (line 6661) | def _found_dep_loop(loop, cur):
  function _decoding_error (line 6710) | def _decoding_error(e, filename, macro_linenr=None):
  function _warn_verbose_deprecated (line 6732) | def _warn_verbose_deprecated(fn_name):
  function _filename_fn (line 6745) | def _filename_fn(kconf, _):
  function _lineno_fn (line 6749) | def _lineno_fn(kconf, _):
  function _info_fn (line 6753) | def _info_fn(kconf, _, msg):
  function _warning_if_fn (line 6759) | def _warning_if_fn(kconf, _, cond, msg):
  function _error_if_fn (line 6766) | def _error_if_fn(kconf, _, cond, msg):
  function _shell_fn (line 6774) | def _shell_fn(kconf, _, command):
  function _re_match (line 7109) | def _re_match(regex):
  function _re_search (line 7113) | def _re_search(regex):

FILE: kernel/scripts/Kconfiglib/listnewconfig.py
  function main (line 22) | def main():

FILE: kernel/scripts/Kconfiglib/menuconfig.py
  function _rgb_to_6cube (line 358) | def _rgb_to_6cube(rgb):
  function _6cube_to_rgb (line 374) | def _6cube_to_rgb(r6g6b6):
  function _rgb_to_gray (line 380) | def _rgb_to_gray(rgb):
  function _gray_to_rgb (line 398) | def _gray_to_rgb(index):
  function _alloc_rgb (line 406) | def _alloc_rgb(rgb, rgb2index={}):
  function _color_from_num (line 438) | def _color_from_num(num):
  function _color_from_rgb (line 464) | def _color_from_rgb(rgb):
  function _parse_style (line 511) | def _parse_style(style_str, parsing_default):
  function _style_to_curses (line 550) | def _style_to_curses(style_def):
  function _init_styles (line 608) | def _init_styles():
  function _style_attr (line 637) | def _style_attr(fg_color, bg_color, attribs, color_attribs={}):
  function _main (line 662) | def _main():
  function menuconfig (line 666) | def menuconfig(kconf):
  function _load_config (line 735) | def _load_config():
  function _needs_save (line 749) | def _needs_save():
  function _menuconfig (line 816) | def _menuconfig(stdscr):
  function _quit_dialog (line 938) | def _quit_dialog():
  function _init (line 963) | def _init():
  function _resize_main (line 1034) | def _resize_main():
  function _height (line 1076) | def _height(win):
  function _width (line 1082) | def _width(win):
  function _enter_menu (line 1088) | def _enter_menu(menu):
  function _select_selected_choice_sym (line 1124) | def _select_selected_choice_sym():
  function _jump_to (line 1142) | def _jump_to(node):
  function _leave_menu (line 1191) | def _leave_menu():
  function _select_next_menu_entry (line 1222) | def _select_next_menu_entry():
  function _select_prev_menu_entry (line 1243) | def _select_prev_menu_entry():
  function _select_last_menu_entry (line 1259) | def _select_last_menu_entry():
  function _select_first_menu_entry (line 1269) | def _select_first_menu_entry():
  function _toggle_show_all (line 1278) | def _toggle_show_all():
  function _center_vertically (line 1325) | def _center_vertically():
  function _draw_main (line 1334) | def _draw_main():
  function _parent_menu (line 1482) | def _parent_menu(node):
  function _shown_nodes (line 1493) | def _shown_nodes(menu):
  function _visible (line 1564) | def _visible(node):
  function _change_node (line 1572) | def _change_node(node):
  function _changeable (line 1631) | def _changeable(node):
  function _set_sel_node_tri_val (line 1649) | def _set_sel_node_tri_val(tri_val):
  function _set_val (line 1658) | def _set_val(sc, val):
  function _update_menu (line 1678) | def _update_menu():
  function _input_dialog (line 1706) | def _input_dialog(title, initial_text, info_text=None):
  function _resize_input_dialog (line 1769) | def _resize_input_dialog(win, title, info_lines):
  function _draw_input_dialog (line 1789) | def _draw_input_dialog(win, title, info_lines, s, i, hscroll):
  function _load_dialog (line 1810) | def _load_dialog():
  function _try_load (line 1854) | def _try_load(filename):
  function _save_dialog (line 1870) | def _save_dialog(save_fn, default_filename, description):
  function _try_save (line 1900) | def _try_save(save_fn, filename, description):
  function _key_dialog (line 1923) | def _key_dialog(title, text, keys):
  function _resize_key_dialog (line 1970) | def _resize_key_dialog(win, text):
  function _draw_key_dialog (line 1985) | def _draw_key_dialog(win, title, text):
  function _draw_frame (line 1997) | def _draw_frame(win, title):
  function _jump_to_dialog (line 2018) | def _jump_to_dialog():
  function _sorted_sc_nodes (line 2211) | def _sorted_sc_nodes(cached_nodes=[]):
  function _sorted_menu_comment_nodes (line 2235) | def _sorted_menu_comment_nodes(cached_nodes=[]):
  function _resize_jump_to_dialog (line 2249) | def _resize_jump_to_dialog(edit_box, matches_win, bot_sep_win, help_win,
  function _draw_jump_to_dialog (line 2290) | def _draw_jump_to_dialog(edit_box, matches_win, bot_sep_win, help_win,
  function _info_dialog (line 2376) | def _info_dialog(node, from_jump_to_dialog):
  function _resize_info_dialog (line 2461) | def _resize_info_dialog(top_line_win, text_win, bot_sep_win, help_win):
  function _draw_info_dialog (line 2489) | def _draw_info_dialog(node, lines, scroll, top_line_win, text_win,
  function _info_str (line 2556) | def _info_str(node):
  function _name_info (line 2596) | def _name_info(sc):
  function _prompt_info (line 2603) | def _prompt_info(sc):
  function _value_info (line 2615) | def _value_info(sym):
  function _choice_syms_info (line 2625) | def _choice_syms_info(choice):
  function _help_info (line 2640) | def _help_info(sc):
  function _direct_dep_info (line 2654) | def _direct_dep_info(sc):
  function _defaults_info (line 2666) | def _defaults_info(sc):
  function _split_expr_info (line 2703) | def _split_expr_info(expr, indent):
  function _select_imply_info (line 2735) | def _select_imply_info(sym):
  function _kconfig_def_info (line 2772) | def _kconfig_def_info(item):
  function _include_path_info (line 2796) | def _include_path_info(node):
  function _menu_path_info (line 2806) | def _menu_path_info(node):
  function _indent (line 2823) | def _indent(s, n):
  function _name_and_val_str (line 2830) | def _name_and_val_str(sc):
  function _expr_str (line 2848) | def _expr_str(expr):
  function _styled_win (line 2853) | def _styled_win(style):
  function _set_style (line 2863) | def _set_style(win, style):
  function _max_scroll (line 2869) | def _max_scroll(lst, win):
  function _edit_text (line 2877) | def _edit_text(c, s, i, hscroll, width):
  function _load_save_info (line 2954) | def _load_save_info():
  function _msg (line 2961) | def _msg(title, text):
  function _error (line 2967) | def _error(text):
  function _node_str (line 2973) | def _node_str(node):
  function _should_show_name (line 3043) | def _should_show_name(node):
  function _value_str (line 3053) | def _value_str(node):
  function _is_y_mode_choice_sym (line 3088) | def _is_y_mode_choice_sym(item):
  function _check_valid (line 3095) | def _check_valid(sym, s):
  function _range_info (line 3126) | def _range_info(sym):
  function _is_num (line 3138) | def _is_num(name):
  function _getch_compat (line 3157) | def _getch_compat(win):
  function _warn (line 3185) | def _warn(*args):
  function _safe_curs_set (line 3198) | def _safe_curs_set(visibility):
  function _safe_addstr (line 3205) | def _safe_addstr(win, *args):
  function _safe_addch (line 3236) | def _safe_addch(win, *args):
  function _safe_hline (line 3243) | def _safe_hline(win, *args):
  function _safe_vline (line 3250) | def _safe_vline(win, *args):
  function _safe_move (line 3257) | def _safe_move(win, *args):
  function _change_c_lc_ctype_to_utf8 (line 3264) | def _change_c_lc_ctype_to_utf8():

FILE: kernel/scripts/Kconfiglib/oldconfig.py
  function _main (line 40) | def _main():
  function oldconfig (line 62) | def oldconfig(node):
  function _name_and_loc_str (line 215) | def _name_and_loc_str(sc):
  function _print_help (line 226) | def _print_help(node):
  function _default_value_str (line 230) | def _default_value_str(sym):

FILE: kernel/scripts/Kconfiglib/olddefconfig.py
  function main (line 21) | def main():

FILE: kernel/scripts/Kconfiglib/savedefconfig.py
  function main (line 25) | def main():

FILE: kernel/scripts/Kconfiglib/setconfig.py
  function main (line 29) | def main():

FILE: kernel/scripts/Kconfiglib/tests/kconfigfunctions.py
  function add (line 1) | def add(kconf, name, *args):
  function one (line 5) | def one(kconf, name, s):
  function one_or_more (line 9) | def one_or_more(kconf, name, arg, *args):
  function location (line 13) | def location(kconf, name):

FILE: kernel/scripts/Kconfiglib/testsuite.py
  function shell (line 58) | def shell(cmd):
  function fail (line 66) | def fail(msg=None):
  function verify (line 73) | def verify(cond, msg):
  function verify_equal (line 78) | def verify_equal(x, y):
  function run_tests (line 92) | def run_tests():
  function run_selftests (line 112) | def run_selftests():
  function run_compatibility_tests (line 2730) | def run_compatibility_tests():
  function all_arch_srcarch (line 2793) | def all_arch_srcarch():
  function test_allnoconfig (line 2818) | def test_allnoconfig(arch, srcarch):
  function test_allnoconfig_walk (line 2832) | def test_allnoconfig_walk(arch, srcarch):
  function test_allmodconfig (line 2846) | def test_allmodconfig(arch, srcarch):
  function test_allyesconfig (line 2860) | def test_allyesconfig(arch, srcarch):
  function test_sanity (line 2874) | def test_sanity(arch, srcarch):
  function test_alldefconfig (line 3027) | def test_alldefconfig(arch, srcarch):
  function test_defconfig (line 3041) | def test_defconfig(arch, srcarch):
  function test_min_config (line 3087) | def test_min_config(arch, srcarch):
  function defconfig_files (line 3124) | def defconfig_files(srcarch):
  function rm_configs (line 3147) | def rm_configs():
  function compare_configs (line 3159) | def compare_configs(arch):
  function equal_configs (line 3167) | def equal_configs():

FILE: kernel/userspace/endpoint.c
  type endpoint (line 30) | struct endpoint {
  function endpoint_close (line 40) | static int endpoint_close(struct kobject *kobj, right_t right, struct pr...
  function endpoint_recv (line 52) | static long endpoint_recv(struct kobject *kobj, void __user *data,
  function endpoint_send (line 61) | static long endpoint_send(struct kobject *kobj, void __user *data, size_...
  function endpoint_reply (line 68) | static int endpoint_reply(struct kobject *kobj, right_t right,
  function endpoint_release (line 75) | static void endpoint_release(struct kobject *kobj)
  function endpoint_mmap (line 85) | static int endpoint_mmap(struct kobject *kobj, right_t right,
  function endpoint_munmap (line 106) | static int endpoint_munmap(struct kobject *kobj, right_t right)
  type kobject_ops (line 117) | struct kobject_ops
  function endpoint_create (line 127) | static int endpoint_create(struct kobject **kobj, right_t *right, unsign...

FILE: kernel/userspace/futex.c
  type futex (line 60) | struct futex {
  type futex_queue (line 67) | struct futex_queue {
  type futex_queue (line 74) | struct futex_queue
  function futex_timeout_val (line 76) | static unsigned long futex_timeout_val(struct timespec *ktime)
  function sys_do_futex_wait (line 82) | static long sys_do_futex_wait(struct futex *ft, uint32_t *kaddr,
  function sys_do_futex_wake (line 106) | static long sys_do_futex_wake(struct futex *ft, uint32_t *kaddr,
  function futex_key (line 124) | static inline int futex_key(unsigned long phy)
  function is_wait_cmd (line 129) | static inline int is_wait_cmd(int cmd)
  function sys_futex (line 139) | long sys_futex(uint32_t __user *uaddr, int op, uint32_t val,
  function futex_subsys_init (line 215) | static int futex_subsys_init(void)

FILE: kernel/userspace/handle.c
  type handle_desc (line 28) | struct handle_desc
  type handle_desc (line 30) | struct handle_desc
  type handle_table_desc (line 31) | struct handle_table_desc
  function __alloc_new_handle (line 51) | static int __alloc_new_handle(struct handle_table_desc *htd,
  function lookup_handle_desc (line 71) | static int lookup_handle_desc(struct process *proc, handle_t handle,
  function __release_handle (line 90) | void __release_handle(struct process *proc, handle_t handle)
  function release_process_handle (line 111) | int release_process_handle(struct process *proc, handle_t handle, struct...
  function release_handle (line 142) | int release_handle(handle_t handle, struct kobject **kobj, right_t *right)
  function __alloc_handle_internal (line 147) | static inline int __alloc_handle_internal(struct handle_desc *desc,
  function handle_t (line 168) | handle_t __alloc_handle(struct process *proc, struct kobject *kobj, righ...
  function handle_t (line 207) | handle_t alloc_handle(struct kobject *kobj, right_t right)
  function setup_handle (line 212) | static int setup_handle(struct process *proc, handle_t handle,
  function handle_t (line 235) | handle_t send_handle(struct process *proc, struct process *pdst,
  function handle_t (line 298) | handle_t sys_grant(handle_t proc_handle, handle_t handle, right_t right)
  function get_kobject_from_process (line 323) | int get_kobject_from_process(struct process *proc, handle_t handle,
  function get_kobject (line 353) | int get_kobject(handle_t handle, struct kobject **kobj, right_t *right)
  function put_kobject (line 358) | int put_kobject(struct kobject *kobj)
  function process_handles_deinit (line 363) | void process_handles_deinit(struct process *proc)
  function release_handle_table (line 377) | static void release_handle_table(struct process *proc, struct handle_des...
  function release_proc_kobjects (line 389) | void release_proc_kobjects(struct process *proc)
  function init_proc_handles (line 403) | int init_proc_handles(struct process *proc)

FILE: kernel/userspace/iqueue.c
  function iqueue_recv (line 33) | long iqueue_recv(struct iqueue *iqueue, void __user *data,
  function iqueue_send (line 93) | long iqueue_send(struct iqueue *iqueue, void __user *data, size_t data_s...
  function iqueue_reply (line 157) | int iqueue_reply(struct iqueue *iqueue, right_t right,
  function wake_all_writer (line 193) | static void wake_all_writer(struct iqueue *iqueue, int errno)
  function iqueue_close (line 212) | int iqueue_close(struct iqueue *iqueue, right_t right, struct process *p...
  function iqueue_init (line 232) | void iqueue_init(struct iqueue *iq, int mutil_writer, struct kobject *kobj)

FILE: kernel/userspace/irq.c
  type irq_event (line 26) | struct irq_event {
  function do_handle_userspace_irq (line 38) | static int do_handle_userspace_irq(uint32_t irq, void *data)
  function request_user_irq (line 63) | static inline int request_user_irq(uint32_t irq, unsigned long flags, vo...
  function irq_kobj_open (line 69) | static int irq_kobj_open(struct kobject *kobj, handle_t handle, right_t ...
  function irq_kobj_read (line 77) | static long irq_kobj_read(struct kobject *kobj, void __user *data,
  function irq_kobj_write (line 97) | static long irq_kobj_write(struct kobject *kobj, void __user *data,
  function irq_kobj_close (line 108) | static int irq_kobj_close(struct kobject *kobj, right_t right, struct pr...
  type kobject_ops (line 113) | struct kobject_ops
  function irq_kobject_create (line 120) | int irq_kobject_create(struct kobject **rkobj, right_t *right, unsigned ...

FILE: kernel/userspace/kobject.c
  function register_kobject_type (line 24) | static void register_kobject_type(kobject_create_cb ops, int type)
  function kobject_release (line 33) | static void kobject_release(struct kobject *kobj)
  function kobject_get (line 44) | int kobject_get(struct kobject *kobj)
  function kobject_put (line 57) | int kobject_put(struct kobject *kobj)
  function kobject_init (line 76) | void kobject_init(struct kobject *kobj, int type,
  function kobject_create (line 89) | int kobject_create(int type, struct kobject **kobj, right_t *right, unsi...
  function kobject_poll (line 103) | int kobject_poll(struct kobject *ksrc, struct kobject *kdst, int event, ...
  function kobject_open (line 111) | int kobject_open(struct kobject *kobj, handle_t handle, right_t right)
  function kobject_close (line 130) | int kobject_close(struct kobject *kobj, right_t right, struct process *p...
  function kobject_recv (line 162) | long kobject_recv(struct kobject *kobj, void __user *data, size_t data_s...
  function kobject_send (line 180) | long kobject_send(struct kobject *kobj, void __user *data, size_t data_s...
  function kobject_reply (line 192) | int kobject_reply(struct kobject *kobj, right_t right, unsigned long token,
  function kobject_munmap (line 201) | int kobject_munmap(struct kobject *kobj, right_t right)
  function kobject_mmap (line 209) | int kobject_mmap(struct kobject *kobj, right_t right,
  function kobject_ctl (line 218) | long kobject_ctl(struct kobject *kobj, right_t right,
  function kobject_subsystem_init (line 227) | static int kobject_subsystem_init(void)

FILE: kernel/userspace/kobject_copy.c
  type kobject_rw_arg (line 22) | struct kobject_rw_arg {
  type syscall_regs (line 27) | struct syscall_regs {
  type syscall_regs (line 38) | struct syscall_regs
  type task (line 38) | struct task
  type syscall_regs (line 40) | struct syscall_regs
  function kobject_copy_ipc_data (line 43) | ssize_t kobject_copy_ipc_data(struct task *tdst, struct task *tsrc, int ...
  function kobject_copy_extra_data (line 68) | ssize_t kobject_copy_extra_data(struct task *tdst, struct task *tsrc, in...
  function kobject_copy_ipc_payload (line 93) | ssize_t kobject_copy_ipc_payload(struct task *dtsk, struct task *ttsk,

FILE: kernel/userspace/kobject_copy.h
  type task (line 4) | struct task
  type task (line 5) | struct task
  type task (line 7) | struct task
  type task (line 8) | struct task
  type task (line 10) | struct task
  type task (line 10) | struct task

FILE: kernel/userspace/notify.c
  function notify_kobj_send (line 27) | static long notify_kobj_send(struct kobject *kobj, void __user *data,
  type kobject_ops (line 48) | struct kobject_ops
  function notify_create (line 52) | int notify_create(struct kobject **kobjr, right_t *right, unsigned long ...

FILE: kernel/userspace/pma.c
  type pma_mapping_entry (line 28) | struct pma_mapping_entry {
  type pma (line 43) | struct pma {
  function free_pma_pages (line 68) | static void free_pma_pages(struct page *head)
  function free_pma_memory (line 80) | static void free_pma_memory(struct pma *p)
  function pma_mmap (line 97) | static int pma_mmap(struct kobject *kobj, right_t right,
  function pma_munmap (line 122) | static int pma_munmap(struct kobject *kobj, right_t right)
  function pma_close (line 136) | static int pma_close(struct kobject *kobj, right_t right,
  type pma (line 161) | struct pma
  type process (line 161) | struct process
  type page (line 164) | struct page
  type pma_mapping_entry (line 166) | struct pma_mapping_entry
  type pma_mapping_entry (line 170) | struct pma_mapping_entry
  function __sys_pma_unmap (line 211) | static int __sys_pma_unmap(struct pma *p, struct process *proc,
  function sys_handle_pma (line 238) | static int sys_handle_pma(handle_t proc_handle, handle_t pma_handle,
  function sys_map_pma (line 299) | int sys_map_pma(handle_t proc_handle, handle_t pma_handle,
  function sys_unmap_pma (line 305) | int sys_unmap_pma(handle_t proc_handle, handle_t pma_handle,
  function pma_release (line 311) | static void pma_release(struct kobject *kobj)
  function pma_add_pages (line 324) | static int pma_add_pages(struct kobject *kobj, int pages)
  function pma_get_size (line 364) | static long pma_get_size(struct kobject *kobj)
  function pma_ctl (line 371) | static long pma_ctl(struct kobject *kobj, int req, unsigned long data)
  function pma_write (line 390) | static long pma_write(struct kobject *kobj, void __user *data, size_t da...
  function pma_read (line 404) | static long pma_read(struct kobject *kobj, void __user *data, size_t dat...
  type kobject_ops (line 419) | struct kobject_ops
  function pma_flags (line 429) | static inline unsigned long pma_flags(int type, right_t right)
  function allocate_pma_memory (line 454) | static int allocate_pma_memory(struct pma *p, size_t size, int type)
  function __create_new_pma (line 488) | static int __create_new_pma(struct kobject **kobj,
  function create_new_pma (line 559) | int create_new_pma(struct kobject **kobj, right_t *right, struct pma_cre...
  function pma_create (line 564) | static int pma_create(struct kobject **kobj, right_t *right, unsigned lo...

FILE: kernel/userspace/poll.c
  type poll_event (line 37) | struct poll_event
  type poll_event_kernel (line 39) | struct poll_event_kernel
  type poll_event_kernel (line 41) | struct poll_event_kernel
  function poll_event_send_static (line 49) | int poll_event_send_static(struct pevent_item *pi, struct poll_event_ker...
  function poll_event_send_with_data (line 61) | int poll_event_send_with_data(struct poll_struct *ps, int ev, int type,
  function poll_event_send (line 96) | int poll_event_send(struct poll_struct *ps, int ev)
  function copy_poll_event_to_user (line 101) | static int copy_poll_event_to_user(struct poll_event __user *events,
  function __poll_hub_read (line 122) | static int __poll_hub_read(struct poll_hub *peh,
  function poll_hub_read (line 165) | static long poll_hub_read(struct kobject *kobj, void __user *data, size_...
  function poll_hub_release (line 182) | static void poll_hub_release(struct kobject *kobj)
  function poll_hub_close (line 201) | static int poll_hub_close(struct kobject *kobj, right_t right, struct pr...
  type pevent_item (line 206) | struct pevent_item
  type poll_struct (line 206) | struct poll_struct
  type poll_hub (line 206) | struct poll_hub
  type pevent_item (line 208) | struct pevent_item
  function add_new_pevent (line 219) | static inline void add_new_pevent(struct poll_struct *ps, int ev, struct...
  type pevent_item (line 228) | struct pevent_item
  type poll_struct (line 228) | struct poll_struct
  type poll_hub (line 229) | struct poll_hub
  type pevent_item (line 231) | struct pevent_item
  type pevent_item (line 232) | struct pevent_item
  function release_poll_struct (line 252) | void release_poll_struct(struct kobject *kobj)
  function __poll_hub_ctl (line 276) | static int __poll_hub_ctl(struct poll_hub *ph, struct kobject *ksrc,
  function poll_hub_check_right (line 354) | static int poll_hub_check_right(int events, right_t right)
  function poll_hub_ctl (line 369) | static long poll_hub_ctl(struct kobject *kobj, int op, unsigned long data)
  type kobject_ops (line 397) | struct kobject_ops
  function poll_hub_create (line 404) | static int poll_hub_create(struct kobject **kobj, right_t *right, unsign...

FILE: kernel/userspace/port.c
  type port (line 30) | struct port {
  function port_close (line 37) | static int port_close(struct kobject *kobj, right_t right, struct proces...
  function port_recv (line 43) | static long port_recv(struct kobject *kobj, void __user *data,
  function port_send (line 52) | static long port_send(struct kobject *kobj, void __user *data, size_t da...
  function port_reply (line 59) | static int port_reply(struct kobject *kobj, right_t right,
  function port_release (line 66) | static void port_release(struct kobject *kobj)
  function port_poll (line 71) | static int port_poll(struct kobject *ksrc,
  type kobject_ops (line 77) | struct kobject_ops
  function port_create (line 86) | static int port_create(struct kobject **kobj, right_t *right, unsigned l...

FILE: kernel/userspace/process.c
  type process (line 34) | struct process
  type process (line 37) | struct process
  type task (line 38) | struct task
  type process (line 41) | struct process
  function task_exit_helper (line 85) | static void task_exit_helper(void *data)
  function request_process_stop (line 90) | static void request_process_stop(struct process *proc, int handle)
  function process_die (line 142) | void process_die(void)
  function kill_process (line 159) | void kill_process(struct process *proc, int handle)
  function process_page_fault (line 164) | int process_page_fault(struct process *proc, uint64_t virtaddr, uint64_t...
  function process_recv (line 194) | static long process_recv(struct kobject *kobj, void __user *data,
  function process_reply (line 209) | static int process_reply(struct kobject *kobj, right_t right, long token,
  function set_process_name (line 217) | static int set_process_name(struct process *proc, char __user *str)
  function do_process_ctl (line 224) | static long do_process_ctl(struct process *proc, int req, unsigned long ...
  function process_ctl (line 253) | static long process_ctl(struct kobject *kobj, int req, unsigned long data)
  function do_process_release (line 263) | int do_process_release(struct kobject *kobj)
  function process_release (line 288) | static void process_release(struct kobject *kobj)
  function clean_process_on_pcpu (line 301) | void clean_process_on_pcpu(struct pcpu *pcpu)
  function process_send (line 331) | static long process_send(struct kobject *kobj,
  function process_close (line 348) | static int process_close(struct kobject *kobj, right_t right, struct pro...
  type kobject_ops (line 353) | struct kobject_ops
  function wake_up_process (line 362) | int wake_up_process(struct process *proc)
  type process (line 376) | struct process
  type process (line 379) | struct process
  type task_stat (line 380) | struct task_stat
  function process_create (line 397) | static int process_create(struct kobject **kobjr, right_t *right, unsign...
  function process_task_create_hook (line 431) | static int process_task_create_hook(void *item, void *context)
  function process_task_release_hook (line 447) | static int process_task_release_hook(void *item, void *context)
  function process_subsys_init (line 456) | static int process_subsys_init(void)

FILE: kernel/userspace/procinfo.c
  type kobject (line 27) | struct kobject
  type task_stat (line 28) | struct task_stat
  type task_stat (line 30) | struct task_stat
  function release_task_stat (line 36) | void release_task_stat(int tid)
  function init_task_stat (line 42) | void init_task_stat(struct task *task)
  function update_task_stat (line 66) | void update_task_stat(struct task *task)
  function procinfo_switch_hook (line 76) | static int procinfo_switch_hook(void *item, void *data)
  function init_kernel_task_stat (line 84) | static void init_kernel_task_stat(struct task *task)
  function procinfo_init (line 96) | int procinfo_init(void)

FILE: kernel/userspace/root_service.c
  type kobject (line 33) | struct kobject
  type process (line 34) | struct process
  type elf_ctx (line 37) | struct elf_ctx {
  type Elf64_auxv_t (line 61) | typedef struct
  function elf_findphdr (line 99) | int elf_findphdr(struct ramdisk_file *file, struct elf_ctx *ctx,
  function elf_init (line 117) | int elf_init(struct ramdisk_file *file, struct elf_ctx *ctx)
  function elf_load_section (line 179) | static int elf_load_section(struct ramdisk_file *file, void *vaddr, Elf_...
  function elf_findshdr (line 198) | static int elf_findshdr(struct ramdisk_file *file, struct elf_ctx *ctx,
  function elf_load (line 220) | int elf_load(struct process *proc, struct ramdisk_file *file, struct elf...
  function elf_load_process (line 254) | long elf_load_process(struct process *proc, struct ramdisk_file *file)
  function setup_user_memory_region (line 267) | static int setup_user_memory_region(struct process *proc, struct bootdat...
  function setup_root_service_env (line 318) | static int setup_root_service_env(struct process *proc)
  function setup_root_service_ustack (line 435) | static int setup_root_service_ustack(struct process *proc)
  function load_root_service (line 483) | int load_root_service(void)
  function init_task (line 527) | int init_task(void *data)

FILE: kernel/userspace/socket.c
  type socket (line 24) | struct socket {
  function socket_release (line 42) | static void socket_release(struct kobject *kobj)
  function endpoint_recv (line 50) | static long endpoint_recv(struct kobject *kobj, void __user *data,
  function socket_send (line 100) | static long socket_send(struct kobject *kobj, void __user *data,
  type kobject_ops (line 146) | struct kobject_ops
  function socket_create (line 152) | static int socket_create(struct kobject **kobj, right_t *right, unsigned...

FILE: kernel/userspace/stdio.c
  type kobject (line 26) | struct kobject
  function stdio_send (line 30) | static long stdio_send(struct kobject *kobj, void __user *data,
  function stdio_recv (line 62) | static long stdio_recv(struct kobject *kobj, void __user *data,
  type kobject_ops (line 80) | struct kobject_ops
  function stdio_kobject_init (line 85) | static int stdio_kobject_init(void)

FILE: kernel/userspace/syscall.c
  function sys_sched_yield (line 28) | void sys_sched_yield(void)
  function sys_kobject_close (line 35) | long sys_kobject_close(handle_t handle)
  function handle_t (line 54) | handle_t sys_kobject_create(int type, unsigned long data)
  function sys_kobject_open (line 72) | int sys_kobject_open(handle_t handle)
  function sys_kobject_recv (line 88) | long sys_kobject_recv(handle_t handle, void __user *data, size_t data_size,
  function sys_kobject_send (line 112) | long sys_kobject_send(handle_t handle, void __user *data, size_t data_size,
  function sys_kobject_reply (line 138) | long sys_kobject_reply(handle_t handle, unsigned long token,
  function sys_kobject_ctl (line 158) | long sys_kobject_ctl(handle_t handle, int req, unsigned long data)
  function sys_kobject_mmap (line 180) | int sys_kobject_mmap(handle_t handle,
  function sys_kobject_munmap (line 202) | int sys_kobject_munmap(handle_t handle)

FILE: kernel/userspace/thread.c
  function sys_exit (line 27) | void sys_exit(int errno)
  function sys_exitgroup (line 35) | void sys_exitgroup(int errno)
  function release_thread (line 40) | void release_thread(struct task *task)
  function add_task_to_process (line 61) | static int add_task_to_process(struct process *proc, struct task *task)
  function sys_clone (line 79) | int sys_clone(int flags, void *stack, int *ptid, void *tls, int *ctid)

FILE: kernel/userspace/time.c
  function sys_clock_gettime (line 22) | int sys_clock_gettime(int id, struct timespec __user *ts)
  function sys_clock_nanosleep (line 45) | int sys_clock_nanosleep(int id, int flags, long time, long ns,

FILE: kernel/userspace/uaccess.c
  function copy_string_from_user (line 21) | int copy_string_from_user(char *dst, char __user *src, int max)
  function __copy_from_user (line 65) | int __copy_from_user(void *dst, struct vspace *vsrc, void __user *src, s...
  function __copy_to_user (line 98) | int __copy_to_user(struct vspace *vdst, void __user *dst, void *src, siz...
  function copy_from_user (line 130) | int copy_from_user(void *dst, void __user *src, size_t size)
  function copy_to_user (line 135) | int copy_to_user(void __user *dst, void *src, size_t size)
  function copy_user_to_user (line 140) | int copy_user_to_user(struct vspace *vdst, void __user *dst,
  function copy_string_from_user_safe (line 175) | int copy_string_from_user_safe(char *dst, char __user *src, size_t max)

FILE: kernel/userspace/vspace.c
  function allocate_asid (line 35) | static int allocate_asid(void)
  function free_asid (line 53) | static void free_asid(int asid)
  function inc_vspace_usage (line 59) | void inc_vspace_usage(struct vspace *vs)
  function dec_vspace_usage (line 64) | void dec_vspace_usage(struct vspace *vs)
  type vspace (line 86) | struct vspace
  function __map_process_memory (line 92) | static inline int __map_process_memory(struct vspace *vs, unsigned long ...
  function map_process_memory (line 109) | int map_process_memory(struct process *proc, unsigned long vaddr,
  function unmap_process_memory (line 127) | int unmap_process_memory(struct process *proc, unsigned long vaddr, size...
  function __map_process_page_internal (line 164) | static int __map_process_page_internal(struct process *proc,
  function handle_page_fault_internal (line 200) | static int handle_page_fault_internal(struct process *proc,
  function sys_map_anon (line 228) | static int sys_map_anon(handle_t proc_handle, unsigned long virt,
  function sys_unmap_anon (line 269) | static int sys_unmap_anon(handle_t proc_handle, unsigned long virt, size...
  function sys_map (line 288) | int sys_map(handle_t proc_handle, handle_t pma_handle,
  function sys_unmap (line 309) | int sys_unmap(handle_t proc_handle, handle_t pma_handle,
  function sys_mtrans (line 330) | unsigned long sys_mtrans(unsigned long virt)
  function handle_page_fault_ipc (line 345) | static int handle_page_fault_ipc(struct process *proc, unsigned long vir...
  function handle_user_page_fault (line 352) | int handle_user_page_fault(unsigned long virt, int write, unsigned long ...
  function handle_user_ia_fault (line 375) | int handle_user_ia_fault(void)
  function user_unmap_range (line 382) | static void user_unmap_range(struct vspace *vspace, unsigned long start,
  type mm_notifier_ops (line 388) | struct mm_notifier_ops
  function vspace_init (line 392) | int vspace_init(struct process *proc)
  function vspace_deinit (line 408) | void vspace_deinit(struct process *proc)
  function umm_init (line 420) | static int umm_init(void)

FILE: kernel/virt/debug_console.c
  type vm_debug_console (line 37) | struct vm_debug_console {
  type vm_debug_console (line 52) | struct vm_debug_console
  function dcon_putc (line 54) | static int dcon_putc(struct tty *tty, char ch)
  function dcon_putcs (line 75) | static int dcon_putcs(struct tty *tty, char *str, int count)
  function dcon_open (line 80) | static int dcon_open(struct tty *tty)
  function dcon_close (line 85) | static void dcon_close(struct tty *tty)
  type tty_ops (line 90) | struct tty_ops
  function dcon_get_resource (line 97) | static int dcon_get_resource(struct vm *
Condensed preview — 2570 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (7,010K chars).
[
  {
    "path": ".gitignore",
    "chars": 1246,
    "preview": "out/\ntags\ncscope.in.out\ncscope.out\ncscope.po.out\nlinkmap.txt\ninclude/config/config.h\nramdisk.sh\nramdisk2.sh\nfat32.sh\n*.s"
  },
  {
    "path": "Makefile",
    "chars": 5484,
    "preview": "PHONY := _all\n_all:\n\nifeq ($(DEBUG),1)\n  BUILD_DEBUG = 1\nelse\n  BUILD_DEBUG = 0\nendif\n\nifeq ($(VERBOSE),1)\n  Q =\nelse\n  "
  },
  {
    "path": "README.md",
    "chars": 14922,
    "preview": "# Minos2\n\n**Minos2 is a micro-kernel OS.**\n\n- [x] Multi-process\n- [x] SMP\n- [x] Multi-thread\n- [x] Virtual memory manage"
  },
  {
    "path": "generic/include/uapi/bootdata.h",
    "chars": 497,
    "preview": "#ifndef __LIBMINOS_BOOTDATA_H__\n#define __LIBMINOS_BOOTDATA_H__\n\n#ifdef __KERNEL__\n#include <minos/types.h>\n#define ROOT"
  },
  {
    "path": "generic/include/uapi/gvm.h",
    "chars": 1979,
    "preview": "#ifndef __LIBMINOS_GVM_H__\n#define __LIBMINOS_GVM_H__\n\n\n/*\n * each guest vm may have at least 64 spi irqs,\n * the 32 - 6"
  },
  {
    "path": "generic/include/uapi/hypervisor.h",
    "chars": 1844,
    "preview": "#ifndef __LIBMINOS_HYPERVISOR_H__\n#define __LIBMINOS_HYPERVISOR_H__\n\n#ifdef __KERNEL__\n#include <minos/types.h>\n#else\n#i"
  },
  {
    "path": "generic/include/uapi/ramdisk.h",
    "chars": 770,
    "preview": "#ifndef __LIBMINOS_RAMDISK_H__\n#define __LIBMINOS_RAMDISK_H__\n\n#ifdef __KERNEL__\n#include <minos/types.h>\n#else\n#include"
  },
  {
    "path": "generic/include/uapi/time.h",
    "chars": 115,
    "preview": "#ifndef __LIBMINOS_TIME_H__\n#define __LIBMINOS_TIME_H__\n\nstruct timespec {\n\tlong ts_sec;\n\tlong ts_nsec;\n};\n\n#endif\n"
  },
  {
    "path": "generic/include/uapi/virtio_mmio.h",
    "chars": 2071,
    "preview": "#ifndef __LIBMINOS_VIRTIO_MMIO_H__\n#define __LIBMIONS_VIRTIO_MMIO_H__\n\n/*\n * for detail of the below mmio register, refe"
  },
  {
    "path": "kernel/.gitignore",
    "chars": 1198,
    "preview": "os/out/\ntools/mvm/mvm\ntags\ncscope.in.out\ncscope.out\ncscope.po.out\nlinkmap.txt\ninclude/config/config.h\n.*\n*.o\n*.o.*\n*.a\n*"
  },
  {
    "path": "kernel/Kconfig",
    "chars": 222,
    "preview": "# Kconfig - main configuration options for Minos\n#\n# Copyright (c) 2019 Min Le <lemin9538@gmail.com>\n#\n#\nmainmenu \"Minos"
  },
  {
    "path": "kernel/LICENSE",
    "chars": 18078,
    "preview": "\t\t    GNU GENERAL PUBLIC LICENSE\n                       Version 2, June 1991\n\n Copyright (C) 1989, 1991 Free Software Fo"
  },
  {
    "path": "kernel/Makefile",
    "chars": 11475,
    "preview": "# SPDX-License-Identifier: GPL-2.0\nVERSION = 0\nPATCHLEVEL = 0\nSUBLEVEL = 1\nEXTRAVERSION =\nNAME = unstable\n\nPHONY := _all"
  },
  {
    "path": "kernel/VERSION",
    "chars": 62,
    "preview": "MAJOR_VERSION=0\nMINOR_VERSION=0\nEXTRA_VERSION=1\n\nKnown issue:\n"
  },
  {
    "path": "kernel/apps/Kconfig",
    "chars": 162,
    "preview": "menu \"Application Config\"\n\nconfig SHELL\n\tbool \"Shell support\"\n\tdefault n\n\thelp\n\t  \"hell support using ESH from Chris Pav"
  },
  {
    "path": "kernel/apps/Makefile",
    "chars": 46,
    "preview": "obj-$(CONFIG_SHELL)\t+= esh/\nobj-y\t\t\t+= init.o\n"
  },
  {
    "path": "kernel/apps/esh/COPYING",
    "chars": 18092,
    "preview": "                    GNU GENERAL PUBLIC LICENSE\n                       Version 2, June 1991\n\n Copyright (C) 1989, 1991 Fr"
  },
  {
    "path": "kernel/apps/esh/Kconfig",
    "chars": 116,
    "preview": "if SHELL\n\nmenu \"Shell config\"\n\nconfig SHELL_TASK_PRIO\n\tint \"The priority of shell task\"\n\tdefault 63\n\nendmenu\n\nendif\n"
  },
  {
    "path": "kernel/apps/esh/Makefile",
    "chars": 64,
    "preview": "obj-$(CONFIG_SHELL)\t+= shell.o esh.o esh_hist.o esh_argparser.o\n"
  },
  {
    "path": "kernel/apps/esh/README.md",
    "chars": 1755,
    "preview": "esh - embedded shell\n====================\n\nesh is a lightweight command shell for embedded applications in C or Rust,\nsm"
  },
  {
    "path": "kernel/apps/esh/esh.c",
    "chars": 15497,
    "preview": "/*\n * esh - embedded shell\n * Copyright (C) 2017 Chris Pavlina\n *\n * This program is free software; you can redistribute"
  },
  {
    "path": "kernel/apps/esh/esh.h",
    "chars": 9703,
    "preview": "/**\n * esh - embedded shell\n * ====================\n *\n * **************************************************************"
  },
  {
    "path": "kernel/apps/esh/esh_argparser.c",
    "chars": 2643,
    "preview": "/*\n * esh - embedded shell\n * Copyright (C) 2017 Chris Pavlina\n *\n * This program is free software; you can redistribute"
  },
  {
    "path": "kernel/apps/esh/esh_argparser.h",
    "chars": 1922,
    "preview": "/*\n * esh - embedded shell\n * Copyright (C) 2017 Chris Pavlina\n *\n * This program is free software; you can redistribute"
  },
  {
    "path": "kernel/apps/esh/esh_config.h",
    "chars": 188,
    "preview": "#define ESH_PROMPT \"minos # \"\n#define ESH_BUFFER_LEN 200\n#define ESH_ARGC_MAX 10\n\n#define ESH_HIST_ALLOC STATIC\n#define "
  },
  {
    "path": "kernel/apps/esh/esh_hist.c",
    "chars": 6077,
    "preview": "/*\n * esh - embedded shell\n * Copyright (C) 2017 Chris Pavlina\n *\n * This program is free software; you can redistribute"
  },
  {
    "path": "kernel/apps/esh/esh_hist.h",
    "chars": 3628,
    "preview": "/*\n * esh - embedded shell\n * Copyright (C) 2017 Chris Pavlina\n *\n * This program is free software; you can redistribute"
  },
  {
    "path": "kernel/apps/esh/esh_incl_config.h",
    "chars": 998,
    "preview": "/*\n * esh - embedded shell\n * Copyright (C) 2017 Chris Pavlina\n *\n * This program is free software; you can redistribute"
  },
  {
    "path": "kernel/apps/esh/esh_internal.h",
    "chars": 4905,
    "preview": "/*\n * esh - embedded shell\n * Copyright (C) 2017 Chris Pavlina\n *\n * This program is free software; you can redistribute"
  },
  {
    "path": "kernel/apps/esh/shell.c",
    "chars": 2650,
    "preview": "/*\n * Copyright (C) 2020 Min Le (lemin9538@gmail.com)\n *\n * This program is free software; you can redistribute it and/o"
  },
  {
    "path": "kernel/apps/init.c",
    "chars": 1702,
    "preview": "/*\n * Copyright (C) 2018 Min Le (lemin9538@gmail.com)\n *\n * This program is free software; you can redistribute it and/o"
  },
  {
    "path": "kernel/arch/aarch64/Kconfig",
    "chars": 356,
    "preview": "config ARCH_AARCH64\n\tdef_bool y\n\tselect DEVICE_TREE\n\tselect 64BIT\n\thelp\n\t  AARCH64 Minos support\n\nconfig 64BIT\n\tdef_bool"
  },
  {
    "path": "kernel/arch/aarch64/Makefile",
    "chars": 1585,
    "preview": "#\n# arch/arm64/Makefile\n#\n# This file is included by the global makefile so that you can add your own\n# architecture-spe"
  },
  {
    "path": "kernel/arch/aarch64/core/Kconfig",
    "chars": 825,
    "preview": "menu \"Minos aarch64 Arch Feature\"\n\nconfig NR_CPUS_CLUSTER0\n\tint \"cpu number in cluster0\"\n\tdefault 4\n\thelp\n\t  cpu count i"
  },
  {
    "path": "kernel/arch/aarch64/core/Makefile",
    "chars": 269,
    "preview": "obj-y += aarch64_IRQ.o\nobj-y += aarch64.o\nobj-y += aarch64_sync.o\nobj-y += arch.o\nobj-y += arm_arch_timer.o\nobj-y += boo"
  },
  {
    "path": "kernel/arch/aarch64/core/aarch64.S",
    "chars": 1843,
    "preview": "/*\n * Copyright (C) 2018 Min Le (lemin9538@gmail.com)\n *\n * This program is free software; you can redistribute it and/o"
  },
  {
    "path": "kernel/arch/aarch64/core/aarch64_IRQ.c",
    "chars": 914,
    "preview": "/*\n * Copyright (C) 2018 Min Le (lemin9538@gmail.com)\n *\n * This program is free software; you can redistribute it and/o"
  },
  {
    "path": "kernel/arch/aarch64/core/aarch64_sync.c",
    "chars": 7469,
    "preview": "/*\n * Copyright (C) 2018 Min Le (lemin9538@gmail.com)\n *\n * This program is free software; you can redistribute it and/o"
  },
  {
    "path": "kernel/arch/aarch64/core/arch.c",
    "chars": 9967,
    "preview": "/*\n * Copyright (C) 2018 Min Le (lemin9538@gmail.com)\n *\n * This program is free software; you can redistribute it and/o"
  },
  {
    "path": "kernel/arch/aarch64/core/arm_arch_timer.c",
    "chars": 4530,
    "preview": "/*\n * Copyright (C) 2018 Min Le (lemin9538@gmail.com)\n *\n * This program is free software; you can redistribute it and/o"
  },
  {
    "path": "kernel/arch/aarch64/core/asm-offset.c",
    "chars": 1327,
    "preview": "/*\n * Copyright (C) 2019 Min Le (lemin9538@gmail.com)\n *\n * This program is free software; you can redistribute it and/o"
  },
  {
    "path": "kernel/arch/aarch64/core/boot.S",
    "chars": 8009,
    "preview": "/*\n * Copyright (C) 2018 Min Le (lemin9538@gmail.com)\n *\n * This program is free software; you can redistribute it and/o"
  },
  {
    "path": "kernel/arch/aarch64/core/cache.S",
    "chars": 5897,
    "preview": "/*\n * Copyright (C) 2001 Deep Blue Solutions Ltd.\n * Copyright (C) 2012 ARM Ltd.\n * Copyright (C) 1996-2000 Russell King"
  },
  {
    "path": "kernel/arch/aarch64/core/cpu.c",
    "chars": 2612,
    "preview": "/*\n * Copyright (C) 2018 Min Le (lemin9538@gmail.com)\n *\n * This program is free software; you can redistribute it and/o"
  },
  {
    "path": "kernel/arch/aarch64/core/cpu_feature.c",
    "chars": 1686,
    "preview": "/*\n * Copyright (C) 2020 Min Le (lemin9538@gmail.com)\n *\n * This program is free software; you can redistribute it and/o"
  },
  {
    "path": "kernel/arch/aarch64/core/entry.S",
    "chars": 1921,
    "preview": "/*\n * Copyright (C) 2004-2017 ARM Ltd. All rights reserved.\n * Copyright (C) 2018 Min Le (lemin9538@gmail.com)\n *\n * Thi"
  },
  {
    "path": "kernel/arch/aarch64/core/fpsimd.c",
    "chars": 3051,
    "preview": "/*\n * Copyright (C) 2020 Min Le (lemin9538@gmail.com)\n *\n * This program is free software; you can redistribute it and/o"
  },
  {
    "path": "kernel/arch/aarch64/core/mem_map.S",
    "chars": 7568,
    "preview": "/*\n * Copyright (C) 2018 Min Le (lemin9538@gmail.com)\n *\n * This program is free software; you can redistribute it and/o"
  },
  {
    "path": "kernel/arch/aarch64/core/stage1.c",
    "chars": 14731,
    "preview": "/*\n * Copyright (C) 2020 Min Le (lemin9538@gmail.com)\n *\n * This program is free software; you can redistribute it and/o"
  },
  {
    "path": "kernel/arch/aarch64/core/stage1.h",
    "chars": 3005,
    "preview": "#ifndef __MINOS_ARM64_STAGE1_H__\n#define __MINOS_ARM64_STAGE1_H__\n\n#include <minos/const.h>\n\n/*\n * stage 1 VMSAv8-64 Tab"
  },
  {
    "path": "kernel/arch/aarch64/core/vector.S",
    "chars": 5594,
    "preview": "/*\n * Copyright (C) 2018 Min Le (lemin9538@gmail.com)\n *\n * This program is free software; you can redistribute it and/o"
  },
  {
    "path": "kernel/arch/aarch64/include/asm/aarch64_common.h",
    "chars": 13124,
    "preview": "#ifndef _MINOS_AARCH64_COMMON_H_\n#define _MINOS_AARCH64_COMMON_H_\n\n#include <minos/const.h>\n\n#define ESR_ELx_EC_UNKNOWN\t"
  },
  {
    "path": "kernel/arch/aarch64/include/asm/aarch64_el1_reg.h",
    "chars": 2174,
    "preview": "/*\n * Copyright (C) 2020 Min Le (lemin9538@gmail.com)\n *\n * This program is free software; you can redistribute it and/o"
  },
  {
    "path": "kernel/arch/aarch64/include/asm/aarch64_el2_reg.h",
    "chars": 3392,
    "preview": "/*\n * Copyright (C) 2020 Min Le (lemin9538@gmail.com)\n *\n * This program is free software; you can redistribute it and/o"
  },
  {
    "path": "kernel/arch/aarch64/include/asm/aarch64_el2_vhe_reg.h",
    "chars": 4064,
    "preview": "/*\n * Copyright (C) 2020 Min Le (lemin9538@gmail.com)\n *\n * This program is free software; you can redistribute it and/o"
  },
  {
    "path": "kernel/arch/aarch64/include/asm/aarch64_helper.h",
    "chars": 10861,
    "preview": "/*\n * Copyright (c) 2013-2017, ARM Limited and Contributors. All rights reserved.\n *\n * SPDX-License-Identifier: BSD-3-C"
  },
  {
    "path": "kernel/arch/aarch64/include/asm/aarch64_reg.h",
    "chars": 885,
    "preview": "/*\n * Copyright (C) 2020 Min Le (lemin9538@gmail.com)\n *\n * This program is free software; you can redistribute it and/o"
  },
  {
    "path": "kernel/arch/aarch64/include/asm/arch.h",
    "chars": 4031,
    "preview": "#ifndef _MINOS_ARCH_AARCH64_H_\n#define _MINOS_ARCH_AARCH64_H_\n\n#include <asm/tcb.h>\n#include <asm/aarch64_helper.h>\n#inc"
  },
  {
    "path": "kernel/arch/aarch64/include/asm/asm_current.h",
    "chars": 1523,
    "preview": "#ifndef __MINOS_ASM_CURRENT_H__\n#define __MINOS_ASM_CURRENT_H__\n\n#include <config/config.h>\n#include <minos/compiler.h>\n"
  },
  {
    "path": "kernel/arch/aarch64/include/asm/asm_marco.S",
    "chars": 845,
    "preview": "#ifndef _MINOS_ASM_MARCO_H_\n#define _MINOS_ASM_MARCO_H_\n\n#include <config/config.h>\n\n// current kernel and user space al"
  },
  {
    "path": "kernel/arch/aarch64/include/asm/asm_types.h",
    "chars": 947,
    "preview": "#ifndef _MINOS_AARCH64_TYPES_H_\n#define _MINOS_AARCH64_TYPES_H_\n\n#include <config/config.h>\n\ntypedef unsigned long\t\t__u6"
  },
  {
    "path": "kernel/arch/aarch64/include/asm/atomic.h",
    "chars": 7499,
    "preview": "#ifndef __ASM_ATOMIC_H__\n#define __ASM_ATOMIC_H__\n\n#include <asm/aarch64_common.h>\n#include <minos/types.h>\n#include <as"
  },
  {
    "path": "kernel/arch/aarch64/include/asm/barrier.h",
    "chars": 554,
    "preview": "#ifndef __MINOS_ASM_BARRIER_H__\n#define __MINOS_ASM_BARRIER_H__\n\n#define __isb()\t\tasm volatile(\"isb\" : : : \"memory\")\n#de"
  },
  {
    "path": "kernel/arch/aarch64/include/asm/bitops.h",
    "chars": 1926,
    "preview": "#ifndef _ASM_GENERIC_BITOPS_H_\n#define _ASM_GENERIC_BITOPS_H_\n\n#include <minos/types.h>\n\n/**\n * __ffs - find first bit i"
  },
  {
    "path": "kernel/arch/aarch64/include/asm/cache.h",
    "chars": 451,
    "preview": "#ifndef __MINOS_AARCH64_CACHE_H__\n#define __MINOS_AARCH64_CACHE_H__\n\nvoid flush_dcache_range(unsigned long addr, size_t "
  },
  {
    "path": "kernel/arch/aarch64/include/asm/cmpxchg.h",
    "chars": 8171,
    "preview": "/*\n * Based on arch/arm/include/asm/cmpxchg.h\n *\n * Copyright (C) 2012 ARM Ltd.\n *\n * This program is free software; you"
  },
  {
    "path": "kernel/arch/aarch64/include/asm/cpu_feature.h",
    "chars": 165,
    "preview": "#ifndef __MINOS_CPU_FEATURE_H__\n#define __MINOS_CPU_FEATURE_H__\n\n#define ARM_FEATURE_MPIDR_SHIFT\t0\n\nint cpu_has_feature("
  },
  {
    "path": "kernel/arch/aarch64/include/asm/div64.h",
    "chars": 1343,
    "preview": "#ifndef _ASM_GENERIC_DIV64_H\n#define _ASM_GENERIC_DIV64_H\n/*\n * Copyright (C) 2003 Bernardo Innocenti <bernie@develer.co"
  },
  {
    "path": "kernel/arch/aarch64/include/asm/gic_reg.h",
    "chars": 3046,
    "preview": "#ifndef _MINOS_GIC_REG_H_\n#define _MINOS_GIC_REG_H_\n\n/*\n * Mapping of MSR and MRS to physical and virtual CPU interface "
  },
  {
    "path": "kernel/arch/aarch64/include/asm/io.h",
    "chars": 3837,
    "preview": "/*\n * Based on arch/arm/include/asm/io.h\n *\n * Copyright (C) 1996-2000 Russell King\n * Copyright (C) 2012 ARM Ltd.\n *\n *"
  },
  {
    "path": "kernel/arch/aarch64/include/asm/power.h",
    "chars": 524,
    "preview": "#ifndef __MINOS_CPU_H__\n#define __MINOS_CPU_H__\n\n#include <asm/psci.h>\n\nint psci_cpu_on(unsigned long cpu, unsigned long"
  },
  {
    "path": "kernel/arch/aarch64/include/asm/psci.h",
    "chars": 3711,
    "preview": "/*\n * ARM Power State and Coordination Interface (PSCI) header\n *\n * This header holds common PSCI defines and macros sh"
  },
  {
    "path": "kernel/arch/aarch64/include/asm/reg.h",
    "chars": 23181,
    "preview": "#ifndef _MINOS_PROCESSER_H_\n#define _MINOS_PROCESSER_H_\n\n#include <minos/types.h>\n\n/* ESR.EC == ESR_CP{15,14,10}_32 */\n#"
  },
  {
    "path": "kernel/arch/aarch64/include/asm/svccc.h",
    "chars": 2951,
    "preview": "#ifndef _MINOS_ASM_SVCCC_H_\n#define _MINOS_ASM_SVCCC_H_\n\n#include <asm/arch.h>\n\n/*\n * ARM_DEN0028B_SMC_Calling_Conventio"
  },
  {
    "path": "kernel/arch/aarch64/include/asm/syscall.h",
    "chars": 716,
    "preview": "#ifndef __ASM_SYSCALL_H__\n#define __ASM_SYSCALL_H__\n\n#define __NR_kobject_create 0\n#define __NR_kobject_open 1\n#define _"
  },
  {
    "path": "kernel/arch/aarch64/include/asm/tcb.h",
    "chars": 993,
    "preview": "#ifndef __ASM_TCB_H__\n#define __ASM_TCB_H__\n\n#include <minos/types.h>\n\nstruct aarch64_regs {\n\tuint64_t pc;\t\t// elr_el2\n\t"
  },
  {
    "path": "kernel/arch/aarch64/include/asm/time.h",
    "chars": 290,
    "preview": "#ifndef _MINOS_ASM_TIME_H_\n#define _MINOS_ASM_TIME_H_\n\n#include <minos/types.h>\n\nextern uint64_t boot_tick;\nextern uint3"
  },
  {
    "path": "kernel/arch/aarch64/include/asm/tlb.h",
    "chars": 2543,
    "preview": "#ifndef __MINOS_ASM_TLB_H__\n#define __MINOS_ASM_TLB_H__\n\n#include <minos/mm.h>\n\nstatic inline void flush_tlb_asid_all(ui"
  },
  {
    "path": "kernel/arch/aarch64/include/asm/trap.h",
    "chars": 5629,
    "preview": "#ifndef _MINOS_EXCEPTION_H_\n#define _MINOS_EXCEPTION_H_\n\n#include <config/config.h>\n#include <asm/arch.h>\n\ntypedef int ("
  },
  {
    "path": "kernel/arch/aarch64/include/asm/uaccess.h",
    "chars": 1009,
    "preview": "#ifndef __ASM_UACCESS_H__\n#define __ASM_UACCESS_H__\n\n#include <asm/asm_types.h>\n#include <minos/compiler.h>\n\nstatic inli"
  },
  {
    "path": "kernel/arch/aarch64/include/asm/virt.h",
    "chars": 869,
    "preview": "#ifndef __MINOS_AARCH64_VIRT_H__\n#define __MINOS_AARCH64_VIRT_H__\n\n#include <asm/tcb.h>\n\nstruct vcpu;\n\nstruct arm_virt_d"
  },
  {
    "path": "kernel/arch/aarch64/include/asm/vtcb.h",
    "chars": 3006,
    "preview": "#ifndef __ASM_VTCB_H__\n#define __ASM_VTCB_H__\n\n/*\n * 0 is reserved as an invalid value.\n * Order should be kept in sync "
  },
  {
    "path": "kernel/arch/aarch64/lds/Makefile",
    "chars": 19,
    "preview": "obj-y\t+= minos.lds\n"
  },
  {
    "path": "kernel/arch/aarch64/lds/minos.lds.S",
    "chars": 3343,
    "preview": "#include <config/config.h>\n\nENTRY(_start)\nSECTIONS\n{\n\t.vectors CONFIG_MINOS_ENTRY_ADDRESS + CONFIG_PTOV_MASK:\n\t{\n\t\t/*\n\t\t"
  },
  {
    "path": "kernel/arch/aarch64/lib/Makefile",
    "chars": 301,
    "preview": "# obj-y += atomic.o\nobj-y += bitops.o\nobj-y += memchr.o\nobj-y += memcmp.o\nobj-y += memcpy.o\nobj-y += memmove.o\nobj-y += "
  },
  {
    "path": "kernel/arch/aarch64/lib/atomic.S",
    "chars": 2042,
    "preview": "/*\n * Copyright (C) 2018 Min Le (lemin9538@gmail.com)\n *\n * This program is free software; you can redistribute it and/o"
  },
  {
    "path": "kernel/arch/aarch64/lib/bitops.S",
    "chars": 2103,
    "preview": "/*\n * Based on linux/arch/arm64/lib/bitops.h which in turn is\n * Based on arch/arm/lib/bitops.h\n *\n * Copyright (C) 2013"
  },
  {
    "path": "kernel/arch/aarch64/lib/memchr.S",
    "chars": 1058,
    "preview": "/*\n * Based on arch/arm/lib/memchr.S\n *\n * Copyright (C) 1995-2000 Russell King\n * Copyright (C) 2013 ARM Ltd.\n *\n * Thi"
  },
  {
    "path": "kernel/arch/aarch64/lib/memcmp.S",
    "chars": 6684,
    "preview": "/*\n * Copyright (C) 2013 ARM Ltd.\n * Copyright (C) 2013 Linaro.\n *\n * This code is based on glibc cortex strings work or"
  },
  {
    "path": "kernel/arch/aarch64/lib/memcpy.S",
    "chars": 5082,
    "preview": "/*\n * Copyright (C) 2013 ARM Ltd.\n * Copyright (C) 2013 Linaro.\n *\n * This code is based on glibc cortex strings work or"
  },
  {
    "path": "kernel/arch/aarch64/lib/memmove.S",
    "chars": 4314,
    "preview": "/*\n * Copyright (C) 2013 ARM Ltd.\n * Copyright (C) 2013 Linaro.\n *\n * This code is based on glibc cortex strings work or"
  },
  {
    "path": "kernel/arch/aarch64/lib/memset.S",
    "chars": 1203,
    "preview": "/*\n * Copyright (C) 2013 ARM Ltd.\n *\n * This program is free software; you can redistribute it and/or modify\n * it under"
  },
  {
    "path": "kernel/arch/aarch64/lib/spinlock.S",
    "chars": 930,
    "preview": "/*\n * Copyright (C) 2018 Min Le (lemin9538@gmail.com)\n *\n * This program is free software; you can redistribute it and/o"
  },
  {
    "path": "kernel/arch/aarch64/lib/strchr.S",
    "chars": 1075,
    "preview": "/*\n * Based on arch/arm/lib/strchr.S\n *\n * Copyright (C) 1995-2000 Russell King\n * Copyright (C) 2013 ARM Ltd.\n *\n * Thi"
  },
  {
    "path": "kernel/arch/aarch64/lib/strcmp.S",
    "chars": 5960,
    "preview": "/*\n * Copyright (C) 2013 ARM Ltd.\n * Copyright (C) 2013 Linaro.\n *\n * This code is based on glibc cortex strings work or"
  },
  {
    "path": "kernel/arch/aarch64/lib/strcpy.S",
    "chars": 3642,
    "preview": "/*\n * Copyright (C) 2013 ARM Ltd.\n * Copyright (C) 2013 Linaro.\n * Copyright (C) 2014 The Android Open Source Project\n *"
  },
  {
    "path": "kernel/arch/aarch64/lib/strlen.S",
    "chars": 3230,
    "preview": "/*\n * Copyright (C) 2013 ARM Ltd.\n * Copyright (C) 2013 Linaro.\n *\n * This code is based on glibc cortex strings work or"
  },
  {
    "path": "kernel/arch/aarch64/lib/strncmp.S",
    "chars": 8449,
    "preview": "/*\n * Copyright (C) 2013 ARM Ltd.\n * Copyright (C) 2013 Linaro.\n *\n * This code is based on glibc cortex strings work or"
  },
  {
    "path": "kernel/arch/aarch64/lib/strnlen.S",
    "chars": 4481,
    "preview": "/*\n * Copyright (C) 2013 ARM Ltd.\n * Copyright (C) 2013 Linaro.\n *\n * This code is based on glibc cortex strings work or"
  },
  {
    "path": "kernel/arch/aarch64/lib/strrchr.S",
    "chars": 1064,
    "preview": "/*\n * Based on arch/arm/lib/strrchr.S\n *\n * Copyright (C) 1995-2000 Russell King\n * Copyright (C) 2013 ARM Ltd.\n *\n * Th"
  },
  {
    "path": "kernel/arch/aarch64/lib/ticket_lock.S",
    "chars": 1459,
    "preview": "/*\n * Copyright (C) 2018 Min Le (lemin9538@gmail.com)\n *\n * This program is free software; you can redistribute it and/o"
  },
  {
    "path": "kernel/arch/aarch64/userspace/Makefile",
    "chars": 23,
    "preview": "obj-y += asm_syscall.o\n"
  },
  {
    "path": "kernel/arch/aarch64/userspace/asm_syscall.c",
    "chars": 5230,
    "preview": "/*\n * Copyright (C) 2020 Min Le (lemin9538@gmail.com)\n *\n * This program is free software; you can redistribute it and/o"
  },
  {
    "path": "kernel/arch/aarch64/virt/Kconfig",
    "chars": 178,
    "preview": "menu \"Minos aarch64 virtualaztion features\"\n\nconfig ARM_VHE\n\tbool \"enable VHE feature for minos\"\n\tdepends on VIRT\n\tdefau"
  },
  {
    "path": "kernel/arch/aarch64/virt/Makefile",
    "chars": 151,
    "preview": "obj-y\t+= arch_virt.o\nobj-y\t+= smc_service.o \nobj-y\t+= svc_service.o\nobj-y\t+= trap.o\nobj-y\t+= vmsa.o\nobj-y\t+= vtimer.o\nob"
  },
  {
    "path": "kernel/arch/aarch64/virt/arch_virt.c",
    "chars": 11501,
    "preview": "/*\n * Copyright (C) 2019 Min Le (lemin9538@gmail.com)\n *\n * This program is free software; you can redistribute it and/o"
  },
  {
    "path": "kernel/arch/aarch64/virt/smc_service.c",
    "chars": 2797,
    "preview": "/*\n * Copyright (C) 2018 Min Le (lemin9538@gmail.com)\n *\n * This program is free software; you can redistribute it and/o"
  },
  {
    "path": "kernel/arch/aarch64/virt/stage2.c",
    "chars": 11308,
    "preview": "/*\n * Copyright (C) 2020 Min Le (lemin9538@gmail.com)\n *\n * This program is free software; you can redistribute it and/o"
  },
  {
    "path": "kernel/arch/aarch64/virt/stage2.h",
    "chars": 5083,
    "preview": "#ifndef __MINOS_ARM64_STAGE2_H__\n#define __MINOS_ARM64_STAGE2_H__\n\n#include <minos/types.h>\n\n/*\n * Stage 2 VMSAv8-64 Tab"
  },
  {
    "path": "kernel/arch/aarch64/virt/svc_service.c",
    "chars": 2336,
    "preview": "/*\n * Copyright (C) 2018 Min Le (lemin9538@gmail.com)\n *\n * This program is free software; you can redistribute it and/o"
  },
  {
    "path": "kernel/arch/aarch64/virt/trap.c",
    "chars": 12124,
    "preview": "/*\n * Copyright (C) 2018 Min Le (lemin9538@gmail.com)\n *\n * This program is free software; you can redistribute it and/o"
  },
  {
    "path": "kernel/arch/aarch64/virt/vfp.c",
    "chars": 3910,
    "preview": "/*\n * Copyright (C) 2018 Min Le (lemin9538@gmail.com)\n *\n * This program is free software; you can redistribute it and/o"
  },
  {
    "path": "kernel/arch/aarch64/virt/vmsa.c",
    "chars": 1628,
    "preview": "/*\n * Copyright (C) 2018 Min Le (lemin9538@gmail.com)\n *\n * This program is free software; you can redistribute it and/o"
  },
  {
    "path": "kernel/arch/aarch64/virt/vtimer.c",
    "chars": 8803,
    "preview": "/*\n * Copyright (C) 2018 Min Le (lemin9538@gmail.com)\n *\n * This program is free software; you can redistribute it and/o"
  },
  {
    "path": "kernel/configs/espressobin_defconfig",
    "chars": 2439,
    "preview": "CONFIG_ARCH_AARCH64=y\nCONFIG_64BIT=y\n\n#\n# Minos aarch64 Arch Feature\n#\nCONFIG_NR_CPUS_CLUSTER0=2\nCONFIG_NR_CPUS_CLUSTER1"
  },
  {
    "path": "kernel/configs/fvp_a76_defconfig",
    "chars": 2605,
    "preview": "CONFIG_ARCH_AARCH64=y\nCONFIG_64BIT=y\n\n#\n# Minos aarch64 Arch Feature\n#\nCONFIG_NR_CPUS_CLUSTER0=2\nCONFIG_NR_CPUS_CLUSTER1"
  },
  {
    "path": "kernel/configs/fvp_defconfig",
    "chars": 2583,
    "preview": "CONFIG_ARCH_AARCH64=y\nCONFIG_64BIT=y\n\n#\n# Minos aarch64 Arch Feature\n#\nCONFIG_NR_CPUS_CLUSTER0=4\nCONFIG_NR_CPUS_CLUSTER1"
  },
  {
    "path": "kernel/configs/fvp_rtos_defconfig",
    "chars": 728,
    "preview": "CONFIG_ARCH_AARCH64=y\nCONFIG_DEVICE_TREE=y\nCONFIG_PLATFORM_FVP=y\nCONFIG_SERIAL_PL011=y\nCONFIG_IRQCHIP_GICV3=y\nCONFIG_IRQ"
  },
  {
    "path": "kernel/configs/kvim3_defconfig",
    "chars": 2630,
    "preview": "CONFIG_ARCH_AARCH64=y\nCONFIG_64BIT=y\n\n#\n# Minos aarch64 Arch Feature\n#\nCONFIG_NR_CPUS_CLUSTER0=2\nCONFIG_NR_CPUS_CLUSTER1"
  },
  {
    "path": "kernel/configs/qemu_arm64_defconfig",
    "chars": 2377,
    "preview": "CONFIG_ARCH_AARCH64=y\nCONFIG_64BIT=y\n\n#\n# Minos aarch64 Arch Feature\n#\nCONFIG_NR_CPUS_CLUSTER0=4\nCONFIG_NR_CPUS_CLUSTER1"
  },
  {
    "path": "kernel/configs/r8a7795_defconfig",
    "chars": 140,
    "preview": "CONFIG_NR_CPUS_CLUSTER1=4\nCONFIG_SMP=y\nCONFIG_NR_SPI_IRQS=480\nCONFIG_LOG_LEVEL_COLORFUL=y\nCONFIG_VIRT=y\nCONFIG_SOC_R8A77"
  },
  {
    "path": "kernel/configs/rpi_3_defconfig",
    "chars": 2491,
    "preview": "CONFIG_ARCH_AARCH64=y\nCONFIG_64BIT=y\n\n#\n# Minos aarch64 Arch Feature\n#\nCONFIG_NR_CPUS_CLUSTER0=4\nCONFIG_NR_CPUS_CLUSTER1"
  },
  {
    "path": "kernel/configs/rpi_4_defconfig",
    "chars": 2595,
    "preview": "CONFIG_ARCH_AARCH64=y\nCONFIG_64BIT=y\n\n#\n# Minos aarch64 Arch Feature\n#\nCONFIG_NR_CPUS_CLUSTER0=4\nCONFIG_NR_CPUS_CLUSTER1"
  },
  {
    "path": "kernel/core/Kconfig",
    "chars": 2229,
    "preview": "menu \"Minos OS configuration\"\n\nconfig MAX_CPU_NR\n\tint \"max cpu in system\"\n\tdefault 8\n\thelp\n\t  max cpu count in system\n\nc"
  },
  {
    "path": "kernel/core/Makefile",
    "chars": 566,
    "preview": "obj-y += bitmap.o\nobj-y += bootarg.o\nobj-y += kmem.o\nobj-y += calltrace.o\nobj-y += delay.o\nobj-y += event.o\nobj-y += fin"
  },
  {
    "path": "kernel/core/bitmap.c",
    "chars": 5881,
    "preview": "/*\n * lib/bitmap.c\n * Helper functions for bitmap.h.\n *\n * This program is distributed in the hope that it will be usefu"
  },
  {
    "path": "kernel/core/bootarg.c",
    "chars": 3130,
    "preview": "/*\n * Copyright (C) 2020 Min Le (lemin9538@gmail.com)\n *\n * This program is free software; you can redistribute it and/o"
  },
  {
    "path": "kernel/core/calltrace.c",
    "chars": 3465,
    "preview": "/*\n * Copyright (C) 2018 Min Le (lemin9538@gmail.com)\n *\n * This program is free software; you can redistribute it and/o"
  },
  {
    "path": "kernel/core/delay.c",
    "chars": 1139,
    "preview": "/*\n * Copyright (C) 2019 Min Le (lemin9538@gmail.com)\n *\n * This program is free software; you can redistribute it and/o"
  },
  {
    "path": "kernel/core/event.c",
    "chars": 4110,
    "preview": "/*\n * Copyright (C) 2019 Min Le (lemin9538@gmail.com)\n *\n * This program is free software; you can redistribute it and/o"
  },
  {
    "path": "kernel/core/find_bit.c",
    "chars": 3423,
    "preview": "/* bit search implementation\n *\n * Copyright (C) 2004 Red Hat, Inc. All Rights Reserved.\n * Written by David Howells (dh"
  },
  {
    "path": "kernel/core/flag.c",
    "chars": 6395,
    "preview": "/*\n * Copyright (C) 2019 Min Le (lemin9538@gmail.com)\n *\n * This program is free software; you can redistribute it and/o"
  },
  {
    "path": "kernel/core/hook.c",
    "chars": 1471,
    "preview": "/*\n * Copyright (C) 2019 Min Le (lemin9538@gmail.com)\n *\n * This program is free software; you can redistribute it and/o"
  },
  {
    "path": "kernel/core/host_vspace.c",
    "chars": 3282,
    "preview": "/*\n * Copyright (C) 2018 Min Le (lemin9538@gmail.com)\n *\n * This program is free software; you can redistribute it and/o"
  },
  {
    "path": "kernel/core/hweight.c",
    "chars": 2360,
    "preview": "/*\n * This program is free software; you can redistribute it and/or modify\n * it under the terms of the GNU General Publ"
  },
  {
    "path": "kernel/core/idle.c",
    "chars": 3414,
    "preview": "/*\n * Copyright (C) 2018 Min Le (lemin9538@gmail.com)\n *\n * This program is free software; you can redistribute it and/o"
  },
  {
    "path": "kernel/core/init.c",
    "chars": 2969,
    "preview": "/*\n * Copyright (C) 2018 Min Le (lemin9538@gmail.com)\n *\n * This program is free software; you can redistribute it and/o"
  },
  {
    "path": "kernel/core/iomem.c",
    "chars": 2243,
    "preview": "/*\n * Copyright (C) 2021 Min Le (lemin9538@gmail.com)\n *\n * This program is free software; you can redistribute it and/o"
  },
  {
    "path": "kernel/core/irq.c",
    "chars": 7488,
    "preview": "/*\n * Copyright (C) 2018 Min Le (lemin9538@gmail.com)\n *\n * This program is free software; you can redistribute it and/o"
  },
  {
    "path": "kernel/core/kmem.c",
    "chars": 3174,
    "preview": "/*\n * Copyright (C) 2018 Min Le (lemin9538@gmail.com)\n *\n * This program is free software; you can redistribute it and/o"
  },
  {
    "path": "kernel/core/mbox.c",
    "chars": 2214,
    "preview": "/*\n * Copyright (C) 2019 Min Le (lemin9538@gmail.com)\n *\n * This program is free software; you can redistribute it and/o"
  },
  {
    "path": "kernel/core/mem.c",
    "chars": 7695,
    "preview": "/*\n * Copyright (C) 2019 Min Le (lemin9538@gmail.com)\n *\n * This program is free software; you can redistribute it and/o"
  },
  {
    "path": "kernel/core/minos.c",
    "chars": 2520,
    "preview": "/*\n * Copyright (C) 2018 Min Le (lemin9538@gmail.com)\n *\n * This program is free software; you can redistribute it and/o"
  },
  {
    "path": "kernel/core/mutex.c",
    "chars": 2035,
    "preview": "/*\n * Copyright (C) 2019 Min Le (lemin9538@gmail.com)\n *\n * This program is free software; you can redistribute it and/o"
  },
  {
    "path": "kernel/core/page.c",
    "chars": 13059,
    "preview": "/*\n * Copyright (C) 2020 Min Le (lemin9538@gmail.com)\n *\n * This program is free software; you can redistribute it and/o"
  },
  {
    "path": "kernel/core/percpu.c",
    "chars": 1748,
    "preview": "/*\n * Copyright (C) 2018 Min Le (lemin9538@gmail.com)\n *\n * This program is free software; you can redistribute it and/o"
  },
  {
    "path": "kernel/core/print.c",
    "chars": 3466,
    "preview": "/*\n * Copyright (C) 2018 Min Le (lemin9538@gmail.com)\n *\n * This program is free software; you can redistribute it and/o"
  },
  {
    "path": "kernel/core/queue.c",
    "chars": 3569,
    "preview": "/*\n * Copyright (C) 2019 Min Le (lemin9538@gmail.com)\n *\n * This program is free software; you can redistribute it and/o"
  },
  {
    "path": "kernel/core/ramdisk.c",
    "chars": 3176,
    "preview": "/*\n * Copyright (C) 2018 Min Le (lemin9538@gmail.com)\n *\n * This program is free software; you can redistribute it and/o"
  },
  {
    "path": "kernel/core/sched.c",
    "chars": 14594,
    "preview": "/*\n * Copyright (C) 2018 Min Le (lemin9538@gmail.com)\n *\n * This program is free software; you can redistribute it and/o"
  },
  {
    "path": "kernel/core/sem.c",
    "chars": 2105,
    "preview": "/*\n * Copyright (C) 2019 Min Le (lemin9538@gmail.com)\n *\n * This program is free software; you can redistribute it and/o"
  },
  {
    "path": "kernel/core/slab.c",
    "chars": 5228,
    "preview": "/*\n * Copyright (C) 2018 Min Le (lemin9538@gmail.com)\n *\n * This program is free software; you can redistribute it and/o"
  },
  {
    "path": "kernel/core/smp.c",
    "chars": 4197,
    "preview": "/*\n * Copyright (C) 2018 Min Le (lemin9538@gmail.com)\n *\n * This program is free software; you can redistribute it and/o"
  },
  {
    "path": "kernel/core/stdlib.c",
    "chars": 1702,
    "preview": "/*\n * Copyright (c) 2003-2004 Fabrice Bellard\n * Copyright (c) 2006 Intel Corporation\n * Copyright (c) 2007 Keir Fraser,"
  },
  {
    "path": "kernel/core/string.c",
    "chars": 8556,
    "preview": "/*\n * Copyright (C) 2018 Min Le (lemin9538@gmail.com)\n *\n * This program is free software; you can redistribute it and/o"
  },
  {
    "path": "kernel/core/task.c",
    "chars": 8626,
    "preview": "/*\n * Copyright (C) 2019 Min Le (lemin9538@gmail.com)\n *\n * This program is free software; you can redistribute it and/o"
  },
  {
    "path": "kernel/core/timer.c",
    "chars": 6225,
    "preview": "/*\n *\n *  Copyright (C) 1991, 1992  Linus Torvalds\n *\n *  1997-01-28  Modified by Finn Arne Gangstad to make timers scal"
  },
  {
    "path": "kernel/drivers/Kconfig",
    "chars": 165,
    "preview": "menu \"Device Drivers\"\n\nsource \"drivers/irq-chips/Kconfig\"\nsource \"drivers/serial/Kconfig\"\n\nconfig DEVICE_TREE\n\tbool \"dev"
  },
  {
    "path": "kernel/drivers/Makefile",
    "chars": 157,
    "preview": "obj-$(CONFIG_SERIAL) \t\t+= serial/\nobj-y \t\t\t\t+= irq-chips/\nobj-$(CONFIG_DEVICE_TREE) \t+= of/\nobj-y \t\t\t\t+= device_id.o\nobj"
  },
  {
    "path": "kernel/drivers/console.c",
    "chars": 2956,
    "preview": "/*\n * Copyright (C) 2018 Min Le (lemin9538@gmail.com)\n *\n * This program is free software; you can redistribute it and/o"
  },
  {
    "path": "kernel/drivers/device_id.c",
    "chars": 1330,
    "preview": "/*\n * Copyright (C) 2018 - 2019 Min Le (lemin9538@gmail.com)\n *\n * This program is free software; you can redistribute i"
  },
  {
    "path": "kernel/drivers/iommu/Kconfig",
    "chars": 280,
    "preview": "# SPDX-License-Identifier: GPL-2.0\n\nif VIRT\n\nmenu \"IOMMU drivers\"\n\nconfig IOMMU\n\tdef_bool y\n\nconfig IOMMU_IPMMU\n\tbool \"i"
  },
  {
    "path": "kernel/drivers/iommu/Makefile",
    "chars": 79,
    "preview": "obj-$(CONFIG_IOMMU_IPMMU) += ipmmu.o\nobj-$(CONFIG_IOMMU_IPMMU) += ipmmu-plat.o\n"
  },
  {
    "path": "kernel/drivers/iommu/ipmmu-plat.c",
    "chars": 6454,
    "preview": "// SPDX-License-Identifier: GPL-2.0\n\n/*\n * Based on Renesas R-Car System Controller driver (rcar-sysc).\n */\n\n#include <a"
  },
  {
    "path": "kernel/drivers/iommu/ipmmu.c",
    "chars": 24833,
    "preview": "// SPDX-License-Identifier: GPL-2.0\n\n#include <asm/io.h>\n#include <minos/irq.h>\n#include <virt/vm.h>\n#include <minos/of."
  },
  {
    "path": "kernel/drivers/irq-chips/Kconfig",
    "chars": 384,
    "preview": "menu \"Interrupt Controller Driver\"\n\nconfig IRQCHIP_GICV3\n\tbool \"gicv3 driver\"\n\tdefault n\n\thelp\n\t  \"GICv3 interrupt contr"
  },
  {
    "path": "kernel/drivers/irq-chips/Makefile",
    "chars": 150,
    "preview": "obj-y\t\t\t\t+= irqchip.o\nobj-$(CONFIG_IRQCHIP_GICV3) \t+= gicv3.o\nobj-$(CONFIG_IRQCHIP_GICV2) \t+= gicv2.o\nobj-$(CONFIG_IRQCH"
  },
  {
    "path": "kernel/drivers/irq-chips/gicv2.c",
    "chars": 11225,
    "preview": "/*\n * xen/arch/arm/gic-v2.c\n *\n * Tim Deegan <tim@xen.org>\n * Copyright (c) 2011 Citrix Systems.\n *\n * Copyright (C) 201"
  },
  {
    "path": "kernel/drivers/irq-chips/gicv3.c",
    "chars": 12634,
    "preview": "/*\n * Copyright (C) 2018 Min Le (lemin9538@gmail.com)\n *\n * This program is free software; you can redistribute it and/o"
  },
  {
    "path": "kernel/drivers/irq-chips/irq-bcm2836.c",
    "chars": 9353,
    "preview": "/*\n * Copyright (C) 2018 Min Le (lemin9538@gmail.com)\n *\n * This program is free software; you can redistribute it and/o"
  },
  {
    "path": "kernel/drivers/irq-chips/irqchip.c",
    "chars": 1872,
    "preview": "/*\n * Copyright (C) 2018 Min Le (lemin9538@gmail.com)\n *\n * This program is free software; you can redistribute it and/o"
  },
  {
    "path": "kernel/drivers/of/Kconfig",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "kernel/drivers/of/Makefile",
    "chars": 31,
    "preview": "obj-y\t+= of.o\nobj-y\t+= of_mm.o\n"
  },
  {
    "path": "kernel/drivers/of/of.c",
    "chars": 24165,
    "preview": "/*\n * Copyright (C) 2018 - 2019 Min Le (lemin9538@gmail.com)\n *\n * This program is free software; you can redistribute i"
  },
  {
    "path": "kernel/drivers/of/of_mm.c",
    "chars": 5113,
    "preview": "/*\n * Copyright (C) 2018 Min Le (lemin9538@gmail.com)\n *\n * This program is free software; you can redistribute it and/o"
  },
  {
    "path": "kernel/drivers/serial/Kconfig",
    "chars": 495,
    "preview": "menu \"Serial Drivers\"\n\nconfig SERIAL\n\tdef_bool y\n\nif SERIAL\nconfig SERIAL_BCM283X_MU\n\tbool \"support bcm283x mu serial\"\n\t"
  },
  {
    "path": "kernel/drivers/serial/Makefile",
    "chars": 207,
    "preview": "obj-$(CONFIG_SERIAL_BCM283X_MU)\t\t+= serial_bcm283x_mu.o\nobj-$(CONFIG_SERIAL_MVEBU_A3700)\t+= serial_mvebu_a3700.o\nobj-$(C"
  },
  {
    "path": "kernel/drivers/serial/pl011.h",
    "chars": 1712,
    "preview": "#ifndef _MINOS_ARM_FVP_UART_H_\n#define _MINOS_ARM_FVP_UART_H_\n\n#define UARTDR\t\t0x0\n#define UARTECR\t\t0x4\n#define UARTFR\t\t"
  },
  {
    "path": "kernel/drivers/serial/serial_bcm283x_mu.c",
    "chars": 2041,
    "preview": "/*\n * copyright (c) 2018 min le (lemin9538@gmail.com)\n *\n * this program is free software; you can redistribute it and/o"
  },
  {
    "path": "kernel/drivers/serial/serial_meson.c",
    "chars": 2312,
    "preview": "/*\n * copyright (c) 2018 min le (lemin9538@gmail.com)\n *\n * this program is free software; you can redistribute it and/o"
  },
  {
    "path": "kernel/drivers/serial/serial_mvebu_a3700.c",
    "chars": 1950,
    "preview": "/*\n * Copyright (C) 2016 Stefan Roese <sr@denx.de>\n *\n * SPDX-License-Identifier:\tGPL-2.0+\n */\n\n#include <minos/minos.h>"
  },
  {
    "path": "kernel/drivers/serial/serial_pl011.c",
    "chars": 2878,
    "preview": "/*\n * copyright (c) 2018 min le (lemin9538@gmail.com)\n *\n * this program is free software; you can redistribute it and/o"
  },
  {
    "path": "kernel/drivers/serial/serial_scif.c",
    "chars": 1522,
    "preview": "// SPDX-License-Identifier: GPL-2.0\n\n#include <asm/io.h>\n#include <minos/console.h>\n\n/* Register offsets */\n#define SCIF"
  },
  {
    "path": "kernel/drivers/tty.c",
    "chars": 2123,
    "preview": "/*\n * Copyright (C) 2020 Min Le (lemin9538@gmail.com)\n *\n * This program is free software; you can redistribute it and/o"
  },
  {
    "path": "kernel/dtbs/Makefile",
    "chars": 306,
    "preview": "obj-y += foundation-v8-gicv2.dtb\nobj-y += foundation-v8-gicv3.dtb\nobj-y += bcm2837-rpi-3-b-plus.dtb\nobj-y += armada-3720"
  },
  {
    "path": "kernel/dtbs/armada-3720-community-v5.dts",
    "chars": 1903,
    "preview": "/dts-v1/;\n\n/ {\n\tmodel = \"Marvell Armada 3720 Community Board\";\n\tcompatible = \"marvell,armada-3720-community\", \"marvell,a"
  },
  {
    "path": "kernel/dtbs/bcm2837-rpi-3-b-plus.dts",
    "chars": 2341,
    "preview": "/dts-v1/;\n\n/ {\n\tcompatible = \"raspberrypi,3-model-b-plus\", \"brcm,bcm2837\";\n\tmodel = \"Raspberry Pi 3 Model B+\";\n\tinterrup"
  },
  {
    "path": "kernel/dtbs/bcm2838-rpi-4-b-32bit.dts",
    "chars": 4637,
    "preview": "/dts-v1/;\n\n/ {\n\tcompatible = \"raspberrypi,4-model-b\", \"brcm,bcm2838\", \"brcm,bcm2837\";\n\tmodel = \"Raspberry Pi 4 Model B\";"
  },
  {
    "path": "kernel/dtbs/bcm2838-rpi-4-b.dts",
    "chars": 14662,
    "preview": "/dts-v1/;\n\n/ {\n\tcompatible = \"raspberrypi,4-model-b\", \"brcm,bcm2838\", \"brcm,bcm2837\";\n\tmodel = \"Raspberry Pi 4 Model B\";"
  },
  {
    "path": "kernel/dtbs/foundation-v8-gicv2.dts",
    "chars": 7793,
    "preview": "/dts-v1/;\n\n/ {\n\tmodel = \"FVP Foundation\";\n\tcompatible = \"arm,fvp-base\", \"arm,vexpress\";\n\tinterrupt-parent = <0x1>;\n\t#add"
  },
  {
    "path": "kernel/dtbs/foundation-v8-gicv3-zephyr.dts",
    "chars": 12084,
    "preview": "/dts-v1/;\n\n/ {\n\tmodel = \"FVP Base\";\n\tcompatible = \"arm,fvp-base\", \"arm,vexpress\";\n\tinterrupt-parent = < 0x01 >;\n\t#addres"
  },
  {
    "path": "kernel/dtbs/foundation-v8-gicv3.dts",
    "chars": 4954,
    "preview": "/dts-v1/;\n\n/ {\n\tmodel = \"FVP Base\";\n\tcompatible = \"arm,fvp-base\", \"arm,vexpress\";\n\tinterrupt-parent = <0x1>;\n\t#address-c"
  },
  {
    "path": "kernel/dtbs/kvim3.dts",
    "chars": 10646,
    "preview": "/dts-v1/;\n\n/ {\n\tinterrupt-parent = < 0x01 >;\n\t#address-cells = < 0x02 >;\n\t#size-cells = < 0x02 >;\n\tcompatible = \"khadas,"
  },
  {
    "path": "kernel/dtbs/qemu-arm64.dts",
    "chars": 5452,
    "preview": "/dts-v1/;\n\n/ {\n\tinterrupt-parent = < 0x8001 >;\n\t#size-cells = < 0x02 >;\n\t#address-cells = < 0x02 >;\n\tcompatible = \"linux"
  },
  {
    "path": "kernel/dtbs/r8a7795.dts",
    "chars": 3775,
    "preview": "// SPDX-License-Identifier: GPL-2.0\n\n/dts-v1/;\n\n/ {\n    model = \"board based on r8a7795\";\n    compatible = \"renesas,r8a7"
  },
  {
    "path": "kernel/include/device/bcm_irq.h",
    "chars": 4678,
    "preview": "#ifndef __BCM_IRQ_H__\n#define __BCM_IRQ_H__\n\n#define LOCAL_CONTROL\t\t\t0x000\n#define LOCAL_PRESCALER\t\t\t0x008\n\n/*\n * The lo"
  },
  {
    "path": "kernel/include/device/gicv2.h",
    "chars": 5166,
    "preview": "/*\n * ARM Generic Interrupt Controller support\n *\n * Tim Deegan <tim@xen.org>\n * Copyright (c) 2011 Citrix Systems.\n *\n "
  },
  {
    "path": "kernel/include/device/gicv3.h",
    "chars": 4703,
    "preview": "#ifndef _MINOS_GICV3_H_\n#define _MINOS_GICV3_H_\n\n//#include <asm/gic_reg.h>\n\n#if 0\n#define GICD_CTLR_ENABLE_GRP0\t\t(1 << "
  },
  {
    "path": "kernel/include/libfdt/fdt.h",
    "chars": 4019,
    "preview": "#ifndef FDT_H\n#define FDT_H\n/*\n * libfdt - Flat Device Tree manipulation\n * Copyright (C) 2006 David Gibson, IBM Corpora"
  },
  {
    "path": "kernel/include/libfdt/libfdt.h",
    "chars": 71202,
    "preview": "#ifndef LIBFDT_H\n#define LIBFDT_H\n/*\n * libfdt - Flat Device Tree manipulation\n * Copyright (C) 2006 David Gibson, IBM C"
  }
]

// ... and 2370 more files (download for full content)

About this extraction

This page contains the full source code of the minosproject/minos2 GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 2570 files (6.1 MB), approximately 1.7M tokens, and a symbol index with 8440 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!