Support invoking qemu in command line and fix a test issue

The script uCore_run can now support invoking qemu in a command prompt
environment. The control hotkeys in qemu can be used to exit emulation
or enter qemu monitor, i.e.

    Ctrl-a x    Exit emulation
    Ctrl-a c    Enter qemu monitor

This patch also fixes the always-fail issue when using qemu 1.4.0. The
problem is that using the option '-gdb' twice no longer work.

Signed-off-by: Junjie Mao <eternal.n08@gmail.com>
Add profiler support

NOTE: if it is turned on, a modified qemu must be used!
Support per-numa node pmm allocation

The free list of buddy system is splited into nr_numa_node entries
gdt init change

1. init gdt as soon as possible
2. APs use boot_cr3 in longmode entry
Allocate percpu var in the right numa node
fix compiling issue in ARM and i386
Spinlock and ap init
Merge branch 'chenyh/amd64' into mjj/amd64
Remove legacy code in multi-core scheduling

Signed-off-by: Junjie Mao <eternal.n08@gmail.com>
add multiboot header
Add multiboot and ramdisk

1. add multiboot header
2. add ramdisk support (only available when booted with grub2)

Now the system can be booted from Grub2 via PXE network.
This is tested in Virtualbox. Should be ready for real machine.
Merge branch 'master' into chenyh/amd64
Fix serial port on AMD64 hw

Signed-off-by: Chen Yuheng <chyh1990@gmail.com>
Implement RefCache and use percpu runqueue

About RefCache, see MIT's RadixVM paper

Signed-off-by: Chen Yuheng <chyh1990@gmail.com>
naive tlb shootdown and timerlist lock

Signed-off-by: Chen Yuheng <chyh1990@gmail.com>
Pin kernel thread to CPU

Signed-off-by: Yuheng Chen <chyh1990@gmail.com>
Signed-off-by: Chen Yuheng <chyh1990@gmail.com>
add ipi queue

1. use percpu IPI queue to handle IPI request
2. fix a problem when compiled with -O2
remove kswapd if UCONFIG_SWAP not defined
add multicore support for slab and buddy

Note: xv6 use lock-free linked list to implement slab
and percore buddy area to avoid contention.

uCore may suffer from the locks in slab and buddy.
Fix a bug in refcache