From: Konrad Rzeszutek Wilk <konrad@kernel.org>
To: Julien Grall <julien.grall@arm.com>
Cc: xen-devel@lists.xenproject.org, ross.lagerwall@citrix.com,
sstabellini@kernel.org
Subject: Re: [PATCH v1] Livepatch ARM 64 implementation
Date: Mon, 15 Aug 2016 11:49:00 -0400 [thread overview]
Message-ID: <20160815154900.GA5296@localhost.localdomain> (raw)
In-Reply-To: <b5b47baf-449b-95b7-e09c-9a0c1dc1df49@arm.com>
On Mon, Aug 15, 2016 at 04:52:58PM +0200, Julien Grall wrote:
>
>
> On 15/08/2016 01:07, Konrad Rzeszutek Wilk wrote:
> > Hey!
>
> Hi Konrad,
>
> > This is the first (non RFC) posting of the enablement of Livepatch under ARM64.
> >
> > The patches are based on: [PATCH v3] Livepatch fixes and features for v4.8.
> > (https://lists.xen.org/archives/html/xen-devel/2016-08/msg01825.html)
> >
> > And the git tree is:
> > git://xenbits.xen.org/people/konradwilk/xen.git livepatch.v4.8.v3
> >
> > I've only tested this under Foundation Platform with only one CPU working
> > (the other CPUs wouldn't boot up for some reason) and without a proper working
> > disk image (can't recall why, but it did have an initramfs) - I ended
> > up building the hypervisor with the livepatch built in and loading it during
> > dom0 execution (via timers), see
> > (http://xenbits.xen.org/gitweb/?p=people/konradwilk/xen.git;a=commit;h=39517b2b807025d0d63d4f042ada5eb3de32ff45)
> > [That patch is not part of this patchset of course]
>
> I am able to use both SMP and the rootfs on the foundation model. What is
> hte command line you are using? How about the device tree?
~/ARM/Foundation_Platformpkg/models/Linux64_GCC-4.7/Foundation_Platform --image ~/ARM/boot-wrapper-aarch64.git/xen-system.axf
And the boot-wrapper-aarch64.git does:
aarch64 <konrad@localhost:~/ARM/boot-wrapper-aarch64.git> git log
--oneline | head -1
b564cbf Fix build when USE_INITRD not set
aarch64 <konrad@localhost:~/ARM/boot-wrapper-aarch64.git> make xen-system.axf
aarch64-linux-gnu-gcc -DCNTFRQ=0x01800000 -DUART_BASE=0x1c090000 -DLED=0x0008 -DSYSREGS_BASE=0x1c010000 -DGIC_DIST_BASE=0x2c001000 -DGIC_CPU_BASE=0x2c002000 -c -o boot.xen.o boot.S -DXEN
aarch64-linux-gnu-gcc -DPHYS_OFFSET=0x80000000 -DMBOX_OFFSET=0xfff8 -DBOOT=boot.xen.o -DXEN_OFFSET=0xA00000 -DKERNEL_OFFSET=0x80000 -DFDT_OFFSET=0x08000000 -DFS_OFFSET=0x10000000 -DXEN=Xen -DKERNEL=Image -DFILESYSTEM=filesystem.cpio.gz -E -P -C -o model.xen.lds model.lds.S
And it looks I tried at some point to play with the LEDs (not very well)
diff --git a/Makefile b/Makefile
index 241091f..dd50f09 100644
--- a/Makefile
+++ b/Makefile
@@ -13,7 +13,7 @@ SYSREGS_BASE := 0x1c010000
GIC_DIST_BASE := 0x2c001000
GIC_CPU_BASE := 0x2c002000
CNTFRQ := 0x01800000 # 24Mhz
-
+LED := 0x0008
#INITRD_FLAGS := -DUSE_INITRD
CPPFLAGS += $(INITRD_FLAGS)
@@ -78,13 +78,13 @@ $(XIMAGE): boot.xen.o model.xen.lds fdt.dtb $(XEN) $(KERNEL) $(FILESYSTEM)
$(LD) -o $@ --script=model.xen.lds
boot.o: $(BOOTLOADER) Makefile
- $(CC) $(CPPFLAGS) -DCNTFRQ=$(CNTFRQ) -DUART_BASE=$(UART_BASE) -DSYSREGS_BASE=$(SYSREGS_BASE) -DGIC_DIST_BASE=$(GIC_DIST_BASE) -DGIC_CPU_BASE=$(GIC_CPU_BASE) -c -o $@ $(BOOTLOADER)
+ $(CC) $(CPPFLAGS) -DCNTFRQ=$(CNTFRQ) -DUART_BASE=$(UART_BASE) -DLED=$(LED) -DSYSREGS_BASE=$(SYSREGS_BASE) -DGIC_DIST_BASE=$(GIC_DIST_BASE) -DGIC_CPU_BASE=$(GIC_CPU_BASE) -c -o $@ $(BOOTLOADER)
model.lds: $(LD_SCRIPT) Makefile
$(CC) $(CPPFLAGS) -DPHYS_OFFSET=$(PHYS_OFFSET) -DMBOX_OFFSET=$(MBOX_OFFSET) -DBOOT=boot.o -DKERNEL_OFFSET=$(KERNEL_OFFSET) -DFDT_OFFSET=$(FDT_OFFSET) -DFS_OFFSET=$(FS_OFFSET) -DKERNEL=$(KERNEL) -DFILESYSTEM=$(FILESYSTEM) -E -P -C -o $@ $<
boot.xen.o: $(BOOTLOADER) Makefile
- $(CC) $(CPPFLAGS) -DCNTFRQ=$(CNTFRQ) -DUART_BASE=$(UART_BASE) -DSYSREGS_BASE=$(SYSREGS_BASE) -DGIC_DIST_BASE=$(GIC_DIST_BASE) -DGIC_CPU_BASE=$(GIC_CPU_BASE) -c -o $@ $(BOOTLOADER) -DXEN
+ $(CC) $(CPPFLAGS) -DCNTFRQ=$(CNTFRQ) -DUART_BASE=$(UART_BASE) -DLED=$(LED) -DSYSREGS_BASE=$(SYSREGS_BASE) -DGIC_DIST_BASE=$(GIC_DIST_BASE) -DGIC_CPU_BASE=$(GIC_CPU_BASE) -c -o $@ $(BOOTLOADER) -DXEN
model.xen.lds: $(LD_SCRIPT) Makefile
$(CC) $(CPPFLAGS) -DPHYS_OFFSET=$(PHYS_OFFSET) -DMBOX_OFFSET=$(MBOX_OFFSET) -DBOOT=boot.xen.o -DXEN_OFFSET=$(XEN_OFFSET) -DKERNEL_OFFSET=$(KERNEL_OFFSET) -DFDT_OFFSET=$(FDT_OFFSET) -DFS_OFFSET=$(FS_OFFSET) -DXEN=$(XEN) -DKERNEL=$(KERNEL) -DFILESYSTEM=$(FILESYSTEM) -E -P -C -o $@ $<
diff --git a/boot.S b/boot.S
index 3e2cecd..60b642c 100644
--- a/boot.S
+++ b/boot.S
@@ -107,6 +107,13 @@ start_ns:
str wzr, [x4, #0xa0] // V2M_SYS_CFGDATA
str w5, [x4, #0xa4] // V2M_SYS_CFGCTRL
+ ldr x4, =LED
+ mov w5, #0xFF
+ str w5, [x4]
+
+ mov x4, #0x00A4
+ mov w5, #0xC0800000
+ str w5, [x4]
/*
* Primary CPU
*/
Anyhow the more important is the DTS:
total 248784
drwxrwxr-x. 3 konrad konrad 4096 Aug 15 11:46 .
drwxrwxr-x. 11 konrad konrad 4096 Aug 15 11:40 ..
-rw-rw-r--. 1 konrad konrad 90957497 Apr 15 15:50 64
-rw-rw-r--. 1 konrad konrad 90571528 Apr 15 15:49 a
-rw-rw-r--. 1 konrad konrad 2388 Apr 15 22:54 boot.S
-rw-rw-r--. 1 konrad konrad 1544 Aug 15 11:46 boot.xen.o
lrwxrwxrwx. 1 konrad konrad 41 Apr 15 14:17 fdt.dtb -> ../arm-dts/fast_models/rtsm_ve-aemv8a.dtb
drwxrwxr-x. 8 konrad konrad 4096 Apr 15 14:17 .git
-rw-rw-r--. 1 konrad konrad 44 Apr 15 14:17 .gitignore
lrwxrwxrwx. 1 konrad konrad 10 Apr 15 14:24 Image -> ../vmlinuz
-rw-rw-r--. 1 konrad konrad 1508 Apr 15 14:17 LICENSE.txt
-rw-rw-r--. 1 konrad konrad 3701 Apr 15 22:53 Makefile
-rw-rw-r--. 1 konrad konrad 935 Apr 15 14:17 model.lds.S
-rw-rw-r--. 1 konrad konrad 2457 Aug 15 11:46 model.xen.lds
-rw-rw-r--. 1 konrad konrad 667 Apr 15 14:17 README
lrwxrwxrwx. 1 konrad konrad 41 Apr 15 15:26 rtsm_ve-aemv8a.dts -> ../arm-dts/fast_models/rtsm_ve-aemv8a.dts
-rw-rw-r--. 1 konrad konrad 6007 Apr 15 15:28 rtsm_ve-motherboard.dtsi
lrwxrwxrwx. 1 konrad konrad 14 Apr 22 15:19 Xen -> ../xen/xen/xen
-rwxrwxr-x. 1 konrad konrad 853552 Apr 15 15:40 xen64
-rwxrwxr-x. 1 konrad konrad 853552 Apr 15 23:12 Xen.ok
lrwxrwxrwx. 1 konrad konrad 24 Apr 15 21:55 Xen.old -> /home/konrad/xen/xen/xen
-rwxrwxr-x. 1 konrad konrad 6761469 Aug 15 11:46 xen-system.axf
-rw-rw-r--. 1 konrad konrad 64854103 Apr 15 15:46 z
aarch64 <konrad@localhost:~/ARM/arm-dts> git log --oneline | head -1
cbfbe3d versatile_express: Update to 3.19 state
With this change:
diff --git a/fast_models/rtsm_ve-aemv8a.dts b/fast_models/rtsm_ve-aemv8a.dts
index 50b544d..6c6240c 100644
--- a/fast_models/rtsm_ve-aemv8a.dts
+++ b/fast_models/rtsm_ve-aemv8a.dts
@@ -18,7 +18,17 @@
#address-cells = <2>;
#size-cells = <2>;
- chosen { };
+ chosen {
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ xen,xen-bootargs = "dtuart=serial0 loglvl=all guesd_loglvl=all dom0_mem=512M,max:512";
+ module@1 {
+ compatible = "xen,linux-zimage", "xen,multiboot-module";
+ reg = <0x80080000 0x800000>;
+ bootargs = "";
+ };
+ };
aliases {
serial0 = &v2m_serial0;
> Cheers,
>
> --
> Julien Grall
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
prev parent reply other threads:[~2016-08-15 15:49 UTC|newest]
Thread overview: 47+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-14 23:07 [PATCH v1] Livepatch ARM 64 implementation Konrad Rzeszutek Wilk
2016-08-14 23:07 ` [PATCH v1 1/9] livepatch: Bubble up sanity checks on Elf relocs Konrad Rzeszutek Wilk
2016-08-17 11:56 ` Jan Beulich
2016-08-14 23:07 ` [PATCH v1 2/9] x86/arm: Make 'make debug' work properly Konrad Rzeszutek Wilk
2016-08-17 12:00 ` Jan Beulich
2016-08-22 17:05 ` Konrad Rzeszutek Wilk
2016-08-14 23:07 ` [PATCH v1 3/9] x86/arm64: Move the ALT_[ORIG|REPL]_PTR macros to header files Konrad Rzeszutek Wilk
2016-08-17 12:15 ` Jan Beulich
2016-08-17 16:26 ` Julien Grall
2016-08-14 23:07 ` [PATCH v1 4/9] arm/mm: Introduce modify_xen_mappings Konrad Rzeszutek Wilk
2016-08-17 16:54 ` Julien Grall
2016-08-14 23:07 ` [PATCH v1 5/9] arm64/insn: introduce aarch64_insn_gen_{nop|branch_imm}() helper functions Konrad Rzeszutek Wilk
2016-08-14 23:07 ` [PATCH v1 6/9] livepatch: Initial ARM64 support Konrad Rzeszutek Wilk
2016-08-15 8:21 ` Jan Beulich
2016-08-15 14:09 ` Konrad Rzeszutek Wilk
2016-08-15 14:23 ` Jan Beulich
2016-08-15 14:57 ` Julien Grall
2016-08-15 15:17 ` Konrad Rzeszutek Wilk
2016-08-15 15:25 ` Julien Grall
2016-08-15 15:27 ` Andrew Cooper
2016-08-17 2:45 ` Konrad Rzeszutek Wilk
2016-08-17 9:02 ` Andrew Cooper
2016-08-15 15:17 ` Julien Grall
2016-08-17 1:50 ` Konrad Rzeszutek Wilk
2016-08-17 19:44 ` Julien Grall
2016-08-17 17:12 ` Julien Grall
2016-08-17 18:22 ` Julien Grall
2016-08-17 18:57 ` Konrad Rzeszutek Wilk
2016-08-17 19:50 ` Julien Grall
2016-08-22 19:22 ` Konrad Rzeszutek Wilk
2016-08-24 2:14 ` Konrad Rzeszutek Wilk
2016-08-25 13:54 ` Julien Grall
2016-08-14 23:07 ` [PATCH v1 7/9] livepatch: ARM64: Ignore mapping symbols: $[a, d, x, p] Konrad Rzeszutek Wilk
2016-08-17 12:21 ` Jan Beulich
2016-08-22 17:14 ` Konrad Rzeszutek Wilk
2016-08-14 23:07 ` [PATCH v1 8/9] livepatch: Move test-cases to common Konrad Rzeszutek Wilk
2016-08-17 12:24 ` Jan Beulich
2016-08-14 23:07 ` [PATCH v1 9/9] livepatch: tests: Make them compile under ARM64 Konrad Rzeszutek Wilk
2016-08-17 18:29 ` Julien Grall
2016-08-17 19:00 ` Konrad Rzeszutek Wilk
2016-08-17 19:57 ` Julien Grall
2016-08-17 20:08 ` Andrew Cooper
2016-08-18 10:38 ` Jan Beulich
2016-08-22 17:41 ` Konrad Rzeszutek Wilk
2016-08-22 19:59 ` Konrad Rzeszutek Wilk
2016-08-15 14:52 ` [PATCH v1] Livepatch ARM 64 implementation Julien Grall
2016-08-15 15:49 ` Konrad Rzeszutek Wilk [this message]
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=20160815154900.GA5296@localhost.localdomain \
--to=konrad@kernel.org \
--cc=julien.grall@arm.com \
--cc=ross.lagerwall@citrix.com \
--cc=sstabellini@kernel.org \
--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.