From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: Antony Pavlov <antonynpavlov@gmail.com>
Cc: barebox@lists.infradead.org, rcz@pengutronix.de
Subject: Re: [PATCH v3 15/21] RISC-V: erizo: migrate to PBL
Date: Wed, 24 Mar 2021 09:27:08 +0100 [thread overview]
Message-ID: <91bbfeef-133f-2366-7700-1ade1d458445@pengutronix.de> (raw)
In-Reply-To: <20210324004335.8ec9b1a909b2ea1eae712ec5@gmail.com>
Hello Antony,
On 23.03.21 22:43, Antony Pavlov wrote:
> On Sun, 21 Mar 2021 16:13:38 +0100
> Ahmad Fatoum <a.fatoum@pengutronix.de> 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@90000000.of
> 0x91000000 - 0x91000003 (size 0x00000004) 91000000.gpio@91000000.of
> 0x91000004 - 0x91000007 (size 0x00000004) 91000000.gpio@91000000.of
> 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@90000000.of
0x91000000 - 0x91000003 (size 0x00000004) 91000000.gpio@91000000.of
0x91000004 - 0x91000007 (size 0x00000004) 91000000.gpio@91000000.of
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@180003f8.of
> 0x1e000000 - 0x1e3fffff (size 0x00400000) 1e000000.flash@1e000000.of
> 0x1f000900 - 0x1f00093f (size 0x00000040) 1f000900.serial@1f000900.of
> 0x1f000b00 - 0x1f000b1f (size 0x00000020) 1f000b00.gpio@1f000b00.of
> 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@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2021-03-24 8:28 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-21 15:13 [PATCH v3 00/21] " Ahmad Fatoum
2021-03-21 15:13 ` [PATCH v3 01/21] partitions: don't allocate dma capable memory Ahmad Fatoum
2021-03-21 15:13 ` [PATCH v3 02/21] images: make BOARD_ARM_GENERIC_DT available for other arches Ahmad Fatoum
2021-03-21 15:13 ` [PATCH v3 03/21] ARM: make ARM_USE_COMPRESSED_DTB " Ahmad Fatoum
2021-03-21 15:13 ` [PATCH v3 04/21] ARM: aarch64: omit unused label in assembly Ahmad Fatoum
2021-03-21 15:13 ` [PATCH v3 05/21] serial: virtio-console: depend on, but don't select VIRTIO Ahmad Fatoum
2021-03-21 15:13 ` [PATCH v3 06/21] RISC-V: <asm/unaligned.h>: don't do unaligned accesses Ahmad Fatoum
2021-03-21 15:13 ` [PATCH v3 07/21] RISC-V: debug_ll: ns16550: align C access size with assembly's Ahmad Fatoum
2021-03-21 15:13 ` [PATCH v3 08/21] RISC-V: drop duplicate or unneeded cflags Ahmad Fatoum
2021-03-21 15:13 ` [PATCH v3 09/21] RISC-V: add cacheless HAS_DMA support Ahmad Fatoum
2021-03-21 15:13 ` [PATCH v3 10/21] RISC-V: erizo: move to arch/riscv/boards/erizo Ahmad Fatoum
2021-03-21 15:13 ` [PATCH v3 11/21] RISC-V: import Linux' optimized string functions Ahmad Fatoum
2021-03-21 15:13 ` [PATCH v3 12/21] filetype: detect RISC-V images Ahmad Fatoum
2021-03-21 15:13 ` [PATCH v3 13/21] RISC-V: implement PBL image header Ahmad Fatoum
2021-03-21 15:13 ` [PATCH v3 14/21] RISC-V: implement PBL and relocation support Ahmad Fatoum
2021-03-21 22:26 ` Antony Pavlov
2021-03-22 7:20 ` [PATCH] fixup! " Ahmad Fatoum
2021-03-21 15:13 ` [PATCH v3 15/21] RISC-V: erizo: migrate to PBL Ahmad Fatoum
2021-03-23 21:43 ` Antony Pavlov
2021-03-24 8:27 ` Ahmad Fatoum [this message]
2021-03-21 15:13 ` [PATCH v3 16/21] RISC-V: support symbol names in barebox image Ahmad Fatoum
2021-03-21 15:13 ` [PATCH v3 17/21] RISC-V: add 64-bit support Ahmad Fatoum
2021-03-21 15:13 ` [PATCH v3 18/21] RISC-V: add generic DT image Ahmad Fatoum
2021-03-21 15:13 ` [PATCH v3 19/21] clocksource: add driver for RISC-V and CLINT timers Ahmad Fatoum
2021-03-21 15:13 ` [PATCH v3 20/21] power: reset: add drivers for generic syscon reset and poweroff Ahmad Fatoum
2021-03-22 7:21 ` [PATCH] fixup! clocksource: add driver for RISC-V and CLINT timers Ahmad Fatoum
2021-03-22 7:39 ` Ahmad Fatoum
2021-03-21 15:13 ` [PATCH v3 21/21] RISC-V: add Qemu virt support Ahmad Fatoum
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=91bbfeef-133f-2366-7700-1ade1d458445@pengutronix.de \
--to=a.fatoum@pengutronix.de \
--cc=antonynpavlov@gmail.com \
--cc=barebox@lists.infradead.org \
--cc=rcz@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox