Package org.jnode.driver

Examples of org.jnode.driver.DriverException


     */
    protected final int getIOBase(Device device, _3c90xFlags flags) throws DriverException {
        final PCIHeaderType0 config = ((PCIDevice) device).getConfig().asHeaderType0();
        final PCIBaseAddress[] addrs = config.getBaseAddresses();
        if (addrs.length < 1) {
            throw new DriverException("Cannot find iobase: not base addresses");
        }
        if (!addrs[0].isIOSpace()) {
            throw new DriverException("Cannot find iobase: first address is not I/O");
        }
        return addrs[0].getIOBase();
    }
View Full Code Here


     */
    protected int getIOLength(Device device, _3c90xFlags flags) throws DriverException {
        final PCIHeaderType0 config = ((PCIDevice) device).getConfig().asHeaderType0();
        final PCIBaseAddress[] addrs = config.getBaseAddresses();
        if (addrs.length < 1) {
            throw new DriverException("Cannot find iobase: not base addresses");
        }
        if (!addrs[0].isIOSpace()) {
            throw new DriverException("Cannot find iobase: first address is not I/O");
        }
        return addrs[0].getSize();
    }
View Full Code Here

    protected void startDevice() throws DriverException {
        try {
            kernel = new VMWareCore(this, (PCIDevice) getDevice());
            configs = kernel.getConfigs();
        } catch (ResourceNotFreeException ex) {
            throw new DriverException(ex);
        }
        final Device dev = getDevice();
        super.startDevice();
        dev.registerAPI(HardwareCursorAPI.class, kernel);
        dev.registerAPI(DeviceInfoAPI.class, this);
View Full Code Here

     * @param flags
     */
    public RTL8139Core(RTL8139Driver driver, ResourceOwner owner, PCIDevice device, Flags flags)
        throws DriverException, ResourceNotFreeException {
        if (!(flags instanceof RTL8139Flags))
            throw new DriverException("Wrong flags to the RTL8139 driver");

        this.driver = driver;
        this.flags = (RTL8139Flags) flags;

        final int irq = getIRQ(device, this.flags);

        // Get the start of the IO address space
        this.iobase = getIOBase(device, this.flags);

        final int iolength = getIOLength(device, this.flags);
        // log.debug("RTL8139 driver iobase "+iobase+" irq "+irq);

        final ResourceManager rm;

        try {
            rm = InitialNaming.lookup(ResourceManager.NAME);
        } catch (NameNotFoundException ex) {
            throw new DriverException("Cannot find ResourceManager");
        }

        this.irq = rm.claimIRQ(owner, irq, this, true);

        try {
View Full Code Here

    protected int getIOBase(Device device, RTL8139Flags flags) throws DriverException {
        final PCIHeaderType0 config = ((PCIDevice) device).getConfig().asHeaderType0();
        final PCIBaseAddress[] addrs = config.getBaseAddresses();

        if (addrs.length < 1) {
            throw new DriverException("Cannot find iobase: not base addresses");
        }
        if (!addrs[0].isIOSpace()) {
            throw new DriverException("Cannot find iobase: first address is not I/O");
        }
        return addrs[0].getIOBase();
    }
View Full Code Here

    protected int getIOLength(Device device, RTL8139Flags flags) throws DriverException {
        final PCIHeaderType0 config = ((PCIDevice) device).getConfig().asHeaderType0();
        final PCIBaseAddress[] addrs = config.getBaseAddresses();

        if (addrs.length < 1) {
            throw new DriverException("Cannot find iobase: not base addresses");
        }

        if (!addrs[0].isIOSpace()) {
            throw new DriverException("Cannot find iobase: first address is not I/O");
        }

        return addrs[0].getSize();
    }
View Full Code Here

                }
            });
        } catch (ResourceNotFreeException ex) {
            throw ex;
        } catch (Exception ex) {
            throw new DriverException("Unknown exception", ex);
        }

    }
View Full Code Here

        try {
            dd = newCore(getDevice(), flags);
            dd.initialize();
            super.startDevice();
        } catch (ResourceNotFreeException ex) {
            throw new DriverException("Cannot claim " + flags.getName() + " resources", ex);
        }
    }
View Full Code Here

        } catch (DriverException ex) {
            throw ex;
        } catch (ResourceNotFreeException ex) {
            throw ex;
        } catch (Exception ex) {
            throw new DriverException(ex);
        }
    }
View Full Code Here

                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.");
                }
            }
            this.vgaIO = io;
            this.mmio0 = mmio0;
View Full Code Here

TOP

Related Classes of org.jnode.driver.DriverException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.