From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefan Bader Subject: Re: Stuck trying to boot Xen 4.3 on Arm Midway Date: Mon, 02 Dec 2013 16:43:33 +0100 Message-ID: <529CAAA5.5030308@canonical.com> References: <529CA055.80402@canonical.com> <1385997874.16012.8.camel@kazak.uk.xensource.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============5573502896327551302==" Return-path: In-Reply-To: <1385997874.16012.8.camel@kazak.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell Cc: Stefano Stabellini , Paolo Pisati , Xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --===============5573502896327551302== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="ch5C6X1uGdf7ebJFDfXWGSnLS133qmEOI" This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --ch5C6X1uGdf7ebJFDfXWGSnLS133qmEOI Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 02.12.2013 16:24, Ian Campbell wrote: > On Mon, 2013-12-02 at 15:59 +0100, Stefan Bader wrote: >> I am trying to extract and combine the various pieces of information f= ound in >> [1] and its sub-pages and the Xen in-tree documentation in order to ma= ke xen >> boot (potentially non-smp without some later changes). But since I am = not >> familiar enough with Arm I think I am stuck doing something wrong. >> >> I compiled the hypervisor with debug and early printk for midway and u= se the >> xen.bin file (I could get no output at all when trying to create a ubo= ot image >> with mkimage from the uncompressed xen.gz). >=20 > What version are you using? xen.bin went away in July, the right file i= s > now just "xen". The released version of xen 4.3. At some point I might update to 4.3.1 (o= r whatever stable is current then). This probably implies picking some addi= tional patches when I want to get it running on Midway. The xen.bin would not be= packaged right now but it had the right format to be used by bootz while = xen.gz (or xen after unpacking) would not be usable in uboot without converting = and that need some more address values which I could and likely do get wrong.= >=20 >> My uboot sequence looks like this: >> >> mw.l 800000 0 10000 >> scsi scan >> ext2load scsi 0 0x800000 xen.bin >> ext2load scsi 0 0x1000000 vmlinuz >> setenv kernsize $filesize >> ext2load scsi 0 0x2000000 initrd.img >> setenv initsize $filesize >> # Tried dtuart=3D/soc/serial@fff36000 as well without >> setenv bootargs "sync_console console=3Ddtuart dtuart=3Dserial" >> fdt addr 0x1000 >> fdt resize >> fdt set /chosen bootargs \"$bootargs\" >> fdt mknod /chosen modules >> # Tried with <1> and <2> for both as I was not sure wnether those numb= ers >> # are related to number of modules >=20 > No, they are the number of u32s which are used for the address and size= > in the reg field, which contains address then size. >=20 > So <2> for both would need "<0x0 0x100000 0x0 $kernsize>" or something.= >=20 Ah ok, thanks for that clarification. So 1 is ok. >> fdt set /chosen/modules \#address-cells <1> >> fdt set /chosen/modules \#size-cells <1> >> fdt mknod /chosen/modules module@0 >> fdt set /chosen/modules/module@0 compatible xen,linux-zimage xen,multi= boot-module >> fdt set /chosen/modules/module@0 reg <0x1000000 $kernsize> >> fdt set /chosen/modules/module@0 bootargs "console=3Dhvc0 debug" >> fdt mknod /chosen/modules module@1 >> fdt set /chosen/modules/module@1 compatible "xen,linux-initrd" >> "xen,multiboot-module" >> fdt set /chosen/modules/module@1 reg <0x2000000 $initsize> >> bootz 0x800000 - 0x1000 >> >> The memory locations are somewhat random (the one for the xen.img is u= sed for >> the kernel on normal installs). The boot produces the following: >> >> ## Flattened Device Tree blob at 00001000 >> Booting using the fdt blob at 0x00001000 >> reserving fdt memory region: addr=3D0 size=3D1000 >> reserving fdt memory region: addr=3D1000 size=3D2000 >> Using Device Tree in place at 00001000, end 00005fff >> >> Starting kernel ... >> >> - UART enabled - >> - CPU 00000000 booting - >> - Machine ID 00000000 - >> - Started in Hyp mode - >> - Zero BSS - >> - Setting up control registers - >> - Turning on paging - >> - Ready - >> RAM: 0000000000000000 - 00000000ff7fffff >> RAM: 0000000200000000 - 00000002ffffffff >> >> MODULE[1]: 0000000001000000 - 0000000001471ae0 console=3Dhvc0 debug >> MODULE[2]: 0000000002000000 - 000000000223f08b >> Placing Xen at 0x00000002ffe00000-0x0000000300000000 >> WARNING: Only using first bank of memory >> Xen heap: 262144 pages Dom heap: 784384 pages >> >> After that nothing. Maybe I am doing the bootargs wrong. I tried >> xen,xen-bootargs and xen,dom0-bootargs and combinations without succes= s. Maybe >> the console argument is wrong. Although the full dtb path at least sho= ws up as >> that in a booted linux in /proc. What am I doing wrong here? >=20 > Your dtuart appears to be wrong, this is the point at which it would > normally be expected to start with the proper (rather than early) > console stuff. >=20 > The correct thing to use depends a bit on which version you are running= , > but if it is not recent xen.git master or staging then that's your firs= t > mistake ;-) The one we (Ubuntu) shipped of course. And that's no mistake. :) >=20 > dtuart=3D/soc/serial@fff36000 is what I use. I've also attached my u-bo= ot > script. (my local scripts append -arm32 to the binary name, it is the > "xen" file though) Thanks, I will look through that later. One thin I noted is the dtb setup= =2E Examples out there often vary in having a modules sub-leaf or not. I woul= d think that from the early printk I am at least right to use the deeper nesting.= At least consistent with the in-source doc at that time/ release. >=20 > Ian. >=20 --ch5C6X1uGdf7ebJFDfXWGSnLS133qmEOI Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBCgAGBQJSnKqlAAoJEOhnXe7L7s6jiQYQANpNkYkN79Riu34y2DyTBF4D kgArw/8dC+dt23SDUODBNEY5kaldmIIBUw1tFEAYRDENaNGsI9fzrkhAIIW3YLGs uTbukbuACQgoiyXhmMDMCRaisSATb8cdLSf6O5W0zN9QehdCK9lLdT4XxapNRcRa l+1lhzYIzoP2V1l1yoVNcz+4pj6eFYX4jwrTxM3+3DSvHlB3jwWWERH2LAHlYSko gMwbkJ78n5mEafI1525ezbcppNQ7Zw8xJQN3+1ngceqZnZ5bdGFtBPx7Z8+dgo8z MRlSB8fzsDemguIAJ8Ju1M+4uHqEZn4rqpb3WUzLQ5bdiVx0f2AFmH9amSgx04By hE3zT2IDNB5lvuoyePAGHxao4DE39O8xf2W0SYWtlBMldebG9kqi/bvm9/E3Ggm9 7tXrpaLzqacOOK35dA2SnNIIGe5+z3UipdN3Y5aM3KZHyU1JcdGrc0c+5C3mQs64 S9WpwLHLhhjqFi3lj1xBm2rcbDF+4awJnJn3YiN274uj9tneONRx4UHAjkcpoEve hgS/W0o69xSmclzAYkL3nWD5TLdM/aivuDt1H2log9lNqgmbsOCemwnZVwQq4jIm NzXihQt+R0DGnjMK4ZtsGb+5bBza6hHjBqJFvSkxJU/embTIrFCnaC2+b/zL1d7k veDAs72W10Dlavq1jLPY =UG5m -----END PGP SIGNATURE----- --ch5C6X1uGdf7ebJFDfXWGSnLS133qmEOI-- --===============5573502896327551302== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel --===============5573502896327551302==--