refactor ReadPciConfig to allow reading other devices as well