Skip to contentSkip to conversation

DRAM test problem

U-Boot Alemao 3 participants 7 messages Jul 6, 2009 – Jul 8, 2009

lore
Share & tools
lore

Alemao

author
#0 lore raw

Hi all,

I've made ports of u-boot for two powerpc processors, MPC8343 and MPC8541.

The boards has 128MB of DDR2. So I enabled CFG_DRAM_TEST in 127MB of those memories, and I got two scenarios:

MPC8343(ddr_clk = 264 MHz): test tooks 1min 35sec

MPC8541(ddr_clk = 333 MHz): test tooks 5 sec

Note: memories get ddr_clk / 2

Make sense?
Is this cause MPC85xx family has L2 cache?
Or cause ddr_clk? Or my port has problems in DDR configuration?

Im using Micron DDR2 memory, MT47H32M16HR-3:F, with CL = 3 for both ports.

Thanks in advance,

--
Alemao

#1 lore raw
Quoted 12 lines · Alemao

Hi all,

I've made ports of u-boot for two powerpc processors, MPC8343 and MPC8541.

The boards has 128MB of DDR2. So I enabled CFG_DRAM_TEST in 127MB of those memories, and I got two scenarios:

MPC8343(ddr_clk = 264 MHz): test tooks 1min 35sec

MPC8541(ddr_clk = 333 MHz): test tooks 5 sec

Quoted 7 lines

Note: memories get ddr_clk / 2

Make sense?
Is this cause MPC85xx family has L2 cache?
Or cause ddr_clk? Or my port has problems in DDR configuration?

Im using Micron DDR2 memory, MT47H32M16HR-3:F, with CL = 3 for both ports.

I believe data cache is disabled on 83xx in u-boot.

-Scott

author
#2 lore raw
Quoted 19 lines · Scott Wood
Quoted 18 lines · Alemao

Hi all,

I've made ports of u-boot for two powerpc processors, MPC8343 and MPC8541.

The boards has 128MB of DDR2. So I enabled CFG_DRAM_TEST in 127MB of those memories, and I got two scenarios:

MPC8343(ddr_clk = 264 MHz): test tooks 1min 35sec

MPC8541(ddr_clk = 333 MHz): test tooks 5 sec

Note: memories get ddr_clk / 2

Make sense?
Is this cause MPC85xx family has L2 cache?
Or cause ddr_clk? Or my port has problems in DDR configuration?

Quoted 6 lines
Quoted 1 line

Im using Micron DDR2 memory, MT47H32M16HR-3:F, with CL = 3 for both ports.

I believe data cache is disabled on 83xx in u-boot.

-Scott

So the time for MPC8343 makes sense??? It tooks that long?

Data cache/instruction cache is inside e300c1 core, u-boot still have to enable/support it?

Any hint how could I do it in 83xx family?

Im loosing a lot of performance and all boards needs to pass this test before goes out...

Cheers,

--
Alemao

author
#3 lore raw
Quoted 34 lines · Alemao
Quoted 19 lines · Scott Wood
Quoted 18 lines · Alemao

Hi all,

I've made ports of u-boot for two powerpc processors, MPC8343 and MPC8541.

The boards has 128MB of DDR2. So I enabled CFG_DRAM_TEST in 127MB of those memories, and I got two scenarios:

MPC8343(ddr_clk = 264 MHz): test tooks 1min 35sec

MPC8541(ddr_clk = 333 MHz): test tooks 5 sec

Note: memories get ddr_clk / 2

Make sense?
Is this cause MPC85xx family has L2 cache?
Or cause ddr_clk? Or my port has problems in DDR configuration?

Quoted 6 lines
Quoted 1 line

Im using Micron DDR2 memory, MT47H32M16HR-3:F, with CL = 3 for both ports.

I believe data cache is disabled on 83xx in u-boot.

-Scott

So the time for MPC8343 makes sense??? It tooks that long?

Data cache/instruction cache is inside e300c1 core, u-boot still have to enable/support it?

Any hint how could I do it in 83xx family?

Quoted 8 lines

Im loosing a lot of performance and all boards needs to pass this test before goes out...

Cheers,

--
Alemao

I forgot to mention that Im running dram test already in ram.

So it's faster then run it from flash.

--
Alemao

#4 lore raw
Quoted 9 lines · On Tue, 7 Jul 2009 15:01:05 -0300 Alemao <[email protected]> wrote:
Quoted 8 lines · Alemao
Quoted 4 lines · Scott Wood

I believe data cache is disabled on 83xx in u-boot.

-Scott

So the time for MPC8343 makes sense??? It tooks that long?

Quoted 7 lines
Quoted 7 lines

Data cache/instruction cache is inside e300c1 core, u-boot still have to enable/support it?

Any hint how could I do it in 83xx family?

Im loosing a lot of performance and all boards needs to pass this test before goes out...

maybe what you're testing for itself needs to be better defined..but in the meanwhile, check out the CONFIG_*_HID0 assignments for your board...they get used in cpu/mpc83xx/start.S - see how they're configuring the caches. See also previous discussions on this list.

Kim

author
#5 lore raw
Quoted 20 lines · Kim Phillips
Quoted 9 lines · On Tue, 7 Jul 2009 15:01:05 -0300 Alemao <[email protected]> wrote:
Quoted 8 lines · Alemao
Quoted 4 lines · Scott Wood

I believe data cache is disabled on 83xx in u-boot.

-Scott

So the time for MPC8343 makes sense??? It tooks that long?

Quoted 7 lines
Quoted 7 lines

Data cache/instruction cache is inside e300c1 core, u-boot still have to enable/support it?

Any hint how could I do it in 83xx family?

Im loosing a lot of performance and all boards needs to pass this test before goes out...

Quoted 7 lines

maybe what you're testing for itself needs to be better defined..but in the meanwhile, check out the CONFIG_*_HID0 assignments for your board...they get used in cpu/mpc83xx/start.S - see how they're configuring the caches. ?See also previous discussions on this list.

Kim

In cpu/mpc83xx/start.S, dcache is enable for stack-in-cache trick:

	/* enable and invalidate the data cache */
	bl	dcache_enable
	sync

dcache_enable:

	mfspr	r3, HID0
	li	r5, HID0_DCFI|HID0_DLOCK
	andc	r3, r3, r5
	mtspr	HID0, r3  /* no invalidate, unlock */
	ori	r3, r3, HID0_DCE
	ori	r5, r3, HID0_DCFI
	mtspr	HID0, r5  /* enable + invalidate */
	mtspr	HID0, r3  /* enable */
	sync
	blr

I didn't find any code that is disabling it after that.

My only concern is whether the times really are consistent, 1min 35sec is much time compared with 5sec from MPC8541. Maybe my DDR configuration is wrong.

I'm doing the test in ram, so it should be faster then running from flash.

--
Alemao

#6 lore raw
Quoted 19 lines · Alemao

In cpu/mpc83xx/start.S, dcache is enable for stack-in-cache trick:

	/* enable and invalidate the data cache */
	bl	dcache_enable
	sync

dcache_enable:

	mfspr	r3, HID0
	li	r5, HID0_DCFI|HID0_DLOCK
	andc	r3, r3, r5
	mtspr	HID0, r3  /* no invalidate, unlock */
	ori	r3, r3, HID0_DCE
	ori	r5, r3, HID0_DCFI
	mtspr	HID0, r5  /* enable + invalidate */
	mtspr	HID0, r3  /* enable */
	sync
	blr
Quoted 1 line

I didn't find any code that is disabling it after that.

Did you find anything that unlocks it once the stack-in-cache is no longer needed? If not, it will not be usable as a cache, just as a RAM.

-Scott