Extent mmioSize = Extent.fromIntZeroExtend(1024); // 1K
MemoryResource mmio0 = deviceRam.claimChildResource(block0Ofs, mmioSize, false);
Mach64VgaIO io = new Mach64VgaIO(deviceRam, mmio0);
if ((io.getReg32(CONFIG_CHIP_ID) & CFG_CHIP_TYPE) != pciCfg.getDeviceID()) {
// Try for 4Mb framebuffers.
mmio0.release();
block0Ofs = Offset.fromIntZeroExtend(0x3ffc00);
mmio0 = deviceRam.claimChildResource(block0Ofs, mmioSize, false);
io = new Mach64VgaIO(deviceRam, mmio0);
if ((io.getReg32(CONFIG_CHIP_ID) & CFG_CHIP_TYPE) != pciCfg.getDeviceID()) {
throw new DriverException("Cannot find block0 registers.");