Package org.jnode.system.resource

Examples of org.jnode.system.resource.SimpleResourceOwner


    private final void parse(ResourceManager rm)
        throws ResourceNotFreeException {
        final int startOfTablePointers = 36;
        final int tablesCount = (getSize() - startOfTablePointers) / 8;
        final ResourceOwner owner = new SimpleResourceOwner(
            "ACPI-RootSystemDescriptionTable");
        for (int index = 0; index < tablesCount; index++) {
            // log.debug("Handling RSDT index " + index + "/" + tablesCount);
            try {
                final int ptrOffset = startOfTablePointers + (index * 8);
 
View Full Code Here


     *
     * @throws PluginException
     */
    protected void startPlugin() throws PluginException {
        try {
            final ResourceOwner owner = new SimpleResourceOwner("CMOS");
            cmos = AccessControllerUtils.doPrivileged(new PrivilegedExceptionAction<CMOS>() {
                public CMOS run() throws ResourceNotFreeException {
                    return new CMOS(owner);
                }
            });
View Full Code Here

        return getInt(112);
    }

    private final void parse(ResourceManager rm)
        throws ResourceNotFreeException {
        final ResourceOwner owner = new SimpleResourceOwner(
            "ACPI-FixedAcpiDescriptionTable");
        facs = (FirmwareAcpiControlStructure) AcpiTable.getTable(getDriver(), owner, rm,
            getAddress32(36));
        dsdt = (DifferentiatedSystemDescriptionTable) AcpiTable.getTable(getDriver(), owner,
            rm, getAddress32(40));
View Full Code Here

    private PcTextScreen() throws ResourceNotFreeException {
        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

        try {
            final Address kernelStart = Unsafe.getKernelStart();
            final Address kernelEnd = Unsafe.getKernelEnd();
            final Extent kernelSize = kernelEnd.toWord().sub(kernelStart.toWord()).toExtent();
            MemoryResourceImpl
                .claimMemoryResource(new SimpleResourceOwner("kernel"), kernelStart, kernelSize, MEMMODE_NORMAL);

            final Address bootHeapStart = Unsafe.getBootHeapStart();
            final Address bootHeapEnd = Unsafe.getBootHeapEnd();
            final Extent bootHeapSize = bootHeapEnd.toWord().sub(bootHeapStart.toWord()).toExtent();
            MemoryResourceImpl
                .claimMemoryResource(new SimpleResourceOwner("bootheap"), bootHeapStart, bootHeapSize, MEMMODE_NORMAL);

            ResourceManager rm = new ResourceManagerImpl();
            InitialNaming.bind(NAME, rm);
            return rm;
        } catch (NamingException ex) {
View Full Code Here

            BootLogInstance.get().info("No initial jarfile found");
            return null;
        } else {
            BootLogInstance.get().info("Found initial jarfile of " + size.toInt() + 'b');
            try {
                final ResourceOwner owner = new SimpleResourceOwner("System");
                return rm.claimMemoryResource(owner, start, size,
                    ResourceManager.MEMMODE_NORMAL);
            } catch (ResourceNotFreeException ex) {
                BootLogInstance.get().error("Cannot claim initjar resource", ex);
                return null;
View Full Code Here

        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;
View Full Code Here

     * @param descriptor
     */
    public DMAPlugin(PluginDescriptor descriptor) {
        super(descriptor);
        channels = new X86DMAChannel[DMA.MAX];
        channels[4] = new X86DMAChannel(this, new SimpleResourceOwner("cascade"), 4);
    }
View Full Code Here

    private final void parse(ResourceManager rm)
        throws ResourceNotFreeException {
        final int startOfTablePointers = 36;
        final int tablesCount = (getSize() - startOfTablePointers) / 4;
        final ResourceOwner owner = new SimpleResourceOwner(
            "ACPI-RootSystemDescriptionTable");
        for (int index = 0; index < tablesCount; index++) {
            // log.debug("Handling RSDT index " + index + "/" + tablesCount);
            try {
                final int ptrOffset = startOfTablePointers + (index * 4);
 
View Full Code Here

    }

    private void loadRootTable(ResourceManager rm, AcpiRSDPInfo acpiInfo)
        throws ResourceNotFreeException {
        if (acpiInfo != null) {
            final ResourceOwner owner = new SimpleResourceOwner("ACPI");
            final MemoryResource rsdtptrRes;
            rsdtptrRes = rm.claimMemoryResource(owner, acpiInfo.getRsdpStart(),
                acpiInfo.getLength(), ResourceManager.MEMMODE_NORMAL);
            this.rsdp = new RSDP(this, rsdtptrRes);
            this.root = NameSpace.getRoot();
View Full Code Here

TOP

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

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.