Minor - explicitly close files in buildrom.py.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Minor - move "tracked memory alloc" code in pmm.c.

Move the "pmm_malloc" code closer to the low level alloc functions it
calls.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Introduce and convert pmm code to use standard list helpers.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Minor - relocate code in stacks.c to keep low-level thread code together.

Just code movement - no actual code changes.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Introduce helper function have_threads() in stacks.c.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Convert stacks.c to use standard list manipulation code.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Convert boot.c to use standard list manipulation code.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Convert pciinit.c to use standard list manipulation code.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Convert PCIDevices list to use standard list manipultion code.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>