Lots of missing functions - DryOS Development - CHDK Forum supplierdeeply

Lots of missing functions

  • 15 Replies
  • 7456 Views
*

Offline RaduP

  • *****
  • 926
Lots of missing functions
« on: 24 / September / 2009, 04:35:08 »
Advertisements
I think Canon changed their libc or something, because the sigfinder can't find the following functions:

Code: [Select]
NHSTUB(UpdateMBROnFlash, 0xDEADC0DE)
NHSTUB(GetOpticalTemperature, 0xDEADC0DE)
NHSTUB(Open, 0xDEADC0DE)
NHSTUB(Close, 0xDEADC0DE)
NHSTUB(Write, 0xDEADC0DE)
NHSTUB(lseek, 0xDEADC0DE)
NHSTUB(mkdir, 0xDEADC0DE)
NHSTUB(Remove, 0xDEADC0DE)
NHSTUB(malloc, 0xFF8140DC)//MAYBE
NHSTUB(free, 0xFF814138)//MAYBE
NHSTUB(strcmp, 0xFF8203A8)//done
NHSTUB(rename, 0xDEADC0DE)
NHSTUB(opendir, 0xDEADC0DE)
NHSTUB(ReadFastDir, 0xDEADC0DE)
NHSTUB(stat, 0xDEADC0DE)
NHSTUB(kbd_p2_f, 0xDEADC0DE)

Other i/o functions are found, but partial match, and at least a few are found wrong.
I think all the new cameras are going to have this new libc, so someone that actually understands the whole thing might want to take a look and find them to update the signatures.

Is there anyone else who was unable to get the sigfinder to find any of those functions?

*

Offline RaduP

  • *****
  • 926
Re: Lots of missing functions
« Reply #1 on: 24 / September / 2009, 15:42:33 »
Hmm, on the SX10, Lseek and lseek are equivalent (same function). I wonder if that would work on the SD980..

*

Offline RaduP

  • *****
  • 926
Re: Lots of missing functions
« Reply #2 on: 24 / September / 2009, 16:05:13 »
Ok, it seems that the canon people were nice enough to make some of the i/o functions easy to find, by putting them in a table, with text. Once I find them all, maybe someone more experienced than me can check them to make sure everything is right, and get their signatures.

*

Offline reyalp

  • ******
  • 14090
Re: Lots of missing functions
« Reply #3 on: 24 / September / 2009, 17:35:34 »
Is there anyone else who was unable to get the sigfinder to find any of those functions?
If it's running at all you will get the same results as anyone else.
Don't forget what the H stands for.


*

Offline RaduP

  • *****
  • 926
Re: Lots of missing functions
« Reply #4 on: 24 / September / 2009, 18:21:41 »
Is there anyone else who was unable to get the sigfinder to find any of those functions?
If it's running at all you will get the same results as anyone else.

Well, I looked in the stubs_entry.s for other cameras, and there were functions there that weren't on mine, so I am pretty sure the new cameras will have different signatures.

Re: Lots of missing functions
« Reply #5 on: 24 / September / 2009, 18:34:31 »
Your original post is assumed already.  As canon changes things the sig will get better % match or worse.  It is a normal part of porting to chdk.  That said you could add additional sigs for newer cameras if you want.  (I'm sure it's easier then the CHDK port is)

I beleive my NHSTUB() list is about 20 items for the basic fuctions for the SD780.  Also note that some stubs that sigfin locates will actually be false positives and they need to be in the NHSTUB list too.

Harpo
Canon Models - SD300, SD780, & SX210

*

Offline RaduP

  • *****
  • 926
Re: Lots of missing functions
« Reply #6 on: 24 / September / 2009, 18:39:33 »
Well, one would assume that standard functions, such as malloc, free, Open, lseek, etc, would not be changed too often, if at all.

Re: Lots of missing functions
« Reply #7 on: 24 / September / 2009, 18:44:52 »
If that assumption is correct then you should be able to go to any of the newer ports (say mine) and then go to your new port and find the function through a direct search by string (or byte wise).  If that proves correct then you can add a signature in the sigfinder tool. 

This would also speed up your efforts and also prove the assumption.  It was an area I thought about but had to balance my efforts.

Harpo 
Canon Models - SD300, SD780, & SX210


*

Offline RaduP

  • *****
  • 926
Re: Lots of missing functions
« Reply #8 on: 24 / September / 2009, 18:46:37 »
Well, I only looked at the ports in the SVN, and I did see those basic functions auto-detected properly. Which port are you working at? And what standard functions were not found automatically?

Re: Lots of missing functions
« Reply #9 on: 24 / September / 2009, 18:55:16 »
My firmware is at http://chdk.setepontos.com/index.php/topic,3995.msg37547.html#msg37547
My list for SD780 is:

#include "stubs_asm.h"
// not found correctly by finsig

//Autofound Required!
NHSTUB(TurnOffBackLight,0xFF878DEC)   //DispSwCon_TurnOffBackLight
NHSTUB(VbattGet,0xFF91B708)      //eventproc_export_VbattGet
NHSTUB(vsprintf,0xFF81CBA0)      //eventproc_export_CPrintf look for function called before error txt
NHSTUB(Mount_FileSystem,0xFF858BEC)      //Do we fix? Not in Dryos?
NHSTUB(Unmount_FileSystem,0xFF858BEC)      //Do we fix? Not in Dryos?
NHSTUB(rewinddir,0xFF858BEC)         //Do we fix? Not in Dryos?
NHSTUB(SetZoomActuatorSpeedPercent,0xFF858BEC)   //Do we fix? Not in Dryos?
NHSTUB(strchr,0xFF88779C)         //search AND R2, R1, #0xFF then LDRB R1, [R0]
NHSTUB(kbd_pwr_on,0xFF858BEC)         //Do we fix?
NHSTUB(kbd_read_keys,0xFF821DCC)      //Look for LDR R0, =YYYY then BL GetKbdState then LDR R0, =YYYY
NHSTUB(DoAFLock,0xFF85B170)         //Look for AFL*
NHSTUB(UnlockAF,0xFF85B180)         //Look for AFUL*
NHSTUB(LEDDrive,0xFF842698)
NHSTUB(ScreenLock,0xFF99CEC4)         //Look for ScreenLock
NHSTUB(RefreshPhysicalScreen,0xFF99CF18)   //Look for ScreenUnLock
NHSTUB(EnterToCompensationEVF,0xFF825420)   //Look for ExpOn
NHSTUB(ExitFromCompensationEVF,0xFF825464)   //Look for ExpOff
NHSTUB(PT_PlaySound,0xFF85B05C)         //Look for LDRH Ro, [R0] follow by LDR R1, [R1]
NHSTUB(WriteSDCard,0xFF903B38)         //Look for ADD     R7, R1, R2,LSL#2
NHSTUB(GetDrive_FreeClusters,0xFF852440)   //Not certain
NHSTUB(GetDrive_TotalClusters,0xFF852414)   //Not certain
NHSTUB(GetDrive_ClusterSize,0xFF8523E8)      //Not certain
NHSTUB(GetOpticalTemperature,0xFF845FA4)   //Not certain   
NHSTUB(GetCurrentTargetDistance,0xFF912430)
NHSTUB(kbd_p2_f,0xFF82170C)         //task_PhySw+1C
NHSTUB(qsort,0xFFA79A4C)         //Look for "ORR     R2, R0, R2" (second hit)

NHSTUB(OpLog_Get,0xFF86C53C)      //OpLog.Get()

NHSTUB(AllocateUncacheableMemory, 0xFF827448) //Override default found version Replaced found one based on missed location..
NHSTUB(kbd_pwr_off, 0xFF858BEC)  //Override default found version
//0xFF858BEC is returned...
NHSTUB(PutInNdFilter,0xFF858BEC)  //Maybe 0xFFA3C0BC
NHSTUB(PutOutNdFilter,0xFF858BEC)  //Maybe near 0xFFA3C0BC
//Build Required!
NHSTUB(PostLogicalEventForNotPowerType,0xFF858BEC)
NHSTUB(UnsetZoomForMovie,0xFF858BEC)
Canon Models - SD300, SD780, & SX210

 

Related Topics


SimplePortal 2.3.6 © 2008-2014, SimplePortal