Package org.jnode.system.resource

Examples of org.jnode.system.resource.DMAException


    public DMA() throws DMAException {
        final ResourceManager rm;
        try {
            rm = InitialNaming.lookup(ResourceManager.NAME);
        } catch (NameNotFoundException ex) {
            throw new DMAException("Cannot find ResourceManager", ex);
        }
        IOResource pageIO = null;
        IOResource dma1IO = null;
        IOResource dma2IO = null;

        try {
            final ResourceOwner owner = new SimpleResourceOwner("DMA-X86");
            pageIO = claimPorts(rm, owner, 0x81, 0x8f - 0x81 + 1);
            dma1IO = claimPorts(rm, owner, 0x00, 16);
            dma2IO = claimPorts(rm, owner, 0xc0, 32);

            this.pageIO = pageIO;
            this.dma1IO = dma1IO;
            this.dma2IO = dma2IO;

            for (int dmanr = 0; dmanr < MAX; dmanr++) {
                clearFF(dmanr);
            }

        } catch (ResourceNotFreeException ex) {
            if (pageIO != null) {
                pageIO.release();
            }
            if (dma1IO != null) {
                dma1IO.release();
            }
            if (dma2IO != null) {
                dma2IO.release();
            }
            throw new DMAException("Cannot claim DMA I/O ports", ex);
        }
    }
View Full Code Here


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

    }
View Full Code Here

TOP

Related Classes of org.jnode.system.resource.DMAException

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.