some_var = 1;write(fd,&some_var | CAM_UNACHED_BIT...
Is it portable?
Well, after some tries, it doesn't work as expected.Setting uncached bit don't work. I look to clean and flush cache (in asm) previously to write but choose to use cached malloc during process and move that mem into freshly uncached malloc buffer, then write that umalloc before ufreeing it.Faster, really faster
It is usual to clean the cache before flushing it, so that external memory is updated withany dirty data. The following code segment shows how you can clean and flush theentire cache (assuming a 4KB data cache):MOV r1, #0 ; Initialize segment counter [color=red]outer_loop[/color]MOV r0, #0 ; Initialize line counter [color=red]inner_loop[/color]ORR r2, r1, r0 ; Generate segment and line addressMCR p15, 0, r2, c7, c14, 2 ; Clean and flush the lineADD r0, r0, #0x20 ; Increment to next lineCMP r0, #0x400 ; Complete all entries in one segment?BNE inner_loop ; If not branch back to inner_loopADD r1, r1, #0x40000000 ; Increment segment counterCMP r1, #0x0 ; Complete all segmentsBNE outer_loop ; If not branch back to outer_loop; End of routine
So no answer ?
I assume it's faster than copying 66KB from cached to uncached buffer !
Started by Simon70 General Help and Assistance on using CHDK stable releases
Started by rahulrs Firmware Dumping
Started by reyalp General Discussion and Assistance
Started by RaduP « 1 2 3 » General Discussion and Assistance
Started by icameisaw « 1 2 3 » RAW Shooting and Processing