[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-users] How to boot domU and dom0 from a device tree
Hi, On 6/10/19 10:30 PM, Stefano Stabellini wrote: > On Mon, 10 Jun 2019, Denis Obrezkov wrote: >> Also, I found out how to pass the amount of memory for dom0. And I >> passed 256M. And I can see that in a device tree there is a memory node >> with 4096M allocated. So, I don't understand why I have this error: > > This is easy, the answer is below. > > >> (XEN) *** LOADING DOMAIN 0 *** >> (XEN) Loading Domd0 kernel from boot module @ 0000000047000000 >> (XEN) Loading ramdisk from boot module @ 0000000042000000 >> (XEN) Allocating 1:1 mappings totalling 256MB for dom0: >> (XEN) BANK[0] 0x00000050000000-0x00000060000000 (256MB) >> (XEN) Grant table range: 0x00000049000000-0x00000049040000 >> (XEN) Allocating PPI 16 for event channel interrupt >> (XEN) Loading zImage from 0000000138000000 to >> 0000000050080000-00000000512d1a00 >> (XEN) Loading dom0 initrd from 0000000042000000 to >> 0x0000000058200000-0x000000005831b680 >> (XEN) Loading dom0 DTB to 0x0000000058000000-0x0000000058001da8 >> (XEN) Initial low memory virq threshold set at 0x4000 pages. >> (XEN) Scrubbing Free RAM in background >> (XEN) Std. Loglevel: Errors and warnings >> (XEN) Guest Loglevel: Nothing (Rate-limited: Errors and warnings) >> (XEN) *************************************************** >> (XEN) No support for ARM_SMCCC_ARCH_WORKAROUND_1. >> (XEN) Please update your firmware. >> (XEN) *************************************************** >> (XEN) 3... 2... 1... >> (XEN) *** Serial input to DOM0 (type 'CTRL-a' three times to switch input) >> (XEN) *** LOADING DOMU cpus=1 memory=140000KB *** >> (XEN) Loading Domd1 kernel from boot module @ 0000000043000000 >> (XEN) Loading ramdisk from boot module @ 0000000048000000 >> (XEN) >> (XEN) **************************************** >> (XEN) Panic on CPU 0: >> (XEN) Out of memory >> (XEN) **************************************** >> (XEN) >> (XEN) Reboot in five seconds... >> >> fdt commands passed via u-boot: >> >> setenv xen_bootargs 'dom0_mem=256M' > > You just need to give more memory to dom0. Use dom0_mem=1G or something > like that for a start. But as far as I understand domU doesn't have enough memory and fails. I change dom0_mem to 1G but the problem still exists. > > >> fdt addr 0x44000000 >> fdt resize >> fdt set /chosen \#address-cells <1> >> fdt set /chosen \#size-cells <1> >> fdt set /chosen xen,xen-bootargs \"$xen_bootargs\" >> fdt mknod /chosen module@0 >> fdt set /chosen/module@0 compatible "xen,linux-zimage" >> "xen,multiboot-module" >> fdt set /chosen/module@0 reg <0x47000000 0x7cc561> >> fdt set /chosen/module@0 bootargs "rw root=/dev/ram rdinit=/sbin/init >> earlyprintk=serial,ttyAMA0 console=hvc0 earlycon=xenboot" >> fdt mknod /chosen module@1 >> fdt set /chosen/module@1 compatible "xen,linux-initrd" >> "xen,multiboot-module" >> fdt set /chosen/module@1 reg <0x42000000 0x11b680> >> >> fdt mknod /chosen domU1 >> fdt set /chosen/domU1 compatible "xen,domain" >> fdt set /chosen/domU1 \#address-cells <1> >> fdt set /chosen/domU1 \#size-cells <1> >> fdt set /chosen/domU1 \cpus <1> >> fdt set /chosen/domU1 \memory <0 1310720> >> >> fdt mknod /chosen/domU1 module@0 >> fdt set /chosen/domU1/module@0 compatible "multiboot,kernel" >> "multiboot,module" >> fdt set /chosen/domU1/module@0 reg <0x43000000 0x7cc561> >> fdt set /chosen/domU1/module@0 bootargs "rw root=/dev/ram >> rdinit=/sbin/init console=hvc0 earlycon=xenboot" >> >> fdt mknod /chosen/domU1 module@1 >> fdt set /chosen/domU1/module@1 compatible "multiboot,ramdisk" >> "multiboot,module" >> fdt set /chosen/domU1/module@1 reg <0x48000000 0x11b680> >> >> booti 0x49000000 - 0x44000000 >> >> On 6/10/19 2:24 PM, Denis Obrezkov wrote: >>> I found out that I can get rid of that error if I load the same image to >>> another address space with -device loader. But then I get the error: >>> (XEN) *************************************************** >>> (XEN) PLEASE SPECIFY dom0_mem PARAMETER - USING 512M FOR NOW >>> (XEN) *************************************************** >>> (XEN) 3... 2... 1... >>> (XEN) *** Serial input to DOM0 (type 'CTRL-a' three times to switch input) >>> (XEN) *** LOADING DOMU cpus=1 memory=200000KB *** >>> (XEN) Loading Domd1 kernel from boot module @ 0000000043000000 >>> (XEN) Loading ramdisk from boot module @ 0000000042000000 >>> (XEN) >>> (XEN) **************************************** >>> (XEN) Panic on CPU 0: >>> (XEN) Out of memory >>> (XEN) **************************************** >>> (XEN) >>> (XEN) Reboot in five seconds... >>> >>> So, I don't understand how xen distribute the allocated memory and how >>> can it be allocated via a device tree. >>> >>> On 6/10/19 12:09 PM, Denis Obrezkov wrote: >>>> Hello, >>>> >>>> I am trying to boot domU from a device tree. I want to use the same >>>> ramdisk and kernel image as for dom0. These are my u-boot commands: >>>> >>>> fdt addr 0x44000000 >>>> fdt resize >>>> fdt set /chosen \#address-cells <1> >>>> fdt set /chosen \#size-cells <1> >>>> fdt mknod /chosen module@0 >>>> fdt set /chosen/module@0 compatible "xen,linux-zimage" >>>> "xen,multiboot-module" >>>> fdt set /chosen/module@0 reg <0x47000000 0x7cc561> >>>> fdt set /chosen/module@0 bootargs "rw root=/dev/ram rdinit=/sbin/init >>>> earlyprintk=serial,ttyAMA0 console=hvc0 earlycon=xenboot" >>>> fdt mknod /chosen module@1 >>>> fdt set /chosen/module@1 compatible "xen,linux-initrd" >>>> "xen,multiboot-module" >>>> fdt set /chosen/module@1 reg <0x42000000 0x11b680> >>>> >>>> fdt mknod /chosen domU1 >>>> fdt set /chosen/domU1 compatible "xen,domain" >>>> fdt set /chosen/domU1 \#address-cells <1> >>>> fdt set /chosen/domU1 \#size-cells <1> >>>> >>>> fdt mknod /chosen/domU1 module@0 >>>> fdt set /chosen/domU1/module@0 compatible "xen,linux-zimage" >>>> "xen,multiboot-module" >>>> fdt set /chosen/domU1/module@0 reg <0x47000000 0x7cc561> >>>> fdt set /chosen/domU1/module@0 bootargs "rw root=/dev/ram >>>> rdinit=/sbin/init console=hvc0 earlycon=xenboot" >>>> >>>> fdt mknod /chosen/domU1 module@1 >>>> fdt set /chosen/domU1/module@1 compatible "xen,linux-initrd" >>>> "xen,multiboot-module" >>>> fdt set /chosen/domU1/module@1 reg <0x42000000 0x11b680> >>>> >>>> booti 0x49000000 - 0x44000000 >>>> >>>> I got: >>>> >>>> .... >>>> >>>> (XEN) *** LOADING DOMAIN 0 *** >>>> (XEN) Missing kernel boot module? >>>> (XEN) >>>> (XEN) **************************************** >>>> (XEN) Panic on CPU 0: >>>> (XEN) Could not set up DOM0 guest OS >>>> (XEN) **************************************** >>>> (XEN) >>>> (XEN) Reboot in five seconds... >>>> >>>> I wasn't able to find instructions on how to run domU and dom0 images >>>> simultaneously. >>>> >>> >> >> -- >> Regards, Denis Obrezkov >> -- Regards, Denis Obrezkov Attachment:
signature.asc _______________________________________________ Xen-users mailing list Xen-users@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-users
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |