실기기에 KVM Porting 기술 소개 5/26/2000 Junbom Pyo ZUVIX technology, Co.

Post on 31-Dec-2015

214 views 0 download

Transcript of 실기기에 KVM Porting 기술 소개 5/26/2000 Junbom Pyo ZUVIX technology, Co.

실기기에 KVM Porting 기술 소개

5/26/2000

Junbom Pyo

ZUVIX technology, Co.

Agenda Overview of Java 2 Platform Introduction to Kjava Profile

(I-mode, MIDP, etc.) NTT DoCoMo DoJa VM and MIDP VM Porting Scopes (APIs) of KVM Accessing argument from native methods CDMA Software Architecture Where is mapping kvm layer?

Java 2 Platform

HotSpot

Java 2Enterprise

Edition

JVM KVM CardVM

Java 2StandardEdition

Java 2 Micro Edition

TVprofile

ScreenPhone/CommunicatorProfile

PDAProfile

MIDProfile

SmartCard

Profile

CDC CLDC

Introduction to Kjava Profile

Any Operating System

“C” VM “K” VM

Core APIs Core APIs

ProfileProfile

Profile

Set of baseConfigurations

(eg. Supporting Threads, Floats)

Library ofIndustry Profiles

e.g.: TV STB,Wireless Phone,

PDA ...

JavaTVJavaPhone

MIDP

ApplicationsEg. Yellow pages,train schedules, Games...

Activity in MIDP Expert Group

Expert Group Sun, Motorola, Nokia Ericsson, Siemens, Telcordia, Symbian, RIM, NEC, Sharp,

NTT/Docomo, Samsung, AOL, Matsushita, Fujitsu, Hitachi, Palm

Tentative Schedule for Spec release March 10, 2000: draft 0.6 (candidate for participant draft) March 21, 2000: Participant Review start April 26, 2000: call for vote to move to public draft May 1, 2000: public review start June 1, 2000: Spec 1.0 Release

Java in AsiaJava in Asia

SK TelecomSK Telecom

ShinsegiShinsegiTelecomTelecom

Java Java enabled enabled

subscriberssubscribers

ServiceLaunch

2001. 5

2001. 6

J2MEStandardVersion

KittyhawkProfile

LG TelecomLG Telecom 2000.10

DoJaProfile

KT FKT F Soon…

NTT-DoCoMoNTT-DoCoMo 2001. 1

KDDI, JPhoneKDDI, JPhone 2001. 6

ServiceLaunch

What is the DoCoMo Java - iApply ?

Overall i-mode network architecture

Native System Software

High Level Architecture

RTOS

CLDC

OEM-SpecificClasses

MIDP ApplicationIapply Application

MIDP, DoJa

OEM-SpecificApplication

NativeApplication

Porting Scopes (APIs) of KVM

Application (management) User interface Persistent Storage Networking Timers I18N/L10N Phone number “Dialer”

KVM Application Manager

Application packaging using JAR

Application Descriptor set of attributes

Title, version, Vendor, Jar-URL, Jar-Size, Data-Size, Application arguments, etc.

Application Lifecycle Application interface

initApp(), startApp(), pauseApp(), destroyApp() Application Context

provides information about the application manager to application

Application Manager install, de-install, application lifecycle management, etc mostly written in C (90%)

CLDC Directory

Java API

Native

MIDP Directory

Features Eliminated from the Java VM

No profile can require that a KVM support any of the following

Java Native Interface (JNI) User-defined class loaders Reflection Thread groups and daemon threads Finalization

Compiler Requirements

You must have a C compiler capable of compiling ANSI – Compliant C files.

The code compiles without any warnings using the following compilers

Metrowerks C compiler, GNU C compiler, Solaris C compiler, Microsoft Visual Studio C compiler.

api Contains the Java library class source code that is provided with the release.

bin Contains all the binary executables and compiled Java library classes.

build Contains makefiles for building the KVM.

doc Contains documentation.

jam Contains the source code of the optional Java Application Manager (JAM) component that is provided with the KVM.

Distribution directories

Directory kvm/VmCommon

StartJVM.c Virtual machine startup and command line argument reading.

cache.c Inline caching operations for speeding up method lookup.

class.c Runtime data structures and operations for representing Java classes.

events.c Implementation of a stream-based protocol for event handling.

fields.c Runtime data structures and operations for representing fields of objects.

frame.c Stack frame and exception handling operations. ETC…

Java code: static native void

drawRectangle(int x, int y, int width, int height);

Native implementation: C code

static void Java_com_sun_kjava_Graphics_drawRectangle() {

int height = popStack();

int width = popStack();

int y = popStack();

int x = popStack();

windowSystemDrawRectangle(x, y, width, height); }

Example Accessing arguments from native methods

const NativeImplementationType

com_sun_midp_lcdui_DefaultDeviceCaps_natives] = {

{ "drawLine", Java_com_sun_midp_lcdui_DefaultDeviceCaps_drawLine},

{ "drawRect", Java_com_sun_midp_lcdui_DefaultDeviceCaps_drawRect},

{ "drawArc", Java_com_sun_midp_lcdui_DefaultDeviceCaps_drawArc},

{ "drawChar", Java_com_sun_midp_lcdui_DefaultDeviceCaps_drawChar},

{ "drawChars", Java_com_sun_midp_lcdui_DefaultDeviceCaps_drawChars},

{ "drawString", Java_com_sun_midp_lcdui_DefaultDeviceCaps_drawString},

{ "drawImage", Java_com_sun_midp_lcdui_DefaultDeviceCaps_drawImage},}

Example Accessing arguments from native methods

Kauai VM Architecture

Class loaderSub system

Runtime data areas

Class files

Native method interface

Native method

libraries, Code

Executionengine

>javac HelloWorld.java

HelloWorld.class

JNI

Where is target?

J2ME for Wireless Carriers Software Architecture

CDMA Software Architecture

MSM

80186

EPROM(Flash)

RAM

EEPROM

Diagnostic Monitor

WatchdogTimer

Main Control Task

User InterfaceTask

Non-VolatileDatabase

Task

DiagnosticTask

WatchdogTask

SearcherTask

RxTask

TxTask

Layer2 Task

HS Task

Where is mapping kvm layer?

Layer 1

Layer 2

Multiplex Sublayer

Layer 3

Management

Application

SearcherVOCRF

Rx Tx

RxTx

Main Control

UI HSKVM NV

Conclusion

Why do you try porting job? personal career? Skill up? Money? Do not do the porting!

But, It is the work for the human beings.Even if don’t like it, you must do it.