From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1ZOtjG-0004b2-Jc for mharc-grub-devel@gnu.org; Mon, 10 Aug 2015 16:31:30 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45883) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZOtjE-0004a9-DG for grub-devel@gnu.org; Mon, 10 Aug 2015 16:31:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZOtjB-0002qZ-7E for grub-devel@gnu.org; Mon, 10 Aug 2015 16:31:28 -0400 Received: from userp1040.oracle.com ([156.151.31.81]:39876) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZOtjA-0002qQ-W1 for grub-devel@gnu.org; Mon, 10 Aug 2015 16:31:25 -0400 Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id t7AKVE6Q008859 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 10 Aug 2015 20:31:14 GMT Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by userv0021.oracle.com (8.13.8/8.13.8) with ESMTP id t7AKVDSe025181 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Mon, 10 Aug 2015 20:31:13 GMT Received: from abhmp0001.oracle.com (abhmp0001.oracle.com [141.146.116.7]) by aserv0121.oracle.com (8.13.8/8.13.8) with ESMTP id t7AKVDY6029389; Mon, 10 Aug 2015 20:31:13 GMT Received: from l.oracle.com (/10.137.176.158) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 10 Aug 2015 13:31:12 -0700 Received: by l.oracle.com (Postfix, from userid 1000) id 14FAE6A3C73; Mon, 10 Aug 2015 16:31:11 -0400 (EDT) Date: Mon, 10 Aug 2015 16:31:10 -0400 From: Konrad Rzeszutek Wilk To: Daniel Kiper Subject: Re: [Xen-devel] [PATCH v2 21/23] x86/boot: implement early command line parser in C Message-ID: <20150810203110.GR13576@l.oracle.com> References: <1437402558-7313-1-git-send-email-daniel.kiper@oracle.com> <1437402558-7313-22-git-send-email-daniel.kiper@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1437402558-7313-22-git-send-email-daniel.kiper@oracle.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-Source-IP: userv0021.oracle.com [156.151.31.71] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 156.151.31.81 Cc: jgross@suse.com, grub-devel@gnu.org, keir@xen.org, ian.campbell@citrix.com, stefano.stabellini@eu.citrix.com, andrew.cooper3@citrix.com, gang.wei@intel.com, roy.franz@linaro.org, ning.sun@intel.com, david.vrabel@citrix.com, jbeulich@suse.com, phcoder@gmail.com, xen-devel@lists.xenproject.org, wei.liu2@citrix.com, richard.l.maliszewski@intel.com, qiaowei.ren@intel.com, fu.wei@linaro.org X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Aug 2015 20:31:29 -0000 On Mon, Jul 20, 2015 at 04:29:16PM +0200, Daniel Kiper wrote: > 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 and much easier > to maintain. > > Suggested-by: Andrew Cooper > Signed-off-by: Daniel Kiper I did not look at the str* functions that were added in but just at how the parameters parsing was done. Also at the assembler code and with that Reviewed-by: Konrad Rzeszutek Wilk .. snip.. > diff --git a/xen/arch/x86/boot/cmdline.c b/xen/arch/x86/boot/cmdline.c > new file mode 100644 > index 0000000..5ea50a4 > --- /dev/null > +++ b/xen/arch/x86/boot/cmdline.c > @@ -0,0 +1,396 @@ > +/* > + * Copyright (c) 2015 Oracle Co. Oracle Corporation.