[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [ImageBuilder][PATCH 1/2] uboot-script-gen: Add support for static heap


  • To: Stefano Stabellini <sstabellini@xxxxxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>
  • From: Jiamei Xie <Jiamei.Xie@xxxxxxx>
  • Date: Fri, 3 Mar 2023 06:52:24 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=vYFFCGtcBKrAZ0uQoYiDJmQkrYQpjyT7IP5oFKtIFRE=; b=djmN0F7/+4MS8OuzL9fL2VH0n3PXT4twJavuh4ySS0hDXA1H+0mDdD8PFHhuk/6m7+PQ8Z2XsL4CYD+6pKrUC5gCv1wn8q9mh6bZQYQul5BMInMkQHZkrPhkX57IDvi9rGKirUdanmz0C5lB6F/2Ux1h+z1F7XLTZxlPei5zotPSHGkQfkF4btS96FmdUyUDX/6+3NAHKCdzGPJUKQaytjt9f0TL92oGqhPkGtainSYqw3+qxnYT5U1H0RXcvhyivZCYSqASqM2OPByeiZeJM/4dTKLBm0ZgsmZ5ZbH9SfkX0n0XtWMK89dyMSxqGfs3/L+hBjaVQ0OJOh7lNKD8kQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Cf536KWQoBxk94elYLVX8gRB36jNEiHSK1z5jqkBsUMNEzuPAUGv6pw7WjoRlHAuJfY9ke+9Nd652mkbsGM6/JgN2bALC+/h0AbAXt+nB6aHib+SyKppGtkLSp5UfvSg0qZUKc2+Azs95+/Ol72b4Efv9MCdb0s6fVWvqbgj5HtJmZZXd3wiTneB5et+dSkaNG7EO9f63Fd5n5i+/PhIolnb6GazAa3Kt3K3xyWpRGKmipNxqi5WnnYZA7WH86FGA5CxfXsTSnMjW3ZcPZLi6CkuGayndK9WutUY1u0Vbj9oDAKgXvhtnnGqt+yKc8bKGmOtQ12cnjUd72NRkeIN+Q==
  • Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Wei Chen <Wei.Chen@xxxxxxx>
  • Delivery-date: Fri, 03 Mar 2023 06:52:42 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true
  • Original-authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Thread-index: AQHZTMH9rCgFY/whfU6dVhdcVu6kMa7naF6AgAC/KoCAAHerMA==
  • Thread-topic: [ImageBuilder][PATCH 1/2] uboot-script-gen: Add support for static heap

Hi Stefano and Michal,

> -----Original Message-----
> From: Stefano Stabellini <sstabellini@xxxxxxxxxx>
> Sent: Friday, March 3, 2023 7:42 AM
> To: Michal Orzel <michal.orzel@xxxxxxx>
> Cc: Jiamei Xie <Jiamei.Xie@xxxxxxx>; xen-devel@xxxxxxxxxxxxxxxxxxxx; Wei
> Chen <Wei.Chen@xxxxxxx>; sstabellini@xxxxxxxxxx
> Subject: Re: [ImageBuilder][PATCH 1/2] uboot-script-gen: Add support for
> static heap
> 
> On Thu, 2 Mar 2023, Michal Orzel wrote:
> > Hi Jiamei,
> >
> > Patch looks good apart from minor comments down below.
> 
> Just wanted to add that the patch looks OK to me too and don't have any
> further comments beyond the ones Michal's already made
> 
> 
> > On 02/03/2023 05:46, jiamei.xie wrote:
> > >
> > >
> > > From: jiamei Xie <jiamei.xie@xxxxxxx>
> > >
> > > Add a new config parameter to configure static heap.
> > > STATIC_HEAP="baseaddr1 size1 ... baseaddrN sizeN"
> > > if specified, indicates the host physical address regions
> > > [baseaddr, baseaddr + size) to be reserved as static heap.
> > >
> > > For instance, STATIC_HEAP="0x50000000 0x30000000", if specified,
> > > indicates the host memory region starting from paddr 0x50000000
> > > with a size of 0x30000000 to be reserved as static heap.
> > >
> > > Signed-off-by: jiamei Xie <jiamei.xie@xxxxxxx>
> > > ---
> > >  README.md                |  4 ++++
> > >  scripts/uboot-script-gen | 20 ++++++++++++++++++++
> > >  2 files changed, 24 insertions(+)
> > >
> > > diff --git a/README.md b/README.md
> > > index 814a004..787f413 100644
> > > --- a/README.md
> > > +++ b/README.md
> > > @@ -256,6 +256,10 @@ Where:
> > >
> > >  - NUM_CPUPOOLS specifies the number of boot-time cpupools to create.
> > >
> > > +- STATIC_HEAP="baseaddr1 size1 ... baseaddrN sizeN"
> > > +  if specified, indicates the host physical address regions
> > > +  [baseaddr, baseaddr + size) to be reserved as static heap.
> > As this option impacts Xen and not domUs, please call it XEN_STATIC_HEAP
> and move
> > it right after XEN_CMD documentation.
Thanks for your comments . Ack
> >
> > > +
> > >  Then you can invoke uboot-script-gen as follows:
> > >
> > >  ```
> > > diff --git a/scripts/uboot-script-gen b/scripts/uboot-script-gen
> > > index f07e334..4775293 100755
> > > --- a/scripts/uboot-script-gen
> > > +++ b/scripts/uboot-script-gen
> > > @@ -189,6 +189,21 @@ function add_device_tree_static_mem()
> > >      dt_set "$path" "xen,static-mem" "hex" "${cells[*]}"
> > >  }
> > >
> > > +function add_device_tree_static_heap()
> > > +{
> > > +    local path=$1
> > > +    local regions=$2
> > > +    local cells=()
> > > +    local val
> > > +
> > > +    for val in ${regions[@]}
> > > +    do
> > > +        cells+=("$(printf "0x%x 0x%x" $(($val >> 32)) $(($val & ((1 << 
> > > 32) -
> 1))))")
> > Please use split_value function instead of opencoding it.
> > It will then become:
> > cells+=("$(split_value $val)")

Thanks for your comments . Ack.
> >
> > ~Michal
> >



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.