[ECOS] Re: Adder II (MPC852T), issue while migrating to 32MB memory

Andre-John Mas ajmas@sympatico.ca
Mon Jul 17 18:35:00 GMT 2006


I have a collegue who suspects that we may need to be changing this
block too, in adder.S

//#define MAMR_PTA (((((((PLPRCR_PTX+1)*3686400)*625)/10000000)+31)/32)&0xFF)
        lwi     r3,0x00802114|(MAMR_PTA<<24)
        stw     r3,MAMR(r4)
        stw     r3,MBMR(r4)

what should this be changed to if this is indeed the case?

> 
> From: Andre-John Mas <ajmas@sympatico.ca>
> Date: 2006/07/17 Mon AM 11:08:22 EDT
> To: <ecos-discuss@ecos.sourceware.org>
> Subject: [ECOS] Re: Adder II (MPC852T), issue while migrating to 32MB memory
> 
> Hi,
> 
> Doing the following change sorted the crashing issue:
> 
> >            /* ONBOARD DRAM */
> >            lwi     r3,0x00000081   # 32-bit, UPMA
> >            lwi     r5,0xFF000E00
> >                     -should be-
> >                     0xFE000E00
> >
> > You need to change this - it adjusts the size of CS1 (the DRAM)
> 
> Now to validate that we are actually addressing the new memory correctly, the following test code was added to our RedBoot:
> 
> int test[10][2] = {
>    {0x0040000, 48}, {0x0040001, 49}, {0x0040002, 50}, {0x0040003, 51}, {0x0040004, 52},
>    {0x1040000 ,53}, {0x1040001, 54}, {0x1040002, 55}, {0x1040003, 56}, {0x1040004, 57}
> };
> 
> for (i=0 ; i<10; i++ )
> {
> 
> 	location = (char *) test[i][0] ;
> 	*location = (char) test[i][1] ;
> 	diag_printf("a: Initializing location 0x%x\n", (int)location);
> }
> 
> diag_dump_buf(test[0][0],32);
> diag_dump_buf(test[5][0],32);
> 
> for (i=0 ; i<10; i++ )
> {
> 	location = (char *) test[i][0] ;
> 	if (*location != ((char) test[i][1]) )
> 	{
> 		diag_printf("a: ERROR -> Expected %d, Found %d at location 0x%x\n", test[i][1], (int)*location, (int)location);
> 	}
> 	else
> 	{
> 		diag_printf("a: SUCCESS -> Expected %d, Found %d at location 0x%x\n", test[i][1], (int)*location, (int)location);
> 	}
> }
> 
> for (i=9 ; i>=0; i-- )
> {
> 	diag_printf("b: Initializing location 0x%x\n", test[i][0]);
> 	location = (char *) test[i][0] ;
> 	*location = (char) test[i][1] ;
> }
> 
> for (i=9 ; i>=0; i-- )
> {
> 	location = (char *) test[i][0] ;
> 	if (*location != ((char) test[i][1]) )
> 	{
> 		diag_printf("b: ERROR -> Expected %d, Found %d at location 0x%x\n", test[i][1], (int)*location, (int)location);
> 	}
> 	else
> 	{
> 		diag_printf("b: SUCCESS -> Expected %d, Found %d at location 0x%x\n", test[i][1], (int)*location, (int)location);
> 	}
> }
> 
> The problem is that it seems that we are encoutering shadow memory, since the following is the result I am getting, in the comparison loops. I am not sure whether it is a configuration error, or a question of my test being incorrect:
> 
> a: ERROR -> Expected 48, Found 53 at location 0x40000
> a: ERROR -> Expected 49, Found 54 at location 0x40001
> a: ERROR -> Expected 50, Found 55 at location 0x40002
> a: ERROR -> Expected 51, Found 56 at location 0x40003
> a: ERROR -> Expected 52, Found 57 at location 0x40004
> a: SUCCESS -> Expected 53, Found 53 at location 0x1040000
> a: SUCCESS -> Expected 54, Found 54 at location 0x1040001
> a: SUCCESS -> Expected 55, Found 55 at location 0x1040002
> a: SUCCESS -> Expected 56, Found 56 at location 0x1040003
> a: SUCCESS -> Expected 57, Found 57 at location 0x1040004
> 
> b: ERROR -> Expected 57, Found 52 at location 0x1040004
> b: ERROR -> Expected 56, Found 51 at location 0x1040003
> b: ERROR -> Expected 55, Found 50 at location 0x1040002
> b: ERROR -> Expected 54, Found 49 at location 0x1040001
> b: SUCCESS -> Expected 53, Found 53 at location 0x1040000
> b: SUCCESS -> Expected 52, Found 52 at location 0x40004
> b: SUCCESS -> Expected 51, Found 51 at location 0x40003
> b: SUCCESS -> Expected 50, Found 50 at location 0x40002
> b: SUCCESS -> Expected 49, Found 49 at location 0x40001
> b: SUCCESS -> Expected 48, Found 48 at location 0x40000
> 
> 
> 
> -- 
> Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
> and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
> 


-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss



More information about the Ecos-discuss mailing list