📄 objappli.c
字号:
/* ============================================================================ Project Name : jayacard Module Name : proto/bios/odata/objappli.c Version : $Id: objappli.c,v 1.1 2004/04/23 20:24:24 dgil Exp $ Description: Application BIOS support The Original Code is jayaCard code. The Initial Developer of the Original Code is Gilles Dumortier. Portions created by the Initial Developer are Copyright (C) 2002-2004 the Initial Developer. All Rights Reserved. Contributor(s): This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; see http://www.gnu.org/licenses/gpl.html History Rev Description 021504 dgil wrote it from scratch ============================================================================*/#include "precomp.h"/* ============================================================================ Import from fstools.c ========================================================================= */void __fs_move_EF_2_Appli_header(void);/* ========================================================================= __bios_application_deselect() ========================================================================= */void __bios_application_deselect(void){ /* reset auth&pin in appli mode ! */ if (tag_life == LIFE_APPLI) { LOG("APPLI","__bios_application_deselect() - reset authentication process !"); BIOS_SET_SEQVAL(SEQVAL_NOPROCESS); } #ifdef JAYA_BIOS_MULTIAPP HAL_ERASE_XRAM((jbyte xdata*)¤t_Appli,sizeof(current_Appli)); current_Appli_addr = NO_CURRENT_FILE; #endif}/* ========================================================================= __bios_application_select() ========================================================================= */void __bios_application_select(void){ #ifdef JAYA_BIOS_MULTIAPP if (tag_life == LIFE_APPLI) { /* quick check to avoid looking an EF for nothing ...*/ if ( (current_DF.fdesc&FDESC_HAS_APPLICATION) == FDESC_HAS_APPLICATION) { LOG("APPLI","__bios_application_select() - look for application ..."); /* now, try to select the EF APPLI */ FS_LOOKUP_FID(FID_APPLI,LOOKUP_MODE_EF_ONLY); if (lasterr!=SUCCESS) { /* no application found */ LOG("APPLI","__bios_application_select() - no application"); lasterr = SUCCESS; } else { /* move EF to Appli header ; note: current_EF is no file after the move */ FLASH_SET(__GlobalSem__,JSEC_FAIL); __fs_move_EF_2_Appli_header(); /* check security */ FLASH_DETECT(__GlobalSem__); LOG("APPLI","__bios_application_select() - select an application"); } } } #endif /* application has been selected */ BIOS_BITSET_SEQVAL(SEQVAL_SELECTED);}/* ========================================================================= That's all folks ! ========================================================================= */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -