make sector_t non-packed
bsp: fix a nested function
bsp: fix another nested function