Re: [PATCH v3 15/21] RISC-V: erizo: migrate to PBL

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Antony,

On 23.03.21 22:43, Antony Pavlov wrote:
> On Sun, 21 Mar 2021 16:13:38 +0100
> Ahmad Fatoum <a.fatoum@xxxxxxxxxxxxxx> wrote:
> 
> Hi!
> 
> I have good news and bad news.
> 
> The good news is that erizo barebox successfully runs on real FPGA hardware.
> 
> The bad news is that there is no "stack" region in erizo iomem output;

Just sent out a fix. I missed that common code can no longer request
the stack memory region as we have a dynamic STACK_BASE now.

> also barebox relocated to te middle of RAM not to the top of RAM:
> 
> barebox:/ iomem
> 0x00000000 - 0xffffffff (size 0x00000000) iomem
>   0x80000000 - 0x807fffff (size 0x00800000) ram0
>     0x802ffd80 - 0x803ffd7f (size 0x00100000) malloc space
>     0x803ffd80 - 0x803fffc3 (size 0x00000244) board data
>     0x80400000 - 0x80436cff (size 0x00036d00) barebox
>     0x80436d00 - 0x8043eec7 (size 0x000081c8) barebox data
>     0x8043eec8 - 0x8044336f (size 0x000044a8) bss
>   0x90000000 - 0x9000001f (size 0x00000020) 90000000.uart@xxxxxxxxxxx
>   0x91000000 - 0x91000003 (size 0x00000004) 91000000.gpio@xxxxxxxxxxx
>   0x91000004 - 0x91000007 (size 0x00000004) 91000000.gpio@xxxxxxxxxxx
> barebox:/ 

Stack is:
	0x805e0000 - 0x805fffff (size 0x00020000) stack

ARM placed the top most memory region 1M from the end of memory. I chose
2M for RISC-V, because Qemu for Virt places the FDT into the last 2M.

I've adjust the virt entry point to take care of this and removed the 2M.
My memory map is now:

0x00000000 - 0xffffffff (size 0x00000000) iomem
  0x80000000 - 0x807fffff (size 0x00800000) ram0
    0x804ffd80 - 0x805ffd7f (size 0x00100000) malloc space
    0x805ffd80 - 0x805fffc3 (size 0x00000244) board data
    0x80600000 - 0x80636c7f (size 0x00036c80) barebox
    0x80636c80 - 0x8063ee53 (size 0x000081d4) barebox data
    0x8063ee54 - 0x806432ff (size 0x000044ac) bss
    0x807e0000 - 0x807fffff (size 0x00020000) stack
  0x90000000 - 0x9000001f (size 0x00000020) 90000000.uart@xxxxxxxxxxx
  0x91000000 - 0x91000003 (size 0x00000004) 91000000.gpio@xxxxxxxxxxx
  0x91000004 - 0x91000007 (size 0x00000004) 91000000.gpio@xxxxxxxxxxx

barebox is now 2M from the end of RAM. This is because barebox PBL
doesn't have information on how big barebox proper BSS is. I am doing
it like ARM and assume 1M.

Thanks for testing and let me know if this works for you,
Ahmad

> 
> Please compare with mips malta and arm vexpress-a9 iomem output:
> 
> barebox@qemu malta:/ iomem
> 0x00000000 - 0xffffffff (size 0x00000000) iomem
>   0x180003f8 - 0x180003ff (size 0x00000008) 180003f8.serial@xxxxxxxxxxx
>   0x1e000000 - 0x1e3fffff (size 0x00400000) 1e000000.flash@xxxxxxxxxxx
>   0x1f000900 - 0x1f00093f (size 0x00000040) 1f000900.serial@xxxxxxxxxxx
>   0x1f000b00 - 0x1f000b1f (size 0x00000020) 1f000b00.gpio@xxxxxxxxxxx
>   0xa0000000 - 0xafffffff (size 0x10000000) kseg1_ram0
>     0xafb39000 - 0xafb3ffff (size 0x00007000) stack
>     0xafb40000 - 0xaff3ffff (size 0x00400000) malloc space
>     0xaff40000 - 0xaffa3fdf (size 0x00063fe0) barebox
>     0xaffa3fe0 - 0xafff249f (size 0x0004e4c0) barebox data
>     0xafffa4a0 - 0xafffe60b (size 0x0000416c) bss
> barebox@qemu malta:/ 
> 
> 
> barebox@V2P-CA9:/ iomem
> 0x00000000 - 0xffffffff (size 0x00000000) iomem
>   0x10004000 - 0x10004fff (size 0x00001000) amba
>   0x10005000 - 0x10005fff (size 0x00001000) amba
>   0x10006000 - 0x10006fff (size 0x00001000) amba
>   0x10007000 - 0x10007fff (size 0x00001000) amba
>   0x10009000 - 0x10009fff (size 0x00001000) amba
>   0x1000a000 - 0x1000afff (size 0x00001000) amba
>   0x1000b000 - 0x1000bfff (size 0x00001000) amba
>   0x1000c000 - 0x1000cfff (size 0x00001000) amba
>   0x10011000 - 0x10011fff (size 0x00001000) amba
>   0x10012000 - 0x10012fff (size 0x00001000) amba
>   0x10017000 - 0x10017fff (size 0x00001000) amba
>   0x1001f000 - 0x1001ffff (size 0x00001000) amba
>   0x10020000 - 0x10020fff (size 0x00001000) amba
>   0x40000000 - 0x43ffffff (size 0x04000000) 40000000.flash@0,00000000.of
>   0x44000000 - 0x47ffffff (size 0x04000000) 40000000.flash@0,00000000.of
>   0x60000000 - 0x9fffffff (size 0x40000000) ram0
>     0x6fefe1c0 - 0x7fdfc37f (size 0x0fefe1c0) malloc space
>     0x7fdfc380 - 0x7fdfffe3 (size 0x00003c64) board data
>     0x7fe00000 - 0x7fe5749f (size 0x000574a0) barebox
>     0x7fe574a0 - 0x7feabb9f (size 0x00054700) barebox data
>     0x7feabba0 - 0x7feae90f (size 0x00002d70) bss
>     0x7ffe8000 - 0x7ffeffff (size 0x00008000) stack
> barebox@V2P-CA9:/ 
> 
> 
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux