pub fn config_read_word(bus: u8, slot: u8, func: u8, offset: u8) -> u16 {
    let device: i32 = match (bus, slot, func) {
        // root PCI controller
        (0, 0, 0) => 0,

        // secondary bus controller (for bus 1)
        (0, 1, 0) => 1,

        (9, 0, 0) => 2,

        (_, _, _) => -1,
    };

    match offset {
        // vendor ID
        0x00 => match device {
            0 => 0x1022,
            1 => 0x1022,
            2 => 0x1013,
            _ => 0xFFFF,
        },

        // device ID
        0x02 => match device {
            _ => 0xFFFF,
        },

        // classes
        0x0A => match device {
            0 => 0x0600,
            1 => 0x0604,
            2 => 0x0300,
            _ => 0xFFFF,
        },

        // header type
        0x0E => match device {
            1 => 0x0001,
            _ => 0x0000,
        },

        // secondary bus
        0x18 => match device {
            1 => 0x0900,
            _ => 0x0000,
        },

        _ => 0xFFFF,
    }
}
            0 => 0x15D0,
            1 => 0x15D3,
            2 => 0x00B8,