Package org.jnode.system.resource

Examples of org.jnode.system.resource.ResourceManager


    private final VgaState state640x480x16;
    private final VgaState oldState;

    public StandardVGA(ResourceOwner owner, IndexColorModel cm) throws ResourceNotFreeException {
        try {
            ResourceManager rm = InitialNaming.lookup(ResourceManager.NAME);
            vgaMem = rm.claimMemoryResource(owner, Address.fromIntZeroExtend(0xa0000), 0x9600,
                ResourceManager.MEMMODE_NORMAL);
            state640x480x16 = new VgaState(seq, crt, gra, att, 0xe3, cm);
            oldState = new VgaState();
        } catch (NameNotFoundException ex) {
            throw new ResourceNotFreeException("ResourceManager not found", ex);
View Full Code Here


        // 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) {
            this.irq.release();
            throw ex;
View Full Code Here

     * Register all PCI devices with the device manager.
     */
    public void startDevice() throws DriverException {
        try {
            final Device pciBusDevice = getDevice();
            final ResourceManager rm = InitialNaming.lookup(ResourceManager.NAME);
            // Claim the resources
            pciConfigIO = claimPorts(rm, pciBusDevice);
            // Register the API's
            pciBusDevice.registerAPI(PCIBusAPI.class, this);
            pciBusDevice.registerAPI(DeviceInfoAPI.class, this);
View Full Code Here

     * @see org.jnode.driver.Driver#startDevice()
     */
    protected void startDevice() throws DriverException {
        final AcpiDevice dev = (AcpiDevice) getDevice();
        try {
            final ResourceManager rm;
            rm = InitialNaming.lookup(ResourceManager.NAME);
            mmapAcpiRegion();
            AcpiRSDPInfo acpiInfo = dev.getRsdpInfo();
            loadRootTable(rm, acpiInfo);
        } catch (NameNotFoundException ex) {
View Full Code Here

    final MemoryResource resource;
    final Address address;

    MemoryRawData(int size) {
        try {
            final ResourceManager rm = InitialNaming.lookup(ResourceManager.NAME);
            final ResourceOwner owner = new SimpleResourceOwner("java.nio");
            this.resource = rm.claimMemoryResource(owner, null, size,
                ResourceManager.MEMMODE_NORMAL);
            this.address = resource.getAddress();
        } catch (NameNotFoundException ex) {
            throw new Error("Cannot find ResourceManager", ex);
        } catch (ResourceNotFreeException ex) {
View Full Code Here

    @PrivilegedActionPragma
    public PIC8259A() {
        final SimpleResourceOwner owner = new SimpleResourceOwner("PIC8259A");

        try {
            final ResourceManager rm = InitialNaming.lookup(ResourceManager.NAME);
            io8259_A = rm.claimIOResource(owner, 0x20, 1); // 0xA0
            io8259_B = rm.claimIOResource(owner, 0xA0, 1);
        } catch (NameNotFoundException ex) {
            throw new Error("Cannot find ResourceManager", ex);
        } catch (ResourceNotFreeException ex) {
            throw new Error("Cannot claim PIC0-IO ports", ex);
        }
View Full Code Here

TOP

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

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.