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

Re: [Minios-devel] [UNIKRAFT PATCH V3 6/6] external plat: Add platform interface implementation


  • To: Felipe Huici <Felipe.Huici@xxxxxxxxx>, "minios-devel@xxxxxxxxxxxxx" <minios-devel@xxxxxxxxxxxxx>
  • From: "Haibo Xu (Arm Technology China)" <Haibo.Xu@xxxxxxx>
  • Date: Mon, 26 Aug 2019 02:58:11 +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-SenderADCheck; bh=WgV4n8UoPgGXQz9PWedob9IBYwSb0AIglOxA8LHr4yw=; b=RWRpvJPY1DEgCC4pQ++UeB8HVgQ5WZctGJL9u9xtHRlgflQxp5D1lhc8DfL6Ih1PLHWX4LPSy7NjKVVCJeLLF1dnGbYpJU9h5M5HyDOB2U+VY+PWTp31EaYTXoziHVdajKBXITvg0m8CkcBs4+CdsqyWSQTwvRM/0xCefGQLQQjtWonwTxp+i4gI8bDsyhiD2CTPwl60EZC4WUSip2svrTvJ7z5/Ry6pVNpVfdotIAOb0nta+t1tPC9vtSHAmBndxdJb8jyR8hvp7FaasPxBnLH5Aml8gNRRJNENZ9DiKGMerIfLlimZDttNGNFucL9p6HpuouhetW6D8/CNfrrGaQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jLrbaruChTAHVvTepXArPUZdtCpCHKrkkjr57WOhe82lYOgb3R5Sq0yD767YWKlQYWcMXK+9OFmd2hWVOO6mn9kq+UPCquSnQuSI59ehyE7WHR4qOdxbHcdSE7o9yGiC9qAhP9Td+qskz0AEQLHvr50JjbtEbPQpEhBZ2aMVgAYJsWenCTPAYsd+ukzevsONfiQ10SXmpqXkvlHsXfoc7yckc7hfhy7MFQf0NJ50XByJsqKeTQ5ewMHPes39zL9LcHpPi6RMKYe38p7EnuvU6sjipsSAlNKPNGmkLwIcM8tKLdOcIjvEiOmzIwBXCrzRp1JRsngQha7X4XnlR5bMtg==
  • Authentication-results: spf=temperror (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; lists.xen.org; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;lists.xen.org; dmarc=temperror action=none header.from=arm.com;
  • Authentication-results-original: spf=none (sender IP is ) smtp.mailfrom=Haibo.Xu@xxxxxxx;
  • Cc: Simon Kuenzer <simon.kuenzer@xxxxxxxxx>
  • Delivery-date: Mon, 26 Aug 2019 02:58:31 +0000
  • List-id: Mini-os development list <minios-devel.lists.xenproject.org>
  • Original-authentication-results: spf=none (sender IP is ) smtp.mailfrom=Haibo.Xu@xxxxxxx;
  • Thread-index: AQHVU2Lq4+g06vG/qEiiHgPfD14XEqcL+HIAgADU74A=
  • Thread-topic: [Minios-devel] [UNIKRAFT PATCH V3 6/6] external plat: Add platform interface implementation

On 2019/8/25 22:15, Felipe Huici wrote:
> Hi Haibo,
>
> Please see one comment inline (copied and pasted from an earlier email from 
> Simon).
>
> Thanks,
>
> -- Felipe
>
> On 16.08.19, 04:59, "Minios-devel on behalf of Haibo Xu" 
> <minios-devel-bounces@xxxxxxxxxxxxxxxxxxxx on behalf of haibo.xu@xxxxxxx> 
> wrote:
>
>     Signed-off-by: Haibo Xu <haibo.xu@xxxxxxx>
>     ---
>      console.c  | 45 ++++++++++++++++++++++++++++++
>      io.c       | 41 +++++++++++++++++++++++++++
>      irq.c      | 28 +++++++++++++++++++
>      lcpu.c     | 75 ++++++++++++++++++++++++++++++++++++++++++++++++++
>      memory.c   | 81 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
>      setup.c    | 42 ++++++++++++++++++++++++++++
>      shutdown.c | 37 +++++++++++++++++++++++++
>      time.c     | 56 +++++++++++++++++++++++++++++++++++++
>      8 files changed, 405 insertions(+)
>      create mode 100644 console.c
>      create mode 100644 io.c
>      create mode 100644 irq.c
>      create mode 100644 lcpu.c
>      create mode 100644 memory.c
>      create mode 100644 setup.c
>      create mode 100644 shutdown.c
>      create mode 100644 time.c
>
>     diff --git a/memory.c b/memory.c
>     new file mode 100644
>     index 0000000..b266f09
>     --- /dev/null
>     +++ b/memory.c
>     @@ -0,0 +1,81 @@
>     +/* SPDX-License-Identifier: BSD-3-Clause */
>     +/*
>     + * Authors: Haibo Xu <haibo.xu@xxxxxxx>
>     + *
>     + * Copyright (c) 2018, Arm Ltd. All rights reserved.
>     + *
>     + * Redistribution and use in source and binary forms, with or without
>     + * modification, are permitted provided that the following conditions
>     + * are met:
>     + *
>     + * 1. Redistributions of source code must retain the above copyright
>     + *    notice, this list of conditions and the following disclaimer.
>     + * 2. Redistributions in binary form must reproduce the above copyright
>     + *    notice, this list of conditions and the following disclaimer in the
>     + *    documentation and/or other materials provided with the 
> distribution.
>     + * 3. Neither the name of the copyright holder nor the names of its
>     + *    contributors may be used to endorse or promote products derived 
> from
>     + *    this software without specific prior written permission.
>     + *
>     + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
> "AS IS"
>     + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 
> THE
>     + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
> PURPOSE
>     + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 
> CONTRIBUTORS BE
>     + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
>     + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
>     + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR 
> BUSINESS
>     + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER 
> IN
>     + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 
> OTHERWISE)
>     + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 
> OF THE
>     + * POSSIBILITY OF SUCH DAMAGE.
>     + *
>     + * THIS HEADER MAY NOT BE EXTRACTED OR MODIFIED IN ANY WAY.
>     + */
>     +
>     +#include <solo5/setup.h>
>     +#include <uk/plat/memory.h>
>     +#include <uk/assert.h>
>     +
>     +int ukplat_memregion_count(void)
>     +{
>     + return _libsolo5plat_opts.heap.base ? 1 : 0;
>
> Do you know if Solo5 supports also something like an initrd? If yes,
> could you add the support for this, too
As far as I know, the Solo5 current doesn't support this. It only provide
a interface to share the heap info(base address and size).

>
>     +}
>     +
>     +/* Can only get the heap info from solo5 tender */
>     +int ukplat_memregion_get(int i, struct ukplat_memregion_desc *m)
>     +{
>     + int ret;
>     +
>     + UK_ASSERT(m);
>     +
>     + if (i == 0 && _libsolo5plat_opts.heap.base) {
>     +         m->base  = _libsolo5plat_opts.heap.base;
>     +         m->len   = _libsolo5plat_opts.heap.len;
>     +         m->flags = UKPLAT_MEMRF_ALLOCATABLE;
>     +#if CONFIG_UKPLAT_MEMRNAME
>     +         m->name  = "heap";
>     +#endif
>     +         ret = 0;
>     + } else {
>     +         /* invalid memory region index or no heap allocated */
>     +         m->base  = __NULL;
>     +         m->len   = 0;
>     +         m->flags = 0x0;
>     +#if CONFIG_UKPLAT_MEMRNAME
>     +         m->name  = __NULL;
>     +#endif
>     +         ret = -1;
>     + }
>     +
>     + return ret;
>     +}
>     +
>     +int ukplat_memallocator_set(struct uk_alloc *a __unused)
>     +{
>     + return 0;
>     +}
>     +
>     +struct uk_alloc *ukplat_memallocator_get(void)
>     +{
>     + return __NULL;
>     +}
>     --
>     2.17.1
>
>
>     _______________________________________________
>     Minios-devel mailing list
>     Minios-devel@xxxxxxxxxxxxxxxxxxxx
>     https://lists.xenproject.org/mailman/listinfo/minios-devel
>
IMPORTANT NOTICE: The contents of this email and any attachments are 
confidential and may also be privileged. If you are not the intended recipient, 
please notify the sender immediately and do not disclose the contents to any 
other person, use it for any purpose, or store or copy the information in any 
medium. Thank you.
_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel

 


Rackspace

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