Check for errors during BIOS or kernel load

Because of the use of unsigned types, possible errors during
BIOS or kernel load were ignored.

Fix by using a signed type.

This also avoids some warnings with GCC flag -Wtype-limits.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
