1. Trammell Hudson
  2. Magic Lantern
  3. Pull requests

Pull requests

#792 Open

Update to EOSM firmware revision 2.0.3

Bitbucket cannot automatically merge this request.

The commits that make up this pull request have been removed.

Bitbucket cannot automatically merge this request due to conflicts.

Review the conflicts on the Overview tab. You can then either decline the request or merge it manually on your local system using the following commands:

hg update 221152120589
hg pull -r update-to-EOSM.203 https://bitbucket.org/Eosm_Dev/magic-lantern
# Note: This will create a new head!
hg merge update-to-EOSM.203
hg commit -m 'Merged in Eosm_Dev/magic-lantern/update-to-EOSM.203 (pull request #792)'
  1. Eosm Developer
  • update of platform EOSM to firmware revision 2.0.3

  • removed ML-SETUP.FIR (somebody needs to recreate it for revision 2.0.3)

Comments (19)

  1. Alex

    Installer FIR for 2.0.3 (not tested, just compiled from this branch): ML-SETUP.FIR

    Minor: hg rename installer/EOSM.202 installer/EOSM.203 (no changes needed inside this directory)

    stub-checker log:

    STUB                                   OLD           NEW     DELTA
    get_current_task                    0x0000252c -> 0x0000252c [0x000]
    create_init_task                    0x00002eb8 -> 0x00002eb8 [0x000]
    DryosDebugMsg                       0x000040d4 -> 0x000040d4 [0x000]
    dm_set_store_level                  0x00004440 -> 0x00004440 [0x000]
    SetHPTimerAfterNow                  0x00005750 -> 0x00005750 [0x000]
    SetHPTimerNextTick                  0x00005840 -> 0x00005840 [0x000]
    create_named_semaphore              0x00006958 -> 0x00006958 [0x000]
    take_semaphore                      0x00006ab8 -> 0x00006ab8 [0x000]
    give_semaphore                      0x00006ba4 -> 0x00006ba4 [0x000]
    msleep                              0x00006f94 -> 0x00006f94 [0x000]
    task_create                         0x00007048 -> 0x00007048 [0x000]
    GetSizeOfMaxRegion                  0x00007c24 -> 0x00007c24 [0x000]
    GetMemoryInformation                0x00007c78 -> 0x00007c78 [0x000]
    _AllocateMemory                     0x00007ed8 -> 0x00007ed8 [0x000]
    _FreeMemory                         0x00008274 -> 0x00008274 [0x000]
    CreateMemoryChunk                   0x00008b3c -> 0x00008b3c [0x000]
    GetMemoryAddressOfMemoryChunk       0x000090e0 -> 0x000090e0 [0x000]
    DeleteMemorySuite                   0x00009154 -> 0x00009154 [0x000]
    CreateMemorySuite                   0x0000935c -> 0x0000935c [0x000]
    AddMemoryChunk                      0x00009638 -> 0x00009638 [0x000]
    GetFirstChunkFromSuite              0x00009708 -> 0x00009708 [0x000]
    GetNextMemoryChunk                  0x00009ea4 -> 0x00009ea4 [0x000]
    msg_queue_create                    0x0000a6f4 -> 0x0000a6f4 [0x000]
    CreateRecursiveLock                 0x0000a8dc -> 0x0000a8dc [0x000]
    dma_memcpy                          0x0000ac40 -> 0x0000ac40 [0x000]
    SetTimerAfter                       0x0000bcb8 -> 0x0000bcb8 [0x000]
    CancelTimer                         0x0000beb8 -> 0x0000beb8 [0x000]
    task_trampoline                     0x0000c360 -> 0x0000c360 [0x000]
    get_obj_attr                        0x0000ee6c -> 0x0000ee6c [0x000]
    SetEDmac                            0x0001c5fc -> 0x0001c5fc [0x000]
    ConnectWriteEDmac                   0x0001c6a8 -> 0x0001c6a8 [0x000]
    ConnectReadEDmac                    0x0001c76c -> 0x0001c76c [0x000]
    StartEDmac                          0x0001c914 -> 0x0001c914 [0x000]
    RegisterEDmacCompleteCBR            0x0001cb00 -> 0x0001cb00 [0x000]
    UnregisterEDmacCompleteCBR          0x0001cb3c -> 0x0001cb3c [0x000]
    RegisterEDmacAbortCBR               0x0001cbe8 -> 0x0001cbe8 [0x000]
    UnregisterEDmacAbortCBR             0x0001cc24 -> 0x0001cc24 [0x000]
    RegisterEDmacPopCBR                 0x0001cc7c -> 0x0001cc7c [0x000]
    UnregisterEDmacPopCBR               0x0001ccb8 -> 0x0001ccb8 [0x000]
    msg_queue_receive                   0x0001ec58 -> 0x0001ec58 [0x000]
    msg_queue_post                      0x0001ee44 -> 0x0001ee44 [0x000]
    msg_queue_count                     0x0001ee84 -> 0x0001ee84 [0x000]
    AcquireRecursiveLock                0x0001ef90 -> 0x0001ef90 [0x000]
    ReleaseRecursiveLock                0x0001f0a4 -> 0x0001f0a4 [0x000]
    vsnprintf                           0x000205cc -> 0x000205cc [0x000]
    TryPostStageEvent                   0x00021c4c -> 0x00021c4c [0x000]
    TryPostStageEvent_end               0x00021cd0 -> 0x00021cd0 [0x000]
    TryPostEvent                        0x0002232c -> 0x0002232c [0x000]
    TryPostEvent_end                    0x000223b0 -> 0x000223b0 [0x000]
    _alloc_dma_memory                   0x00022574 -> 0x00022574 [0x000]
    _free_dma_memory                    0x000225a8 -> 0x000225a8 [0x000]
    is_taskid_valid                     0x0002cfa0 -> 0x0002cfa0 [0x000]
    bzero32                             0x00036ed8 -> 0x00036ed8 [0x000]
    task_dispatch_hook                  0x0003dd60 -> 0x0003dd60 [0x000]
    gui_main_struct                     0x0003e154 -> 0x0003e154 [0x000]
    pre_isr_hook                        0x0003e1c8 -> 0x0003e1c8 [0x000]
    post_isr_hook                       0x0003e1cc -> 0x0003e1cc [0x000]
    sounddev                            0x0003e46c -> 0x0003e46c [0x000]
    dm_names                            0x0003ec7c -> 0x0003ec7c [0x000]
    task_max                            0x0003f14c -> 0x0003f14c [0x000]
    mvr_config                          0x0004c124 -> 0x0004c124 [0x000]
    gui_task_list                       0x00058da0 -> 0x00058da0 [0x000]
    sd_device                           0x000606dc -> 0x000606dc [0x000]
    LCD_Palette                         0x0006bab4 -> 0x0006bab4 [0x000]
    bmp_vram_info                       0x0006d2b4 -> 0x0006d2b4 [0x000]
    camera_engine                       0xc0220000 -> 0xc0220000 [0x000]
    cstart                              0xff0c1c10 -> 0xff0c1c10 [0x000] [!!!]
    init_task                           0xff0c5484 -> 0xff0c5480 [0x004]
    _malloc                             0xff0c8364 -> 0xff0c8360 [0x004]
    _free                               0xff0c83bc -> 0xff0c83b8 [0x004]
    gui_main_task                       0xff0d72a0 -> 0xff0d7350 [0x0b0]
    GUI_Control                         0xff0d7674 -> 0xff0d7724 [0x0b0]
    gui_init_end                        0xff0d7d18 -> 0xff0d7dc8 [0x0b0]
    SRM_AllocateMemoryResourceFor1stJob 0xff0e75dc -> 0xff0e768c [0x0b0]
    SRM_FreeMemoryResourceFor1stJob     0xff0eb63c -> 0xff0eb6ec [0x0b0]
    StartASIFDMAADC                     0xff10a674 -> 0xff10a724 [0x0b0]
    SoundDevShutDownIn                  0xff10a920 -> 0xff10a9d0 [0x0b0]
    StopASIFDMAADC                      0xff10a920 -> 0xff10a9d0 [0x0b0]
    StartASIFDMADAC                     0xff10aa48 -> 0xff10aaf8 [0x0b0]
    StopASIFDMADAC                      0xff10acc8 -> 0xff10ad78 [0x0b0]
    SetNextASIFADCBuffer                0xff10b190 -> 0xff10b240 [0x0b0]
    SetNextASIFDACBuffer                0xff10b378 -> 0xff10b428 [0x0b0]
    sounddev_task                       0xff10cd40 -> 0xff10cdf0 [0x0b0]
    SoundDevActiveIn                    0xff10d148 -> 0xff10d1f8 [0x0b0]
    prop_register_slave                 0xff11f910 -> 0xff11f9c0 [0x0b0]
    _prop_request_change                0xff11fb04 -> 0xff11fbb4 [0x0b0]
    prop_deliver                        0xff1200c0 -> 0xff120170 [0x0b0]
    _prop_cleanup                       0xff12018c -> 0xff12023c [0x0b0]
    LoadCalendarFromRTC                 0xff132118 -> 0xff1321c8 [0x0b0]
    SetAudioVolumeOut                   0xff1330a0 -> 0xff133150 [0x0b0]
    SetSamplingRate                     0xff134504 -> 0xff1345b4 [0x0b0]
    PowerMicAmp                         0xff134ce4 -> 0xff134d94 [0x0b0]
    PowerAudioOutput                    0xff1350f0 -> 0xff1351a0 [0x0b0]
    call                                0xff137c1c -> 0xff137ccc [0x0b0]
    AllocateMemoryResource              0xff13b7c0 -> 0xff13b870 [0x0b0]
    AllocateContinuousMemoryResource    0xff13b80c -> 0xff13b8bc [0x0b0]
    FreeMemoryResource                  0xff13b924 -> 0xff13b9d4 [0x0b0]
    SetGUIRequestMode                   0xff1a805c -> 0xff1a810c [0x0b0]
    mvrSetDefQScale                     0xff2c043c -> 0xff2c04ec [0x0b0]
    mvrFixQScale                        0xff2c0944 -> 0xff2c09f4 [0x0b0]
    _EngDrvOut                          0xff2c1694 -> 0xff2c1744 [0x0b0]
    shamem_read                         0xff2c1730 -> 0xff2c17e0 [0x0b0]
    _engio_write                        0xff2c19ac -> 0xff2c1a5c [0x0b0]
    CreateResLockEntry                  0xff2c5848 -> 0xff2c58f8 [0x0b0]
    LockEngineResources                 0xff2c5d10 -> 0xff2c5dc0 [0x0b0]
    UnLockEngineResources               0xff2c5eb4 -> 0xff2c5f64 [0x0b0]
    _audio_ic_write                     0xff339490 -> 0xff339540 [0x0b0]
    _audio_ic_read                      0xff339adc -> 0xff339b8c [0x0b0]
    _FIO_OpenFile                       0xff346494 -> 0xff346544 [0x0b0]
    _FIO_CreateFile                     0xff346550 -> 0xff346600 [0x0b0]
    _FIO_RemoveFile                     0xff3465fc -> 0xff3466ac [0x0b0]
    FIO_ReadFile                        0xff3466a4 -> 0xff346754 [0x0b0]
    FIO_SeekSkipFile                    0xff346754 -> 0xff346804 [0x0b0]
    FIO_WriteFile                       0xff346844 -> 0xff3468f4 [0x0b0]
    FIO_CloseFile                       0xff3468f4 -> 0xff3469a4 [0x0b0]
    _FIO_GetFileSize                    0xff346a70 -> 0xff346b20 [0x0b0]
    _FIO_RenameFile                     0xff346f88 -> 0xff347038 [0x0b0]
    _FIO_CreateDirectory                0xff347150 -> 0xff347200 [0x0b0]
    _FIO_FindFirstEx                    0xff347718 -> 0xff3477c8 [0x0b0]
    FIO_FindNextEx                      0xff34780c -> 0xff3478bc [0x0b0]
    FIO_FindClose                       0xff3478ec -> 0xff34799c [0x0b0]
    PlayMain_handler                    0xff3bc078 -> 0xff3bc128 [0x0b0]
    ptp_register_handler                0xff45fbdc -> 0xff45fc8c [0x0b0]
    dialog_redraw                       0xff4c48fc -> 0xff4c49ac [0x0b0]
    fsuDecodePartitionTable             0xff4f8348 -> 0xff4f83f8 [0x0b0]
    ErrForCamera_handler                0xff520960 -> 0xff520a10 [0x0b0]
    CancelDateTimer                     0xff52cdc8 -> 0xff52ce78 [0x0b0]
    dialog_set_property_str             0xff52f748 -> 0xff52f7f8 [0x0b0]
    HideUnaviFeedBack_maybe             0xff53800c -> 0xff5380bc [0x0b0]
    LiveViewApp_handler                 0xff53a558 -> 0xff53a608 [0x0b0]
    ShootOlcApp_handler                 0xff541bd4 -> 0xff541c84 [0x0b0]
    PlayMovieGuideApp_handler           0xff5540e4 -> 0xff554194 [0x0b0]
    GetCFnData                          0xff6818b4 -> 0xff681968 [0x0b4]
    SetCFnData                          0xff681acc -> 0xff681b80 [0x0b4]
    ErrCardForLVApp_handler             0xff6a2e00 -> 0xff6a2eb4 [0x0b4]
    LiveViewShutterApp_handler          0xff6fbd44 -> 0xff6fbdf8 [0x0b4]
    audio_thresholds                    0xff7fbbdc -> 0xff7fbc90 [0x0b4]

    (looks sane)

  2. Daniel Fort

    It might be a good idea to keep track of the real SoundDevShutDownIn address in your stubs.S. The reason we're temporarily using address for StopASIFDMAADC is to resolve Issue #2255 while not breaking other platforms that seem to have the addresses for StopASIFDMAADC and SoundDevShutDownIn transposed.

    For EOSM.203 it would be:

    ///NSTUB(0xFF10D450,  SoundDevShutDownIn)                   // This is the real address
    1. Daniel Fort

      They haven't changed, they are all there. It is just that he removed all the unused stubs, which is fine because the addresses most like changed anyway. I was only suggesting keeping track of that one stub because it has the wrong address. Changing it would break other platforms--that are probably also using the wrong address.

      1. Alex

        There's a script that auto-formats all the stubs files (comments out unused ones, makes sure all of them are grouped in a consistent way etc).

  3. Daniel Fort

    Ok--a couple of stubs are changing, the pre_isr_hook and post_isr_hook. Check out commit b1bd219 This hasn't made it into unified yet but the latest changes in unified are causing conflicts with stubs.S in this pull request.

    1. Licaon Kter

      These are all different, unless I misunderstand things (possible):

      +NSTUB(0xFF1350F0,  PowerAudioOutput)                        // Look for actrlCpowerControl Case 1 Sub
      +NSTUB(0xFF134CE4,  PowerMicAmp)
      +NSTUB(0xFF1330A0,  SetAudioVolumeOut)
      +NSTUB(0xFF10B190,  SetNextASIFADCBuffer)                    // Int16
      +NSTUB(0xFF10B378,  SetNextASIFDACBuffer)                    // Int16 Regular
      +NSTUB(0xFF134504,  SetSamplingRate)
      +NSTUB(0xFF10D148,  SoundDevActiveIn)
      +NSTUB(0xFF10A920,  SoundDevShutDownIn)                      // Temporarily using address for StopASIFDMAADC to resolve MLV_SND issue
      +NSTUB(0xFF10A674,  StartASIFDMAADC)                         // To Regular
      +NSTUB(0xFF10AA48,  StartASIFDMADAC)                         // Needs Patches Or
      +NSTUB(0xFF10A920,  StopASIFDMAADC)                          // Regular -- Stop ASIF ADC - needed for future changes to mlv_snd.c
      +NSTUB(0xFF10ACC8,  StopASIFDMADAC)                          // NormalStopAsif
      +NSTUB(0xFF134D94,  PowerMicAmp)
      +NSTUB(0xFF1351A0,  PowerAudioOutput)                        // Look for actrlCpowerControl Case 1 Sub
      +NSTUB(0xFF133150,  SetAudioVolumeOut)
      +NSTUB(0xFF1345B4,  SetSamplingRate)
      +NSTUB(0xFF10A724,  StartASIFDMAADC)                         // To Regular
      +NSTUB(0xFF10A9D0,  SoundDevShutDownIn)                      // Temporarily using address for StopASIFDMAADC to resolve MLV_SND issue
      +NSTUB(0xFF10A9D0,  StopASIFDMAADC)                          // Regular -- Stop ASIF ADC - needed for future changes to mlv_snd.c
      +NSTUB(0xFF10AAF8,  StartASIFDMADAC)                         // Needs Patches Or
      +NSTUB(0xFF10AD78,  StopASIFDMADAC)                          // NormalStopAsif
      +NSTUB(0xFF10B240,  SetNextASIFADCBuffer)                    // Int16
      +NSTUB(0xFF10B428,  SetNextASIFDACBuffer)                    // Int16 Regular
      +NSTUB(0xFF10D1F8,  SoundDevActiveIn)
      1. Daniel Fort

        As far as I can tell the stubs haven't changed. Things got rearranged a bit with the 202 stubs which caused this merge conflict. The stubs in the Eosm Developer repository haven't changed either. By the way, who is Eosm Developer ? I distributed test builds and have been getting very good results, certainly no worse than EOSM.202.

        1. Licaon Kter

          As far as I can tell the stubs haven't changed

          Ok I'll believe you, although the actual addresses are different (eg. 0xFF134CE4 vs 0xFF134D94 for PowerMicAmp) my lack of knowledge here might be at fault.

  4. Daniel Fort

    Right, what's confusing is that one address is for 2.0.2 and the other address is for 2.0.3. Check the stub-checker log posted by a1ex and you'll see both addresses are correct.

  5. Forest Godfrey

    I'm not the original developer, but I have been trying to get EOS M 2.0.3 working in QEMU (for something else I'm working on) and along the way, I needed to do an sf_dump and noticed that the stubs are wrong. I disassembled the 2.0.3 firmware and found the stubs for SF_Create and SF_readSerialFlash, but wasn't able to find SF_Destroy. From modules/sf_dump/sf_dump.c

        //SF_CreateSerial     = (void*) 0xFF1385AC;
        SF_CreateSerial     = (void*) 0xFF13865C;
        //SF_readSerialFlash  = (void*) 0xFF138554;
        SF_readSerialFlash  = (void*) 0xFF138604;
        //SF_Destroy          = (void*) 0xFF13AF5C;
    1. Alex

      It should be at the same offset (it doesn't have a string, but was named based on its usage patterns).

      Currently EOS M doesn't boot the GUI in QEMU, but it goes pretty far. It's most likely because it boots to LiveView by default, which is not emulated. It's probably fixable with a startup log in playback mode.

      1. Forest Godfrey

        Hmm. I found a .FIR file for 2.0.2 and downgraded. I get a LOT further with 2.0.2 in QEMU than I did with 2.0.3. With 2.0.2, I get past loading AUTOEXEC.BIN and eventually hang with repeated messages about changing user_mem_start. With 2.0.3, my last message is about Serial Flash: "70: 34.048 [PROPAD] SerialFlash Packages!! 0x7". That had me wondering if I'd really successfully dumped the flash, but based on what I'm assuming is a magic number at offset 0x200000, I think I did. In any event, I don't mean to hijack this pull request into a way for me to get my QEMU session to work, but I thought I'd post the offsets.

        As for SF_Destroy, I had apparently screwed up the math when I looked for it last night. I looked again and, as you suggest, it is likely at the same offset, which puts it at 0xff13b00c. That location looks like a function entry and has 18 references to it in my disassembly.

        While I don't know enough about Magic Lantern to claim that I can maintain this pull request (this is my first development effort with it), if you'd like, I can submit a change to sf_dump that updates it with these offsets.

        1. Alex

          The SerialFlash Packages!! 0x7 is actually a successful one. The error message you are looking to avoid is something like [PROPAD] ERROR Not Exist Valid ComboPackages!!. It tricked to me as well - see my latest post on EOS M2.

          Feel free to continue the emulation discussion on the forum (the main QEMU thread would probably be a better place). If you get a startup log that boots the camera directly into some sort of menu, without opening LiveView, I'd like to give it a try as well. I'm pretty sure Daniel Fort already got such logs in some other thread, probably related to the shutter bug.

          1. Daniel Fort

            I recall a while back doing startup logs while booting the camera with the playback button which isn't LiveView, is it? It didn't resolve the Shutter-bug (Issue #1893) but we did find three different StartupCondition states, one of which doesn't show the bug.