CN101013377A - Class loading method for starting Java Processor - Google Patents

Class loading method for starting Java Processor Download PDF

Info

Publication number
CN101013377A
CN101013377A CN 200710026261 CN200710026261A CN101013377A CN 101013377 A CN101013377 A CN 101013377A CN 200710026261 CN200710026261 CN 200710026261 CN 200710026261 A CN200710026261 A CN 200710026261A CN 101013377 A CN101013377 A CN 101013377A
Authority
CN
China
Prior art keywords
java
class
code
stowage
byte code
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN 200710026261
Other languages
Chinese (zh)
Other versions
CN100465894C (en
Inventor
谭洪舟
王华宁
房树磊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sun Yat Sen University
Original Assignee
Sun Yat Sen University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sun Yat Sen University filed Critical Sun Yat Sen University
Priority to CNB2007100262610A priority Critical patent/CN100465894C/en
Publication of CN101013377A publication Critical patent/CN101013377A/en
Application granted granted Critical
Publication of CN100465894C publication Critical patent/CN100465894C/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Devices For Executing Special Programs (AREA)
  • Stored Programmes (AREA)

Abstract

The invention discloses a class loading method when starting Java processor, the steps are: a) initialize chips; 2) initiate byte code read module; 3) select and set up the loading path; 4) load the loader for user classes; 5) load the operating system. The method references the design of common PC BIOS. When the chips are made, the start code is programmed in the chips. When the system starts, the code is run automatically to implement initialization function for peripherals, while building the system class loader for Java Virtual Machine and loading the Java embedded operating systems or applications stored as byte code files form peripheral storage devices or network. The invention makes the development process on Java-based processor similar to other embedded Java applications, which is convenience to the chip users and software developers. What's more, all the Java byte code following the Java standard can run on the chips, improving the universality and taking advantage of the portability of Java.

Description

Class stowage when a kind of Java Processor starts
Technical field
The invention belongs to the flush bonding processor design field, specifically, class stowage when relating to a kind of JavaProcessor and starting.
Background technology
Mainly be in the exploitation main frame, to realize at the class load function in the Java Processor at present by software simulation, operating software in the exploitation main frame, according to the Java byte code files after the compiling, carry out the type checking, storage allocation, symbol resolution, class loading operations such as initializing variable, the memory mirror file downloads to image file in the system storage, directly operation then when generating a java applet execution.
This method uses the exploitation main frame to realize the process of a part of java applet operation, incompatible with Java master gauge method, make the Java software development process become loaded down with trivial details, except moving conventional Java program compiler Java higher level lanquage compilation of source code is become the byte code files, the process that also must carry out one " secondary compiling " generates memory mirror file when carrying out.The image file that this method generates can not be transplanted to other Java platforms and use, and " secondary compiling " software has weakened the portability of Java technology significantly to the dependence of platform.
Summary of the invention
In order to overcome above deficiency, class stowage when the present invention proposes a kind of Java Processor and starting.Its key step comprises: 1) chip initiation; 2) start the bytecode reading unit; 3) select and be provided with class loading path; 4) load the user class loading bin; 5) loading operation system.
Described this method, will start block code and be solidificated in chip internal when chip production with reference to the BIOS design philosophy in the universal PC.
In the described step 1) chip initiation process, the initialization program code that starts in the module also is stored on the sheet among the ROM as one section microcode subroutine, directly carry out this section code during startup, to carry out initial work, as detect internal memory, initialization serial ports, work such as network, simultaneously for I/O operation provides simple system call, for it the postbyte sign indicating number read and operation is prepared.
The system class loading bin is realized with software in the described step 3), and program code is solidificated in ROM on the sheet of chip internal equally.
The user class loading bin also is to be loaded onto in the system as a class in the described step 4), and is necessary.
Operating system is a small-scale operating system by the Java language exploitation in the described step 5), and the loading of its core will be undertaken by system class loading bin and user class loading bin.
Described startup module firmware can not use class to organize data and code as other java applets, and its specific implementation has following three kinds:
1) realizes that with self-defining micro-code instruction the micro-code instruction function is simple, be easy to exploitation, but do not form standard, comparatively simple demand when only being suitable for starting;
2) use the Java byte code instruction that does not form class formation to realize, can realize comparatively strong functions, because Java byte code instruction more complicated, and this subprogram code does not form class formation, can not use the Java high level language, lack development environment, technical difficulty is bigger;
3) combination of above dual mode at simple initial phase operation micro-code instruction, realizes and loads byte code files stage use Java byte code instruction at the class loaders of complexity.
Beneficial effect of the present invention:
1, make the performance history based on the java application of Java Processor be tending towards identical, for chip user and software developer facilitate with the performance history of other embedded Java application programs.
2, the Java byte code files that makes all follow the Java standard can both move on chip, improves the portability of the versatility and the performance Java technology of system.
Description of drawings
Fig. 1 is the startup process flow diagram of Java processor.
Embodiment
Below in conjunction with accompanying drawing the present invention is further set forth.
As shown in Figure 1, class stowage when a kind of Java Processor starts, its key step comprises: 1) chip initiation; 2) start the bytecode reading unit; 3) select and be provided with class loading path; 4) load the user class loading bin; 5) loading operation system.
This method is with reference to the BIOS design philosophy in the universal PC, when chip production, to start block code and be solidificated in chip internal, when system start-up, move this partial code automatically, except the function that realizes initializing peripheral equipment, make up the system class loading bin of Java Virtual Machine simultaneously, and from peripheral storage device or network environment, load Java embedded OS or java application with the byte code files storage.
Each step specifies:
1, chip initiation
Java processor need translate into it microcode subroutine and move when carrying out the Java byte code instruction, have in processor inside therefore that ROM stores the microcode subroutine on the sheet.The all corresponding one section microcode subroutine of the attainable byte code instruction of each bar.Present technique is utilized this mechanism, the initialization program code that starts in the module also is stored on the sheet among the ROM as one section microcode subroutine, directly carry out this section code during startup, to carry out initial work, as detect internal memory, initialization serial ports, work such as network, simultaneously for I/O operation provides simple system call, for it the postbyte sign indicating number read and operation is prepared.
2, start the bytecode reading unit
The execution process instruction of Java process processor was divided into for 4 steps to carry out: get bytecode, get microcode, decoding is carried out.
In the chip initiation process, the bytecode reading unit is not activated, and this step need not carry out yet therefore " to get bytecode ", and processor directly reads the initialization program code with the storage of microcode form among the ROM on sheet, carries out then.
After initialization procedure finishes, in order to carry out the Java byte code instruction, processor must start the bytecode reading unit, this action is by last two instruction triggers of initialization program code, article one, instruction will start the bytecode reading unit, make that " getting bytecode " this step flow process joins in the implementation, after wait article one byte code instruction successfully reads, the last item micro-code instruction jumps to corresponding microcode subprogram segment and carries out according to the content of byte code instruction.
3, select and be provided with class loading path
The execution core of this step is the system class loading bin.Java applet is with the form tissue of class, so the user is necessary for system and provides class to load the path, and system can be from serial ports according to user's selection, the Flash storer, and perhaps network obtains byte code files, and it is resolved and then runs application.This process must be realized by class loaders.And according to the Java Virtual Machine standard, the most initialized class loaders, promptly the system class loading bin must be realized by virtual machine oneself itself.Can load other by the User Defined class loaders by the system class loading bin, and then realize more powerful class load function.
The system class loading bin realizes with software, and program code is solidificated in ROM on the sheet of chip internal equally.
There are two the opportunity of operational system class loaders:
One, operation before the bytecode reading unit starts.
Because this moment, the bytecode reading unit did not start as yet, processor can only be carried out micro-code instruction, so can only realize the system class loading bin with micro-code instruction, because the micro-code instruction function is simple, do not possess versatility, thus such class loaders performance history more complicated that realizes, but operational efficiency is higher.
Its two, after the bytecode reading unit starts, carry out.
After the bytecode reading unit starts, the Java byte code instruction that processor can be carried out must be smooth storage in internal memory, and can not carry out the bytecode that has class formation in the Java class file, Java class byte code files is to be byte code files after the unit compiling with the class by the Java compiler.Wherein except comprising byte code instruction, also comprised other information relevant with the class tissue, as generic attribute, constant pool, addressable mark etc.Address during with access memory is an example, and the address in the byte code instruction must be clear and definite physical address at this moment, and the address of byte code instruction is to store with the form of Symbolic Links in the Java class file.Carry out the bytecode with class formation of appointment in these Java Virtual Machine standards, must realize earlier being used to resolve Java class file by the system class loading bin.Common resolving is very complicated, therefore, carries out this step after the bytecode reading unit starts, can utilize can move smooth Java byte code instruction realize the system class loading bin.The function of byte code instruction is complicated abundant, makes that this subprogram exploitation is simple easily, also is easy to the modification upgrading of this module.
4, load the user class loading bin
For Java Virtual Machine or Java processor, the user class loading bin also is to be loaded in the system by the system class loading bin as a class.Compared with the system class loading bin, the user class loading bin can provide more powerful class load function.In the Java Virtual Machine standard, allow to select whether to provide the user class load function when realizing the system class loading bin, embedded Java application program for the overwhelming majority, the load function that the system class loading bin provides is enough, but in order to realize Java operating system, in Java processor, provide the user class load function to be necessary.
The user class loading bin uses Java higher level lanquage exploitation on PC, be compiled into Java class file after, be loaded in the system by the system class loading bin module among the Java process.
5, loading operation system
In view of the Embedded Application that becomes increasingly complex, system will provide a small-scale operating system by the Java language exploitation, to simplify the performance history of application program, can shorten production life cycle.The same with common java application, the loading of operating system kernel will be undertaken by system class loading bin and user class loading bin.
Because when starting, system does not also have class loaders, can not as other java applets, use class to organize data and code so start the module firmware 1-3 step.Specific implementation has following three kinds:
1. use micro-code instruction to realize that the micro-code instruction function is simple, be easy to exploitation, comparatively simple demand when being suitable for starting.
2. use the Java byte code instruction that does not form class formation to realize, can realize comparatively strong functions.Because Java byte code instruction more complicated, and this subprogram code do not form class formation, can not use the Java high level language, lacks development environment, and technical difficulty is bigger.
3. the combination of above dual mode at simple initial phase operation micro-code instruction, is used the Java byte code instruction in the structure class loaders and the loading byte code files stage of complexity.

Claims (7)

  1. The class stowage is characterized in that its key step comprises: 1) chip initiation when 1, a kind of Java Processor started; 2) start the bytecode reading unit; 3) select and be provided with class loading path; 4) load the user class loading bin; 5) loading operation system.
  2. The class stowage is characterized in that described method with reference to the BIOS design philosophy in the universal PC when 2, Java Processor according to claim 1 started, and when chip production, will start block code and be solidificated in chip internal.
  3. Class stowage when 3, Java Processor according to claim 1 starts, it is characterized in that in the described step 1) chip initiation process, the initialization program code that starts in the module also is stored on the sheet among the ROM as one section microcode subroutine, directly carry out this section code during startup, to carry out initial work, as detecting internal memory, the initialization serial ports, work such as network, simultaneously for I/O operation provides simple system call, for it the postbyte sign indicating number read and operation is prepared.
  4. The class stowage is characterized in that the system class loading bin is realized with software in the described step 3) when 4, Java Processor according to claim 1 started, and program code is solidificated in ROM on the sheet of chip internal equally.
  5. The class stowage is characterized in that the user class loading bin also is to be loaded onto in the system as a class in the described step 4), and is necessary when 5, Java Processor according to claim 1 started.
  6. Class stowage when 6, Java Processor according to claim 1 starts, it is characterized in that operating system is a small-scale operating system by the Java language exploitation in the described step 5), the loading of its core will be undertaken by system class loading bin and user class loading bin.
  7. The class stowage is characterized in that described startup module firmware can not use class to organize data and code when 7, Java Processor according to claim 2 started as other java applets, and its specific implementation has following three kinds:
    1) realizes that with self-defining micro-code instruction the micro-code instruction function is simple, be easy to exploitation, but do not form standard, comparatively simple demand when only being suitable for starting;
    2) use the Java byte code instruction that does not form class formation to realize, can realize comparatively strong functions, because Java byte code instruction more complicated, and this subprogram code does not form class formation, can not use the Java high level language, lack development environment, technical difficulty is bigger;
    3) combination of above dual mode at simple initial phase operation micro-code instruction, realizes and loads byte code files stage use Java byte code instruction at the class loaders of complexity.
CNB2007100262610A 2007-01-12 2007-01-12 Class loading method for starting Java Processor Expired - Fee Related CN100465894C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB2007100262610A CN100465894C (en) 2007-01-12 2007-01-12 Class loading method for starting Java Processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2007100262610A CN100465894C (en) 2007-01-12 2007-01-12 Class loading method for starting Java Processor

Publications (2)

Publication Number Publication Date
CN101013377A true CN101013377A (en) 2007-08-08
CN100465894C CN100465894C (en) 2009-03-04

Family

ID=38700910

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2007100262610A Expired - Fee Related CN100465894C (en) 2007-01-12 2007-01-12 Class loading method for starting Java Processor

Country Status (1)

Country Link
CN (1) CN100465894C (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101763273A (en) * 2008-12-26 2010-06-30 上海闻泰电子科技有限公司 Method for dynamically loading code into extended memory of embedded type system
CN106648681A (en) * 2016-12-29 2017-05-10 南京科远自动化集团股份有限公司 System and method for compiling and loading programmable language
CN106897638A (en) * 2015-12-21 2017-06-27 扬智科技股份有限公司 Manufacturing method of chip and its chip
CN107430650A (en) * 2015-03-02 2017-12-01 因温特奥股份公司 Computer program is protected to resist reverse-engineering
CN113010179A (en) * 2021-02-23 2021-06-22 深圳市广和通无线股份有限公司 Software storage method under storage architecture

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100493893B1 (en) * 2003-02-07 2005-06-10 삼성전자주식회사 System and method of shortening class loading process in java program
KR100654428B1 (en) * 2004-01-14 2006-12-06 삼성전자주식회사 System for improving transaction rate of java program and method thereof

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101763273A (en) * 2008-12-26 2010-06-30 上海闻泰电子科技有限公司 Method for dynamically loading code into extended memory of embedded type system
CN101763273B (en) * 2008-12-26 2014-08-13 上海闻泰电子科技有限公司 Method for dynamically loading code into extended memory of embedded type system
CN107430650A (en) * 2015-03-02 2017-12-01 因温特奥股份公司 Computer program is protected to resist reverse-engineering
CN107430650B (en) * 2015-03-02 2020-10-09 因温特奥股份公司 Securing computer programs against reverse engineering
CN106897638A (en) * 2015-12-21 2017-06-27 扬智科技股份有限公司 Manufacturing method of chip and its chip
CN106897638B (en) * 2015-12-21 2020-11-24 扬智科技股份有限公司 Chip manufacturing method and chip thereof
CN106648681A (en) * 2016-12-29 2017-05-10 南京科远自动化集团股份有限公司 System and method for compiling and loading programmable language
CN113010179A (en) * 2021-02-23 2021-06-22 深圳市广和通无线股份有限公司 Software storage method under storage architecture
CN113010179B (en) * 2021-02-23 2024-03-15 深圳市广和通无线股份有限公司 Independent application running method based on real-time operating system

Also Published As

Publication number Publication date
CN100465894C (en) 2009-03-04

Similar Documents

Publication Publication Date Title
CN100377085C (en) Method for implementing hardware image starting optimizing of embedded operating system
CN101763279B (en) BootLoader architectural design method
Stutz et al. Shared source CLI essentials
EP2705422B1 (en) Dynamically redirecting boot to another operating system
US7925875B2 (en) Systems and methods for identifying and booting a computer architecture
US7162626B2 (en) Use of common language infrastructure for sharing drivers and executable content across execution environments
CN100530108C (en) Method and system for calling function
JPH10269082A (en) System, method and device for executing directly archtecture-indpendent binary program
CN102402427A (en) Method and device for updating Java application program
CN101894028B (en) Realization method and device for Linux kernel mirror image data supporting various CPUs
CN100465894C (en) Class loading method for starting Java Processor
US8539214B1 (en) Execution of a program module within both a PEI phase and a DXE phase of an EFI firmware
CN103514015A (en) Method and device for booting operation system from storage medium
US20040083467A1 (en) System and method for executing intermediate code
CN103268241A (en) Method for achieving hiding or display of hard disk partitions in BIOS
WO2017066183A1 (en) Software architecture for embedded systems
JP2012516483A (en) Application of platform-dependent routines within a virtual mechanism by embedding native code in a class file
KR20130068630A (en) Method for initializing embedded device and apparatus thereof
CN100498710C (en) Method for reading and electing read only memory program code on self-storing mechanism
TWI777636B (en) Method, device, and computer program product for composing modular firmware
CN109426546A (en) Using starting method and device, computer storage medium and equipment
CN112685095A (en) Virtual equipment loading method, device, equipment and storage medium
Al-Bokhaiti et al. Customization and Optimization of Android Operating System for Custom Board with the Implementation of an Administrative Tool
WO2008083277A1 (en) Portable multi-platform booting systems and architectures
CN101187876A (en) Parasitic DOS operation system manufacture and its usage method

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20090304

Termination date: 20150112

EXPY Termination of patent right or utility model