Add the LoongArch machine code. Including pmap, trap handling,
exception vectors, interrupt controllers, timer, SMP, bus_dma,
ptrace and DDB support, and FDT boot glue, plus small hooks in MI code.
Currently only QEMU is supported.
The port heavily references the existing riscv code.
LoongArch is a new RISC ISA from Loongson Technology, a bit like MIPS
or RISC-V. It defines four privilege levels, PLV0~PLV3: the kernel
runs at PLV0 and applications at PLV3. This port targets the 64-bit
variant (LA64): 32 GPRs, 32 FPRs, optional LSX/LASX vector extensions,
privileged-mode CSRs, a software-managed TLB with ASIDs, and DMWn
direct-mapped address windows used for the kernel direct map.
References:
https://github.com/loongson/LoongArch-Documentation/releases/latest/download/LoongArch-Vol1-v1.00-EN.pdf
https://github.com/loongson/LoongArch-Documentation/releases/latest/download/LoongArch-ELF-ABI-v1.00-EN.pdf
https://loongson.github.io/LoongArch-Documentation/
http://www.loongson.cn/
Signed-off-by: Xiaoqiang Zhao <zhaoxiaoqiang007@gmail.com>