Support #674
openiMac8,1 won't progress JEDEC init: ch0 rank0 addr=0x00000000 (GM965)
0%
Description
Trying to make a coreboot port for the iMac8,1 see gerrit CB:97436 but currently it hangs during RAM init see ehci-debug log attachment. Tried multiple DIMM's and sizes although I don't have single sided ones but it hangs [DEBUG] JEDEC init: ch0 rank0 addr=0x00000000 after:
[NOTE ] coreboot-26.06-1063-gf99654c6b9e9-dirty Sun Aug 30 10:24:51 UTC 2026 x86_32 bo.
[DEBUG] Starting cbfs_boot_device
[DEBUG] Starting cbfs_boot_device
[DEBUG] FMAP: Found "FLASH" version 1.1 at 0x90000.
[DEBUG] FMAP: base = 0x0 size = 0x200000 #areas = 5
[DEBUG] FMAP: area COREBOOT found @ 91000 (1503232 bytes)
[INFO ] Booting from COREBOOT region
[INFO ] CBFS: mcache @0xfefc2e00 built for 12 files, used 0x290 of 0x4000 bytes
[INFO ] CBFS: Found 'fallback/romstage' @0x210c0 size 0x11098 in mcache @0xfefc2e5c
[DEBUG] BS: bootblock times (exec / console): total (unknown) / 14 ms
[NOTE ] PROG_RUN: Limiting XIP cache to 128KiB!
[DEBUG] PROG_RUN: Setting MTRR to cache XIP stage. base: 0xffea0000, size: 0x00020000
[NOTE ] coreboot-26.06-1063-gf99654c6b9e9-dirty Sun Aug 30 10:24:51 UTC 2026 x86_32 ro.
[DEBUG] SMBus controller enabled
[DEBUG] FMAP: area RW_MRC_CACHE found @ 0 (65536 bytes)
[NOTE ] MRC: no data in 'RW_MRC_CACHE'
[DEBUG] raminit: cold boot - scanning DIMMs
[DEBUG] EEPROM with 0x0100 bytes
[DEBUG] SPD contains 0x80 bytes
[DEBUG] Revision : 1.3
[DEBUG] Type : 0x08
[DEBUG] Rows : 14
[DEBUG] Columns : 10
[DEBUG] Ranks : 2
[DEBUG] Module data width : x64
[DEBUG] SDRAM width : x8
[DEBUG] Banks : 8
[DEBUG] Voltage : 1.8V
[DEBUG] Supported CAS mask : 0x70
[DEBUG] Capacity : 2 GB
[DEBUG] The assembly supports self refresh: true
[DEBUG] General features : 50Ohm WEAK_DRIVER
[DEBUG] Burst length : BL8 BL4
[DEBUG] Dimm type : 4
[DEBUG] ECC support : 0
[DEBUG] Package : planar
[DEBUG] Manufacturer ID : 7f7f7f7f
[DEBUG] Part number : LIFETIMEMEMORY.C
[DEBUG] Date : 2008 week 0
[DEBUG] Serial number : 0x00000000
[INFO ] Row addr bits : 14
[INFO ] Column addr bits : 10
[INFO ] Number of ranks : 2
[INFO ] DIMM Capacity : 2048 MB
[INFO ] Width : x8
[INFO ] Banks : 8
[INFO ] CAS latencies : 4 5 6
[INFO ] tCK at CL4 : 3.750 ns
[INFO ] tAC at CL4 : 0.398 ns
[INFO ] tCK at CL5 : 3.000 ns
[INFO ] tAC at CL5 : 0.398 ns
[INFO ] tCK at CL6 : 2.500 ns
[INFO ] tAC at CL6 : 0.398 ns
[INFO ] tCKmax : 0.796 ns
[INFO ] tWRmin : 15.000 ns
[INFO ] tRCDmin : 15.000 ns
[INFO ] tRRDmin : 7.500 ns
[INFO ] tRPmin : 15.000 ns
[INFO ] tRASmin : 45.000 ns
[INFO ] tRCmin : 60.000 ns
[INFO ] tRFCmin : 127.500 ns
[INFO ] tWTRmin : 7.500 ns
[INFO ] tRTPmin : 7.500 ns
[INFO ] tDS : 0.046 ns
[INFO ] tDH : 0.117 ns
[INFO ] tDQSQmax : 0.199 ns
[INFO ] tQHSmax : 0.296 ns
[INFO ] tPLL : 0.000 us
[INFO ] tRR : 7812.500 us
[DEBUG] DIMM0: 1024MB/rank 2R rows=14 cols=10 banks=8 CAS=0x70 tCK=640 (1/256 ns)
[DEBUG] EEPROM with 0x0100 bytes
[DEBUG] SPD contains 0x80 bytes
[DEBUG] Revision : 1.3
[DEBUG] Type : 0x08
[DEBUG] Rows : 14
[DEBUG] Columns : 10
[DEBUG] Ranks : 2
[DEBUG] Module data width : x64
[DEBUG] SDRAM width : x8
[DEBUG] Banks : 8
[DEBUG] Voltage : 1.8V
[DEBUG] Supported CAS mask : 0x70
[DEBUG] Capacity : 2 GB
[DEBUG] The assembly supports self refresh: true
[DEBUG] General features : 50Ohm WEAK_DRIVER
[DEBUG] Burst length : BL8 BL4
[DEBUG] Dimm type : 4
[DEBUG] ECC support : 0
[DEBUG] Package : planar
[DEBUG] Manufacturer ID : 7f7f7f7f
[DEBUG] Part number : LIFETIMEMEMORY.C
[DEBUG] Date : 2255 week 255
[DEBUG] Serial number : 0xffffffff
[INFO ] Row addr bits : 14
[INFO ] Column addr bits : 10
[INFO ] Number of ranks : 2
[INFO ] DIMM Capacity : 2048 MB
[INFO ] Width : x8
[INFO ] Banks : 8
[INFO ] CAS latencies : 4 5 6
[INFO ] tCK at CL4 : 3.750 ns
[INFO ] tAC at CL4 : 0.398 ns
[INFO ] tCK at CL5 : 3.000 ns
[INFO ] tAC at CL5 : 0.398 ns
[INFO ] tCK at CL6 : 2.500 ns
[INFO ] tAC at CL6 : 0.398 ns
[INFO ] tCKmax : 0.796 ns
[INFO ] tWRmin : 15.000 ns
[INFO ] tRCDmin : 15.000 ns
[INFO ] tRRDmin : 7.500 ns
[INFO ] tRPmin : 15.000 ns
[INFO ] tRASmin : 45.000 ns
[INFO ] tRCmin : 60.000 ns
[INFO ] tRFCmin : 127.500 ns
[INFO ] tWTRmin : 7.500 ns
[INFO ] tRTPmin : 7.500 ns
[INFO ] tDS : 0.046 ns
[INFO ] tDH : 0.117 ns
[INFO ] tDQSQmax : 0.199 ns
[INFO ] tQHSmax : 0.296 ns
[INFO ] tPLL : 0.000 us
[INFO ] tRR : 7812.500 us
[DEBUG] DIMM2: 1024MB/rank 2R rows=14 cols=10 banks=8 CAS=0x70 tCK=640 (1/256 ns)
[DEBUG] raminit: 2 DIMM(s), 2 channel(s)
[DEBUG] raminit: selecting frequency and CAS
[DEBUG] DRAM: DDR2-667 CAS5 (tCKmin_common=640 tCK=768 tAA_needed=3840 cas_mask=0x70)
[DEBUG] raminit: calculating timings
[DEBUG] Timings: CAS5 tRAS=15 tRP=5 tRCD=5 tWR=5 tRFC=43 tRRD=3 tRTP=3
[DEBUG] program_clkcfg_lock: CLKCFG orig=0x00020336 want_memclk=0x40
[DEBUG] program_clkcfg_lock: CLKCFG after=0x00000346
[DEBUG] raminit: POST 19 - program_gcfgc
[DEBUG] raminit: POST 20 - set_clkcross_frequencies
[DEBUG] raminit: POST 21 - pre-JEDEC MCHBAR regs
[DEBUG] raminit: POST 22 - prejedec_memory_map
[DEBUG] raminit: POST 23 - rcomp_init
[DEBUG] rcomp_init: started RCOMP_CTRL=0x000e0021 CFG=0x0f802f00 CFG2=0x50 CFG3=0x00049
[DEBUG] rcomp_init: table[0x688]=0x3cf3cf38 table[0x6c8]=0x34d34d30 table[0x6b0]=0x0005
[DEBUG] raminit: POST 24 - odt_pre_setup
[DEBUG] raminit: POST 25 - program_timings
[DEBUG] raminit: POST 26 - misc_odt_settings
[DEBUG] raminit: POST 27 - ddr2_odt_setup
[DEBUG] raminit: POST 28 - ddr2_memory_io_init_phase1
[DEBUG] raminit: POST 29 - ddr2_memory_io_init_phase2
[DEBUG] raminit: POST 30 - program_rw_pointer_and_ddr_type
[DEBUG] raminit: POST 31 - enable_dram_clocks
[DEBUG] raminit: POST 32 - waiting for RCOMP (RCOMP_CTRL=0x000e0020)
[DEBUG] raminit: RCOMP done (RCOMP_CTRL=0x000e0020)
[DEBUG] raminit: POST 33 - jedec_init_ddr2
[DEBUG] JEDEC init: ch0 rank0 addr=0x00000000
The HP compaq 6710b gerrit CB:95504 would continue after this with:
...
[DEBUG] raminit: POST 33 - jedec_init_ddr2
[DEBUG] JEDEC init: ch0 rank0 addr=0x00000000
[DEBUG] JEDEC init: ch0 rank1 addr=0x08000000
[DEBUG] JEDEC init: ch1 rank0 addr=0x10000000
[DEBUG] JEDEC init: ch1 rank1 addr=0x18000000
[DEBUG] raminit: POST 34 - post_jedec_sequence
[DEBUG] raminit: POST 35 - program_memory_map
[DEBUG] IGD: gfx_uma_size=4 GMS=5 GGC=0x0050 (32 MB stolen)
[DEBUG] memmap: total=3072MB TOM=3072MB TOLUD=3072MB TOUUD=3072MB remap=0 DRA0=0x00090033 DRA1=0x00090033
[DEBUG] memmap regs: TOM=0x0018 TOLUD=0xc000 TOUUD=0x0c00 REMAPBASE=0x03ff REMAPLIMIT=0x0000 ESMRAMC=0x38
[DEBUG] raminit: POST 36 - final_timing_adjust
[DEBUG] raminit: POST 37 - dram_optimizations
[DEBUG] raminit: POST 38 - DCC final
[DEBUG] raminit: POST 39 - receive_enable_training (fast_boot=0)
[DEBUG] REC ch0: coarse_high=5 coarse_low=2 fine=8 DRT3=0x01056282 DRT5=0x42
[DEBUG] REC ch1: coarse_high=5 coarse_low=2 fine=3 DRT3=0x01056282 DRT5=0x42
[DEBUG] raminit: POST 39 done
[DEBUG] raminit: POST 41 - EPD_2E=0x00
[DEBUG] raminit: EPD skipped (first cold boot - HW defaults)
[DEBUG] raminit: POST 43 - dram_power_mgmt
[DEBUG] raminit: thermal_init
[DEBUG] raminit: complete
[DEBUG] romstage: i82801hx_dmi_setup
[DEBUG] romstage: gm965_dmi_init
[DEBUG] init_egress
[DEBUG] init_dmi
[DEBUG] setup_rcrb
[DEBUG] setup_aspm
[DEBUG] romstage: i82801hx_dmi_poll_vc1
[DEBUG] ICH8-M waits for VC1 negotiation... done.
[DEBUG] ICH8-M waits for port arbitration table update... done.
[DEBUG] romstage: gm965_pm_init
...
Since I copied most of the Lenovo X61 as template using a iGPU, this Mac comes with only a dGPU and lacks the Ricoh southbridge likes the Lenovo and HP compaq does therefor definitly some IRQ/PICM are incorrect since I had to supply that asl file otherwise it wouldn't build.
Any idea's / hints?
Files
AC Updated by Alexis Calin about 20 hours ago
I think the hang is caused by the FSB not being recognised, rather than by anything board-specific, but I don't have that board to confirm.
What the logs show:
-
Your CLKCFG (MCHBAR+0xC00) reports FSB code 6. coreboot reads orig=0x00020336 and the Apple firmware leaves 0x4356.
-
dmidecode reports an external clock of 266 MHz, and the E8135 is a 1066-FSB Penryn. The iMac8,1 runs a 1066 MHz FSB.
-
The Apple firmware runs the DIMMs at DDR2-800 (CLKCFG memclk code 5). coreboot picks DDR2-667.
-
read_fsb_clock() in nb/intel/gm965/raminit.c only handles codes 1, 2 and 3. Any other code silently falls back to FSB-800. GM45 decodes code 6 as 1067 MHz, and I assume GM965 does the same but haven't checked it against a datasheet.
-
Because of that fallback, set_clkcross_frequencies() programs the FSB-800/DDR2-667 clock-crossing values. Apple's firmware uses different ones:
- 0x208 = 0x00830070
- 0x20c = 0x0000000c
- 0x210 = 0
- 0x1258 and 0x1358 = 0x08040120
- 0x125c and 0x135c = 0
These come from your post-boot inteltool dump, so they may not be exactly what the vendor raminit writes.
Hypothesis: with the wrong FSB/DRAM clock-crossing setup, MCHBAR writes still work, but the first DRAM read in jedec_command() never completes. That would explain why every step before POST 33 succeeds. Other FSB-800 assumptions, such as the PLL relock to DDR2-667 in program_clkcfg_lock(), could also be involved.
Suggested test:
- Add printks just before and after the read32() in jedec_command(). This confirms the hang is the DRAM read itself and not an MCHBAR access.
- Add an FSB-1066 entry: map CLKCFG code 6 in read_fsb_clock(), and add a MEM_CLOCK_800MT entry for memclk code 5. Use Apple's clock-crossing values above for the 1066/800 combination.
- Extend the FSB-indexed tables in pm.c, which would otherwise be read past their ends. Your dump gives the 1066 values, and they follow the 533/667/800 progression:
- 0xc3a/0xc38 = 0x187a/0x1777
- 0xc16 low bits = 0x15
- 0xf00 = 0x900
- 0xf04 = 0x2f00
The other memory-clock-dependent tables (timings, RCOMP, ODT, receive enable) have no DDR2-800 values yet. For this first test you can reuse the DDR2-667 values for everything except CLKCFG and clock crossing. Your dump of 0x1210–0x1254 has Apple's 800/CAS6 DRT timings for reference.
If it gets past JEDEC init: ch0 rank0, or fails differently, that supports the hypothesis. If it hangs at the same read, the main cause is elsewhere, though FSB-1066 support will still be needed.
Running DDR2-667 at FSB-1066 instead would need clock-crossing values for that ratio. The Lenovo ROM tables don't have an FSB-1066 row; those entries are all zero. The memory-init PEI module in your Apple ROM may have one. You could extract it with UEFITool and search for the Intel table, using two adjacent known entries so a short pattern doesn't give false hits. For example, 08 01 02 00 00 00 00 00 10 02 04 00 00 00 00 00 is the FSB-800 row in the Lenovo copy.
WS Updated by Walter Sonius about 19 hours ago
- Related links updated (diff)
WS Updated by Walter Sonius about 19 hours ago
- Related links updated (diff)
WS Updated by Walter Sonius about 19 hours ago
Thanks for the comprehensive feedback, since I'm not knowledgeable about editing ram init code would a simple "CPU swap" with a working Merom t7250 from compaq 6710b and run inteltool again on Apple OEM vendor firmware and try to see if coreboot cbmem log would progress help in any way? Both machines have purple Socket P options.
Same / viceversa run the Apple Specific Intel E8135 CPU according to Wikipedia on the working compaq 6710b which already runs coreboot and see if errors the same or progress if the latter thay may hint it is iMac specific or if it fails that it's CPU specific issue?