changelog of trunk including comments / devtalk - page 13 - General Discussion and Assistance - CHDK Forum

changelog of trunk including comments / devtalk

  • 299 Replies
  • 238222 Views
*

Offline srsa_4c

  • ******
  • 4451
Re: changelog of trunk including comments / devtalk
« Reply #120 on: 09 / October / 2012, 00:10:30 »
Advertisements
It also will not work on cameras without cp15 (only srsas S1 port as far as we know, which is not in in the trunk anyway)
Do you have any idea/suggestion what could be used on a CPU where the cache control isn't known?
Quote
With a bit more work using cp15 cache control will also allow us to improve the handling of read()/write() and the umalloc/malloc issues.
By any chance is this related to what the ML developers do? Could we use this method directly or are our (compacts <-> DSLRs) CPUs configured differently? Would be a great way to gather information about obscure places of the firmware.
I remember A1ex mentioning that ML is less stable with cache hacks for some reason though.

*

Offline reyalp

  • ******
  • 14111
Re: changelog of trunk including comments / devtalk
« Reply #121 on: 09 / October / 2012, 00:32:51 »
It also will not work on cameras without cp15 (only srsas S1 port as far as we know, which is not in in the trunk anyway)
Do you have any idea/suggestion what could be used on a CPU where the cache control isn't known?
If there's anywhere the Canon code copies code into RAM, that might contain some clues. Otherwise you can do some brute force things. My initial "fix" for this was to do
Code: [Select]
       for(i=0;i<size_flat;i++) {
           *(char *)((int)(flat_buf+i) | CAM_UNCACHED_BIT) = *(flat_buf+i);
       }
Which should take care of the data cache "cleaning". Not sure how you would flush the instruction cache short of executing a full cache worth of code (can't be a loop either!), but that should be less of an issue.
Quote
Quote
With a bit more work using cp15 cache control will also allow us to improve the handling of read()/write() and the umalloc/malloc issues.
By any chance is this related to what the ML developers do?
No, thats something very different, although I was wondering last night if we could abuse lockdown like that. Interesting.
Quote
Could we use this method directly or are our (compacts <-> DSLRs) CPUs configured differently?
I don't think there should be much difference.
Quote
I remember A1ex mentioning that ML is less stable with cache hacks for some reason though.
It seems like there's a few ways the Canon firmware could break it. Those could be different between P&S and DSLR too, I guess.
Don't forget what the H stands for.

*

Offline reyalp

  • ******
  • 14111
Re: changelog of trunk including comments / devtalk
« Reply #122 on: 09 / October / 2012, 00:39:06 »
I checked the change into the stable branch in changeset 2205.
Don't forget what the H stands for.

*

Offline reyalp

  • ******
  • 14111
Re: changelog of trunk including comments / devtalk
« Reply #123 on: 21 / April / 2013, 23:21:18 »
In trunk changeset  2723 I've restored some of the stock lua module handling code. This may bloat things slightly, but it gets our Lua implementation a bit closer to stock, and also makes it so hostlua require (outside of emu) can operate normally.

The default module path is set so that it should match the previous implementation, but you can now manipulate package.path if you like.
Don't forget what the H stands for.


*

Offline reyalp

  • ******
  • 14111
Re: changelog of trunk including comments / devtalk
« Reply #124 on: 28 / April / 2013, 23:25:00 »
In trunk changeset 2735 I've updated the dbg_dump format to include module info.

The corresponding chdkptp decoder script update is changeset 335. Among other things, it will now annotate which module addresses on the stack belong to, and whether they are text or data. The same annotation can also be obtained on the "user data" using dump:print_udata_words().
Don't forget what the H stands for.

*

Offline reyalp

  • ******
  • 14111
Re: changelog of trunk including comments / devtalk
« Reply #125 on: 02 / May / 2013, 16:56:21 »
In trunk changeset 2753 I've updated the cache code to get the cache size from cp15, based on report in this thread: http://chdk.setepontos.com/index.php?topic=2139.10

This should also go in the release branch, since using the incorrect size could lead to module crashes, but I'd like to have a digic 5 user report that it works (or at least doesn't crash) before merging it over.

Getting the cache config at runtime rather than using a define may be overkill, but it seems more reliable than relying on porters to check. An alternative would be to use the sigfinder to locate the equivalent canon cache control functions. We could also just do it based on digic version, but I wouldn't rule out canon making a low end "Digic 5" that has half the cache disabled or something.
Don't forget what the H stands for.

Re: changelog of trunk including comments / devtalk
« Reply #126 on: 02 / May / 2013, 20:41:05 »
This should also go in the release branch, since using the incorrect size could lead to module crashes, but I'd like to have a digic 5 user report that it works (or at least doesn't crash) before merging it over.
Did an svn update, rebuilt the 1.2.0 version of the SX50HS (digic5), downloaded to camera and rebooted.  Everything seems to run fine.

Patched with cpuinfo patch from here :
http://chdk.setepontos.com/index.php?topic=2139.msg100074#msg100074

Resulting file attached.
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline reyalp

  • ******
  • 14111
Re: changelog of trunk including comments / devtalk
« Reply #127 on: 02 / May / 2013, 22:24:05 »
Did an svn update, rebuilt the 1.2.0 version of the SX50HS (digic5), downloaded to camera and rebooted. 
Everything seems to run fine.
Thanks for confirming, I'll merge that change over to the stable branch.


Quote
Patched with cpuinfo patch from here :
http://chdk.setepontos.com/index.php?topic=2139.msg100074#msg100074

Resulting file attached.
Thanks. CPU info is identical to the one for sx50 posted by yukia10 (a good thing...  8))
If you want to get CPU info on your other cameras, that might be interesting. I *expect* all the digic-II through digic IV are very similar to what we've already seen, but you never know.

The only thing that would be expected to vary is the size and location of the memory protection regions, and the location of the DTCM.
Don't forget what the H stands for.


Re: changelog of trunk including comments / devtalk
« Reply #128 on: 02 / May / 2013, 22:44:38 »
If you want to get CPU info on your other cameras, that might be interesting. I *expect* all the digic-II through digic IV are very similar to what we've already seen, but you never know.
Attached file has CPUINFO.TXT for G10, IXUS120_SD940, and A1200 - all Digic4 cams unfortunately.
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline reyalp

  • ******
  • 14111
Re: changelog of trunk including comments / devtalk
« Reply #129 on: 02 / May / 2013, 22:54:11 »
Attached file has CPUINFO.TXT for G10, IXUS120_SD940, and A1200 - all Digic4 cams unfortunately.
Thanks.

Only difference is the g10 has 128 megs of RAM where the others have 64.
Don't forget what the H stands for.

 

Related Topics


SimplePortal 2.3.6 © 2008-2014, SimplePortal