Commit 2120284f authored by alex@thinkpad's avatar alex@thinkpad
Browse files

QEMU: shared memory initialization for DIGIC 6 (MEMDIV messages)

to try: SHM_SHOW_INFO / SHM_SHOW_DIST_INFO on serial console (only 80D, 750D and 760D reach this far)
( sleep 3; echo "akashimorino";
  sleep 1; echo "SHM_SHOW_INFO";
  sleep 1; echo "SHM_SHOW_DIST_INFO";
) | ./run_canon_fw.sh 80D -serial stdio

--HG--
branch : qemu
parent 26d2dc2fc97c
......@@ -224,6 +224,7 @@ EOSRegionHandler eos_handlers[] =
{ "ENGIO", 0xC0F00000, 0xC0FFFFFF, eos_handle_engio, 0 },
{ "ROM-DMA", 0xD6030000, 0xD60300FF, eos_handle_romread_dma, 0 },
{ "MEMDIV", 0xD9001600, 0xD9003FFF, eos_handle_memdiv, 0 },
{ "DIGIC6", 0xD0000000, 0xDFFFFFFF, eos_handle_digic6, 0 },
{ "DIGIC6", 0xC8100000, 0xC8100FFF, eos_handle_digic6, 1 },
......@@ -4946,6 +4947,32 @@ unsigned int eos_handle_eeko_comm( unsigned int parm, EOSState *s, unsigned int
return ret;
}
unsigned int eos_handle_memdiv( unsigned int parm, EOSState *s, unsigned int address, unsigned char type, unsigned int value )
{
const char * msg = 0;
unsigned int ret = 0;
switch (address & 0xFFFF)
{
case 0x1604:
{
msg = "MEMDIV_SETUP";
ret = 0x5A;
break;
}
default:
{
/* 0x1600 ... 0x3FFF */
/* firmware expects to read back what it has written earlier? */
static uint32_t shm[0x4000];
MMIO_VAR(shm[address & (COUNT(shm)-1)]);
}
}
io_log("MEMDIV", s, address, type, value, ret, msg, 0, 0);
return ret;
}
unsigned int eos_handle_digic6 ( unsigned int parm, EOSState *s, unsigned int address, unsigned char type, unsigned int value )
{
const char * msg = 0;
......
......@@ -380,6 +380,7 @@ unsigned int eos_handle_power_control ( unsigned int parm, EOSState *s, unsigned
unsigned int eos_handle_adc ( unsigned int parm, EOSState *s, unsigned int address, unsigned char type, unsigned int value );
unsigned int eos_handle_jpcore( unsigned int parm, EOSState *s, unsigned int address, unsigned char type, unsigned int value );
unsigned int eos_handle_eeko_comm( unsigned int parm, EOSState *s, unsigned int address, unsigned char type, unsigned int value );
unsigned int eos_handle_memdiv( unsigned int parm, EOSState *s, unsigned int address, unsigned char type, unsigned int value );
unsigned int eos_handle_digic6 ( unsigned int parm, EOSState *s, unsigned int address, unsigned char type, unsigned int value );
......
3545d920c7ad871e4afc413596e5c87b calls-main.log
5037327f0d40055d7587b2e3773286a7 calls-main.idc
30859457134f5820444d1cde09e367ad calls-main-basic.log
85094088b1004c7416a118d3db0beaf9 calls-main-basic.idc
1b191ad44ad94516642f8f0d080c4037 calls-main.log
758255adf94f7edd6f97551a70568181 calls-main.idc
af6d99f84462f225cfe93bb751013c77 calls-main-basic.log
2f7a5950b460ab81c2d7642cdfd6002c calls-main-basic.idc
22192bbfbf9c1ee50beab02db0dbe88d calls-main.log
0cf1d506c82c0eebe810b7d85c8d7e59 calls-main.idc
0705a5b99fed9a89ad123422a364897d calls-main-basic.log
d1eee7a001f23ed6ff9491d953b6f730 calls-main-basic.idc
f89e4aee5ae06c4cc43aeda731b67301 calls-main.log
72a5e2a2b885cb8acb869157f6b85f54 calls-main.idc
6ea4fc91b181e432ba9c8ca744d32909 calls-main-basic.log
fa53a79b118883f8805c538eac3a9f64 calls-main-basic.idc
d8dc73b01e5e9df84b0113e572f1a101 calls-main.log
05e95c879de984e5c9acb835563dfe64 calls-main.idc
b01c9a07ce01e540e71614bc8c636304 calls-main-basic.log
456ea5e694946c531a0e08d7d5cd91c9 calls-main-basic.idc
fda236be3276eb1f6afd2ba0f8d8ab90 calls-main.log
9c174f9e650ccb82dd23a5d0e523023a calls-main.idc
294a06be189f23480633d3c1b2115821 calls-main-basic.log
9e3be68cd3669b626c95668af5c7e223 calls-main-basic.idc
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment