Package org.jnode.driver

Examples of org.jnode.driver.DriverException


        this.channel = getChannel();
        try {
            KeyboardLayoutManager mgr = InitialNaming.lookup(KeyboardLayoutManager.NAME);
            this.kbInterpreter = mgr.createDefaultKeyboardInterpreter();
        } catch (NameNotFoundException ex) {
            throw new DriverException("Cannot find the keyboard layout manager", ex);
        } catch (KeyboardInterpreterException ex) {
            throw new DriverException();
        }

        final Device dev = getDevice();
        final String id = dev.getId();
        startDispatcher(id);
View Full Code Here


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

    }
View Full Code Here

        try {
            dm = InitialNaming.lookup(DeviceManager.NAME);
            dm.rename(device, getDevicePrefix(), true);
        } catch (DeviceAlreadyRegisteredException ex) {
            log.error("Cannot rename device", ex);
            throw new DriverException("Cannot rename device", ex);
        } catch (NameNotFoundException ex) {
            throw new DriverException("Cannot find DeviceManager", ex);
        }
        PCIHeaderType2 header = ((PCIDevice) device).getConfig().asHeaderType2();
        this.bus = new CardBusBus(this, header.getCardBus());
    }
View Full Code Here

        try {
            final ResourceManager rm;
            rm = InitialNaming.lookup(ResourceManager.NAME);
            info = findAcpiRSDTPTR(rm);
        } catch (NameNotFoundException ex) {
            throw new DriverException("Cannot find the resource manager");
        } catch (ResourceNotFreeException ex) {
            log.error("Cannot claim BIOS region", ex);
        }

        // Register out API
View Full Code Here

        final PCIHeaderType0 config = device.getConfig().asHeaderType0();
        final int irq = config.getInterruptLine();

        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");
        }

        // Get the start of the IO address space
        iobase = addrs[0].getIOBase();
        final int iolength = addrs[0].getSize();
        log.debug("Found Lance IOBase: 0x" + NumberUtils.hex(iobase) + ", length: " + iolength);
        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 {
            ioResource = claimPorts(rm, owner, iobase, iolength);
        } catch (ResourceNotFreeException ex) {
View Full Code Here

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

    }
View Full Code Here

            pitIO = claimPorts(rm, dev, CHANNEL2_PORT, 2);
            getDevice().registerAPI(SpeakerAPI.class, this);
            // do a test beep during startup
            // beep();
        } catch (NameNotFoundException nnfex) {
            throw new DriverException(nnfex);
        } catch (ResourceNotFreeException rnfex) {
            throw new DriverException(rnfex);
        }
    }
View Full Code Here

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

    }
View Full Code Here

        ModeInfoBlock modeInfoBlock = null;
        try {
            Address vbeControlInfo = UnsafeX86.getVbeControlInfos();
            VbeInfoBlock vbeInfoBlock = new VbeInfoBlock(vbeControlInfo);
            if (vbeInfoBlock.isEmpty()) {
                throw new DriverException(
                        "can't start device (vbeInfoBlock is empty): grub haven't switched to graphic mode");
            }

            Address vbeModeInfo = UnsafeX86.getVbeModeInfos();
            modeInfoBlock = new ModeInfoBlock(vbeModeInfo);
            if (modeInfoBlock.isEmpty()) {
                throw new DriverException(
                        "can't start device (modeInfoBlock is empty): grub haven't switched to graphic mode");
            }

            kernel = new VESACore(this, vbeInfoBlock, modeInfoBlock, (PCIDevice) getDevice());           
            configs = kernel.getConfigs();
        } catch (ResourceNotFreeException ex) {
            throw new DriverException(ex);
        } catch (Throwable t) {
            throw new DriverException(t);
        }
        final Device dev = getDevice();
        super.startDevice();

        dev.registerAPI(HardwareCursorAPI.class, kernel);
View Full Code Here

        final int iolength = getIOLength(device, flags);
        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 {
            io = rm.claimIOResource(owner, iobase, iolength);
        } catch (ResourceNotFreeException ex) {
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.