Two things need to be done:

APIC Timer initialization: PIT ok → measure how many ticks are done by APIC timer using PIT (1ms) interrupt; disable interrupt temporarily; set APIC timer and disable PIT IRQ; enable APIC timer.

A miscellaneous garden for playing with the kernel :P. Because this is a personal note on Linux kernel, I do not give any guarantee that all the information listed here is accurate. Notice that this note will introduce some notions we have already learned in undergraduate courses, but it will give more details on the implementations of the kernel.

Building the Kernel and Debugging with QEMU + GDB (NO SGX)

You may build QEMU from source by following this tutorial, note that you should configure QEMU build by

$ ./configure --enable-slirp
$ sudo apt install libslirp-dev -y

Booting Ubuntu Cloud Image in QEMU (Preliminary Steps for SGX + QEMU + GDB)

Fetch the cloud image from the website.