📄 jvm_internal.h
字号:
/*****************************************************************************
* Copyright Statement:
* --------------------
* This software is protected by Copyright and the information contained
* herein is confidential. The software may not be copied and the information
* contained herein may not be used or disclosed except with the written
* permission of MediaTek Inc. (C) 2005
*
* BY OPENING THIS FILE, BUYER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES
* THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE")
* RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO BUYER ON
* AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT.
* NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE
* SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR
* SUPPLIED WITH THE MEDIATEK SOFTWARE, AND BUYER AGREES TO LOOK ONLY TO SUCH
* THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. MEDIATEK SHALL ALSO
* NOT BE RESPONSIBLE FOR ANY MEDIATEK SOFTWARE RELEASES MADE TO BUYER'S
* SPECIFICATION OR TO CONFORM TO A PARTICULAR STANDARD OR OPEN FORUM.
*
* BUYER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND CUMULATIVE
* LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE,
* AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT ISSUE,
* OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY BUYER TO
* MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE.
*
* THE TRANSACTION CONTEMPLATED HEREUNDER SHALL BE CONSTRUED IN ACCORDANCE
* WITH THE LAWS OF THE STATE OF CALIFORNIA, USA, EXCLUDING ITS CONFLICT OF
* LAWS PRINCIPLES. ANY DISPUTES, CONTROVERSIES OR CLAIMS ARISING THEREOF AND
* RELATED THERETO SHALL BE SETTLED BY ARBITRATION IN SAN FRANCISCO, CA, UNDER
* THE RULES OF THE INTERNATIONAL CHAMBER OF COMMERCE (ICC).
*
*****************************************************************************/
/*******************************************************************************
* Filename:
* ---------
* jvm_internal.h
*
* Project:
* --------
* MAUI
*
* Description:
* ------------
*
*
* Author:
* -------
* -------
*
*==============================================================================
* HISTORY
* Below this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
*------------------------------------------------------------------------------
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
* removed!
* removed!
* removed!
*
*------------------------------------------------------------------------------
* Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!!
*==============================================================================
*******************************************************************************/
#include "jvm_interface.h"
#ifndef _JVM_INTERNAL_H
#define _JVM_INTERNAL_H
/*************************************************************************
* Include Header Files
*************************************************************************/
#ifdef DATACACHE_FBBR_ON
#include "cache_hw.h"
#include "cache_sw.h"
#endif /* defined(__MTK_TARGET__) && defined(MT6228) */ /* CACHE */
#include "stack_timer.h"
//#include "event_shed.h"
/*************************************************************************
* Global Definition
*************************************************************************/
#define VIRTUAL_FILE_TAG (0x13579024)
#define NORMAL_FILE_TAG (0x09133710)
#define DRM_FILE_TAG (0xC580A94B)
#define ENCRYPTED_JAR_FILE (0xC9A9848D)
typedef struct _virtual_file_struct
{
kal_uint32 file_tag;
union
{
kal_int32 handler;
kal_int32 position;
} h;
union{
kal_int32 filesize;
kal_int32 encrypt_code;
}f;
kal_uint8 *filedata;
} vfile_struct, *pvfile;
/* Backward-compatible */
/*****************************************************************************
* FUNCTION
* Kputs
* DESCRIPTION
*
* PARAMETERS
* s [?]
* RETURNS
* void
*****************************************************************************/
__inline void Kputs(char *s)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
jvm_debug_print(s);
}
/*****************************************************************************
* FUNCTION
* Kputchar
* DESCRIPTION
*
* PARAMETERS
* ch [IN]
* RETURNS
* void
*****************************************************************************/
__inline void Kputchar(char ch)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
char chs[2];
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
chs[0] = ch;
chs[1] = 0;
jvm_debug_print(chs);
}
#define Kprintf() Kputs(_kvmLogStr)
#define getJulianOffsetTimeInMillis jvm_get_julian_time_ms
/*************************************************************************
* Global Declaration
*************************************************************************/
extern WCHAR WCHARFilename[MAX_WCHAR_FILENAME_LEN];
extern kal_char *work_dir_path;
extern kal_char *work_sys_dir_path;
extern j2me_custom_file_info_struct* work_info_ptr;
extern kal_char j2me_sys_dir_path[];
#ifdef __SUPPORT_INFUSIO__
extern kal_char eureka_sys_dir_path[];
#endif /* __SUPPORT_INFUSIO__ */
#ifdef SUPPORT_SURFKITCHEN
extern kal_char surfkitchen_sys_dir_path[];
#endif /* SUPPORT_SURFKITCHEN */
#ifdef SUPPORT_MUSICWAV
extern kal_char musicwav_sys_dir_path[];
#endif /* SUPPORT_MUSICWAV */
extern int virtual_file_count;
extern const char *virtual_file_name[];
extern const unsigned char *virtual_file_data[];
extern const int virtual_file_size[];
extern void FBBR_heap_init(void);
extern void FBBR_heap_finalize(void);
extern void *FBBR_invalid_l1_cache_img(void *dst, int x_pos, int y_pos, int width, int height, int dst_width);
extern void *FBBR_invalid_l1_cache(void *dst, int length);
/* Timer */
//extern event_scheduler *jvm_event_scheduler_ptr;
extern stack_timer_struct jvm_base_timer;
extern void jvm_start_base_timer(void *base_timer_ptr, kal_uint32 time_out);
extern void jvm_stop_base_timer(void *base_timer_ptr);
extern void jvm_init_timer(void);
#endif /* _JVM_INTERNAL_H */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -