Changeset 258
- Timestamp:
- Dec 4, 2013, 7:48:04 PM (11 years ago)
- Location:
- soft/giet_vm
- Files:
-
- 105 added
- 9 deleted
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
soft/giet_vm/Makefile
r256 r258 5 5 DU = mipsel-unknown-elf-objdump 6 6 7 MAP_XML = mappings/4c_1p_iob.xml 8 9 SYS_OBJS = build/sys/vm_handler.o \ 10 build/sys/sys_handler.o \ 11 build/sys/giet.o \ 12 build/sys/switch.o \ 13 build/sys/common.o \ 14 build/sys/ctx_handler.o \ 15 build/sys/drivers.o \ 16 build/sys/exc_handler.o \ 17 build/sys/irq_handler.o \ 18 build/sys/kernel_init.o 19 20 BOOT_OBJS = build/boot/reset.o \ 21 build/boot/boot_init.o 22 7 ### FAT parameters definition for Disk image 8 ### sector_size = 512 9 ### partition_begin_lba = 300 10 ### sector_per_cluster = 8 11 ### partition sectors = 524832 12 13 MAP_XML = mappings/4c_1p_iob_four.xml 14 15 ### Objects to be linked for kernel.elf 16 KERNEL_OBJS = build/common/utils.o \ 17 build/common/vmem.o \ 18 build/fat32/fat32.o \ 19 build/drivers/dma_driver.o \ 20 build/drivers/fbf_driver.o \ 21 build/drivers/xcu_driver.o \ 22 build/drivers/icu_driver.o \ 23 build/drivers/ioc_driver.o \ 24 build/drivers/iob_driver.o \ 25 build/drivers/mmc_driver.o \ 26 build/drivers/mwr_driver.o \ 27 build/drivers/nic_driver.o \ 28 build/drivers/tim_driver.o \ 29 build/drivers/tty_driver.o \ 30 build/kernel/giet.o \ 31 build/kernel/switch.o \ 32 build/kernel/ctx_handler.o \ 33 build/kernel/exc_handler.o \ 34 build/kernel/sys_handler.o \ 35 build/kernel/irq_handler.o \ 36 build/kernel/kernel_init.o 37 38 ### Objects to be linked for boot.elf 39 BOOT_OBJS = build/common/utils.o \ 40 build/common/vmem.o \ 41 build/fat32/fat32.o \ 42 build/drivers/tty_driver.o \ 43 build/drivers/xcu_driver.o \ 44 build/drivers/dma_driver.o \ 45 build/drivers/mwr_driver.o \ 46 build/drivers/ioc_driver.o \ 47 build/drivers/nic_driver.o \ 48 build/drivers/mmc_driver.o \ 49 build/kernel/ctx_handler.o \ 50 build/kernel/switch.o \ 51 build/boot/boot.o 52 53 ### Objects to be linked for display.elf 23 54 DISPLAY_OBJS = build/display/main.o \ 24 build/libs/stdio.o \ 25 build/libs/utils.o 26 27 ROUTER_OBJS = build/router/main.o \ 28 build/libs/mwmr_channel.o \ 29 build/libs/stdio.o \ 30 build/libs/utils.o 31 32 HELLO_OBJS = build/hello/main.o \ 33 build/libs/stdio.o \ 34 build/libs/utils.o 35 36 PGCD_OBJS = build/pgcd/main.o \ 37 build/libs/stdio.o \ 38 build/libs/utils.o 39 40 GAMEOFLIFE_OBJS = build/gameoflife/main.o \ 41 build/libs/stdio.o \ 42 build/libs/barrier.o 43 55 build/libs/stdio.o 56 57 ### Objects to be linked for router.elf 58 ROUTER_OBJS = build/router/main.o \ 59 build/libs/mwmr_channel.o \ 60 build/libs/stdio.o 61 62 ### Objects to be linked for hello.elf 63 HELLO_OBJS = build/hello/main.o \ 64 build/libs/stdio.o 65 66 ### Objects to be linked for pgcd.elf 67 PGCD_OBJS = build/pgcd/main.o \ 68 build/libs/stdio.o 69 70 ### Objects to be linked for game.elf 71 GAMEOFLIFE_OBJS = build/gameoflife/main.o \ 72 build/libs/stdio.o \ 73 build/libs/barrier.o 74 75 ### Objects to be linked for dhrystone.elf 44 76 DHRYSTONE_OBJS = build/dhrystone/dhry_1.o \ 45 77 build/dhrystone/dhry_2.o \ 46 build/libs/stdio.o \ 47 build/libs/utils.o \ 48 build/libs/string.o \ 49 build/libs/spin_lock.o \ 78 build/libs/stdio.o \ 79 build/libs/string.o \ 80 build/libs/spin_lock.o \ 50 81 build/libs/malloc.o 51 82 52 SORT_OBJS = build/sort/main.o \ 53 build/libs/stdio.o \ 54 build/libs/barrier.o 83 ### Objects to be linked for sort.elf 84 SORT_OBJS = build/sort/main.o \ 85 build/libs/stdio.o \ 86 build/libs/spin_lock.o \ 87 build/libs/barrier.o 88 55 89 56 90 CFLAGS = -Wall -ffreestanding -mno-gpopt -mips32 57 91 58 INCLUDE = -Iboot -Isys -Ixml -Ilibs -I. 59 60 all: map.bin soft.elf 61 62 ## merge all *.elf and map.bin to soft.elf 63 soft.elf: build/boot/boot.elf \ 64 build/sys/sys.elf \ 65 build/display/display.elf \ 66 build/router/router.elf \ 67 build/pgcd/pgcd.elf \ 68 build/hello/hello.elf \ 69 build/gameoflife/gameoflife.elf \ 70 build/dhrystone/dhrystone.elf \ 71 build/sort/sort.elf \ 72 73 $(MAKE) -C memo 74 memo/memo.x map.bin 75 $(DU) -D $@ > build$@.txt 92 GIET_INCLUDE = -Igiet_boot \ 93 -Igiet_kernel \ 94 -Igiet_xml \ 95 -Igiet_fat32 \ 96 -Igiet_drivers \ 97 -Igiet_common \ 98 -Igiet_libs \ 99 -I. 100 101 USER_INCLUDE = -Igiet_libs \ 102 -Igiet_xml \ 103 -I. 104 105 all: map.bin \ 106 build/boot/boot.elf \ 107 build/kernel/kernel.elf \ 108 build/display/display.elf \ 109 build/router/router.elf \ 110 build/hello/hello.elf \ 111 build/pgcd/pgcd.elf \ 112 build/dhrystone/dhrystone.elf \ 113 build/gameoflife/gameoflife.elf \ 114 build/sort/sort.elf \ 115 hdd/virt_hdd.dmg 116 117 ### Disk image generation 118 ### This requires the generic LINUX/MacOS sript "create_dmg" script 119 ### written by C.Fuguet. (should be installed in GIET-VM root directory). 120 hdd/virt_hdd.dmg: map.bin \ 121 build/boot/boot.elf \ 122 build/kernel/kernel.elf \ 123 build/display/display.elf \ 124 build/hello/hello.elf \ 125 build/pgcd/pgcd.elf \ 126 build/router/router.elf \ 127 build/dhrystone/dhrystone.elf \ 128 build/gameoflife/gameoflife.elf 129 ### remove all content of virtual disk virt_hdd 130 rm -rf hdd/virt_hdd/* 131 ### copy content to virtual disk from build, misc and map.bin 132 ### the boot.elf file is not copied on the virtual disk 133 cp -r build hdd/virt_hdd 134 rm -rf hdd/virt_hdd/build/boot 135 cp -r hdd/misc hdd/virt_hdd 136 cp map.bin hdd/virt_hdd 137 ### create temporary partition image (partition_image.dmg) 138 ./create_dmg create hdd/virt_hdd partition_image 139 ### copy standard MBR into virtual disk image (mbr.dmg) 140 cp hdd/mbr.dmg $@ 141 ### copy boot.elf into virtual disk image (sector 2) 142 dd if=build/boot/boot.elf of=$@ seek=2 143 ### copy partition image into virtual disk image (sector 300) 144 dd if=partition_image.dmg of=$@ seek=300 145 ### remove partition image 146 rm partition_image.dmg 76 147 77 148 ### mapping compilation 78 149 map.bin: $(MAP_XML) 79 $(MAKE) -C xml 80 xml/xml2bin $< . 81 82 ### system compilation 83 build/sys/sys.elf: $(SYS_OBJS) sys/sys.ld 84 $(LD) -o $@ -T sys/sys.ld $(SYS_OBJS) 85 $(DU) -D $@ > $@.txt 86 87 build/sys/%.o: sys/%.c giet_config.h $(MAP_XML) 88 $(CC) $(INCLUDE) $(CFLAGS) -c -o $@ $< 89 90 build/sys/%.o: sys/%.s giet_config.h $(MAP_XML) 91 $(CC) $(INCLUDE) $(CFLAGS) -c -o $@ $< 150 $(MAKE) -C giet_xml 151 giet_xml/xml2bin $< . 152 153 ### drivers compilation 154 build/drivers/dma_driver.o: giet_drivers/dma_driver.c \ 155 giet_drivers/dma_driver.h \ 156 giet_config.h \ 157 $(MAP_XML) 158 $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< 159 160 build/drivers/fbf_driver.o: giet_drivers/fbf_driver.c \ 161 giet_drivers/fbf_driver.h \ 162 giet_config.h \ 163 $(MAP_XML) 164 $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< 165 166 build/drivers/xcu_driver.o: giet_drivers/xcu_driver.c \ 167 giet_drivers/xcu_driver.h \ 168 giet_config.h \ 169 $(MAP_XML) 170 $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< 171 172 build/drivers/icu_driver.o: giet_drivers/icu_driver.c \ 173 giet_drivers/icu_driver.h \ 174 giet_config.h \ 175 $(MAP_XML) 176 $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< 177 178 build/drivers/ioc_driver.o: giet_drivers/ioc_driver.c \ 179 giet_drivers/ioc_driver.h \ 180 giet_config.h \ 181 $(MAP_XML) 182 $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< 183 184 build/drivers/iob_driver.o: giet_drivers/iob_driver.c \ 185 giet_drivers/iob_driver.h \ 186 giet_config.h \ 187 $(MAP_XML) 188 $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< 189 190 build/drivers/mmc_driver.o: giet_drivers/mmc_driver.c \ 191 giet_drivers/mmc_driver.h \ 192 giet_config.h \ 193 $(MAP_XML) 194 $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< 195 196 build/drivers/mwr_driver.o: giet_drivers/mwr_driver.c \ 197 giet_drivers/mwr_driver.h \ 198 giet_config.h \ 199 $(MAP_XML) 200 $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< 201 202 build/drivers/nic_driver.o: giet_drivers/nic_driver.c \ 203 giet_drivers/nic_driver.h \ 204 giet_config.h \ 205 $(MAP_XML) 206 $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< 207 208 build/drivers/tim_driver.o: giet_drivers/tim_driver.c \ 209 giet_drivers/tim_driver.h \ 210 giet_config.h \ 211 $(MAP_XML) 212 $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< 213 214 build/drivers/tty_driver.o: giet_drivers/tty_driver.c \ 215 giet_drivers/tty_driver.h \ 216 giet_config.h \ 217 $(MAP_XML) 218 $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< 219 220 ### fat32 compilation 221 build/fat32/fat32.o: giet_fat32/fat32.c \ 222 giet_fat32/fat32.h \ 223 giet_config.h \ 224 $(MAP_XML) 225 $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< 226 227 ### utils compilation 228 build/common/utils.o: giet_common/utils.c \ 229 giet_common/utils.h \ 230 giet_config.h \ 231 $(MAP_XML) 232 $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< 233 234 ### vmem compilation 235 build/common/vmem.o: giet_common/vmem.c \ 236 giet_common/vmem.h \ 237 giet_config.h \ 238 $(MAP_XML) 239 $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< 92 240 93 241 ### boot compilation 94 build/boot/boot.elf: $(BOOT_OBJS) boot/boot.ld 95 $(LD) -o $@ -T boot/boot.ld $(BOOT_OBJS) 96 $(DU) -D $@ > $@.txt 97 98 build/boot/%.o: boot/%.c giet_config.h $(MAP_XML) 99 $(CC) $(INCLUDE) $(CFLAGS) -c -o $@ $< 100 101 build/boot/%.o: boot/%.S giet_config.h $(MAP_XML) 102 $(CC) $(INCLUDE) $(CFLAGS) -c -o $@ $< 242 build/boot/boot.elf: $(BOOT_OBJS) 243 $(LD) -o $@ -T giet_boot/boot.ld $(BOOT_OBJS) 244 $(DU) -D $@ > $@.txt 245 246 build/boot/boot.o: giet_boot/boot.c \ 247 giet_common/utils.h \ 248 giet_fat32/fat32.h \ 249 giet_common/vmem.h \ 250 giet_drivers/tty_driver.h \ 251 giet_drivers/ioc_driver.h \ 252 giet_config.h \ 253 $(MAP_XML) 254 $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< 255 256 ### kernel compilation 257 build/kernel/kernel.elf: $(KERNEL_OBJS) giet_kernel/kernel.ld 258 $(LD) -o $@ -T giet_kernel/kernel.ld $(KERNEL_OBJS) 259 $(DU) -D $@ > $@.txt 260 261 build/kernel/%.o: giet_kernel/%.c giet_config.h $(MAP_XML) 262 $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< 263 264 build/kernel/%.o: giet_kernel/%.s giet_config.h $(MAP_XML) 265 $(CC) $(GIET_INCLUDE) $(CFLAGS) -c -o $@ $< 266 267 268 269 270 ### libs compilation 271 build/libs/stdio.o: giet_libs/stdio.c \ 272 giet_libs/stdio.h \ 273 giet_config.h 274 $(CC) $(CFLAGS) $(USER_INCLUDE) -c -o $@ $< 275 276 build/libs/mwmr_channel.o: giet_libs/mwmr_channel.c \ 277 giet_libs/mwmr_channel.h \ 278 giet_config.h 279 $(CC) $(CFLAGS) $(USER_INCLUDE) -c -o $@ $< 280 281 build/libs/malloc.o: giet_libs/malloc.c \ 282 giet_libs/malloc.h \ 283 giet_libs/malloc_private.h \ 284 giet_config.h 285 $(CC) $(CFLAGS) $(USER_INCLUDE) -c -o $@ $< 286 287 build/libs/barrier.o: giet_libs/barrier.c \ 288 giet_libs/barrier.h \ 289 giet_config.h 290 $(CC) $(CFLAGS) $(USER_INCLUDE) -c -o $@ $< 291 292 build/libs/string.o: giet_libs/string.c \ 293 giet_libs/string.h \ 294 giet_config.h 295 $(CC) $(CFLAGS) $(USER_INCLUDE) -c -o $@ $< 296 297 build/libs/spin_lock.o: giet_libs/spin_lock.c \ 298 giet_libs/spin_lock.h \ 299 giet_config.h 300 $(CC) $(CFLAGS) $(USER_INCLUDE) -c -o $@ $< 301 302 303 103 304 104 305 ### display compilation … … 107 308 $(DU) -D $@ > $@.txt 108 309 109 build/display/main.o: display/main .c110 $(CC) $( INCLUDE) $(CFLAGS) -c -o $@ $<310 build/display/main.o: display/main_cma.c 311 $(CC) $(USER_INCLUDE) $(CFLAGS) -c -o $@ $< 111 312 112 313 ### router compilation … … 116 317 117 318 build/router/main.o: router/main.c 118 $(CC) $( INCLUDE) $(CFLAGS) -c -o $@ $<319 $(CC) $(USER_INCLUDE) $(CFLAGS) -c -o $@ $< 119 320 120 321 ### hello compilation … … 124 325 125 326 build/hello/main.o: hello/main.c 126 $(CC) $( INCLUDE) $(CFLAGS) -c -o $@ $<327 $(CC) $(USER_INCLUDE) $(CFLAGS) -c -o $@ $< 127 328 128 329 ### pgcd compilation … … 132 333 133 334 build/pgcd/main.o: pgcd/main.c 134 $(CC) $(INCLUDE) $(CFLAGS) -c -o $@ $< 135 335 $(CC) $(USER_INCLUDE) $(CFLAGS) -c -o $@ $< 136 336 137 337 ### gameoflife compilation … … 141 341 142 342 build/gameoflife/main.o: gameoflife/main.c 143 $(CC) $( INCLUDE) $(CFLAGS) -O3 -c -o $@ $<343 $(CC) $(USER_INCLUDE) $(CFLAGS) -O3 -c -o $@ $< 144 344 145 345 ### dhrystone compilation … … 149 349 150 350 build/dhrystone/dhry_1.o: dhrystone/dhry_1.c 151 $(CC) $( INCLUDE) $(CFLAGS) -c -o $@ $<351 $(CC) $(USER_INCLUDE) $(CFLAGS) -c -o $@ $< 152 352 153 353 build/dhrystone/dhry_2.o: dhrystone/dhry_2.c 154 $(CC) $( INCLUDE) $(CFLAGS) -c -o $@ $<354 $(CC) $(USER_INCLUDE) $(CFLAGS) -c -o $@ $< 155 355 156 356 ### sort compilation 157 build/sort/sort.elf: $(SORT_OBJS) sort/sort.ld 357 build/sort/sort.elf: $(SORT_OBJS) sort/sort.ld 158 358 $(LD) -o $@ -T sort/sort.ld $(SORT_OBJS) 159 359 $(DU) -D $@ > $@.txt 160 360 161 361 build/sort/main.o: sort/main.c 162 $(CC) $(INCLUDE) $(CFLAGS) -O3 -c -o $@ $< 163 164 ### libs compilation 165 build/libs/utils.o: libs/utils.c giet_config.h 166 $(CC) $(CFLAGS) $(INCLUDE) -c -o $@ $< 167 168 build/libs/stdio.o: libs/stdio.c giet_config.h 169 $(CC) $(CFLAGS) $(INCLUDE) -c -o $@ $< 170 171 build/libs/mwmr_channel.o: libs/mwmr_channel.c 172 $(CC) $(CFLAGS) $(INCLUDE) -c -o $@ $< 173 174 build/libs/malloc.o: libs/malloc.c libs/malloc.h libs/malloc_private.h giet_config.h 175 $(CC) $(CFLAGS) $(INCLUDE) -c -o $@ $< 176 177 build/libs/barrier.o: libs/barrier.c 178 $(CC) $(CFLAGS) $(INCLUDE) -c -o $@ $< 179 180 build/libs/string.o: libs/string.c libs/string.h 181 $(CC) $(CFLAGS) $(INCLUDE) -c -o $@ $< 182 183 build/libs/spin_lock.o: libs/spin_lock.c libs/spin_lock.h 184 $(CC) $(CFLAGS) $(INCLUDE) -c -o $@ $< 362 $(CC) $(USER_INCLUDE) $(CFLAGS) -c -o $@ $< 185 363 186 364 ### clean 187 365 clean: 188 366 rm -f *.o *.elf *.bin *.txt core giet_vsegs.ld hard_config.h map.bin*~ 189 $(MAKE) -s clean -C xml 190 $(MAKE) -s clean -C memo 367 $(MAKE) -s clean -C giet_xml 191 368 rm -rf build/boot/* 192 rm -rf build/sys/* 369 rm -rf build/fat32/* 370 rm -rf build/common/* 371 rm -rf build/drivers/* 372 rm -rf build/kernel/* 373 rm -rf build/reset/* 193 374 rm -rf build/libs/* 194 375 rm -rf build/pgcd/* … … 198 379 rm -rf build/gameoflife/* 199 380 rm -rf build/dhrystone/* 381 rm -rf build/sort/* 382 rm -rf build/map.bin 383 rm -rf hdd/virt_hdd.dmg -
soft/giet_vm/dhrystone/dhry.h
r241 r258 361 361 362 362 #include <stdio.h> 363 #include <utils.h>364 363 #include <string.h> 365 364 #include <malloc.h> -
soft/giet_vm/dhrystone/dhrystone.ld
r241 r258 3 3 *****************************************************************************/ 4 4 5 seg_data_base = 0x00800000;6 5 seg_code_base = 0x00400000; 6 seg_data_base = 0x00500000; 7 7 8 8 /*************************************************************************** -
soft/giet_vm/display/display.ld
r191 r258 3 3 *****************************************************************************/ 4 4 5 seg_data_base = 0x00800000;6 5 seg_code_base = 0x00400000; 6 seg_data_base = 0x00500000; 7 7 8 8 /*************************************************************************** -
soft/giet_vm/display/main.c
r254 r258 1 1 #include <stdio.h> 2 2 3 #define NBLOCKS 32 // number of blocks per image(128 * 128) / 5123 #define NBLOCKS 32 // (128 * 128) / 512 4 4 5 unsigned char buf0[128*128] __attribute__((aligned(64))); 6 unsigned char buf1[128*128] __attribute__((aligned(64))); 5 unsigned char buf[128*128] __attribute__((aligned(512))); 7 6 8 __attribute__((constructor)) int main(void) 9 { 10 unsigned int x; 11 unsigned int base = 0; 7 __attribute__((constructor)) void main() 8 { 9 int fd; 10 int blocks; 11 unsigned int ko; 12 unsigned int blocks_to_skip = 8*NBLOCKS; 12 13 13 /* initialise CDMA transfert (double buffer) */ 14 giet_tty_printf("\nStarting task DISPLAY on processor %d at cycle %d\n", 15 giet_procid(), giet_proctime() ); 14 16 15 giet_tty_printf( "*** Starting task DISPLAY_CMA on processor %d at cycle %d\n", 16 giet_procid(), giet_proctime() ); 17 giet_tty_printf( " - buf0 address (LSB) = %x\n", (unsigned int)buf0 ); 18 giet_tty_printf( " - buf1 address (LSB) = %x\n", (unsigned int)buf1 ); 17 /////////////////////////////////////////// 18 fd = giet_fat_open( "misc/images.raw", 0 ); 19 if ( fd < 0 ) 20 { 21 giet_tty_printf("\n*** echec giet_fat_open for misc/images.raw at cycle %d\n", 22 giet_proctime() ); 23 giet_exit(); 24 } 25 else 26 { 27 giet_tty_printf("\ngiet_fat_open completed for misc/images.raw at cycle %d\n", 28 giet_proctime() ); 29 } 19 30 20 x = giet_fb_cma_init( buf0, // buf0 base address 21 buf1, // buf1 base address 22 128*128 ); // buffer size (bytes) 23 giet_assert( (x==0), "echec giet_fb_cdma_init" ); 31 ///////////////////////////////////////// 32 while ( blocks_to_skip < (10 * NBLOCKS) ) 33 { 34 // lecture image sur le disque 35 blocks = giet_fat_read( fd, buf, NBLOCKS, blocks_to_skip ); 36 if ( blocks != NBLOCKS ) 37 { 38 giet_tty_printf("\n*** echec giet_fat_read at cycle %d\n", 39 giet_proctime() ); 40 giet_exit(); 41 } 42 else 43 { 44 giet_tty_printf("\ngiet_fat_read for image %d completed at cycle %d \n", 45 (blocks_to_skip>>5), giet_proctime()); 46 } 24 47 25 while (base < 10 * NBLOCKS) 26 { 27 /* Phase 1 : transfer one image from disk to buf0 and display */ 48 // transfert vers le frame buffer 49 ko = giet_fb_sync_write( 0, buf, 128 * 128 ); 50 if ( ko ) 51 { 52 giet_tty_printf("\n*** echec giet_fb_sync_write at cycle %d\n", 53 giet_proctime() ); 54 giet_exit(); 55 } 56 else 57 { 58 giet_tty_printf("\ndisplay completed for image %d at cycle %d \n", 59 (blocks_to_skip>>5), giet_proctime()); 60 } 28 61 29 giet_tty_printf( "\n *** image %d *** at date = %d \n",30 (base/NBLOCKS), giet_proctime() );62 blocks_to_skip = blocks_to_skip + NBLOCKS; 63 } 31 64 32 x = giet_ioc_read( base, // lba on disk 33 buf0, // user buffer address 34 NBLOCKS ); // number of blocks 35 giet_assert( (x==0) , "echec giet_ioc_read for buf0" ); 36 37 x = giet_ioc_completed(); 38 giet_assert( (x==0) , "echec giet_ioc_completed for buf0" ); 39 40 giet_tty_printf( "ioc_read buf0 completed at date = %d \n", giet_proctime() ); 41 42 x = giet_fb_cma_write( 0 ); // buf0 43 giet_assert( (x==0) , "echec giet_fb_cma_write for buf0" ); 44 45 base = base + NBLOCKS; 46 47 /* Phase 2 : transfer one image from disk to buf1 and display */ 48 49 giet_tty_printf( "\n *** image %d *** at date = %d \n", 50 (base/NBLOCKS), giet_proctime() ); 51 52 x = giet_ioc_read( base, // lba on disk 53 buf1, // user buffer address 54 NBLOCKS ); // number of locks 55 giet_assert( (x==0) , "echec giet_ioc_read for buf1"); 56 57 x = giet_ioc_completed(); 58 giet_assert( (x==0) , "echec giet_ioc_completed for buf1"); 59 60 giet_tty_printf( "ioc_read buf1 completed at date = %d \n", giet_proctime() ); 61 62 x = giet_fb_cma_write( 1 ); // buf1 63 giet_assert( (x==0) , "echec giet_fb_cma_write for buf1" ); 64 65 base = base + NBLOCKS; 66 } // end while 67 68 giet_fb_cma_stop(); 65 giet_tty_printf("\n*** Tak display exit at cycle %d ***\n", giet_proctime()); 69 66 giet_exit(); 70 return 0;71 67 } -
soft/giet_vm/giet_config.h
r254 r258 7 7 /********************************************************************************/ 8 8 9 #ifndef _GIET_ CONFIG_H10 #define _GIET_ CONFIG_H9 #ifndef _GIET_VM_CONFIG_H 10 #define _GIET_VM_CONFIG_H 11 11 12 12 /* hardware parameters */ … … 18 18 #define BOOT_DEBUG_PT 0 /* trace page tables initialisation */ 19 19 #define BOOT_DEBUG_VOBJS 0 /* trace vobjs initialisation */ 20 #define BOOT_DEBUG_SCHED 0 /* trace schedulers initialisation */ 20 21 #define BOOT_DEBUG_PERI 0 /* trace peripherals initialisation */ 21 #define BOOT_DEBUG_ SCHED 0 /* trace schedulers initialisation*/22 #define BOOT_DEBUG_ELF 0 /* trace .elf files loading */ 22 23 23 24 #define GIET_DEBUG_INIT 0 /* trace parallel kernel initialisation */ 25 #define GIET_DEBUG_FAT 0 /* trace fat accesses */ 24 26 #define GIET_DEBUG_SWITCH 0 /* trace context switchs */ 25 27 #define GIET_DEBUG_IOC_DRIVER 0 /* trace IOC accesses */ … … 30 32 /* software parameters */ 31 33 34 #define GIET_IDLE_TASK_PERIOD 10000000 /* Idle Task message period */ 35 #define GIET_MAX_ELF_FILES 20 /* max .elf files loaded by boot-loader */ 36 #define GIET_OPEN_FILES_MAX 16 /* max simultaneously open files */ 32 37 #define GIET_NB_VSPACE_MAX 64 /* max number of virtual spaces */ 33 #define GIET_TICK_VALUE 0x100000/* context switch period (number of cycles) */38 #define GIET_TICK_VALUE 100000 /* context switch period (number of cycles) */ 34 39 #define GIET_USE_IOMMU 0 /* IOMMU activated when non zero */ 40 #define GIET_NO_HARD_CC 0 /* No hard cache coherence when non zero */ 41 35 42 #endif 36 43 -
soft/giet_vm/hello/hello.ld
r191 r258 3 3 *****************************************************************************/ 4 4 5 seg_data_base = 0x00800000;6 5 seg_code_base = 0x00400000; 6 seg_data_base = 0x00500000; 7 7 8 8 /*************************************************************************** -
soft/giet_vm/pgcd/pgcd.ld
r191 r258 3 3 *****************************************************************************/ 4 4 5 seg_data_base = 0x00800000;6 5 seg_code_base = 0x00400000; 6 seg_data_base = 0x00500000; 7 7 8 8 /*************************************************************************** -
soft/giet_vm/router/router.ld
r191 r258 3 3 *****************************************************************************/ 4 4 5 seg_data_base = 0x00800000;6 5 seg_code_base = 0x00400000; 6 seg_data_base = 0x00500000; 7 7 8 8 /*************************************************************************** -
soft/giet_vm/sort/main.c
r257 r258 45 45 // threads 46 46 47 #define NPROCS 1647 #define NPROCS 4 48 48 #define ARRAY_LENGTH (NPROCS * 128) 49 49 #define IPP (ARRAY_LENGTH / NPROCS) // ITEMS PER PROCESSOR -
soft/giet_vm/sort/sort.ld
r256 r258 3 3 *****************************************************************************/ 4 4 5 seg_data_base = 0x00800000;6 5 seg_code_base = 0x00400000; 6 seg_data_base = 0x00500000; 7 7 8 8 /***************************************************************************
Note: See TracChangeset
for help on using the changeset viewer.