x86: Fix validation of xAPIC LDR register

LDR will be set to 0 for any CPU with an ID >= 8. This is fine, it just
means the CPU is not addressable in logical destination mode.

This fixes startup in xAPIC mode on systems with more than 8 CPUs.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Start a public TODO list

First rough collection of needs and ideas.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
core: Consider fragmentation in page allocator

Rework the page allocator to be bit less simplistic and take
fragmentation of the free page bitmap into account. Such fragmentation
is more likely to occur when cells get created and destroyed.

The algorithm for find n contiguous pages in page_alloc now looks like
this: Find the first free page, starting at bitmap position 0, then
check if n-1 directly succeeding pages are free as well. If one page is
not adjacent, use that page as start page for another search round.
Search ends as soon as the page index reaches the total number of pages
in a pool.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>