Examples of VmArchitecture


Examples of org.jnode.vm.facade.VmArchitecture

          getCurrentProcessor().getArchitecture().getStackReader()
                    .debugStackTrace();
            Unsafe.die("Recursive initialize");
        }
        initializing = true;
        final VmArchitecture arch = VmUtils.getVm().getArch();
        helper.bootArchitecture(true);

        final Address bootImgStart = helper.getBootImageStart();
        final Address bootImgEnd = helper.getBootImageEnd();
        final int bootImgSize = bootImgEnd.sub(bootImgStart.toWord()).toInt();
View Full Code Here

Examples of org.jnode.vm.facade.VmArchitecture

        this.initProperties = properties;
        this.isolate = isolate;
        this.mainClass = mainClass;
        this.args = args;
        this.bindings = bindings;
        final VmArchitecture arch = VmUtils.getVm().getArch();
        this.isolatedStaticsTable = new VmIsolatedStatics(VmMagic.currentProcessor().getIsolatedStatics(),
            arch, new Unsafe.UnsafeObjectResolver());
        this.creator = currentIsolate();
        if (getRoot().executor == null && isRoot()) {
            //initialize the root executor on the creation of the first child
View Full Code Here

Examples of org.jnode.vm.facade.VmArchitecture

     * @param res the system properties object
     */
    public static void insertSystemProperties(Properties res) {

        final org.jnode.vm.facade.Vm vm = VmUtils.getVm();
        final VmArchitecture arch = vm.getArch();

        // Standard Java properties
        res.put("file.separator", "/");
//        res.put("file.encoding", "ISO-8859-1");
        res.put("java.awt.graphicsenv", "org.jnode.awt.JNodeGraphicsEnvironment");
        //todo
//        res.put("java.awt.printerjob", "");
        //todo
        res.put("java.class.path", ":");
        res.put("java.class.version", "50.0");
        res.put("java.compiler", "Internal"); //todo is this needed?
        res.put("java.endorsed.dirs", "/jifs/lib/");
        res.put("java.ext.dirs", "/jifs/lib/");
        res.put("java.home", "/jnode");
        res.put("java.io.tmpdir", "/jnode/tmp");
        res.put("java.library.path", "/jnode/tmp"); //dummy value but needed by Runtime.loadLibrary
        res.put("java.runtime.name", "JNode");
        res.put("java.runtime.version", vm.getVersion());
        res.put("java.specification.name", "Java Platform API Specification");
        res.put("java.specification.vendor", "Sun Microsystems Inc.");
        res.put("java.specification.version", "1.6");
        res.put("java.vendor", "JNode.org");
        res.put("java.vendor.url", "http://jnode.org");
        res.put("java.vendor.url.bug", "http://jnode.org");
        res.put("java.version", "1.6");
        res.put("java.vm.info", "JNode");
        res.put("java.vm.name", "JNode");
        res.put("java.vm.specification.name", "Java Virtual Machine Specification");
        res.put("java.vm.specification.vendor", "Sun Microsystems Inc.");
        res.put("java.vm.specification.version", "1.0");
        res.put("java.vm.vendor", "JNode.org");
        res.put("java.vm.version", vm.getVersion());
        res.put("line.separator", "\n");
        res.put("os.arch", arch.getName());
        res.put("os.name", "JNode");
        res.put("os.version", vm.getVersion());
        res.put("path.separator", ":");
        //todo
//        res.put("user.country", "");
        res.put("user.dir", "/");
        res.put("user.home", "/jnode/home");
        res.put("user.language", "en");
        res.put("user.name", "admin");
        //todo
//        res.put("user.timezone", "");

        // GNU properties
        res.put("gnu.cpu.endian", (arch.getByteOrder() == ByteOrder.BIG_ENDIAN) ? "big" : "little");
        res.put("gnu.classpath.home.url", "system://");
        res.put("gnu.classpath.vm.shortname", "jnode");
        res.put("gnu.javax.swing.noGraphics2D", "true");

        //----------JNode related
View Full Code Here

Examples of org.jnode.vm.facade.VmArchitecture

     * @return The space managed by the virtual machine. In this case, the boot
     *         image space is returned.
     */
    public static ImmortalSpace getVMSpace() {
        if (bootSpace == null) {
            final VmArchitecture arch = VmUtils.getVm().getArch();
            final long bootSize = AVAILABLE_START().sub(HEAP_START().toWord())
                    .toLong();
            final int bootSizeMb = (int) (bootSize >>> 20);
            bootSpace = new ImmortalSpace("boot",
                    BasePlan.DEFAULT_POLL_FREQUENCY, bootSizeMb, false);
View Full Code Here

Examples of org.jnode.vm.facade.VmArchitecture

     *
     * @param devices
     */
    protected void remapDeviceAddresses(List<PCIDevice> devices) {
        log.debug("Remapping pci devices");
        final VmArchitecture arch = VmUtils.getVm().getArch();
        final Address start = arch.getStart(VirtualMemoryRegion.DEVICE);
        final Address end = arch.getEnd(VirtualMemoryRegion.DEVICE);
        for (PCIDevice dev : devices) {
            final PCIDeviceConfig cfg = dev.getConfig();
            if (cfg.isHeaderType0()) {
                int addrIdx = 0;
                for (PCIBaseAddress addr : cfg.asHeaderType0().getBaseAddresses()) {
View Full Code Here

Examples of org.jnode.vm.facade.VmArchitecture

    /**
     * Map the ACPI virtual memory region.
     */
    private void mmapAcpiRegion()
        throws DriverException {
        final VmArchitecture arch = VmUtils.getVm().getArch();
        final MemoryMapEntry[] mmap = AccessController.doPrivileged(new PrivilegedAction<MemoryMapEntry[]>() {
            public MemoryMapEntry[] run() {
                return arch.getMemoryMap();
            }
        });

        final Address acpiStart = arch.getStart(ACPI);
        final Address acpiEnd = arch.getEnd(ACPI);
        // First unmap the entire ACPI region
        arch.munmap(ACPI, acpiStart, acpiEnd.toWord().sub(acpiStart.toWord()).toExtent());
        this.acpiVirtStart = acpiStart;

        MemoryMapEntry lastAcpiEntry = null;
        Address start = acpiStart;
        for (MemoryMapEntry e : mmap) {
            if (e.isAcpi() || e.isAcpiNVS()) {
                // Calculate page aligned boundaries & sizes
                final Address alignedPhysStart = arch.pageAlign(ACPI, e.getStart(), false);
                final Word diff = e.getStart().toWord().sub(alignedPhysStart.toWord());
                final Extent size = e.getSize().add(diff);

                // Check for adjacent memory blocks
                if (lastAcpiEntry != null) {
                    Address expected = lastAcpiEntry.getStart().add(lastAcpiEntry.getSize());
                    if (e.getStart().NE(expected)) {
                        throw new DriverException("ACPI memory map entries are not adjacent");
                    }
                } else {
                    this.acpiPhysStart = alignedPhysStart;
                }

                // Map entry
                log.info("Mapping ACPI memory map entry to " + MagicUtils.toString(start));
                arch.mmap(ACPI, start, size, alignedPhysStart);
                start = start.add(e.getSize());
                lastAcpiEntry = e;
            }
        }
        if (lastAcpiEntry == null) {
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.