📄 readme
字号:
This example shows how to boot a standalone multiprocessorsystem from a single object file in EEPROM, using a staged downloader which runs on one of the processors, and which loads the object file on each of the processors.The basic idea is simple: assumed that the EEPROM is accessiblevia PCI, downloading can be performed using the multiprocessorloading function described in file MP_downloader.c. This functiontakes the EEPROM memory address, together with arrays of basic processorinformation for all processors used. After this function has been used to load the object from eeprom to each of the processors, all processors can be started.MP_downloader.c is intended for demonstration on tmsim, and thereforecontains the following adaptations: - the EEPROM is simulated by a piece of malloced SDRAM into which the object file "program.out" is read. - the value of the tmsim specific download symbol __syscall is copied to the loaded program. The names of the corresponding download symbols for MacOS and Win95, respectively, are: _TMMANSharedPatch and __HostCall_commvar_init. After the appropriate changes, the demo will run also on MacOS or Win95. Standalone executables (host= nohost) do not have such specific download symbols (unless user specified). - The top of SRDAM is avoided for downloading (see TOP_MEM_HOLE), because tmsim has mapped some undocumented I/O locations there.The only problem is that the MP_downloader runs on a processor thatis also itself a download target. While the downloader runs, a programmust be loaded onto the same processor whithout corrupting the downloader.This can be handled as follows: Modify the L1 boot code for the bootprocessor so that it loads the executable somewhere in the stack/heap gapof the final object to be loaded (here the stack heap gap of program.out).This stack heap gap is not needed anyway until the final program starts executing, and therefore is free for use during downloading.For this tmsim demo, the L1 boot code is simulated by L1.c, by means of a call to the downloader to download MP_downloader in an area 5 megabytesbelow the end of SDRAM, with a length of 4 Megabytes. Note that the stack heap gap is dependent on the final executable; however, the sizes used here are usually ok.The MP_downloader as described can now be used. It will downloadto all processors, while neatly avoiding the memory in which it itselfruns on the current processor. All executables on the other processors can be started using the familiar fiddling with their BUI_CTL's; the executable on the MP_downloader's node itself can be started by a jump to its SDRAM base, after the proper cache invalidations. The demo loads on one processor only, but this already demonstrates how to handle the major problems, i.e. downloading on the current node.Note that each loaded object (L1.out, MP_downloader.out, program.out)is a complete executable, an will start setting its required endian, its stack and heap area, and that the code of the previous boot stage is not used, and can safely be overwritten.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -