[arch][arm64] Fix and improve fault logging

The fault code (bits 5:0 of ESR) was only printed if ISV was set,
however ISV indicates whether the instruction syndrome (bits 23:14)
is valid.
Parse and print fault code for data and instruction faults.
Parse and print instruction syndrome when ISV is set.
For data faults say whather the error occurred reading or writing.
Use more descriptive naming for "FAR" and "DFSC".
Don't print ISS twice.
Shift IL value so it's printed as 0x0 or 0x1, not 0x2000000.

Example before:

secure os: data fault: PC at 0x1edb87901778(0x19778), FAR 0x0, iss 0x44
secure os: load bias: 0x1edb878e8000
secure os: ESR 0x92000044: ec 0x24, il 0x2000000, iss 0x44


secure os: data fault writing to 0x0, PC at 0x1edb87901778(0x19778)
secure os: fault code 0x4: Translation fault, level 0
secure os: load bias: 0x1edb878e8000
secure os: ESR 0x92000044: ec 0x24, il 0x1, iss 0x44

Change-Id: I4922328373e13443c999c2c79ea0ba2606417aeb
1 file changed
tree: 21ce1a75949de05e0803fe18c6e127a2ea25ed88
  1. .clang-format
  2. .gitignore
  4. README.md
  5. app/
  6. arch/
  7. build-config-kerneltests
  8. dev/
  9. engine.mk
  10. external/
  11. hosttests/
  12. include/
  13. kernel/
  14. kerneltests-inc.mk
  15. lib/
  16. lk_inc.mk.example
  17. make/
  18. makefile
  19. platform/
  20. target/
  21. tools/
  22. top/


The LK embedded kernel. An SMP-aware kernel designed for small systems.

See https://github.com/littlekernel/lk for the latest version.

See https://github.com/littlekernel/lk/wiki for documentation.


Build Status

To build and test for ARM on linux

  1. install or build qemu. v2.4 and above is recommended.
  2. install gcc for embedded arm (see note 1)
  3. run scripts/do-qemuarm (from the lk directory)
  4. you should see ‘welcome to lk/MP’

This will get you a interactive prompt into LK which is running in qemu arm machine ‘virt’ emulation. type ‘help’ for commands.

note 1: for ubuntu: sudo apt-get install gcc-arm-none-eabi or fetch a prebuilt toolchain from http://newos.org/toolchains/arm-eabi-5.3.0-Linux-x86_64.tar.xz