[ioapi] Formalise the I/O API as used in i386-pcbios