From: Ajay Garg <ajaygargnsit@gmail.com>
To: u-boot@lists.denx.de, xen-devel@lists.xenproject.org
Subject: [For knowledge-sake] Understanding of couple of things under the hood
Date: Tue, 1 May 2018 15:57:05 +0530 [thread overview]
Message-ID: <CAHP4M8VRMwJrDAs201vf3z9e+WV9pUfGbaiFiYVhuagjsfzAqw__9326.71014820716$1525170347$gmane$org@mail.gmail.com> (raw)
Hi All.
I have been able to bring up xen on cubieboard2, using the following
script gathered from google :
###################################################################
# SUNXI Xen Boot Script
# Arch Linux ARM adaption of the cmd file which can be found at
http://openmirage.org/wiki/xen-on-cubieboard2
# Addresses suitable for 1GB system, adjust as appropriate for a 2GB system.
# Top of RAM: 0x80000000
# Xen relocate addr 0x7fe00000
setenv kernel_addr_r 0x7f600000 # 10 MB
setenv fdt_addr 0x7ec00000 # 2 MB
setenv xen_addr_r 0x7ea00000 # 2 MB
setenv fdt_high 0xffffffff # Load fdt in place instead of relocating
# Load xen/xen to ${xen_addr_r}.
fatload mmc 0 ${xen_addr_r} /xen
setenv bootargs "dom0_mem=256M"
# Load appropriate .dtb file to ${fdt_addr}
fatload mmc 0 ${fdt_addr} /sun7i-a20-cubieboard2.dtb
fdt addr ${fdt_addr} 0x40000
fdt resize
fdt chosen
fdt set /chosen \#address-cells <1>
fdt set /chosen \#size-cells <1>
# Load Linux arch/arm/boot/zImage to ${kernel_addr_r}
fatload mmc 0 ${kernel_addr_r} /zImage
fdt mknod /chosen module@0
fdt set /chosen/module@0 compatible "xen,linux-zimage" "xen,multiboot-module"
fdt set /chosen/module@0 reg <${kernel_addr_r} 0x${filesize} >
fdt set /chosen/module@0 bootargs "console=hvc0 rw root=/dev/mmcblk0p2
rootwait clk_ignore_unused"
bootz ${xen_addr_r} - ${fdt_addr}
###################################################################
I have been able to understand most of the workflow, except three things :
a)
Is the relocation-address of xen, given by
# Xen relocate addr 0x7fe00000
hardcoded? Or it is computed someway from ${kernel_addr_r},
{fdt_addr}, {xen_addr_r}?
In the bootup logs, xen does relocate to 0x7fe00000, so surely there
is some magic going ..
b)
What does the argument 0x40000 signify in the following :
fdt addr ${fdt_addr} 0x40000
I consulted https://www.denx.de/wiki/DULG/UBootCmdFDT, but did not
find anything about this third argument.
c)
I assume filesize is the size of the kernel-binary, but how is it
determined in the following :
fdt set /chosen/module@0 reg <${kernel_addr_r} 0x${filesize} >
Will be grateful for some help, as it will gain deeper understanding
of the ecosystem.
Thanks and Regards,
Ajay
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
next reply other threads:[~2018-05-01 10:27 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-01 10:27 Ajay Garg [this message]
-- strict thread matches above, loose matches on Subject: below --
2018-05-01 10:27 [U-Boot] [For knowledge-sake] Understanding of couple of things under the hood Ajay Garg
2018-05-01 11:14 ` Julien Grall
2018-05-01 12:00 ` Ajay Garg
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='CAHP4M8VRMwJrDAs201vf3z9e+WV9pUfGbaiFiYVhuagjsfzAqw__9326.71014820716$1525170347$gmane$org@mail.gmail.com' \
--to=ajaygargnsit@gmail.com \
--cc=u-boot@lists.denx.de \
--cc=xen-devel@lists.xenproject.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.