Wikia

Magic Lantern Firmware Wiki

2.0.4 HotPlug Structs

328pages on
this wiki
Talk0

Parent: http://magiclantern.wikia.com/wiki/2.0.4_AJ

TH hotplug struct

HotPlug task creation: TH_startupEntry() -> AJ_hotplug_taskmaster() -> AJ_task_create("HotPlug",TH_hotplug_task())


The following image is only going to be be here briefly - and may help those with the 550D IDA screen see if Hotplug task is simlar to the 5D mk ii. If you can't see the image, right click, open in another window, select full resolution ... or click on this





[2010_05_29]: Hotplug structures at [0x1AA4 ] , [0xC0220000] , and [0xC0230000]

seg001:00001AA4 aAJ_0x1AA4_hotplug_struct_0x00_to_0x44_initialized % 4 ; AJ_hotplug_taskmaster() sets this to 1
                                                                         In AJ_ORPHAN_Hotplug_related(): If Non-Zero, action performed and set to Zero 
seg001:00001AA8 aAJ_0x1AA4_hotplug_struct_0x04_task_create_related % 4 ; Return value of (   AJ_task_create("Hotplug")   ) = 3 , 5 OR 2xR4 
seg001:00001AAC aAJ_0x1AA4_hotplug_struct_0x08_video_prop_deliver % 4 ; AJ: Ref:TH_hotplug_task()
seg001:00001AAC                                                       ; Passed into TH_prop_deliver() for VIDEO
seg001:00001AB0 aAJ_0x1AA4_hotplug_struct_0x0C_USB_prop_deliver % 4   ; AJ: Ref:TH_hotplug_task()
seg001:00001AB0                                                       ; Passed into TH_prop_deliver() for USB
seg001:00001AB4 aAJ_0x1AA4_hotplug_struct_0x10_TOE_prop_deliver % 4   ; AJ: Ref:TH_hotplug_task() (TCPIP Offload Engine?)
seg001:00001AB4                                                       ; Passed into TH_prop_deliver() for TOE
seg001:00001AB4                                                       ; Also used in AJ_TOERequestChangeCBR()
seg001:00001AB8 aAJ_0x1AA4_hotplug_struct_0x14_HDMI_prop_deliver % 4  ; AJ: Ref:TH_hotplug_task()
seg001:00001AB8                                                       ; Passed into TH_prop_deliver() for HDMI
seg001:00001ABC aAJ_0x1AA4_hotplug_struct_0x18_SecretMode_sub_address % 4 ; set to AJ_Enter.Secret.Mode_related() in AJ_initialize_0x1AA4_hotplug_struct()
seg001:00001ABC                                                       ; Sub routine address is stored, then it is called.
seg001:00001AC0 aAJ_0x1AA4_hotplug_struct_0x1C_zero % 4               : AJ: I think this is always zero (ie not used)
seg001:00001AC4 aAJ_0x1AA4_hotplug_struct_0x20_interrupt_sw % 4       ; Ref: AJ_interrupt_func_sw()
seg001:00001AC4                                                       ; [values] set to 1
seg001:00001AC8 aAJ_0x1AA4_hotplug_struct_0x24_hotplug_video_state % 4 ; AJ: <Video_state> = 0 : Is Disconnected
seg001:00001AC8                                                       ; <Video_state> = 1 : Is Connected
seg001:00001ACC aAJ_0x1AA4_hotplug_struct_0x28_dunno % 4              ; AJ: LDR in AJ_initialize_0x1AA4_hotplug_struct()
seg001:00001ACC                                                       ; AJAJ: Dont know what this is yet
seg001:00001AD0 aAJ_0x1AA4_hotplug_struct_0x2C_dunno % 4
seg001:00001AD4 aAJ_0x1AA4_hotplug_struct_0x30_hotplug_prev_video_state % 4
seg001:00001AD4                                                       ; AJ: <prev_video_state> = 0 : Was Disconnected
seg001:00001AD4                                                       ; <prev_video_state> = 1 : Was Connected
seg001:00001AD8 aAJ_0x1AA4_hotplug_struct_0x34_hotplug_usb_state % 4  ; AJ: USB Hotplug status
seg001:00001AD8                                                       ; Ref TH_hotplug_task() . bit 2^0 is tested
seg001:00001AD8                                                       ; 2^0 = 0 = Disconnected
seg001:00001AD8                                                       ; 2^1 = 1 = Connected
seg001:00001ADC aAJ_0x1AA4_hotplug_struct_0x38_hotplug_TOE_state % 4  ; AJ: TOE (TCPIP Offload Engine?) Hotplug status
seg001:00001ADC                                                       ; Ref TH_hotplug_task() . bit 2^0 is tested
seg001:00001ADC                                                       ; 2^0 = 0 = Disconnected
seg001:00001ADC                                                       ; 2^1 = 1 = Connected
seg001:00001AE0 aAJ_0x1AA4_hotplug_struct_0x3C_hotplug_HDMI_state % 4 ; AJ: HDMI Hotplug status
seg001:00001AE0                                                       ; Ref TH_hotplug_task() . bit 2^0 is tested
seg001:00001AE0                                                       ; 2^0 = 0 = Disconnected
seg001:00001AE0                                                       ; 2^1 = 1 = Connected
seg001:00001AE4 aAJ_0x1AA4_hotplug_struct_0x40_dunno % 4              ; AJ: Initialized in AJ_initialize_0x1AA4_hotplug_struct()
seg001:00001AE4                                                       ; AJAJ: Dont know what this is yet
seg001:00001AE8 aAJ_0x1AA4_hotplug_struct_0x44_KernelDry_KerFlag % 4  ; AJ: * NOT SURE WHAT THIS IS YET * need to check the following routines

-

This is a copy from http://bitbucket.org/hudson/magic-lantern/src/tip/hotplug.h
It is not the same size struct as the one 2.0.4 that I list above.

struct hotplug_struct
{
	uint32_t		initialized;	// off 0x00
	uint32_t		off_0x04;
	uint32_t		off_0x08;
	uint32_t		usb_prop;	// off_0x0c;
	uint32_t		off_0x10;
	uint32_t		off_0x14;
	uint32_t		off_0x18;
	uint32_t		off_0x1c;
	uint32_t		off_0x20;
	uint32_t		video_state;	// off_0x24;
	uint32_t		off_0x28;
	uint32_t		off_0x2c;
	uint32_t		last_video_state; // off_0x30;
	uint32_t		usb_state;	// off_0x34
        [AJ Missing items here]
};


I'm guess this would only cause an issue of the C structure was being copied or malloced.


--


DIGIC:C0220000 aAJ_0xC0220000_HDMI_maybe_hotplug_struct1_0x00_to_0x70 % 4 ; AJ: Ref: TH_hotplug_task()
DIGIC:C0220004 aAJ_0xC0220000_HDMI_struct1_0x04 % 4
DIGIC:C0220008 aAJ_0xC0220000_HDMI_struct1_0x08 % 4
DIGIC:C022000C aAJ_0xC0220000_HDMI_struct1_0x0C % 4
DIGIC:C0220010 aAJ_0xC0220000_HDMI_struct1_0x10 % 4
DIGIC:C0220014 aAJ_0xC0220000_HDMI_struct1_0x14 % 4
DIGIC:C0220018 aAJ_0xC0220000_HDMI_struct1_0x18 % 4
DIGIC:C022001C aAJ_0xC0220000_HDMI_struct1_0x1C % 4
DIGIC:C0220020 aAJ_0xC0220000_HDMI_struct1_0x20 % 4
DIGIC:C0220024 aAJ_0xC0220000_HDMI_struct1_0x24 % 4
DIGIC:C0220028 aAJ_0xC0220000_HDMI_struct1_0x28 % 4
DIGIC:C022002C aAJ_0xC0220000_HDMI_struct1_0x2C % 4
DIGIC:C0220030 aAJ_0xC0220000_HDMI_struct1_0x30 % 4
DIGIC:C0220034 aAJ_0xC0220000_HDMI_struct1_0x34_hotplug_usb_buf % 4 ; AJ: USB Hotplug status
DIGIC:C0220034                                                       ; Ref TH_hotplug_task() . bit 2^0 is tested
DIGIC:C0220034                                                       ; 2^0 = 0 = Disconnected
DIGIC:C0220034                                                       ; 2^1 = 1 = Connected
DIGIC:C0220038 aAJ_0xC0220000_HDMI_struct1_0x38 % 4
DIGIC:C022003C aAJ_0xC0220000_HDMI_struct1_0x3C_hotplug_hdmi_state % 4 ; AJ: HDMI Hotplug status
DIGIC:C022003C                                                       ; Ref TH_hotplug_task() . bit 2^0 is tested
DIGIC:C022003C                                                       ; 2^0 = 0 = Disconnected
DIGIC:C022003C                                                       ; 2^1 = 1 = Connected
DIGIC:C0220040 aAJ_0xC0220000_HDMI_struct1_0x40 % 4
DIGIC:C0220044 aAJ_0xC0220000_HDMI_struct1_0x44 % 4 ; AJ: TOE Hotplug status
DIGIC:C0220044                                                       ; Ref TH_hotplug_task() . bit 2^0 is tested
DIGIC:C0220044                                                       ; 2^0 = 0 = Disconnected
DIGIC:C0220044                                                       ; 2^1 = 1 = Connected
DIGIC:C0220044                                                       ; Ref AJ_TOEDetectISR()
DIGIC:C0220048 aAJ_0xC0220000_HDMI_struct1_0x48 % 4
DIGIC:C022004C aAJ_0xC0220000_HDMI_struct1_0x4C % 4
DIGIC:C0220050 aAJ_0xC0220000_HDMI_struct1_0x50 % 4
DIGIC:C0220054 aAJ_0xC0220000_HDMI_struct1_0x54 % 4
DIGIC:C0220058 aAJ_0xC0220000_HDMI_struct1_0x58 % 4
DIGIC:C022005C aAJ_0xC0220000_HDMI_struct1_0x5C % 4
DIGIC:C0220060 aAJ_0xC0220000_HDMI_struct1_0x60 % 4
DIGIC:C0220064 aAJ_0xC0220000_HDMI_struct1_0x64 % 4
DIGIC:C0220068 aAJ_0xC0220000_HDMI_struct1_0x68 % 4
DIGIC:C022006C aAJ_0xC0220000_HDMI_struct1_0x6C % 4
DIGIC:C0220070 aAJ_0xC0220000_HDMI_struct1_0x70_hotplug_video_state % 4 ; AJ: Video Hot plug status
DIGIC:C0220070                                                       ; Ref TH_hotplug_task() . bit 2^0 is tested
DIGIC:C0220070                                                       ; 2^0 = 0 = Disconnected
DIGIC:C0220070                                                       ; 2^1 = 1 = Connected

-

DIGIC:C0203000 aAJ_0xC0230000_HDMI_struct2_0x00_to_0x4C % 4 ; AJ: Compare following structs:

DIGIC:C0203004 aAJ_0xC0230000_HDMI_struct2_0x04 % 4
DIGIC:C0203008 aAJ_0xC0230000_HDMI_struct2_0x08 % 4
DIGIC:C020300C aAJ_0xC0230000_HDMI_struct2_0x0C % 4
DIGIC:C0203010 aAJ_0xC0230000_HDMI_struct2_0x10 % 4
DIGIC:C0203014 aAJ_0xC0230000_HDMI_struct2_0x14 % 4
DIGIC:C0203018 aAJ_0xC0230000_HDMI_struct2_0x18 % 4
DIGIC:C020301C aAJ_0xC0230000_HDMI_struct2_0x1C_USB_related % 4 ; AJ: Ref: AJ_USBDetectISR()
DIGIC:C020301C                                                       ; if USB = 0 (Disconnected), Set to 0x18
DIGIC:C020301C                                                       ; if USB = 1 (Connected) Set to 0x1C
DIGIC:C0203020 aAJ_0xC0230000_HDMI_struct2_0x20_Video_releated % 4 ; AJ: Ref: AJ_VideoDetectISR()
DIGIC:C0203020                                                       ; if VIDEO = 0 (Disconnected), Set to 0x18
DIGIC:C0203020                                                       ; if VIDEO = 1 (Connected) Set to 0x1C
DIGIC:C0203024 aAJ_0xC0230000_HDMI_struct2_0x24 % 4
DIGIC:C0203028 aAJ_0xC0230000_HDMI_struct2_0x28 % 4
DIGIC:C020302C aAJ_0xC0230000_HDMI_struct2_0x2C % 4
DIGIC:C0203030 aAJ_0xC0230000_HDMI_struct2_0x30 % 4
DIGIC:C0203034 aAJ_0xC0230000_HDMI_struct2_0x34 % 4
DIGIC:C0203038 aAJ_0xC0230000_HDMI_struct2_0x38 % 4
DIGIC:C020303C aAJ_0xC0230000_HDMI_struct2_0x3C % 4
DIGIC:C0203040 aAJ_0xC0230000_HDMI_struct2_0x40 % 4
DIGIC:C0203044 aAJ_0xC0230000_HDMI_struct2_0x44 % 4                  ; AJ: Ref: AJ_HDMIDetectISR()
DIGIC:C0203044                                                       ; if HDMI = 0 (Disconnected), Set to 0x18
DIGIC:C0203044                                                       ; if HDMI = 1 (Connected) Set to 0x1C
DIGIC:C0203048 aAJ_0xC0230000_HDMI_struct2_0x48_TOE_related % 4 ; AJ: Ref: AJ_TOEDetectISR()
DIGIC:C0203048                                                       ; if TOE = 0 (Disconnected), Set to 0x18
DIGIC:C0203048                                                       ; if TOE = 1 (Connected) Set to 0x1C
DIGIC:C020304C aAJ_0xC0230000_HDMI_struct2_0x4C % 4

Around Wikia's network

Random Wiki