Changeset 429
- Timestamp:
- Oct 4, 2014, 3:20:52 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
soft/giet_vm/giet_fat32/fat32.c
r417 r429 193 193 #if GIET_DEBUG_FAT 194 194 unsigned int procid = _get_procid(); 195 unsigned int cid = procid / NB_PROCS_MAX;196 unsigned int lpid = procid % NB_PROCS_MAX;197 unsigned int x = cid >> Y_WIDTH;198 unsigned int y = cid & ((1<<Y_WIDTH) - 1); 195 unsigned int x = procid >> (Y_WIDTH + P_WIDTH); 196 unsigned int y = (procid >> P_WIDTH) & ((1<<Y_WIDTH)-1); 197 unsigned int p = procid & ((1<<P_WIDTH)-1); 198 199 199 _printf("\n[FAT DEBUG] _get_next_cluster() : P[%d,%d,%d] enters for cluster %x\n", 200 x, y, lpid, cluster );200 x, y, p, cluster ); 201 201 #endif 202 202 … … 231 231 #if GIET_DEBUG_FAT 232 232 _printf("\n[FAT DEBUG] _get_next_cluster() : P[%d,%d,%d] next cluster = %x\n", 233 x, y, lpid, next );233 x, y, p, next ); 234 234 #endif 235 235 … … 820 820 #if GIET_DEBUG_FAT 821 821 unsigned int procid = _get_procid(); 822 unsigned int cid = procid / NB_PROCS_MAX;823 unsigned int lpid = procid % NB_PROCS_MAX;824 unsigned int x = cid >> Y_WIDTH;825 unsigned int y = cid & ((1<<Y_WIDTH) - 1); 822 unsigned int x = procid >> (Y_WIDTH + P_WIDTH); 823 unsigned int y = (procid >> P_WIDTH) & ((1<<Y_WIDTH)-1); 824 unsigned int p = procid & ((1<<P_WIDTH)-1); 825 826 826 _printf("\n[FAT DEBUG] _scan_directory() : P[%d,%d,%d] enters for %s / is_sfn = %d\n", 827 x, y, lpid, file_name, is_sfn );827 x, y, p, file_name, is_sfn ); 828 828 #endif 829 829 … … 973 973 #if GIET_DEBUG_FAT 974 974 _printf("\n[FAT DEBUG] _scan_directory() : P[%d,%d,%d] found %s / cluster = %x\n", 975 x, y, lpid, file_name, searched_cluster );975 x, y, p, file_name, searched_cluster ); 976 976 #endif 977 977 … … 1010 1010 #if GIET_DEBUG_FAT 1011 1011 unsigned int procid = _get_procid(); 1012 unsigned int cid = procid / NB_PROCS_MAX; 1013 unsigned int lpid = procid % NB_PROCS_MAX; 1014 unsigned int x = cid >> Y_WIDTH; 1015 unsigned int y = cid & ((1<<Y_WIDTH) - 1); 1016 1017 _printf("\n[FAT DEBUG] _fat_init() : P[%d,%d,%d] enters", x, y, lpid ); 1012 unsigned int x = procid >> (Y_WIDTH + P_WIDTH); 1013 unsigned int y = (procid >> P_WIDTH) & ((1<<Y_WIDTH)-1); 1014 unsigned int p = procid & ((1<<P_WIDTH)-1); 1015 1016 _printf("\n[FAT DEBUG] _fat_init() : P[%d,%d,%d] enters", x, y, p ); 1018 1017 if ( mode == IOC_BOOT_MODE ) _printf(" / IOC_BOOT_MODE\n"); 1019 1018 if ( mode == IOC_KERNEL_MODE ) _printf(" / IOC_KERNEL_MODE\n"); … … 1095 1094 1096 1095 #if GIET_DEBUG_FAT 1097 _printf("\n[FAT DEBUG] _fat_init() : P[%d,%d,%d] initialises FAT descriptor\n", x, y, lpid);1096 _printf("\n[FAT DEBUG] _fat_init() : P[%d,%d,%d] initialises FAT descriptor\n", x, y, p ); 1098 1097 _fat_print(); 1099 _printf("\n[FAT DEBUG] _fat_init() : P[%d,%d,%d] exit\n", x, y, lpid);1098 _printf("\n[FAT DEBUG] _fat_init() : P[%d,%d,%d] exit\n", x, y, p ); 1100 1099 #endif 1101 1100 … … 1145 1144 #if GIET_DEBUG_FAT 1146 1145 unsigned int procid = _get_procid(); 1147 unsigned int cid = procid / NB_PROCS_MAX;1148 unsigned int lpid = procid % NB_PROCS_MAX;1149 unsigned int x = cid >> Y_WIDTH;1150 unsigned int y = cid & ((1<<Y_WIDTH) - 1); 1146 unsigned int x = procid >> (Y_WIDTH + P_WIDTH); 1147 unsigned int y = (procid >> P_WIDTH) & ((1<<Y_WIDTH)-1); 1148 unsigned int p = procid & ((1<<P_WIDTH)-1); 1149 1151 1150 _printf("\n[FAT DEBUG] _fat_open() : P[%d,%d,%d] enters for path %s\n", 1152 x, y, lpid, pathname );1151 x, y, p, pathname ); 1153 1152 #endif 1154 1153 … … 1165 1164 #if GIET_DEBUG_FAT 1166 1165 _printf("\n[FAT DEBUG] _fat_open() : P[%d,%d,%d] takes the FAT lock\n", 1167 x, y, lpid);1166 x, y, p ); 1168 1167 #endif 1169 1168 … … 1193 1192 #if GIET_DEBUG_FAT 1194 1193 _printf("\n[FAT DEBUG] _fat_open() : P[%d,%d,%d] search dir/file : %s\n", 1195 x, y, lpid, name );1194 x, y, p, name ); 1196 1195 #endif 1197 1196 … … 1223 1222 #if GIET_DEBUG_FAT 1224 1223 _printf("\n[FAT DEBUG] _fat_open() : P[%d,%d,%d] found cluster index for file %s : %x\n", 1225 x, y, lpid, pathname, cluster );1224 x, y, p, pathname, cluster ); 1226 1225 #endif 1227 1226 … … 1249 1248 #if GIET_DEBUG_FAT 1250 1249 _printf("\n[FAT DEBUG] _fat_open() : P[%d,%d,%d] exit : fd = %d for file %s\n", 1251 x, y, lpid, fd_id, pathname );1250 x, y, p, fd_id, pathname ); 1252 1251 #endif 1253 1252 … … 1343 1342 #if GIET_DEBUG_FAT 1344 1343 unsigned int procid = _get_procid(); 1345 unsigned int cid = procid / NB_PROCS_MAX; 1346 unsigned int lpid = procid % NB_PROCS_MAX; 1347 unsigned int x = cid >> Y_WIDTH; 1348 unsigned int y = cid & ((1<<Y_WIDTH) - 1); 1344 unsigned int x = procid >> (Y_WIDTH + P_WIDTH); 1345 unsigned int y = (procid >> P_WIDTH) & ((1<<Y_WIDTH)-1); 1346 unsigned int p = procid & ((1<<P_WIDTH)-1); 1349 1347 _printf("\n[FAT DEBUG] _fat_read() : P[%d,%d,%d] enters for file %s\n" 1350 1348 " - buffer vbase = %x\n" … … 1353 1351 " - first cluster = %x\n" 1354 1352 " - skiped clusters = %x\n", 1355 x, y, lpid, fat.fd[fd_id].name,1353 x, y, p, fat.fd[fd_id].name, 1356 1354 (unsigned int)buffer, offset, count, cluster, clusters_to_skip ); 1357 1355 #endif … … 1388 1386 " - lba = %x\n" 1389 1387 " - sectors = %d\n", 1390 x, y, lpid, cluster, (unsigned int)dst, lba, iter_sectors );1388 x, y, p, cluster, (unsigned int)dst, lba, iter_sectors ); 1391 1389 #endif 1392 1390 … … 1463 1461 #if GIET_DEBUG_FAT 1464 1462 unsigned int procid = _get_procid(); 1465 unsigned int cid = procid / NB_PROCS_MAX;1466 unsigned int lpid = procid % NB_PROCS_MAX;1467 unsigned int x = cid >> Y_WIDTH;1468 unsigned int y = cid & ((1<<Y_WIDTH) - 1); 1463 unsigned int x = procid >> (Y_WIDTH + P_WIDTH); 1464 unsigned int y = (procid >> P_WIDTH) & ((1<<Y_WIDTH)-1); 1465 unsigned int p = procid & ((1<<P_WIDTH)-1); 1466 1469 1467 _printf("\n[FAT DEBUG] _fat_write() : P[%d,%d,%d] enters for file %s\n", 1470 1468 " - buffer vbase = %x\n" … … 1473 1471 " - file sectors = %x\n" 1474 1472 " - need allocate = %d\n", 1475 x, y, lpid, fat.fd[fd_id].name, (unsigned int)buffer,1473 x, y, p, fat.fd[fd_id].name, (unsigned int)buffer, 1476 1474 offset, count, file_sectors, allocate ); 1477 1475 #endif … … 1544 1542 _printf("\n[FAT DEBUG] _fat_write() : P[%d,%d,%d] makes an IOC write : " 1545 1543 "buf = %x / lba = %x / sectors = %x\n", 1546 x, y, lpid, (unsigned int)src, lba, iter_sectors );1544 x, y, p, (unsigned int)src, lba, iter_sectors ); 1547 1545 #endif 1548 1546
Note: See TracChangeset
for help on using the changeset viewer.