AnsweredAssumed Answered

Failed to copy __secondary_start_page

Question asked by yixuan hao on May 30, 2018
Latest reply on Jul 8, 2018 by Pavel Chubakov

Hello everyone,

   Using one customed T2080 board(DDR size 2GB,and SVR is 0x85300011 without sercurity ),plat_mp_up in U-boot,it will failed to print:

   CPU up timeout. CPU up mask is 1 should be f

    I added some print-info in u-boot as follow:

    bootpg = 0x7ffff000,pagesize = 0x1000
__bootpg_addr = 0x7fef3000,__spin_table_addr = 0x7fef3100
__second_half_boot_page = 0x3c600000,__secondary_start_page = 0x7fef2000
real CONFIG_BPTR_VIRT_ADDR = 0x7ffff000

 

I find a problem when the code run at memcpy((void *)CONFIG_BPTR_VIRT_ADDR, (void *)fixup, 4096) in func setup_mp.

that`s mean copy __secondary_start_page code to CONFIG_BPTR_VIRT_ADDR in my point,but i use command md to show the addr,the result as follow:

 

=> md 7ffff000

7ffff000: 00000000 00000000 00000000 00000000    ................

7ffff010: 00000000 00000000 00000000 7c7c43a6    ............||C.

7ffff020: 00000000 00000000 00000000 00000000    ................

7ffff030: 00000000 00000000 00000000 3c600001    ............<`..

7ffff040: 00000000 00000000 00000000 00000000    ................

7ffff050: 00000000 00000000 00000000 60420102    ............`B..

7ffff060: 00000000 00000000 00000000 00000000    ................

7ffff070: 00000000 00000000 00000000 4c00012c    ............L..,

7ffff080: 00000000 00000000 00000000 00000000    ................

7ffff090: 00000000 00000000 00000000 5408efbe    ............T...

7ffff0a0: 00000000 00000000 00000000 00000000    ................

7ffff0b0: 00000000 00000000 00000000 5488083c    ............T..<

7ffff0c0: 00000000 00000000 00000000 00000000    ................

7ffff0d0: 00000000 00000000 00000000 7d709ba6    ............}p..

7ffff0e0: 00000000 00000000 00000000 00000000    ................

7ffff0f0: 00000000 00000000 00000000 61ab0015    ............a...

=> md fffff000

fffff000: 00000000 00000000 00000000 00000000    ................

fffff010: 00000000 00000000 00000000 7c7c43a6    ............||C.

fffff020: 00000000 00000000 00000000 00000000    ................

fffff030: 00000000 00000000 00000000 3c600001    ............<`..

fffff040: 00000000 00000000 00000000 00000000    ................

fffff050: 00000000 00000000 00000000 60420102    ............`B..

fffff060: 00000000 00000000 00000000 00000000    ................

fffff070: 00000000 00000000 00000000 4c00012c    ............L..,

fffff080: 00000000 00000000 00000000 00000000    ................

fffff090: 00000000 00000000 00000000 5408efbe    ............T...

fffff0a0: 00000000 00000000 00000000 00000000    ................

fffff0b0: 00000000 00000000 00000000 5488083c    ............T..<

fffff0c0: 00000000 00000000 00000000 00000000    ................

fffff0d0: 00000000 00000000 00000000 7d709ba6    ............}p..

fffff0e0: 00000000 00000000 00000000 00000000    ................

fffff0f0: 00000000 00000000 00000000 61ab0015    ............a...

 

=> md 7fef2000

7fef2000: 3c608000 60630080 7c70fba6 3c600140    <`..`c..|p..<`.@

7fef2010: 60630201 7c75fba6 38600000 7c7c43a6    `c..|u..8`..||C.

7fef2020: 7c7d43a6 3c400000 60420102 7c53fba6    |}C.<@..`B..|S..

7fef2030: 7c73faa6 7c611039 4082fff8 3c600001    |s..|a.9@...<`..

7fef2040: 60630001 7c73fba6 4c00012c 7c73faa6    `c..|s..L..,|s..

7fef2050: 70610001 4182fff8 3c400000 60420102    pa..A...<@..`B..

7fef2060: 7c52fba6 7c72faa6 7c611039 4082fff8    |R..|r..|a.9@...

7fef2070: 3c600001 60630001 7c72fba6 4c00012c    <`..`c..|r..L..,

7fef2080: 7c72faa6 70610001 4182fff8 3c60ffff    |r..pa..A...<`..

7fef2090: 6063f144 80630000 7c1e42a6 5408efbe    `c.D.c..|.B.T...

7fef20a0: 540ad97e 1caa0004 7ca54214 1c850002    T..~....|.B.....

7fef20b0: 54a83032 7d434214 7c9e43a6 5488083c    T.02}CB.|.C.T..<

7fef20c0: 39080020 7d1e93a6 3da0ffff 61adf144    9.. }...=...a..D

7fef20d0: 81ad0000 55ad0026 3d601001 7d709ba6    ....U..&=`..}p..

7fef20e0: 3d60c000 616b1100 7d719ba6 65ab0000    =`..ak..}q..e...

7fef20f0: 61ab0006 7d729ba6 65ab0000 61ab0015    a...}r..e...a...

 

Obviously,the data is wrong!0x7fef2000 is address about the __secondary_start_page code data,  0x7ffff000 is real addr conver from CONFIG_BPTR_VIRT_ADDR,0xfffff000 is virt addr define in code CONFIG_BPTR_VIRT_ADDR.

 

I have done the thing as same in T2080RDB(DDR 4G but just use 2G, SVR is 0x85380011 with security),the result as follow: 

 

fffff000: 3c608000 60630080 7c70fba6 3c600140    <`..`c..|p..<`.@

fffff010: 60630201 7c75fba6 38600000 7c7c43a6    `c..|u..8`..||C.

fffff020: 7c7d43a6 3c400000 60420102 7c53fba6    |}C.<@..`B..|S..

fffff030: 7c73faa6 7c611039 4082fff8 3c600001    |s..|a.9@...<`..

fffff040: 60630001 7c73fba6 4c00012c 7c73faa6    `c..|s..L..,|s..

fffff050: 70610001 4182fff8 3c400000 60420102    pa..A...<@..`B..

fffff060: 7c52fba6 7c72faa6 7c611039 4082fff8    |R..|r..|a.9@...

fffff070: 3c600001 60630001 7c72fba6 4c00012c    <`..`c..|r..L..,

fffff080: 7c72faa6 70610001 4182fff8 3c60ffff    |r..pa..A...<`..

fffff090: 6063f144 80630000 7c1e42a6 5408efbe    `c.D.c..|.B.T...

fffff0a0: 540ad97e 1caa0004 7ca54214 1c850002    T..~....|.B.....

fffff0b0: 54a83032 7d434214 7c9e43a6 5488083c    T.02}CB.|.C.T..<

fffff0c0: 39080020 7d1e93a6 3da0ffff 61adf144    9.. }...=...a..D

fffff0d0: 81ad0000 55ad0026 3d601001 7d709ba6    ....U..&=`..}p..

fffff0e0: 3d60c000 616b1100 7d719ba6 65ab0000    =`..ak..}q..e...

fffff0f0: 61ab0006 7d729ba6 65ab0000 61ab0015    a...}r..e...a...

 

This data is correct!

 

I can`t understand why the data is copy wrong at,the DDR addr 0x7ffff000, i test the read-write function about 0x7ffff000~0x7fffffff is OK!

 

Any help is appreciated!

Outcomes