ertfs

所属分类:嵌入式/单片机/硬件编程
开发工具:Others
文件大小:15547KB
下载次数:54
上传日期:2007-05-28 19:31:36
上 传 者huanglan
说明:  ertfs文件系统里面既有完整ucos程序,又有原理图及原版fata32
(ertfs file system integrity both inside TRACK procedures, with original drawings and fata32)

文件列表:
ertfs\ERTFS\陈猛的文档\BSS.doc (19456, 2003-08-24)
ertfs\ERTFS\陈猛的文档\Criterr.doc (19456, 2003-08-24)
ertfs\ERTFS\陈猛的文档\DEVIO.doc (19456, 2003-08-24)
ertfs\ERTFS\陈猛的文档\ERTFS API.doc (37888, 2003-08-24)
ertfs\ERTFS\陈猛的文档\ERTFS文件组织.doc (19456, 2003-05-02)
ertfs\ERTFS\陈猛的文档\FAT32移植事项.doc (19456, 2003-05-01)
ertfs\ERTFS\陈猛的文档\If raw is TRUE the blocks are reported as block offsets from.doc (19456, 2003-08-24)
ertfs\ERTFS\陈猛的文档\RTFSINIT.doc (20480, 2003-08-24)
ertfs\ERTFS\陈猛的文档\pc.doc (19456, 2003-08-24)
ertfs\ERTFS\陈猛的文档\文件系统.doc (19456, 2003-08-24)
ertfs\ERTFS\陈猛的文档\文件系统中对关键代码段的处理.doc (19456, 2003-08-24)
ertfs\ERTFS\陈猛的文档\文件系统重要的数据结构.doc (19968, 2003-08-24)
ertfs\ERTFS\陈猛的文档 (0, 2004-12-18)
ertfs\ERTFS\原理图\test\44btest\44btest.mcp (199832, 2004-12-09)
ertfs\ERTFS\原理图\test\44btest\44btest_Data\CWSettingsWindows.stg (3450, 2004-12-09)
ertfs\ERTFS\原理图\test\44btest\44btest_Data\Debug (0, 2007-05-15)
ertfs\ERTFS\原理图\test\44btest\44btest_Data\DebugRel\44btest.axf (250428, 2004-12-09)
ertfs\ERTFS\原理图\test\44btest\44btest_Data\DebugRel\44btest.bin (90700, 2004-12-09)
ertfs\ERTFS\原理图\test\44btest\44btest_Data\DebugRel\TargetDataWindows.tdt (132362, 2004-12-09)
ertfs\ERTFS\原理图\test\44btest\44btest_Data\DebugRel\ObjectCode\44BINIT.o (7156, 2004-07-08)
ertfs\ERTFS\原理图\test\44btest\44btest_Data\DebugRel\ObjectCode\44BLIB_A.o (1262, 2004-07-08)
ertfs\ERTFS\原理图\test\44btest\44btest_Data\DebugRel\ObjectCode\44blib.o (35692, 2004-07-08)
ertfs\ERTFS\原理图\test\44btest\44btest_Data\DebugRel\ObjectCode\ATA.o (37160, 2004-07-08)
ertfs\ERTFS\原理图\test\44btest\44btest_Data\DebugRel\ObjectCode\Adc.o (23628, 2004-07-08)
ertfs\ERTFS\原理图\test\44btest\44btest_Data\DebugRel\ObjectCode\Cache.o (25044, 2004-07-08)
ertfs\ERTFS\原理图\test\44btest\44btest_Data\DebugRel\ObjectCode\Dma.o (24696, 2004-07-08)
ertfs\ERTFS\原理图\test\44btest\44btest_Data\DebugRel\ObjectCode\Eint.o (21432, 2004-07-08)
ertfs\ERTFS\原理图\test\44btest\44btest_Data\DebugRel\ObjectCode\Etc.o (20836, 2004-07-08)
ertfs\ERTFS\原理图\test\44btest\44btest_Data\DebugRel\ObjectCode\FAT32.o (36220, 2004-07-08)
ertfs\ERTFS\原理图\test\44btest\44btest_Data\DebugRel\ObjectCode\Iic.o (24028, 2004-07-08)
ertfs\ERTFS\原理图\test\44btest\44btest_Data\DebugRel\ObjectCode\Iis.o (28256, 2004-07-08)
ertfs\ERTFS\原理图\test\44btest\44btest_Data\DebugRel\ObjectCode\Power.o (26224, 2004-07-08)
ertfs\ERTFS\原理图\test\44btest\44btest_Data\DebugRel\ObjectCode\Sio.o (25056, 2004-07-08)
ertfs\ERTFS\原理图\test\44btest\44btest_Data\DebugRel\ObjectCode\Timer.o (24336, 2004-07-08)
ertfs\ERTFS\原理图\test\44btest\44btest_Data\DebugRel\ObjectCode\Uart.o (42536, 2004-07-08)
ertfs\ERTFS\原理图\test\44btest\44btest_Data\DebugRel\ObjectCode\WrRdflash.o (1354, 2004-07-08)
ertfs\ERTFS\原理图\test\44btest\44btest_Data\DebugRel\ObjectCode\download.o (32640, 2004-07-08)
ertfs\ERTFS\原理图\test\44btest\44btest_Data\DebugRel\ObjectCode\extdma.o (30560, 2004-07-08)
ertfs\ERTFS\原理图\test\44btest\44btest_Data\DebugRel\ObjectCode\file.o (30996, 2004-07-08)
ertfs\ERTFS\原理图\test\44btest\44btest_Data\DebugRel\ObjectCode\flash.o (32160, 2004-07-08)
... ...

Release note for stand alone ERTFS. This version of ERTFS is a standalone version that may be built without the OS porting environment included with EBS's RTIP. To install the product type: A:INSTALL PLease refer to the configuration section of the ERTFS user's manual for configuration. The porting layer is described below. The makefile The release is shipped with a simple Microsoft 'C' makefile. The makefile compiles the source code into libraries and executes link to create the demo program. The make file is very simple, but one thing must be kept in mind. The compiler must define two predefined macros from the command line: 1. The ertfs standalone define: ERTFS_SA - This must always be defined. 2. The Kernel porting option (this may vary). If no kernel is used then POLLOS - Define as one to run polled mode. The demo program rtfsdem.exe contains two virtually seperate programs, an interactive test shell (in tstsh.c) and a regression test (in the file rtfsdem.c). When the program starts, a menu allows selection of the regression test or the test shell. The test shell has a help prompt. The regression test and test shell use console IO, so for embedded systems you will need a different sample application. The IO in the regression test consists of printfs which can be removed for deep embedded systems. Note: RTFSDEM.C contains the application entry point and spawns a task to run the applications in. The porting layer The porting layer consists of 3 header files and 3 'C' files. The environment provided is as stated before only for Microsoft Real Mode. The porting layer is thin enough that it should be a simple exersize to add other ports. We will describe each file in detail. PORTTERM.H - The following 4 lines represent the whole contents of this file: #define tm_gets(X) gets(X); #define tm_printf(X) printf(X) #define tm_printf_2(X,Y) printf(X,Y) #define tm_printf_3(X,Y,Z) printf(X,Y,Z) In a few places in the code we communicate through the console with printfs and getch. For deep embedded systems these macros should be NULLED out. If they are nulled out the only library file critically effected is criterr.c. They are used extensively by the demo programs RTFSDEM.C and TSTSH.C. Printf is used incidentally in these files: FORMAT.C, FL_DRVER.C, ROMDISK.C, PORTKERN.C. Both printf and getch are used in CRITERR.C. PORTIO.H - This file defines whether IO operations are done with peeks and pokes (memory mapped IO) or are done with INP and OUTP instructions. It defines the type of an IO address (word or char *) and defines the following four macros: OUTBYTE,OUTWORD,INBYTE and INWORD. How these macros are defined can vary by compiler. PORTIO.C - This file contains the following four functions: insw,outsw,shut_bios_timer_off and io_delay. Insw and outsw perform multiple INPW and OUTPW operations respectively. The provided routines perform the operations inside for loops. These should be optimized to use rep insw and rep outsw operations on 808x platforms. Shut_bios_timer_off is called by the floppy driver to make sure that the bios clock isr does not inadverdantly turn off the floppy motor. It is only needed in real mode systems with a bios. Io_delay provides a 1 microsecond delay. It is coded to read the NMI register on a PC. In other environment a loop of some sort is needed. PORTISR.C - This file contains routines to hook and dispatch the pcmcia, floppy and ide interrupts. There are also some PC specific PIC management routines. The following routines must be implemented: ide_isr_0() - The actual interrupt service routine for controller 0 ide_isr_1() - The actual interrupt service routine for controller 1 ks_invoke_ide_interrupt - A callback that the ide driver calls to signal an IDE event from interrupt service. hook_ide_interrupt - A routine to put ide_isr_0() and ide_isr_1() into the vector table. floppy_isr_0() - The actual interrupt service routine for floppy ks_invoke_floppy_interrupt - A callback that the floppy driver calls to signal a floppy event from interrupt service. hook_ide_interrupt - A routine to put floppy_isr_0()into the vector table. Note: The interrupt hook routines are passed the interrupt number to hook for the device. In some porting situations when you know what the interrupt number is supposed to be up front it is convenient to ignore the argument and use the value you know. PORTKERN.H - This file contains CPU and kernel specific typedefs and macros. There are a few elements in this file that depend on CPU and compiler and should be looked at. The following macros are dependent on compiler and CPU and must be modified on an as needed basis: KS_CONSTANT KS_LITTLE_ENDIAN KS_FAR FLAT_ADDRESSING The following typedefs are defined and will probably not need changing: byte, word, dword, BOOLEAN, PFBYTE, PFINT, PFWORD, PFLONG PFDWORD, PFCHAR, PFVOID, PFCCHAR, PFCBYTE The following constants are defined and will not need changing: TRUE FALSE The following macros are defined and will not need changing: OS_FS_ENTER() OS_FS_EXIT() OS_CLAIM_LOGDRIVE OS_RELEASE_LOGDRIVE OS_CLAIM_FSCRITICAL OS_RELEASE_FSCRITICAL OS_CLAIM_DRIVE_IO OS_RELEASE_DRIVE_IO PORTKERN.C - This file contains the kernel porting layer for ERTFS. There are also a few miscellaneous routines that depend on the target environment. ks_resource_init - This routine creates the mutex and counting semaphores that will be used by ERTFS. It also spawns a background timer task for managing the floppy disk motor. The following mutexes are created: fs_drivesem[NDRIVES] - One per logical drive fs_iosem[NDRIVES] - One per possible device driver fs_critsem - For accessing critical sections The following counters are created (depending on configuration): floppy_signal; ide_signal[2]; The following routines claim and release mutex semaphores. ks_claim_logdrive - These routines claim and release ks_release_logdrive - the mutex semaphores. They are called ks_claim_fscritical - when macros in portkern.h are invoked. ks_release_fscritical - These routines should not need changing. ks_claim_drive_io - ks_release_drive_io - The following routines test, set and clear counting semaphores. ks_clear_floppy_signal- These routines clear, set and test the ks_set_floppy_signal - counting semaphores that are used to ks_test_floppy_signal - signal IO completion. ks_clear_ide_signal - ks_set_ide_signal - These routines should not need changing. ks_test_ide_signal - The following routines manage the interrupt state. ks_enable - Enable interrupts ks_disable - Disable interrupts The following routines provide clock related services. **** Note: ks_ticks_p_sec() and ks_msec_p_tick() report the clock frequency and period and must be modified to reflect the clock rate of the target. ks_get_ticks() - Get ticks since startup. ks_sleep() - Sleep number of ticks ks_ticks_p_sec - Return ticks per second (must be modified) ks_msec_p_tick - Return milliseconds per tick (must be modified) Note: - The POLLOS reference port does not have a provision for shutting of the floppy motor. If you have a clock interrupt handler it should call fl_motor_off() once per second. This routine will shut off the motor when appropriate. File system user management - Each task that uses ERTFS must have a user context which contains the current working directory and drive for the task as well as the "errno" associated with that task. We maintain a table of contexts NUM_USERS (pcconf.h) long. You may wish to customize these routines if you feel you have a better way to do it (for example you may wish to embedd the user table in your task control block). Note: - For the POLLOS port please set NUM_USERS to 1 The following routines make up the user management package: init_user_table - This is a local routine that zeroes the table at startup. get_system_user - This routine is called from other modules in RTFS to get the user table entry for the current task. pc_free_all_users - This routine is called by other modules in RTFS when a drive is unmounted. It frees the current working directory object for each user for the specified drive. set_errno - This routine is called by other modules in RTFS to set "errno". pc_free_user - This routine should be called from application tasks to free the user table entry for the task. An appropriate place to call this routine is when a task exits. get_errno - This routine should be called by the application task to find out the value of errno associated with the previous api call. Miscelaneous functions - These are miscelaneous functions that depend on the target environment. pc_report_error - Prints an internal RTFS error to the console. pc_getsysdate - Get the current system time and date. This is used to time stamp directory entries as they are created. os_floppy_type - Return the type of floppy drive installed. The default implementation reads it from the PC's cmos. It should be hardwired in embedded systems. phys_to_virtual - Convert a virtual address to a physical address A few other files that should be mentioned.. fl_drver.c - This is in practice a floppy device driver for the PC architecture. It can be and has been ported to non pc platforms but there is no specific porting layer. pcmctrl.c - This is a driver for Intel 82365 compatible pcmcia controllers. It is built for the PC platform but has been ported to several other platforms such as PowerPC. There is no porting layer for it but it port fairly easilly (suprisingly) to other targets. To port the pcmcia code in pcmcia.c to non 82365 compatible controllers the following routines must be implemented for the alternate controller: pcmctrl_enable_io_mode pcmctrl_map_ata_regs pcmctrl_put_cis_byte pcmctrl_get_cis_byte pcmctrl_card_power_up pcmctrl_device_power_up

近期下载者

相关文件


收藏者