Re: [Xen-devel] [PATCH v6 10/15] x86/boot: implement early command line parser in C

2016-09-20 Thread Daniel Kiper
On Tue, Sep 20, 2016 at 04:05:12AM -0600, Jan Beulich wrote: > >>> On 20.09.16 at 11:49, wrote: > > Out of curiosity, could you outline in a few words your idea? > > Well, one approach would be something along the lines of > the public headers errno.h and cpufeatureset.h: Have a helper > header in

Re: [Xen-devel] [PATCH v6 10/15] x86/boot: implement early command line parser in C

2016-09-20 Thread Jan Beulich
>>> On 20.09.16 at 11:49, wrote: > Out of curiosity, could you outline in a few words your idea? Well, one approach would be something along the lines of the public headers errno.h and cpufeatureset.h: Have a helper header invoking some macro, where the macro arguments specify both the C and asse

Re: [Xen-devel] [PATCH v6 10/15] x86/boot: implement early command line parser in C

2016-09-20 Thread Daniel Kiper
On Mon, Sep 19, 2016 at 10:03:08AM -0600, Jan Beulich wrote: > >>> On 19.09.16 at 17:27, wrote: > > On Mon, Sep 19, 2016 at 06:47:50AM -0600, Jan Beulich wrote: > >> >>> On 12.09.16 at 22:18, wrote: > > > > [...] > > > >> > --- a/xen/arch/x86/boot/trampoline.S > >> > +++ b/xen/arch/x86/boot/tramp

Re: [Xen-devel] [PATCH v6 10/15] x86/boot: implement early command line parser in C

2016-09-19 Thread Jan Beulich
>>> On 19.09.16 at 17:27, wrote: > On Mon, Sep 19, 2016 at 06:47:50AM -0600, Jan Beulich wrote: >> >>> On 12.09.16 at 22:18, wrote: > > [...] > >> > --- a/xen/arch/x86/boot/trampoline.S >> > +++ b/xen/arch/x86/boot/trampoline.S >> > @@ -220,8 +220,22 @@ trampoline_boot_cpu_entry: >> >

Re: [Xen-devel] [PATCH v6 10/15] x86/boot: implement early command line parser in C

2016-09-19 Thread Daniel Kiper
On Mon, Sep 19, 2016 at 06:47:50AM -0600, Jan Beulich wrote: > >>> On 12.09.16 at 22:18, wrote: [...] > > --- a/xen/arch/x86/boot/trampoline.S > > +++ b/xen/arch/x86/boot/trampoline.S > > @@ -220,8 +220,22 @@ trampoline_boot_cpu_entry: > > /* Jump to the common bootstrap entry point. */

Re: [Xen-devel] [PATCH v6 10/15] x86/boot: implement early command line parser in C

2016-09-19 Thread Jan Beulich
>>> On 12.09.16 at 22:18, wrote: > --- a/xen/arch/x86/boot/Makefile > +++ b/xen/arch/x86/boot/Makefile > @@ -1,9 +1,16 @@ > obj-bin-y += head.o > > -RELOC_DEPS = $(BASEDIR)/include/asm-x86/config.h > $(BASEDIR)/include/xen/multiboot.h \ > +DEFS_H_DEPS = $(BASEDIR)/include/xen/stdbool.h > + > +

[Xen-devel] [PATCH v6 10/15] x86/boot: implement early command line parser in C

2016-09-12 Thread Daniel Kiper
Current early command line parser implementation in assembler is very difficult to change to relocatable stuff using segment registers. This requires a lot of changes in very weird and fragile code. So, reimplement this functionality in C. This way code will be relocatable out of the box (without p