Read about our upcoming Code of Conduct on this issue

Commit deb0567b authored by alex@thinkpad's avatar alex@thinkpad
Browse files

QEMU: make sure all models have correct ROM sizes defined

- do not allow ROM files with duplicate data
- most models do not have ROM0; only define where it is actually used
- ROM0/1, where present, should be defined with the right size (too low - won't boot; too high - will fail the duplication test)
- test results: context changed in some models without ROM0 (noise from the ROM dump was sometimes pointing to strings in ROM1)

https://www.magiclantern.fm/forum/index.php?topic=5601.msg212692#msg212692

--HG--
branch : qemu
parent 86d6d9f225ee
......@@ -403,6 +403,7 @@ static int check_rom_mirroring(void * buf, int size, int full_size)
if (!check_rom_mirroring(buf, size / 2, full_size))
{
fprintf(stderr, "[EOS] mirrored data; unique 0x%X bytes repeated 0x%X times\n", size / 2, full_size / (size / 2));
assert(0);
}
return 1;
}
......
......@@ -7,7 +7,7 @@ struct eos_model_desc eos_model_list[] = {
/* defaults for DIGIC 3 cameras */
.digic_version = 3,
.rom1_addr = 0xF8000000,
.rom1_size = 0x00800000,
.rom1_size = 0x00800000, /* 8MB */
//.ram_size = 0x08000000, /* prefer to specify exact size for each model */
.caching_bit = 0x10000000,
.atcm_addr = 0x00000000,
......@@ -94,9 +94,9 @@ struct eos_model_desc eos_model_list[] = {
.digic_version = 4,
/* note: some cameras have smaller ROMs, or only one ROM */
.rom0_addr = 0xF0000000,
.rom0_size = 0x01000000,
//.rom0_size = 0x01000000, /* optional, not all cameras have it */
.rom1_addr = 0xF8000000,
.rom1_size = 0x01000000,
.rom1_size = 0x01000000, /* 8MB */
//.ram_size = 0x20000000, /* prefer to specify exact size for each model */
.caching_bit = 0x40000000,
.atcm_addr = 0x00000000,
......@@ -132,6 +132,8 @@ struct eos_model_desc eos_model_list[] = {
{
.name = "50D",
.digic_version = 4,
.rom0_size = 0x00400000, /* 4MB */
.rom1_size = 0x00800000, /* 8MB */
.ram_size = 0x20000000, /* 512MB */
.card_led_address = 0xC02200BC,
.cf_driver_interrupt = 0x82,
......@@ -145,6 +147,8 @@ struct eos_model_desc eos_model_list[] = {
{
.name = "5D2",
.digic_version = 4,
.rom0_size = 0x00400000, /* 4MB */
.rom1_size = 0x00800000, /* 8MB */
.ram_size = 0x20000000, /* 512MB */
.firmware_start = 0xFF810000,
.card_led_address = 0xC02200BC,
......@@ -220,8 +224,8 @@ struct eos_model_desc eos_model_list[] = {
.name = "1300D",
.digic_version = 4,
.ram_size = 0x10000000, /* 256MB */
.rom0_size = 0x02000000,
.rom1_size = 0x02000000,
.rom0_size = 0x02000000, /* 32MB */
.rom1_size = 0x02000000, /* 32MB */
.firmware_start = 0xFF0C0000,
.dryos_timer_id = 1, /* set to 10ms; run with -d io,int,v to find it */
.dryos_timer_interrupt = 0x09, /* enabled right before setting the timer value */
......@@ -242,7 +246,7 @@ struct eos_model_desc eos_model_list[] = {
.name = "A1100",
.digic_version = 4,
.rom0_size = 0x400000, /* fixme: unknown */
.rom1_size = 0x400000,
.rom1_size = 0x400000, /* 4MB */
.ram_size = 0x04000000, /* only 64M */
.btcm_addr = 0x80000000,
.mmio_size = 0x01000000,
......@@ -254,9 +258,9 @@ struct eos_model_desc eos_model_list[] = {
/* defaults for DIGIC 5 cameras */
.digic_version = 5,
.rom0_addr = 0xF0000000,
.rom0_size = 0x01000000,
//.rom0_size = 0x01000000, /* optional, not all cameras have it */
.rom1_addr = 0xF8000000,
.rom1_size = 0x01000000,
.rom1_size = 0x01000000, /* 16MB */
//.ram_size = 0x20000000, /* prefer to specify exact size for each model */
.caching_bit = 0x40000000,
.atcm_addr = 0x00000000,
......@@ -296,6 +300,7 @@ struct eos_model_desc eos_model_list[] = {
{
.name = "5D3",
.digic_version = 5,
.rom0_size = 0x00800000, /* 8MB */
.ram_size = 0x20000000, /* 512MB */
.current_task_addr = 0x23E14,
.mpu_request_register = 0xC02200BC, /* written in mpu_send (run with -d io) */
......@@ -332,6 +337,7 @@ struct eos_model_desc eos_model_list[] = {
{
.name = "6D",
.digic_version = 5,
.rom0_size = 0x00800000, /* 8MB */
.ram_size = 0x20000000, /* 512MB */
.card_led_address = 0xC022C184,
.mpu_request_register = 0xC02200BC, /* written in mpu_send (run with -d io) */
......@@ -380,6 +386,7 @@ struct eos_model_desc eos_model_list[] = {
{
.name = "EOSM2",
.digic_version = 5,
.rom0_size = 0x01000000, /* 16MB */
.ram_size = 0x10000000, /* 256MB */
.current_task_addr = 0x8FBCC,
.serial_flash_size = 0x1000000,
......@@ -402,6 +409,7 @@ struct eos_model_desc eos_model_list[] = {
{
.name = "70D",
.digic_version = 5,
.rom0_size = 0x00800000, /* 8MB */
.ram_size = 0x20000000, /* 512MB */
.current_task_addr = 0x7AAC0,
.mpu_request_register = 0xC02200BC, /* written in mpu_send (run with -d io) */
......@@ -419,9 +427,9 @@ struct eos_model_desc eos_model_list[] = {
{
/* defaults for DIGIC 6 cameras */
.digic_version = 6,
.rom0_size = 0, /* not dumped yet, camera locks up (?!) */
.rom0_size = 0x00000000, /* unused? */
.rom1_addr = 0xFC000000,
.rom1_size = 0x02000000,
.rom1_size = 0x02000000, /* 32MB */
//.ram_size = 0x20000000, /* prefer to specify exact size for each model */
.caching_bit = 0x40000000,
.atcm_addr = 0x00000000,
......@@ -532,7 +540,7 @@ struct eos_model_desc eos_model_list[] = {
.ram_size = 0x20000000, /* 512MB? */
.firmware_start = 0xFC000000,
.rom0_addr = 0xFB800000,
.rom0_size = 0x800000,
.rom0_size = 0x800000, /* 8MB */
.current_task_addr = 0x803C,
.card_led_address = 0xD20B0994,
},
......@@ -542,7 +550,7 @@ struct eos_model_desc eos_model_list[] = {
.ram_size = 0x20000000, /* 512MB? */
.firmware_start = 0xFC000000,
.rom0_addr = 0xFB800000,
.rom0_size = 0x800000,
.rom0_size = 0x800000, /* 8MB */
.current_task_addr = 0x803C,
.card_led_address = 0xD20B0994, /* unknown, copied from M3 */
},
......@@ -553,9 +561,9 @@ struct eos_model_desc eos_model_list[] = {
.firmware_start = 0xE0040000,
.bootflags_addr = 0xE1FF8000,
.rom0_addr = 0xE0000000,
.rom0_size = 0x02000000,
.rom0_size = 0x02000000, /* 32MB (main ROM) */
.rom1_addr = 0xF0000000,
.rom1_size = 0x01000000,
.rom1_size = 0x01000000, /* 16MB (secondary ROM) */
//.ram_size = 0x40000000, /* prefer to specify exact size for each model */
.caching_bit = 0x40000000,
.mmio_addr = 0xBFE00000, /* fixme: BFE is configured as regular RAM, but certain values are expected */
......@@ -622,8 +630,6 @@ struct eos_model_desc eos_model_list[] = {
.name = "EOSM5",
.digic_version = 7,
.firmware_start = 0xE0000000,
.rom1_addr = 0xE0000000,
.rom1_size = 0x02000000,
.ram_size = 0x40000000, /* not yet known */
.caching_bit = 0x40000000,
.mmio_addr = 0xC0000000,
......
fc485e0954e5050985bc6170942c7582 calls-main.log
881190d2e974bc2a6f3b281299ddb17c calls-main.log
c310c66d6684fd7dc319234b5cf5baf1 calls-main.idc
c949287c4f558bd8cf8f35ef629f7fe3 calls-main-basic.log
19d480bfc9051e3af4b6a5d8657f3f40 calls-main-basic.idc
c4444011e58349e14067ba2836838d69 calls-main.log
c7c045b2bc534f17d14c0312b3a5351d calls-main.log
c6a485437869c137c693722f889909d4 calls-main.idc
8ccc21ecbe4e300565f683b93a665ba5 calls-main-basic.log
f3f3a92e5f1388519c9fa6c7d7a93b00 calls-main-basic.idc
edb782ab3d071fc958d0add00051eebf calls-main.log
046b2a2ba08e17f425d9f83ccb7d6b00 calls-main.log
cc2befee42d44f2477a89bf719bcaf45 calls-main.idc
c487cbfa506dac1cfa41845aece394c9 calls-main-basic.log
6311299e1380ee2510b15c2ea9640f96 calls-main-basic.idc
7a455cbdd5ef2d56301207099b9f327f calls-main.log
59e681ef95ad6537aa476443006a6f1d calls-main.log
be42f7617090cd4d235a186ffe77d14b calls-main.idc
52dfe9f9e5a83d3abb2b1b88974dcb7a calls-main-basic.log
3fda3c755a07568d87e46486c78c62f3 calls-main-basic.idc
aa0d70b85d43ebaa0ce8de6bb069b96b calls-main.log
a8f2335a5ee5d2799289695cfc7e49ab calls-main.log
af17b4b7931281d72e901b70e0364f05 calls-main.idc
f772169600f8fdc7681ede890f7ad957 calls-main-basic.log
d381dcfbce3ec597d9004c4c8dc2bc62 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