Examples of claimMemoryResource()


Examples of org.jnode.system.resource.ResourceManager.claimMemoryResource()

        // Claim the available heap region as resource.
        try {
            final ResourceManager rm = InitialNaming.lookup(ResourceManager.NAME);
            final Address start = Memory.AVAILABLE_START();
            final Extent size = Memory.AVAILABLE_END().toWord().sub(start.toWord()).toExtent();
            heapResource = rm.claimMemoryResource(ResourceOwner.SYSTEM, start,
                    size, ResourceManager.MEMMODE_NORMAL);
        } catch (NameNotFoundException ex) {
            BootLogInstance.get().fatal("Cannot find resource manager", ex);
        } catch (ResourceNotFreeException ex) {
            BootLogInstance.get().fatal("Cannot claim available heap region", ex);
View Full Code Here

Examples of org.jnode.system.resource.ResourceManager.claimMemoryResource()

        super(80, 25);
        Address ptr = Address.fromIntZeroExtend(0xb8000);
        try {
            final ResourceManager rm = InitialNaming.lookup(ResourceManager.NAME);
            final ResourceOwner owner = new SimpleResourceOwner("Screen");
            memory = rm.claimMemoryResource(owner, ptr, getWidth()
                    * getHeight() * 2, ResourceManager.MEMMODE_NORMAL);
        } catch (NameNotFoundException ex) {
            throw new ResourceNotFreeException("ResourceManager not found", ex);
        }
    }
View Full Code Here

Examples of org.jnode.system.resource.ResourceManager.claimMemoryResource()

            // PRESERVE THIS CLAIMING ORDER!
            irq = rm.claimIRQ(owner, FLOPPY_IRQ, this, false);
            dma = dmaService.claimDMAChannel(owner, FLOPPY_DMA);
            io1 = claimPorts(rm, owner, startPort + OFFSET_RANGE1, NR_PORTS_RANGE1);
            io2 = claimPorts(rm, owner, startPort + OFFSET_RANGE2, NR_PORTS_RANGE2);
            dmaMem = rm.claimMemoryResource(owner, null, 64 * 1024, ResourceManager.MEMMODE_ALLOC_DMA);
        } catch (NameNotFoundException ex) {
            throw new ResourceNotFreeException("Cannot find ResourceManager or DMAService", ex);
        } catch (ResourceNotFreeException ex) {
            if (dmaMem != null) {
                dmaMem.release();
View Full Code Here

Examples of org.jnode.system.resource.ResourceManager.claimMemoryResource()

        // Claim the memory mapped I/O region
        final Address regsAddrPtr = Address.fromLong(regsAddr.getMemoryBase());
        final Extent regsSize = Extent.fromIntZeroExtend(regsAddr.getSize());
        try {
            final MemoryResource regs;
            regs = rm.claimMemoryResource(device, regsAddrPtr, regsSize,
                ResourceManager.MEMMODE_NORMAL);
            this.io = new Prism2IO(regs);
        } catch (ResourceNotFreeException ex) {
            throw new DriverException("Cannot claim memory mapped I/O", ex);
        }
View Full Code Here

Examples of org.jnode.system.resource.ResourceManager.claimMemoryResource()

                    Address.fromLong(device.getConfig().asHeaderType0().getBaseAddresses()[1].getMemoryBase());
            } else {
                videoRamAddr = Address.fromIntZeroExtend(SVGA_REG_FB_START);

            }
            this.videoRam = rm.claimMemoryResource(device, videoRamAddr, videoRamSize, ResourceManager.MEMMODE_NORMAL);
            this.bitsPerPixel = bitsPerPixel;
            switch (bitsPerPixel) {
                case 8:
                    bitmapGraphics =
                        BitmapGraphics.create8bppInstance(videoRam, width, height,
View Full Code Here

Examples of org.jnode.system.resource.ResourceManager.claimMemoryResource()

            final int memSize = fbAddr.getSize();
            log.info("Memory size " + NumberUtils.toBinaryByte(memSize));

            // Map Device RAM
            this.deviceRam =
                    rm.claimMemoryResource(device, Address.fromIntZeroExtend(fbBase), memSize,
                            ResourceManager.MEMMODE_NORMAL);

            // Map MMIO block 0, first test for 8Mb framebuffers.
            Offset block0Ofs = Offset.fromIntZeroExtend(0x7ffc00);
            Extent mmioSize = Extent.fromIntZeroExtend(1024); // 1K
View Full Code Here

Examples of org.jnode.system.resource.ResourceManager.claimMemoryResource()

            this.bytesPerLine = modeInfoBlock.getXResolution() * multiplier;
            this.videoRamSize = bytesPerLine * modeInfoBlock.getYResolution();

            this.videoRam =
                    rm.claimMemoryResource(device, address, videoRamSize,
                            ResourceManager.MEMMODE_NORMAL);

            BitmapGraphics graphics;
            switch (bitsPerPixel) {
                case 8:
View Full Code Here

Examples of org.jnode.system.resource.ResourceManager.claimMemoryResource()

            final int ioSize = ioAddr.getSize();
            final int fbBase = (int) fbAddr.getMemoryBase() /* & 0xFF800000 */;

            // Map Memory Mapped IO
            this.mmio =
                    rm.claimMemoryResource(device, Address.fromIntZeroExtend(ioBase), ioSize,
                            ResourceManager.MEMMODE_NORMAL);
            this.vgaIO = new RadeonVgaIO(mmio);
            final int memSize = readMemorySize();
            log.info("Memory size " + NumberUtils.toBinaryByte(memSize));
            this.accel = new RadeonAcceleration(vgaIO);
View Full Code Here

Examples of org.jnode.system.resource.ResourceManager.claimMemoryResource()

            log.info("Memory size " + NumberUtils.toBinaryByte(memSize));
            this.accel = new RadeonAcceleration(vgaIO);

            // Map Device RAM
            this.deviceRam =
                    rm.claimMemoryResource(device, Address.fromIntZeroExtend(fbBase), memSize,
                            ResourceManager.MEMMODE_NORMAL);
            vgaIO.setVideoRam(deviceRam);

            // Find ROM
            MemoryResource rom = null;
View Full Code Here

Examples of org.jnode.system.resource.ResourceManager.claimMemoryResource()

            MemoryResource rom = null;
            if (romAddr != null) {
                romAddr.setEnabled(true);
                if (romAddr.isEnabled()) {
                    rom =
                            rm.claimMemoryResource(device, Address.fromIntZeroExtend(romAddr
                                    .getRomBase()), romAddr.getSize(),
                                    ResourceManager.MEMMODE_NORMAL);
                    if (!verifyBiosSignature(rom)) {
                        log.info("Signature mismatch");
                        rom.release();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.