From minios-devel-bounces@lists.xenproject.org Sat Apr 03 14:44:46 2021
Return-path: <minios-devel-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xenproject.org
Delivery-date: Sat, 03 Apr 2021 14:44:46 +0000
Received: from list by lists.xenproject.org with outflank-mailman.105088.201223 (Exim 4.92)
	(envelope-from <minios-devel-bounces@lists.xenproject.org>)
	id 1lShVx-0004ol-Ol; Sat, 03 Apr 2021 14:44:41 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 105088.201223; Sat, 03 Apr 2021 14:44:41 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <minios-devel-bounces@lists.xenproject.org>)
	id 1lShVx-0004oe-Ll; Sat, 03 Apr 2021 14:44:41 +0000
Received: by outflank-mailman (input) for mailman id 105088;
 Sat, 03 Apr 2021 14:44:41 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=wTAA=JA=gmail.com=virtanrazvan@srs-us1.protection.inumbo.net>)
 id 1lShVw-0004oZ-Rn
 for minios-devel@lists.xen.org; Sat, 03 Apr 2021 14:44:40 +0000
Received: from mail-ed1-x530.google.com (unknown [2a00:1450:4864:20::530])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id eb26759b-1805-48cd-9fc0-e5b37b47ee55;
 Sat, 03 Apr 2021 14:44:39 +0000 (UTC)
Received: by mail-ed1-x530.google.com with SMTP id h10so8097526edt.13
 for <minios-devel@lists.xen.org>; Sat, 03 Apr 2021 07:44:38 -0700 (PDT)
Received: from razvan-Lenovo-Legion-Y530-15ICH.local
 ([2a02:2f08:c211:9400:94cb:7915:8173:8207])
 by smtp.gmail.com with ESMTPSA id q10sm7105190eds.67.2021.04.03.07.44.36
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Sat, 03 Apr 2021 07:44:37 -0700 (PDT)
X-BeenThere: minios-devel@lists.xenproject.org
List-Id: Mini-os development list <minios-devel.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/minios-devel>, 
 <mailto:minios-devel-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:minios-devel@lists.xenproject.org>
List-Help: <mailto:minios-devel-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/minios-devel>, 
 <mailto:minios-devel-request@lists.xenproject.org?subject=subscribe>
Errors-To: minios-devel-bounces@lists.xenproject.org
Precedence: list
Sender: "Minios-devel" <minios-devel-bounces@lists.xenproject.org>
X-Inumbo-ID: eb26759b-1805-48cd-9fc0-e5b37b47ee55
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20161025;
        h=from:to:cc:subject:date:message-id:in-reply-to:references;
        bh=4E/D2qEw0vkxA8iFotgeSclZwJ+xVqDgDLRanxu4G5I=;
        b=vP0ByrNAUxJllAGrY3sYwoyKYNm88pLCxADI1Xctd3LdYz9o2gu6yh8BsZm1qE8CK7
         Ye13/lEmEA903MkAEZkwByH/MTw6iyjz2YkYEXGJH6nrXy9clsp9sz5KFXf43lD4oEfN
         sUKj6UemsGxesdb8cXfo0aAl+GIcUGIoOWe80vVnl0vvQx7pbkZCIPG0qM2G+WZ2cyHT
         otGRtyg8KBCc/WEPzds644filI3PgpfWcv02bi66aR1ZYfMtZuBosFfF9JIh3tRJhR8W
         9oA9N43LWeoYxrEJabbPpSkkpleWHE1wdYVJlkB/HNc/REzCIdFhxuKq1lZwQkorKM23
         Q3Sg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to
         :references;
        bh=4E/D2qEw0vkxA8iFotgeSclZwJ+xVqDgDLRanxu4G5I=;
        b=EJ2hdSwYGQkxB7QYKB1goSx+TZe+Q0KcPE20/yiCb0loAnaU3BsLlvT8JsQhCnKljk
         JnOtUMynnSq+WhVqb6RkvT2v7pgbSFnawB/0snxizyD2CXNOZclIB4/eFcKXhfiJ8fjW
         4BFpG/KRKWVBXKBPRmA2FtpH6fTjX28AsM/C+PNkH/H90KsX2qFgJb7aID+wzAvMQkTB
         L42D2yuGQQqJSSHNhLKF8rkYq7f2jsMODGIIOXEyNCivZm/21JmZrwvp78o1ESkIfKrF
         qoWmU/XWT9WYJzFyPZCkv9fZYtudmVR+aH/2+g4ByEhVX2NrNk39qxj/XReJ5MJYOlBo
         /hhQ==
X-Gm-Message-State: AOAM531bhF2RgaVZISbO47CDwNlxNKDWamzNCeiKdI7pBWXHys2JfrHQ
	1XhidbRsqIxRq68HSHeRFt8=
X-Google-Smtp-Source: ABdhPJyqGH4GoBUMPvLdpR8zVBYuxQk6WHohkS2rF575n7G6TTjUV55lkHNMh7DNqi5dSVCqBHwApw==
X-Received: by 2002:a05:6402:518d:: with SMTP id q13mr21487506edd.313.1617461077972;
        Sat, 03 Apr 2021 07:44:37 -0700 (PDT)
From: Razvan Virtan <virtanrazvan@gmail.com>
X-Google-Original-From: Razvan Virtan <razvanvirtan@gmail.com>
To: justin.he@arm.com
Cc: minios-devel@lists.xen.org
Subject: Re: [RFCv4,04/35] plat/virtio: Add new virtio_mmio device/driver on arm64 
Date: Sat,  3 Apr 2021 17:44:35 +0300
Message-Id: <20210403144435.23176-1-razvanvirtan@gmail.com>
X-Mailer: git-send-email 2.17.1
In-Reply-To: <20201223073857.118076-5-justin.he@arm.com>
References: <20201223073857.118076-5-justin.he@arm.com>

Hi, Justin.
This patch looks good, I've only found some minor typos. I'll let them here, as
inline comments.

diff --git a/plat/drivers/virtio/virtio_mmio.c b/plat/drivers/virtio/virtio_mmio.c
new file mode 100644
index 0000000..6716153
--- /dev/null
+++ b/plat/drivers/virtio/virtio_mmio.c
@@ -0,0 +1,480 @@ 
+/* SPDX-License-Identifier: BSD-3-Clause */
+/*
+ * Authors: Jia He <justin.he@arm.com>
+ *
+ * Copyright (c) 2020, 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 <uk/config.h>
+#include <uk/arch/types.h>
+#include <errno.h>
+#include <string.h>
+#include <uk/alloc.h>
+#include <uk/print.h>
+#include <uk/plat/lcpu.h>
+#include <uk/plat/irq.h>
+#include <uk/bus.h>
+#include <uk/bitops.h>
+
+#include <platform_bus.h>
+#include <virtio/virtio_config.h>
+#include <virtio/virtio_bus.h>
+#include <virtio/virtqueue.h>
+#include <virtio/virtio_mmio.h>
+
+/* The alignment to use between consumer and producer parts of vring.
+ * Currently hardcoded to the page size. */
+#define VIRTIO_MMIO_VRING_ALIGN		__PAGE_SIZE
+
+static struct uk_alloc *a;
+struct virtio_mmio_device_id {
+	uint16_t device_id;
+	uint32_t vendor;
+};
+
+struct virtio_mmio_device {
+	struct virtio_dev vdev;
+	char *name;
+	struct virtio_mmio_device_id  id;
+	struct virtio_mmio_driver     *drv;
+	unsigned long version;
+	unsigned long irq;
+	void *base;
+	struct pf_device *pfdev;
+};
+
+#define to_virtio_mmio_device(_dev) \
+	__containerof(_dev, struct virtio_mmio_device, vdev)
+
+struct virtio_mmio_vq_info {
+	/* the actual virtqueue */
+	struct virtqueue *vq;
+};
+typedef void vq_callback_t(struct virtqueue *);
+
+/* Configuration interface */
+
+static __u64 vm_get_features(struct virtio_dev *vdev)
+{
+	struct virtio_mmio_device *vm_dev = to_virtio_mmio_device(vdev);
+	__u64 features = 0;
+
+	virtio_cwrite32(vm_dev->base, VIRTIO_MMIO_DEVICE_FEATURES_SEL, 1);
+	features = virtio_cread32(vm_dev->base, VIRTIO_MMIO_DEVICE_FEATURES);
+	features <<= 32;
+
+	virtio_cwrite32(vm_dev->base, VIRTIO_MMIO_DEVICE_FEATURES_SEL, 0);
+	features |= virtio_cread32(vm_dev->base, VIRTIO_MMIO_DEVICE_FEATURES);
+
+	return features;
+}
+
+static void vm_set_features(struct virtio_dev *vdev,
+					 __u64 features)
+{
+	struct virtio_mmio_device *vm_dev = to_virtio_mmio_device(vdev);
+
+	/* Give virtio_ring a chance to accept features. */
+	virtqueue_feature_negotiate(features);
+

  "Make sure there are no mixed devices"

+	/* Make sure there is are no mixed devices */
+	if (vm_dev->version == 2 &&
+		!uk_test_bit(VIRTIO_F_VERSION_1, &vdev->features)) {
+		uk_pr_err("New virtio-mmio devices (version 2) must provide VIRTIO_F_VERSION_1 feature!\n");
+		return;
+	}
+
+	virtio_cwrite32(vm_dev->base, VIRTIO_MMIO_DRIVER_FEATURES_SEL, 1);
+	virtio_cwrite32(vm_dev->base, VIRTIO_MMIO_DRIVER_FEATURES,
+						(__u32)(vdev->features >> 32));
+
+	virtio_cwrite32(vm_dev->base, VIRTIO_MMIO_DRIVER_FEATURES_SEL, 0);
+	virtio_cwrite32(vm_dev->base, VIRTIO_MMIO_DRIVER_FEATURES,
+						(__u32)vdev->features);
+
+	return;
+}
+
+static int vm_get(struct virtio_dev *vdev, __u16 offset,
+		   void *buf, __u32 len, __u8 type_len __unused)
+{
+	struct virtio_mmio_device *vm_dev = to_virtio_mmio_device(vdev);
+	void *base = vm_dev->base + VIRTIO_MMIO_CONFIG;
+	__u8 b;
+	__u16 w;
+	__u32 l;
+
+	if (vm_dev->version == 1) {
+		__u8 *ptr = buf;
+		unsigned i;
+
+		for (i = 0; i < len; i++)
+			ptr[i] = virtio_cread8(base, offset + i);
+		return len;
+	}
+
+	switch (len) {
+	case 1:
+		b = virtio_cread8(base, offset);
+		memcpy(buf, &b, sizeof b);
+		break;
+	case 2:
+		w = (virtio_cread16(base, offset));
+		memcpy(buf, &w, sizeof w);
+		break;
+	case 4:
+		l = (virtio_cread32(base, offset));
+		memcpy(buf, &l, sizeof l);
+		break;
+	case 8:
+		l = (virtio_cread32(base, offset));
+		memcpy(buf, &l, sizeof l);
+		l = (virtio_cread32(base, offset + sizeof l));
+		memcpy(buf + sizeof l, &l, sizeof l);
+		break;
+	default:
+		uk_pr_err("Not supported length(%d) for io read\n", len);
+		UK_BUG();
+	}
+
+	return len;
+}
+
+static int vm_set(struct virtio_dev *vdev, __u16 offset,
+		   const void *buf, __u32 len)
+{
+	struct virtio_mmio_device *vm_dev = to_virtio_mmio_device(vdev);
+	void *base = vm_dev->base + VIRTIO_MMIO_CONFIG;
+	__u8 b;
+	__u16 w;
+	__u32 l;
+
+	if (vm_dev->version == 1) {
+		const __u8 *ptr = buf;
+		__u32 i;
+
+		for (i = 0; i < len; i++)
+			virtio_cwrite8(base, offset + i, ptr[i]);
+		return 0;
+	}
+
+	switch (len) {
+	case 1:
+		memcpy(&b, buf, sizeof b);
+		virtio_cwrite8(base, offset, b);
+		break;
+	case 2:
+		memcpy(&w, buf, sizeof w);
+		virtio_cwrite16(base, offset, w);
+		break;
+	case 4:
+		memcpy(&l, buf, sizeof l);
+		virtio_cwrite32(base, offset, l);
+		break;
+	case 8:
+		memcpy(&l, buf, sizeof l);
+		virtio_cwrite32(base, offset, l);
+		memcpy(&l, buf + sizeof l, sizeof(l));
+		virtio_cwrite32(base, offset + sizeof l, l);
+		break;
+	default:
+		uk_pr_err("Not supported length(%d) for io write\n", len);
+		UK_BUG();
+	}
+
+	return 0;
+}
+
+static __u8 vm_get_status(struct virtio_dev *vdev)
+{
+	struct virtio_mmio_device *vm_dev = to_virtio_mmio_device(vdev);
+
+	return virtio_cread32(vm_dev->base, VIRTIO_MMIO_STATUS) & 0xff;
+}
+
+static void vm_set_status(struct virtio_dev *vdev, __u8 status)
+{
+	struct virtio_mmio_device *vm_dev = to_virtio_mmio_device(vdev);
+
+	/* We should never be setting status to 0. */
+	UK_BUGON(status == 0);
+
+	virtio_cwrite32(vm_dev->base, VIRTIO_MMIO_STATUS, status);
+}
+
+static void vm_reset(struct virtio_dev *vdev)
+{
+	struct virtio_mmio_device *vm_dev = to_virtio_mmio_device(vdev);
+
+	/* 0 status means a reset. */
+	virtio_cwrite32(vm_dev->base, VIRTIO_MMIO_STATUS, 0);
+}
+
+/* Transport interface */
+
+/* the notify function used when creating a virt queue */
+static int vm_notify(struct virtio_dev *vdev, __u16 queue_id)
+{
+	struct virtio_mmio_device *vm_dev = to_virtio_mmio_device(vdev);
+
+	/* We write the queue's selector into the notification register to
+	 * signal the other end */
+	virtio_cwrite32(vm_dev->base, VIRTIO_MMIO_QUEUE_NOTIFY, queue_id);
+	return 1;
+}
+
+/* Notify all virtqueues on an interrupt. */
+static int vm_interrupt(void *opaque)
+{
+	struct virtio_mmio_device *vm_dev = opaque;
+	unsigned long status;
+	unsigned long flags;
+	int rc = 0;
+	struct virtqueue *vq;
+
+	/* Read and acknowledge interrupts */
+	status = virtio_cread32(vm_dev->base, VIRTIO_MMIO_INTERRUPT_STATUS);
+	virtio_cwrite32(vm_dev->base, VIRTIO_MMIO_INTERRUPT_ACK, status);
+
+	if (unlikely(status & VIRTIO_MMIO_INT_CONFIG)) {
+		uk_pr_warn("Unsupported config change interrupt received on virtio-mmio device %p\n",
+			   vm_dev);
+	}
+
+	if (likely(status & VIRTIO_MMIO_INT_VRING)) {
+		flags = ukplat_lcpu_save_irqf();
+		UK_TAILQ_FOREACH(vq, &vm_dev->vdev.vqs, next) {
+			rc |= virtqueue_ring_interrupt(vq);
+		}
+		ukplat_lcpu_restore_irqf(flags);
+	}
+
+	return rc;
+}
+
+
+static struct virtqueue *vm_setup_vq(struct virtio_dev *vdev,
+					__u16 queue_id,
+					__u16 num_desc,
+					virtqueue_callback_t callback,
+					struct uk_alloc *a)
+{
+	struct virtio_mmio_device *vm_dev = to_virtio_mmio_device(vdev);
+	struct virtqueue *vq;
+	unsigned long flags;
+
+	/* Create the vring */
+	vq = virtqueue_create(queue_id, num_desc, VIRTIO_MMIO_VRING_ALIGN,
+			      callback, vm_notify, vdev, a);
+
+	if (PTRISERR(vq)) {
+		uk_pr_err("Failed to create the virtqueue: %d\n",
+			  PTR2ERR(vq));
+
+		goto err_exit;
+	}
+
+	/* Select the queue we're interested in */
+	virtio_cwrite32(vm_dev->base, VIRTIO_MMIO_QUEUE_SEL, queue_id);
+
+	/* Activate the queue */
+	virtio_cwrite32(vm_dev->base, VIRTIO_MMIO_QUEUE_NUM, (__u32)virtqueue_vring_get_num(vq));
+	if (vm_dev->version == 1) {
+
+		virtio_cwrite32(vm_dev->base, VIRTIO_MMIO_QUEUE_ALIGN, __PAGE_SIZE);
+		virtio_cwrite32(vm_dev->base, VIRTIO_MMIO_QUEUE_PFN,
+					virtqueue_physaddr(vq) >> __PAGE_SHIFT);
+	} else {
+		__u64 addr;
+		addr = virtqueue_physaddr(vq);
+		virtio_cwrite32(vm_dev->base, VIRTIO_MMIO_QUEUE_DESC_LOW, (__u32)addr);
+		virtio_cwrite32(vm_dev->base, VIRTIO_MMIO_QUEUE_DESC_HIGH,
+								(__u32)(addr >> 32));
+
+		addr = virtqueue_get_avail_addr(vq);
+		virtio_cwrite32(vm_dev->base, VIRTIO_MMIO_QUEUE_AVAIL_LOW, (__u32)addr);
+		virtio_cwrite32(vm_dev->base, VIRTIO_MMIO_QUEUE_AVAIL_HIGH,
+								(__u32)(addr >> 32));
+
+		addr =  virtqueue_get_used_addr(vq);
+		virtio_cwrite32(vm_dev->base, VIRTIO_MMIO_QUEUE_USED_LOW, (__u32)addr);
+		virtio_cwrite32(vm_dev->base, VIRTIO_MMIO_QUEUE_USED_HIGH,
+								(__u32)(addr >> 32));
+
+		virtio_cwrite32(vm_dev->base, VIRTIO_MMIO_QUEUE_READY, 1);
+	}
+
+	flags = ukplat_lcpu_save_irqf();
+	UK_TAILQ_INSERT_TAIL(&vm_dev->vdev.vqs, vq, next);
+	ukplat_lcpu_restore_irqf(flags);
+
+err_exit:
+	return vq;
+}
+
+static int vm_find_vqs(struct virtio_dev *vdev, __u16 num_vqs, __u16 *qdesc_size)
+{
+	struct virtio_mmio_device *vm_dev = to_virtio_mmio_device(vdev);
+	unsigned int irq = vm_dev->pfdev->irq;
+	int i, err;
+	int vq_cnt = 0;
+
+	err = ukplat_irq_register(irq, vm_interrupt, vm_dev);
+	if (err)
+		return err;
+
+	for (i = 0; i < num_vqs; ++i) {
+		/* Select the queue we're interested in */
+		virtio_cwrite32(vm_dev->base, VIRTIO_MMIO_QUEUE_SEL, i);
+
+		/* Queue shouldn't already be set up. */
+		if (virtio_cread32(vm_dev->base, (vm_dev->version == 1 ?
+				VIRTIO_MMIO_QUEUE_PFN : VIRTIO_MMIO_QUEUE_READY))) {
+			uk_pr_err("vm_find_vqs error mmio queue not ready\n");
+			err = -ENOENT;
+			goto error_exit;
+		}
+
+		qdesc_size[i] = virtio_cread32(vm_dev->base, VIRTIO_MMIO_QUEUE_NUM_MAX);
+		if (qdesc_size[i] == 0) {
+			err = -ENOENT;
+			goto error_exit;
+		}
+
+		vq_cnt++;
+	}
+
+	return vq_cnt;
+error_exit:
+	uk_pr_err("err in vm_find_vqs :%d\n", err);
+	return err;
+}
+
+static struct virtio_config_ops virtio_mmio_config_ops = {
+	.config_get	= vm_get,
+	.config_set	= vm_set,
+	.status_get	= vm_get_status,
+	.status_set	= vm_set_status,
+	.device_reset	= vm_reset,
+	.features_get	= vm_get_features,
+	.features_set	= vm_set_features,
+	.vqs_find	= vm_find_vqs,
+	.vq_setup	= vm_setup_vq,
+};
+
+static int virtio_mmio_add_dev(struct pf_device *pfdev)
+{
+	struct virtio_mmio_device *vm_dev;
+	unsigned int magic;
+	int rc;
+
+	UK_ASSERT(pfdev != NULL);
+	uk_pr_info("virtio_mmio_add dev\n");
+
+	vm_dev = uk_malloc(a, sizeof(*vm_dev));
+	if (!vm_dev) {

  "Failed to allocate virtio-mmio...." (instead of virtio-pci)

+		uk_pr_err("Failed to allocate virtio-pci device\n");
+		return -ENOMEM;
+	}
+
+	/* Fetch Pf Device information */
+	vm_dev->pfdev = pfdev;
+	vm_dev->base = (void *)pfdev->base;
+	vm_dev->vdev.cops = &virtio_mmio_config_ops;
+	vm_dev->name = "virtio_mmio";
+
+	if (vm_dev->base == NULL)
+		return -EFAULT;
+
+	magic = virtio_cread32(vm_dev->base, VIRTIO_MMIO_MAGIC_VALUE);
+	if (magic != ('v' | 'i' << 8 | 'r' << 16 | 't' << 24)) {
+		uk_pr_err("Wrong magic value 0x%x!\n", magic);
+		return -ENODEV;
+	}
+
+	/* Check device version */
+	vm_dev->version = virtio_cread32(vm_dev->base, VIRTIO_MMIO_VERSION);
+	if (vm_dev->version < 1 || vm_dev->version > 2) {
+		uk_pr_err("Version %ld not supported!\n", vm_dev->version);
+		return -ENXIO;
+	}
+
+	vm_dev->vdev.id.virtio_device_id = virtio_cread32(vm_dev->base, VIRTIO_MMIO_DEVICE_ID);
+	if (vm_dev->vdev.id.virtio_device_id == 0) {
+		/*
+		 * virtio-mmio device with an ID 0 is a (dummy) placeholder
+		 * with no function. End probing now with no error reported.
+		 */
+		uk_pr_err("virtio_device_id is 0\n");
+
+		return -ENODEV;
+	}
+	vm_dev->id.vendor = virtio_cread32(vm_dev->base, VIRTIO_MMIO_VENDOR_ID);
+
+	virtio_cwrite32(vm_dev->base, VIRTIO_MMIO_GUEST_PAGE_SIZE, __PAGE_SIZE);
+
+	rc = virtio_bus_register_device(&vm_dev->vdev);
+	if (rc != 0) {
+		uk_pr_err("Failed to register the virtio device: %d\n", rc);
+		goto free_pf_dev;
+	}
+
+	uk_pr_info("finish add a virtio mmio dev\n");
+
+	return rc;
+
+free_pf_dev:
+	uk_free(a, vm_dev);
+
+	return 0;
+}
+
+static int virtio_mmio_drv_init(struct uk_alloc *drv_allocator)
+{
+	/* driver initialization */
+	if (!drv_allocator)
+		return -EINVAL;
+
+	a = drv_allocator;
+
+	return 0;
+}
+
+static const struct pf_device_id virtio_mmio_ids = {
+		.device_id = VIRTIO_MMIO_ID
+};
+
+static struct pf_driver virtio_mmio_drv = {
+	.device_ids = &virtio_mmio_ids,
+	.init = virtio_mmio_drv_init,
+	.add_dev = virtio_mmio_add_dev
+};
+
+PF_REGISTER_DRIVER(&virtio_mmio_drv);


Reviewed-by: Razvan Virtan <virtanrazvan@gmail.com>


From minios-devel-bounces@lists.xenproject.org Sat Apr 03 14:46:18 2021
Return-path: <minios-devel-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xenproject.org
Delivery-date: Sat, 03 Apr 2021 14:46:18 +0000
Received: from list by lists.xenproject.org with outflank-mailman.105089.201227 (Exim 4.92)
	(envelope-from <minios-devel-bounces@lists.xenproject.org>)
	id 1lShXU-0004qU-Tj; Sat, 03 Apr 2021 14:46:16 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 105089.201227; Sat, 03 Apr 2021 14:46:16 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <minios-devel-bounces@lists.xenproject.org>)
	id 1lShXU-0004qN-Qt; Sat, 03 Apr 2021 14:46:16 +0000
Received: by outflank-mailman (input) for mailman id 105089;
 Sat, 03 Apr 2021 14:46:15 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=wTAA=JA=gmail.com=virtanrazvan@srs-us1.protection.inumbo.net>)
 id 1lShXT-0004qI-Bn
 for minios-devel@lists.xen.org; Sat, 03 Apr 2021 14:46:15 +0000
Received: from mail-ej1-x62f.google.com (unknown [2a00:1450:4864:20::62f])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id b0a1976a-16a7-4081-b52f-c64ec645b049;
 Sat, 03 Apr 2021 14:46:14 +0000 (UTC)
Received: by mail-ej1-x62f.google.com with SMTP id e14so10922586ejz.11
 for <minios-devel@lists.xen.org>; Sat, 03 Apr 2021 07:46:14 -0700 (PDT)
Received: from razvan-Lenovo-Legion-Y530-15ICH.local
 ([2a02:2f08:c211:9400:94cb:7915:8173:8207])
 by smtp.gmail.com with ESMTPSA id i11sm5561910ejc.101.2021.04.03.07.46.13
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Sat, 03 Apr 2021 07:46:13 -0700 (PDT)
X-BeenThere: minios-devel@lists.xenproject.org
List-Id: Mini-os development list <minios-devel.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/minios-devel>, 
 <mailto:minios-devel-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:minios-devel@lists.xenproject.org>
List-Help: <mailto:minios-devel-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/minios-devel>, 
 <mailto:minios-devel-request@lists.xenproject.org?subject=subscribe>
Errors-To: minios-devel-bounces@lists.xenproject.org
Precedence: list
Sender: "Minios-devel" <minios-devel-bounces@lists.xenproject.org>
X-Inumbo-ID: b0a1976a-16a7-4081-b52f-c64ec645b049
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20161025;
        h=from:to:cc:subject:date:message-id:in-reply-to:references;
        bh=tt2Rtwo2NI0ej69YMX4fzGZgiEjbTQMC42SyjubiP4w=;
        b=GbUY6yainNOJmqJJPXW6HpMQIWFbmb6stXU4+r7qI9E9FTO96jqHXHd9eRtLuX1Cg/
         nGZeL7qNcl+y6mqel0Mc3tZX9Uf5p4RaVLI+/uZHEG4KR2APpkYmXGRrlWQtAyG/sUFN
         7wvMPqxwlXoKC0Y1EfEJNJ6eaFiz9L1F3e72cG0GEilFdpwvS+NkXI0JWB34oTQILC1t
         hS0S8jZxBTINIf5Rhvo8sBvqY9bNZoNLwz3RMFlMFCJB7Z/+M8PkGrgB6ggdk+sTiGr3
         DG9dzK3W4q3LQrwUGXgLWFJvuMeiypLwQnqfyqMn041mg5VxVrH0X6FMdC+n9BFI56cg
         jXfg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to
         :references;
        bh=tt2Rtwo2NI0ej69YMX4fzGZgiEjbTQMC42SyjubiP4w=;
        b=qgkcYibaWQxP9c9IKmwFO+4DqskCEHVXgdXefvC8EuX8CjqpQ4LRIDiQOcV/tC1TDl
         e4g1VaxzAOfDHqdsooeLlzHgEyZle/iNRrGLpMp0EXs003qMlOSsKg1SBzPOZbN+F97X
         L0bOjRHHTkYC6G49FejUupiVs/74GlSdedds4g94f4X8rBpdQQsDlR8aB54/KBrxd0iV
         djE43bu75fnnHoZdwIMEuRke56x7BprFJCZ3D9HRV/C0G1ncONW34vej4jajs8lrldK/
         FY5CLQulR/zDv9CXaiU0LxyW9nou5QenIdxLb/OWKyGYW4XpSyYGGC/Wn6udY0ZgDRJF
         EdaQ==
X-Gm-Message-State: AOAM532feSnmVeYbMLisZHcyvx5z3ADmdTbLcvyhbDth/6MnJ2LEzzbZ
	57yqNv2SnwIKNeHE6dRyM3s=
X-Google-Smtp-Source: ABdhPJxwgANHETBtdPvkpWjOpJSPBEo7gdlsfDoBkGRxxg5EROaZfKf38X5kA+kbGo5WOlp/m/VJEA==
X-Received: by 2002:a17:906:29c3:: with SMTP id y3mr18431120eje.430.1617461173848;
        Sat, 03 Apr 2021 07:46:13 -0700 (PDT)
From: Razvan Virtan <virtanrazvan@gmail.com>
X-Google-Original-From: Razvan Virtan <razvanvirtan@gmail.com>
To: justin.he@arm.com
Cc: minios-devel@lists.xen.org
Subject: Re: [RFCv4,13/35] plat/virtio_mmio: Implement platform probe for virtio_mmio
Date: Sat,  3 Apr 2021 17:46:12 +0300
Message-Id: <20210403144612.23335-1-razvanvirtan@gmail.com>
X-Mailer: git-send-email 2.17.1
In-Reply-To: <20201223073857.118076-14-justin.he@arm.com>
References: <20201223073857.118076-14-justin.he@arm.com>

All good with this patch.

Reviewed-by: Razvan Virtan <virtanrazvan@gmail.com>


From minios-devel-bounces@lists.xenproject.org Sat Apr 03 14:51:31 2021
Return-path: <minios-devel-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xenproject.org
Delivery-date: Sat, 03 Apr 2021 14:51:31 +0000
Received: from list by lists.xenproject.org with outflank-mailman.105091.201234 (Exim 4.92)
	(envelope-from <minios-devel-bounces@lists.xenproject.org>)
	id 1lShcY-0005dG-BR; Sat, 03 Apr 2021 14:51:30 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 105091.201234; Sat, 03 Apr 2021 14:51:30 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <minios-devel-bounces@lists.xenproject.org>)
	id 1lShcY-0005d9-8X; Sat, 03 Apr 2021 14:51:30 +0000
Received: by outflank-mailman (input) for mailman id 105091;
 Sat, 03 Apr 2021 14:51:28 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=wTAA=JA=gmail.com=virtanrazvan@srs-us1.protection.inumbo.net>)
 id 1lShcW-0005d1-QL
 for minios-devel@lists.xen.org; Sat, 03 Apr 2021 14:51:28 +0000
Received: from mail-ej1-x635.google.com (unknown [2a00:1450:4864:20::635])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id 332730f9-8233-4e2f-83b2-d3e960f970c0;
 Sat, 03 Apr 2021 14:51:28 +0000 (UTC)
Received: by mail-ej1-x635.google.com with SMTP id u17so4682422ejk.2
 for <minios-devel@lists.xen.org>; Sat, 03 Apr 2021 07:51:28 -0700 (PDT)
Received: from razvan-Lenovo-Legion-Y530-15ICH.local
 ([2a02:2f08:c211:9400:94cb:7915:8173:8207])
 by smtp.gmail.com with ESMTPSA id si3sm5596491ejb.90.2021.04.03.07.51.26
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Sat, 03 Apr 2021 07:51:27 -0700 (PDT)
X-BeenThere: minios-devel@lists.xenproject.org
List-Id: Mini-os development list <minios-devel.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/minios-devel>, 
 <mailto:minios-devel-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:minios-devel@lists.xenproject.org>
List-Help: <mailto:minios-devel-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/minios-devel>, 
 <mailto:minios-devel-request@lists.xenproject.org?subject=subscribe>
Errors-To: minios-devel-bounces@lists.xenproject.org
Precedence: list
Sender: "Minios-devel" <minios-devel-bounces@lists.xenproject.org>
X-Inumbo-ID: 332730f9-8233-4e2f-83b2-d3e960f970c0
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20161025;
        h=from:to:cc:subject:date:message-id:in-reply-to:references;
        bh=tt2Rtwo2NI0ej69YMX4fzGZgiEjbTQMC42SyjubiP4w=;
        b=T6p/anybbCtpb62Wsz0v6sExx6mXXam2N17cQ+GWbpT2WclTkvSFHZPfr+VXag8K1K
         uQrKd72aUJDw/6/nXaO58p0zI3NGdqkx2YUWJcy6LnOMpmuGMUD4K1clXWTyPmnM30O+
         JlZJfqJqzgmlBoaMQPmIL3ZMHi8spH9ug6h3zPFSR8yRICHnaBcqKwyWpTTHImvNiq6f
         RUWpHJQkZmsBD+q4KAnK5t6nhJ6p1yx7z8BzfMxAJ1x9VeKUgAScZUhLDKSARuhVSjfc
         0ZvP/8o4s8MIKac1EY4Qb6dsaQeUxLmfAvjWCjCYZ+ZzyX7oMFHYMoMs4+CX86nS+U8b
         T+Dw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to
         :references;
        bh=tt2Rtwo2NI0ej69YMX4fzGZgiEjbTQMC42SyjubiP4w=;
        b=gSI7qXN/5BYrXyqRok7v6Wvoupv0YuuOAkL6l1UKTAMLbRoc5eqce2zZkBzOlv45ZV
         OHS+0I9TGX30/cFA3e+9IWHQhK8Ong3MoycRNRnMKLHYBBZ1f/S1RbhqBDTNgP/sWdKD
         vg73JvlLeQQc8POvYrGAhsWY/kmy/afG43JNqSDofqiwAWCLDXyqrrKoygRniV0j2YwZ
         BZTpVO0jNpimN+lSH4F3eNrfrch28q1wQbkwO/DaYObBz+HxEAW3sNnU5Dt0qwa6SHxs
         GHbIQjZncWv4mPYYkv4wpDpmJXuu4toieYL5kxe4cLb6FP6bqKF9cvamyRvWGVTLiV8m
         MkJQ==
X-Gm-Message-State: AOAM533QiB3yfNNQ95NajQ/D6m+ncLGAKa3Ts7Da0iOv94LtvRKbCQYw
	oFDNr/sgByeEMlWF3AQYb/R32cBdwR2WbA==
X-Google-Smtp-Source: ABdhPJz00y45CelxvCkyHQf/W7FVqalxsBk5UWDXwfT5m7W2qtEFt9Zme+VXA0Gh5imLvgt2Y3x8nw==
X-Received: by 2002:a17:907:3353:: with SMTP id yr19mr19546814ejb.8.1617461487291;
        Sat, 03 Apr 2021 07:51:27 -0700 (PDT)
From: Razvan Virtan <virtanrazvan@gmail.com>
X-Google-Original-From: Razvan Virtan <razvanvirtan@gmail.com>
To: justin.he@arm.com
Cc: minios-devel@lists.xen.org
Subject: Re: [RFCv4,31/35] plat/virtio_mmio: Fix virtqueue size for virtio 9p device
Date: Sat,  3 Apr 2021 17:51:25 +0300
Message-Id: <20210403145125.23617-1-razvanvirtan@gmail.com>
X-Mailer: git-send-email 2.17.1
In-Reply-To: <20201223073857.118076-32-justin.he@arm.com>
References: <20201223073857.118076-32-justin.he@arm.com>

All good with this patch.

Reviewed-by: Razvan Virtan <virtanrazvan@gmail.com>


From minios-devel-bounces@lists.xenproject.org Mon Apr 05 16:21:44 2021
Return-path: <minios-devel-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xenproject.org
Delivery-date: Mon, 05 Apr 2021 16:21:44 +0000
Received: from list by lists.xenproject.org with outflank-mailman.105482.201917 (Exim 4.92)
	(envelope-from <minios-devel-bounces@lists.xenproject.org>)
	id 1lTRyv-0006wl-N5; Mon, 05 Apr 2021 16:21:41 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 105482.201917; Mon, 05 Apr 2021 16:21:41 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <minios-devel-bounces@lists.xenproject.org>)
	id 1lTRyv-0006we-Jm; Mon, 05 Apr 2021 16:21:41 +0000
Received: by outflank-mailman (input) for mailman id 105482;
 Mon, 05 Apr 2021 16:21:40 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=iyKO=JC=gmail.com=virtanrazvan@srs-us1.protection.inumbo.net>)
 id 1lTRyt-0006wV-Sr
 for minios-devel@lists.xen.org; Mon, 05 Apr 2021 16:21:39 +0000
Received: from mail-ej1-x635.google.com (unknown [2a00:1450:4864:20::635])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id 0da4b860-9b39-4d03-b828-9b03640536a0;
 Mon, 05 Apr 2021 16:21:38 +0000 (UTC)
Received: by mail-ej1-x635.google.com with SMTP id b7so17602661ejv.1
 for <minios-devel@lists.xen.org>; Mon, 05 Apr 2021 09:21:38 -0700 (PDT)
Received: from razvan-Lenovo-Legion-Y530-15ICH.local
 ([2a02:2f08:c211:9400:408c:1723:5905:9db7])
 by smtp.gmail.com with ESMTPSA id o6sm11131631edw.24.2021.04.05.09.21.36
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Mon, 05 Apr 2021 09:21:37 -0700 (PDT)
X-BeenThere: minios-devel@lists.xenproject.org
List-Id: Mini-os development list <minios-devel.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/minios-devel>, 
 <mailto:minios-devel-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:minios-devel@lists.xenproject.org>
List-Help: <mailto:minios-devel-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/minios-devel>, 
 <mailto:minios-devel-request@lists.xenproject.org?subject=subscribe>
Errors-To: minios-devel-bounces@lists.xenproject.org
Precedence: list
Sender: "Minios-devel" <minios-devel-bounces@lists.xenproject.org>
X-Inumbo-ID: 0da4b860-9b39-4d03-b828-9b03640536a0
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20161025;
        h=from:to:cc:subject:date:message-id:in-reply-to:references;
        bh=zluDJxpE/IQwO4S8SefXbOHYPIOCFN+xXyrR5KO46ow=;
        b=crJnv4JoR4mOD1Tz3Jmjd1huBWbzklJsshRuBqnfR+TWsJ4QS9h/tqh1Y1BixFmZkC
         LFlIVVJWh5AY7Jji3EtgNkKwrydS2N/UJfYMlBpjgRfiIhamsj4DcZM/MOocUSYTnUjJ
         ZyjtHAiIdL66oKOhq13AQZwqjPRz53s6ikErwtiXaUJe7vYznskpOfoYCh8GmA3fcvjy
         dyG1HHFTiyfP0dgJeMdTC6ZtfJ63VpfYL+oPdBsk/p8Ryng9wfYuBYB4b538iLFhyT1y
         nUmvhh0LhR5WNMzI514U8ErnZlo6Zr6ULYPzTQjYyUO0hcaqSyLNxpX49R8BTotmI0aE
         v+0Q==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to
         :references;
        bh=zluDJxpE/IQwO4S8SefXbOHYPIOCFN+xXyrR5KO46ow=;
        b=glaDXUZEysqCm/KtNF+He7MkvZuVyn3p3xjfC6UsPOT3e+SDZNtzVkzVZ++b/M09yB
         crF+ldjbZ5TDqy23ilCtjL1CCIaKcpRQUyi5NVaqSctV4CvpVCW9sZ0rp49eG4tt+497
         V2FoFg0NqWDaK2qEf0tuBQdtsD6+eRE6M/z6G4YcHoTkJnBCRZu6hhkOZpk5LVdyH2eS
         KBEl6sfxOBXrWA7lxQFzGex5AcewLNYq+P3qKfPnuaT91D0APhxKjHuB7JS7HYLEQgiM
         WelXNTAVPMD1wyfsHjRdQc5eGKUZfPBH2o18gIz1NjQxD3QCQjKM4ZUm5EcIcJqBZYzm
         doaQ==
X-Gm-Message-State: AOAM5301x63A8OP9WtZOgrmWor8yn8clzqYkjyDjX5fUMV/IiuRS3Zpp
	3e1V8ncUtOFIYRHephZaUMY=
X-Google-Smtp-Source: ABdhPJx/rRVV189Nf1qFNuxqpDsZANYoPqJMl3H3XNS21AKYqTH2HJ1sUSKPKxECHpXEvwXQGr/oWg==
X-Received: by 2002:a17:907:2bdd:: with SMTP id gv29mr28593283ejc.259.1617639697883;
        Mon, 05 Apr 2021 09:21:37 -0700 (PDT)
From: Razvan Virtan <virtanrazvan@gmail.com>
X-Google-Original-From: Razvan Virtan <razvanvirtan@gmail.com>
To: justin.he@arm.com
Cc: minios-devel@lists.xen.org
Subject: Re: [RFCv4,05/35] build: Enable the platform bus and virtio_mmio device on arm64 
Date: Mon,  5 Apr 2021 19:21:35 +0300
Message-Id: <20210405162135.6885-1-razvanvirtan@gmail.com>
X-Mailer: git-send-email 2.17.1
In-Reply-To: <20201223073857.118076-6-justin.he@arm.com>
References: <20201223073857.118076-6-justin.he@arm.com>

Hi, Justin.
All good with this patch.

Reviewed-by: Razvan Virtan <virtanrazvan@gmail.com>


From minios-devel-bounces@lists.xenproject.org Fri Apr 16 14:34:08 2021
Return-path: <minios-devel-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xenproject.org
Delivery-date: Fri, 16 Apr 2021 14:34:08 +0000
Received: from list by lists.xenproject.org with outflank-mailman.111808.213831 (Exim 4.92)
	(envelope-from <minios-devel-bounces@lists.xenproject.org>)
	id 1lXPXq-0007yV-NO; Fri, 16 Apr 2021 14:34:06 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 111808.213831; Fri, 16 Apr 2021 14:34:06 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <minios-devel-bounces@lists.xenproject.org>)
	id 1lXPXq-0007yO-KO; Fri, 16 Apr 2021 14:34:06 +0000
Received: by outflank-mailman (input) for mailman id 111808;
 Fri, 16 Apr 2021 14:34:04 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=oWDl=JN=gmail.com=virtanrazvan@srs-us1.protection.inumbo.net>)
 id 1lXPXo-0007xo-J7
 for minios-devel@lists.xen.org; Fri, 16 Apr 2021 14:34:04 +0000
Received: from mail-ej1-x636.google.com (unknown [2a00:1450:4864:20::636])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id e5f402c2-22b9-4d26-88da-4e736f7aa34f;
 Fri, 16 Apr 2021 14:34:03 +0000 (UTC)
Received: by mail-ej1-x636.google.com with SMTP id w3so42502943ejc.4
 for <minios-devel@lists.xen.org>; Fri, 16 Apr 2021 07:34:03 -0700 (PDT)
Received: from razvan-Lenovo-Legion-Y530-15ICH.local
 ([2a02:2f08:c211:9400:d181:d70:c58c:654b])
 by smtp.gmail.com with ESMTPSA id k9sm4333613eje.102.2021.04.16.07.34.01
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Fri, 16 Apr 2021 07:34:02 -0700 (PDT)
X-BeenThere: minios-devel@lists.xenproject.org
List-Id: Mini-os development list <minios-devel.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/minios-devel>, 
 <mailto:minios-devel-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:minios-devel@lists.xenproject.org>
List-Help: <mailto:minios-devel-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/minios-devel>, 
 <mailto:minios-devel-request@lists.xenproject.org?subject=subscribe>
Errors-To: minios-devel-bounces@lists.xenproject.org
Precedence: list
Sender: "Minios-devel" <minios-devel-bounces@lists.xenproject.org>
X-Inumbo-ID: e5f402c2-22b9-4d26-88da-4e736f7aa34f
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20161025;
        h=from:to:cc:subject:date:message-id:in-reply-to:references;
        bh=xv484ytqGRX72D5+qNfRK+1TLebvyqYfUtxifqUx41M=;
        b=K8S3RI2vUHE80N0QwMOuzj2fYWX/sfUp/PU1NUhrUrBF9FQzuxRyWfzOS1gAqDH271
         X/vR3BMZLiIxOzXI1EMZ8rFxtqsJC7vtwu8gD92zeI/CETYVtMUiv5SE9NbG98VlKbBf
         uFC4X/Hnz5vWftTGr47bePZo1EMPxp3MxjLbmcn6X2kYfg2XlNqMttu2Hc62BmBgTl2j
         N8IxoPhpdpgx3+I0bgfcFypE5jpWXJxB8yh0PPtR22xPvLg28BDEvi4oBpAGGV5nWV8w
         wvGU8RlmkO21gYX32oR61DBcsYAtBy9OHViSNrPzZyyZJa2eh2EvbdGwU0sOj9AlgaC0
         iKNw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to
         :references;
        bh=xv484ytqGRX72D5+qNfRK+1TLebvyqYfUtxifqUx41M=;
        b=aJMVEOaU2L4nmcFmuuo2uNr4t8EwElymB0WxNdwcn1nbD48vuzhIMF3KMckK5X+kpF
         oESlvym2J21RwUtQ3rs6AkQ8zup4nnny2WefwPdQJnLsuTt2wbZSV17Qld6wJsT1Jkah
         xfAw6bNVYFEhkX7TQ00JN+S747gRC6iokBpuf0N8IRy/5GPiXJeDVudI/mzuDpGZVD/D
         K2nEhyiSReCmsulLlyhPeySQIToJp7n+M1asmGm4hPyDZe8eZ1bgRTST6DkrGX+Cah7a
         4LstkTi/nFW/27xhl3vhX4ZeBHC7G3cSpa6Cl+D+tXBlOI6jlL3Zjxn4QDIejBslZZ5z
         gdcg==
X-Gm-Message-State: AOAM533e2urQB7VGNdqEtSoEbUOVVwJc0V6jrQL1xQ4YIsjJG9x1BXGk
	r5ypItGUDkdn2d+mlIT5lCU=
X-Google-Smtp-Source: ABdhPJwxIXJKh+QxRmLDbyVafGBczlwnxcyv2m+bKL/p7AO7K742KegsjoNYfmUUKZRvdSJjLOA0uw==
X-Received: by 2002:a17:906:d18a:: with SMTP id c10mr8449416ejz.271.1618583642801;
        Fri, 16 Apr 2021 07:34:02 -0700 (PDT)
From: Razvan Virtan <virtanrazvan@gmail.com>
X-Google-Original-From: Razvan Virtan <razvanvirtan@gmail.com>
To: justin.he@arm.com
Cc: minios-devel@lists.xen.org
Subject: Re: [RFCv4,07/35] plat/ofw: Export fdt_find_irq_parent_offset 
Date: Fri, 16 Apr 2021 17:34:00 +0300
Message-Id: <20210416143400.6818-1-razvanvirtan@gmail.com>
X-Mailer: git-send-email 2.17.1
In-Reply-To: <20201223073857.118076-8-justin.he@arm.com>
References: <20201223073857.118076-8-justin.he@arm.com>

Hi, Justin.
I think the description for fdt_find_irq_parent_offset provided in the
header file is wrong, since it describes `fdt_node_offset_by_phandle()`
from `libfdt.h` instead of `fdt_find_irq_parent_offset()`.

/**

The second argument should be something like:
@offset: offset of the node whose irq parent to find

 * fdt_find_irq_parent_offset - find the irq parent offset
 * @fdt: pointer to the device tree blob
 * @phandle: phandle value
 *

I think the detailed description below should be removed or replaced with one
that describes this function.

 * fdt_node_offset_by_phandle() returns the offset of the node
 * which has the given phandle value.  If there is more than one node
 * in the tree with the given phandle (an invalid tree), results are
 * undefined.
 *
 * returns:
 *	structure block offset of the located node (>= 0), on success
 *	-FDT_ERR_NOTFOUND, no node with that phandle exists
 *	-FDT_ERR_BADPHANDLE, given phandle value was invalid (0 or -1)
 *	-FDT_ERR_BADMAGIC,
 *	-FDT_ERR_BADVERSION,
 *	-FDT_ERR_BADSTATE,
 *	-FDT_ERR_BADSTRUCTURE, standard meanings
 */
int fdt_find_irq_parent_offset(const void *fdt, int offset);


Reviewed-by: Razvan Virtan <virtanrazvan@gmail.com>


From minios-devel-bounces@lists.xenproject.org Fri Apr 16 14:49:26 2021
Return-path: <minios-devel-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xenproject.org
Delivery-date: Fri, 16 Apr 2021 14:49:26 +0000
Received: from list by lists.xenproject.org with outflank-mailman.111836.213847 (Exim 4.92)
	(envelope-from <minios-devel-bounces@lists.xenproject.org>)
	id 1lXPme-0000wD-7P; Fri, 16 Apr 2021 14:49:24 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 111836.213847; Fri, 16 Apr 2021 14:49:24 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <minios-devel-bounces@lists.xenproject.org>)
	id 1lXPme-0000w6-4W; Fri, 16 Apr 2021 14:49:24 +0000
Received: by outflank-mailman (input) for mailman id 111836;
 Fri, 16 Apr 2021 14:49:23 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=oWDl=JN=gmail.com=virtanrazvan@srs-us1.protection.inumbo.net>)
 id 1lXPmd-0000w1-Bc
 for minios-devel@lists.xen.org; Fri, 16 Apr 2021 14:49:23 +0000
Received: from mail-ed1-x52e.google.com (unknown [2a00:1450:4864:20::52e])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id 12da1eb3-b2e5-4278-92b7-b65d76a12a0f;
 Fri, 16 Apr 2021 14:49:22 +0000 (UTC)
Received: by mail-ed1-x52e.google.com with SMTP id h10so32570996edt.13
 for <minios-devel@lists.xen.org>; Fri, 16 Apr 2021 07:49:22 -0700 (PDT)
Received: from razvan-Lenovo-Legion-Y530-15ICH.local
 ([2a02:2f08:c211:9400:d181:d70:c58c:654b])
 by smtp.gmail.com with ESMTPSA id x7sm4332038ejc.116.2021.04.16.07.49.21
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Fri, 16 Apr 2021 07:49:21 -0700 (PDT)
X-BeenThere: minios-devel@lists.xenproject.org
List-Id: Mini-os development list <minios-devel.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/minios-devel>, 
 <mailto:minios-devel-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:minios-devel@lists.xenproject.org>
List-Help: <mailto:minios-devel-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/minios-devel>, 
 <mailto:minios-devel-request@lists.xenproject.org?subject=subscribe>
Errors-To: minios-devel-bounces@lists.xenproject.org
Precedence: list
Sender: "Minios-devel" <minios-devel-bounces@lists.xenproject.org>
X-Inumbo-ID: 12da1eb3-b2e5-4278-92b7-b65d76a12a0f
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20161025;
        h=from:to:cc:subject:date:message-id:in-reply-to:references;
        bh=zluDJxpE/IQwO4S8SefXbOHYPIOCFN+xXyrR5KO46ow=;
        b=YFwebsnIflp/s8isCo9zbbq724tnQzrQRM6LYh80v6wh169riKjnKP5/Ncf/vcCycl
         e5oJ+RaxpcbzJWpxJRQjrNcFlGl/jhFer2IV7ehWNiH8YJJrjOU0f35T8fqboDwfCDdo
         v/j5AqWsw0MmyV1vkjYeOxBmG2yu1LQTGCP8vbcRRDiR/gVuetaGgMr0s7HiXHOCIks9
         sHvcNqDMZnYHLZ0C4w9iF1DFILXRsCG/VcGZOVPsPNhvNIESJHJ+WLqQtWAwH36O6RV/
         0t+8G6Yq4oePaeqHmobW7bXZYaMDnQ90WK3Vol891+lA8FSL+kbsZg4hSQkgC1GWbp18
         Unkg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to
         :references;
        bh=zluDJxpE/IQwO4S8SefXbOHYPIOCFN+xXyrR5KO46ow=;
        b=uHg4u4MrAv8qmLtB+yQhhAGs7SbSlfiTpE7zpUHDea7PreZv7s4IFbFmer9311wCgN
         cq0+OV1WKf4X3xgidaR24609nYIQuapuuO8V/Q+89fjHlQ0SoTXur6T1BdLASnAl/DCC
         gvr+uQWp7YISCoMUTPjdH6/74TP2N5fYi/6H+s0HVTtY4rw8hwLpMg5LcV8RptLi/lxk
         9MOGv71fwH95Ht7MTRw0CeBAtlND8VIznHyYYbZptJXnoqA99WtFqlYKs+HfwXtiQyAU
         +G9imxecFMJy9oXrkCsHqbsUtDhJ5E5bEpoO9K1PLn8Ct/zaPg/hAJxAM2R8pbzzr3JL
         Nc4Q==
X-Gm-Message-State: AOAM531N1nHzxrxQUjTgcxg6tyUBuUJPKhFyFrETjgdF9+ycSE4L7+42
	Ujj0Fjl4kCmwxR16sSBQNxs=
X-Google-Smtp-Source: ABdhPJx4irHaMJ1hzP9ko5YQFFz3Jwhb1FVQHErvMx0PGRKfiXX+UfEYDm3mNnPa6vhtEw4AR4OziQ==
X-Received: by 2002:aa7:db16:: with SMTP id t22mr1055506eds.266.1618584561885;
        Fri, 16 Apr 2021 07:49:21 -0700 (PDT)
From: Razvan Virtan <virtanrazvan@gmail.com>
X-Google-Original-From: Razvan Virtan <razvanvirtan@gmail.com>
To: justin.he@arm.com
Cc: minios-devel@lists.xen.org
Subject: Re: [RFCv4,08/35] plat/pci_ecam: Introduce pci/pci_ecam.h 
Date: Fri, 16 Apr 2021 17:49:20 +0300
Message-Id: <20210416144920.7471-1-razvanvirtan@gmail.com>
X-Mailer: git-send-email 2.17.1
In-Reply-To: <20201223073857.118076-9-justin.he@arm.com>
References: <20201223073857.118076-9-justin.he@arm.com>

Hi, Justin.
All good with this patch.

Reviewed-by: Razvan Virtan <virtanrazvan@gmail.com>


From minios-devel-bounces@lists.xenproject.org Fri Apr 16 15:46:31 2021
Return-path: <minios-devel-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xenproject.org
Delivery-date: Fri, 16 Apr 2021 15:46:31 +0000
Received: from list by lists.xenproject.org with outflank-mailman.111880.213919 (Exim 4.92)
	(envelope-from <minios-devel-bounces@lists.xenproject.org>)
	id 1lXQfs-0006zU-Tg; Fri, 16 Apr 2021 15:46:28 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 111880.213919; Fri, 16 Apr 2021 15:46:28 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <minios-devel-bounces@lists.xenproject.org>)
	id 1lXQfs-0006zN-Qq; Fri, 16 Apr 2021 15:46:28 +0000
Received: by outflank-mailman (input) for mailman id 111880;
 Fri, 16 Apr 2021 15:46:27 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=oWDl=JN=gmail.com=virtanrazvan@srs-us1.protection.inumbo.net>)
 id 1lXQfr-0006zI-9l
 for minios-devel@lists.xen.org; Fri, 16 Apr 2021 15:46:27 +0000
Received: from mail-ed1-x52a.google.com (unknown [2a00:1450:4864:20::52a])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id c23b9b03-49d6-42e1-944f-50391834d96e;
 Fri, 16 Apr 2021 15:46:26 +0000 (UTC)
Received: by mail-ed1-x52a.google.com with SMTP id z1so32830533edb.8
 for <minios-devel@lists.xen.org>; Fri, 16 Apr 2021 08:46:26 -0700 (PDT)
Received: from razvan-Lenovo-Legion-Y530-15ICH.local
 ([2a02:2f08:c211:9400:d181:d70:c58c:654b])
 by smtp.gmail.com with ESMTPSA id y16sm5650492edc.62.2021.04.16.08.46.25
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Fri, 16 Apr 2021 08:46:25 -0700 (PDT)
X-BeenThere: minios-devel@lists.xenproject.org
List-Id: Mini-os development list <minios-devel.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/minios-devel>, 
 <mailto:minios-devel-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:minios-devel@lists.xenproject.org>
List-Help: <mailto:minios-devel-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/minios-devel>, 
 <mailto:minios-devel-request@lists.xenproject.org?subject=subscribe>
Errors-To: minios-devel-bounces@lists.xenproject.org
Precedence: list
Sender: "Minios-devel" <minios-devel-bounces@lists.xenproject.org>
X-Inumbo-ID: c23b9b03-49d6-42e1-944f-50391834d96e
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20161025;
        h=from:to:cc:subject:date:message-id:in-reply-to:references;
        bh=75QoOmL2AHcNS5FNjcuOHRp94/H9VI2eZ62WHmjOnfA=;
        b=KNbauBvr9UcoiJnIZ7G56x7260T3vI2bC62wsteLBjiv30YLIshn2CUcQOkAaWxC/a
         N9Vc3kr2JTu41aMM7R43lPDGO2VsqChADiv3YjuuVEGSuVEK1J9Z9iquDtBq6pLVn1iq
         vmv7YbXFW/x05vVd0cEyXBbIBsjzyWKVYObTIAqDhZVwiY9wUn0OggF+dz8ZwVZeQL+D
         Rmh55G6QfVk9CyWOr7vvfMpXAu1CH6q6EhWqZYc184kx6heHZlpKSMWElSsWLjjBa7EH
         C5kQQ6voPX4h1dJwDieCBnspYFX+qmLChSq03GEZhKQfQu55uq/47gf73ODjVzIaJ582
         e8Xg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to
         :references;
        bh=75QoOmL2AHcNS5FNjcuOHRp94/H9VI2eZ62WHmjOnfA=;
        b=X/dA1rKq9zK9j3MY+HXEz2qnam6u7kXAnF6HHBq7nSjX2l76TWpZnM/A8YOelsvRv2
         Y6pEO90dXZ0NXNWIfCZ6oJxQPXwH6283IGKRB1On4oJzFm4e1+kGRfpNow3DZZv16Kob
         U1jY5EH2xdQYwo1QvhzUWDDyATyV22oUv0/P7fZv9yK9XP8j7ysfdCMyIuuUfcqluUI6
         IKI/RmAeItTb56wKQRyELpdGx0rfSoyH9qWU9s0yXcgH9QHoUgyXl2BTL54lxbz7f2tU
         hGaJbkinThfpb4CcEfM2IV8ws2o1QtzLQO83vnxVGS5Ket+WgDmxhuz4+NshuEvQAYRX
         f0yg==
X-Gm-Message-State: AOAM5337mbGO948GUY4W6/5pTFyYbsgSEDiKWqjdDYOgH+F2J/cCjmDg
	E8M1t2HQ4Q7dFBoGVW2Y4bQ=
X-Google-Smtp-Source: ABdhPJyzczWIrfCNefUbdgZmmX+a+K7zUGYqzS2oMIStqLUl69y4MCMM96rZ9Gq6+W1fD25/h4N7gQ==
X-Received: by 2002:a05:6402:4309:: with SMTP id m9mr11105856edc.25.1618587985584;
        Fri, 16 Apr 2021 08:46:25 -0700 (PDT)
From: Razvan Virtan <virtanrazvan@gmail.com>
X-Google-Original-From: Razvan Virtan <razvanvirtan@gmail.com>
To: justin.he@arm.com
Cc: minios-devel@lists.xen.org
Subject: Re: [RFCv4,09/35] plat/pci_ecam: Introduce pci ecam skeleton
Date: Fri, 16 Apr 2021 18:46:24 +0300
Message-Id: <20210416154624.10198-1-razvanvirtan@gmail.com>
X-Mailer: git-send-email 2.17.1
In-Reply-To: <20201223073857.118076-10-justin.he@arm.com>
References: <20201223073857.118076-10-justin.he@arm.com>

All good with this patch, I've found only one minor typo:



Reviewed-by: Razvan Virtan <virtanrazvan@gmail.com>


From minios-devel-bounces@lists.xenproject.org Fri Apr 16 16:33:43 2021
Return-path: <minios-devel-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xenproject.org
Delivery-date: Fri, 16 Apr 2021 16:33:43 +0000
Received: from list by lists.xenproject.org with outflank-mailman.111919.214001 (Exim 4.92)
	(envelope-from <minios-devel-bounces@lists.xenproject.org>)
	id 1lXRPa-0004Gl-85; Fri, 16 Apr 2021 16:33:42 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 111919.214001; Fri, 16 Apr 2021 16:33:42 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <minios-devel-bounces@lists.xenproject.org>)
	id 1lXRPa-0004Ge-4t; Fri, 16 Apr 2021 16:33:42 +0000
Received: by outflank-mailman (input) for mailman id 111919;
 Fri, 16 Apr 2021 16:33:41 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=oWDl=JN=gmail.com=virtanrazvan@srs-us1.protection.inumbo.net>)
 id 1lXRPZ-0004GZ-FT
 for minios-devel@lists.xen.org; Fri, 16 Apr 2021 16:33:41 +0000
Received: from mail-ed1-x532.google.com (unknown [2a00:1450:4864:20::532])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id 8056e279-101d-481a-a4e9-83fe01eb098c;
 Fri, 16 Apr 2021 16:33:40 +0000 (UTC)
Received: by mail-ed1-x532.google.com with SMTP id m3so32983926edv.5
 for <minios-devel@lists.xen.org>; Fri, 16 Apr 2021 09:33:40 -0700 (PDT)
Received: from razvan-Lenovo-Legion-Y530-15ICH.local
 ([2a02:2f08:c211:9400:d181:d70:c58c:654b])
 by smtp.gmail.com with ESMTPSA id 1sm4517683ejt.95.2021.04.16.09.33.39
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Fri, 16 Apr 2021 09:33:39 -0700 (PDT)
X-BeenThere: minios-devel@lists.xenproject.org
List-Id: Mini-os development list <minios-devel.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/minios-devel>, 
 <mailto:minios-devel-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:minios-devel@lists.xenproject.org>
List-Help: <mailto:minios-devel-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/minios-devel>, 
 <mailto:minios-devel-request@lists.xenproject.org?subject=subscribe>
Errors-To: minios-devel-bounces@lists.xenproject.org
Precedence: list
Sender: "Minios-devel" <minios-devel-bounces@lists.xenproject.org>
X-Inumbo-ID: 8056e279-101d-481a-a4e9-83fe01eb098c
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20161025;
        h=from:to:cc:subject:date:message-id:in-reply-to:references;
        bh=Giu0lpCc3crQccTYZlQRLWk65YIjVKJN2hw5CtBMn+4=;
        b=Z3VVMhk+ux/rImrCNIeEjiNUAW6CaGpUa7clGUhKmRKlbHx98l7dJ7TzcvWIlLYRHY
         LYz6zy53epUvCOfNGswF//2weAV+akZWm59+RBURISUJkLp6PN59ul5Am0kxc5D86vFv
         fqPp7JA7papYM1RiK01C44QKvD4Mt5HrlX/y58ypaQFXP0frKJlYkUJgqPOdTzcyTNNd
         C/CcgDZaK300CPB8XY8bGqlBj1TyexKsu+g0d5a2g8nhCP39DH2ERvVXQ5L7VaaIlv9S
         1YRiUipBEJNbdqC2woOhqtrX4jLH6BEQdyXLg9pkmTFPyTacWxSiHYVE8Th9ADt+RSNq
         1w1g==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to
         :references;
        bh=Giu0lpCc3crQccTYZlQRLWk65YIjVKJN2hw5CtBMn+4=;
        b=IXfTuuN7yRomwV2MZMdWpkQwWbSiFJb3SvfDfWFmif7xLizer+US+Tu/Fbbkg56KHC
         H9EP1ypZHGcOnGrHqewM0grfjQ246yYORmPsH0dBuQbVZiog8WstAdK8UUB9HxRFHhf0
         0wfaJXQaNJnWaCmI0+ocKGeSR239P1tXkamxDH0Kw5v2q8jZRPKcwQ+VzDntEmidP8uD
         ySwtn6pNBNQz/Mk2p1uzb34Fvx6X0OeDkFhrcwOQrKDRIvWMuCDaD529kTnBt5iKQarZ
         +ik6wUw6g9J5C0LIRQFPEuow72z6fE6V2xRrp1DCvW7TjjcYovkJD8FfQgCauh5mh3ET
         DQHQ==
X-Gm-Message-State: AOAM533nqpZnV1SjMJYTPL0GV9Ctd7Pe3NkCNgmUTqNTg4Hn2XUc43t1
	tgEKvSVyflxx++7x54P/4JoB66L7BIxroQ==
X-Google-Smtp-Source: ABdhPJyTYRlbGUH7zTXlsSjL5YLyGmrirXvETLtbecYJl5fH6x1wLkESbK+ps959wYBHGBqZYbYJ2g==
X-Received: by 2002:a05:6402:434e:: with SMTP id n14mr4858060edc.378.1618590820050;
        Fri, 16 Apr 2021 09:33:40 -0700 (PDT)
From: Razvan Virtan <virtanrazvan@gmail.com>
X-Google-Original-From: Razvan Virtan <razvanvirtan@gmail.com>
To: justin.he@arm.com
Cc: minios-devel@lists.xen.org
Subject: Re: [RFCv4,09/35] plat/pci_ecam: Introduce pci ecam skeleton
Date: Fri, 16 Apr 2021 19:33:38 +0300
Message-Id: <20210416163338.12162-1-razvanvirtan@gmail.com>
X-Mailer: git-send-email 2.17.1
In-Reply-To: <20201223073857.118076-10-justin.he@arm.com>
References: <20201223073857.118076-10-justin.he@arm.com>

Hi, Justin.
Sorry for the first email on this patch, it was a mistake from my side.
There is no problem with this patch, we are all good.

Reviewed-by: Razvan Virtan <virtanrazvan@gmail.com>


From minios-devel-bounces@lists.xenproject.org Fri Apr 16 16:35:08 2021
Return-path: <minios-devel-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xenproject.org
Delivery-date: Fri, 16 Apr 2021 16:35:08 +0000
Received: from list by lists.xenproject.org with outflank-mailman.111921.214006 (Exim 4.92)
	(envelope-from <minios-devel-bounces@lists.xenproject.org>)
	id 1lXRQx-0004Oy-D2; Fri, 16 Apr 2021 16:35:07 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 111921.214006; Fri, 16 Apr 2021 16:35:07 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <minios-devel-bounces@lists.xenproject.org>)
	id 1lXRQx-0004Or-9p; Fri, 16 Apr 2021 16:35:07 +0000
Received: by outflank-mailman (input) for mailman id 111921;
 Fri, 16 Apr 2021 16:35:06 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=oWDl=JN=gmail.com=virtanrazvan@srs-us1.protection.inumbo.net>)
 id 1lXRQw-0004Om-Bi
 for minios-devel@lists.xen.org; Fri, 16 Apr 2021 16:35:06 +0000
Received: from mail-ed1-x529.google.com (unknown [2a00:1450:4864:20::529])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id 3bfa263b-f969-4ac6-8b90-85e7555543d8;
 Fri, 16 Apr 2021 16:35:05 +0000 (UTC)
Received: by mail-ed1-x529.google.com with SMTP id d21so12903411edv.9
 for <minios-devel@lists.xen.org>; Fri, 16 Apr 2021 09:35:05 -0700 (PDT)
Received: from razvan-Lenovo-Legion-Y530-15ICH.local
 ([2a02:2f08:c211:9400:d181:d70:c58c:654b])
 by smtp.gmail.com with ESMTPSA id n11sm5732255edo.15.2021.04.16.09.35.04
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Fri, 16 Apr 2021 09:35:04 -0700 (PDT)
X-BeenThere: minios-devel@lists.xenproject.org
List-Id: Mini-os development list <minios-devel.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/minios-devel>, 
 <mailto:minios-devel-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:minios-devel@lists.xenproject.org>
List-Help: <mailto:minios-devel-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/minios-devel>, 
 <mailto:minios-devel-request@lists.xenproject.org?subject=subscribe>
Errors-To: minios-devel-bounces@lists.xenproject.org
Precedence: list
Sender: "Minios-devel" <minios-devel-bounces@lists.xenproject.org>
X-Inumbo-ID: 3bfa263b-f969-4ac6-8b90-85e7555543d8
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20161025;
        h=from:to:cc:subject:date:message-id:in-reply-to:references;
        bh=tt2Rtwo2NI0ej69YMX4fzGZgiEjbTQMC42SyjubiP4w=;
        b=jK7FElZTWrdt1SMk/SUc3LZqrc0GWCSmiBJU8atnX5nAZ2XY3BYV2ueW9/Ez1Dm4Ms
         1ssIPpCQCQGkKEmdV3IKRIvxnnBsTopu48OU+9F+mFUkoDGw6OaSOjTAvQvrZpQkzqs1
         1ZHR484eTO/C7yIZfSbq72odX0C2VduwdFqdiy5bdF3nDPbJA54Xnrb1z9nEJ12tbizl
         q2juS0iIjeLHdCwwzXP/wLIdq9asyoCpoPvO9yIINQTDw5UaIJw+/jcBWs6W3ysFhk+W
         DAEOKuZ5pWDrcQo8PLTf8Uxv6xAMLFk2LyaJSeGCdemBBnl5WWatMQchxsUeN9LzCh2b
         jWiA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to
         :references;
        bh=tt2Rtwo2NI0ej69YMX4fzGZgiEjbTQMC42SyjubiP4w=;
        b=tjD4oTvbo9k2BDYOSH8dhCkeEZ31xtMBczvhDSupv3u2UniW9xN3fuIVI7y7vvXwjo
         6PtCPLdmA/RypliPdI476mdmx35aQljbXWlqFCiERDekE9wb662nmHjtJ1eMBJfB3sWd
         fY1Nza1IhvzF8nHdG5pFr/4Hw3pRMYDLKturqWjxs2+lDHd92As1OWe6J+/sZGOherCk
         KSkfkvQS0cFalHleXGp8+k/Go4+gFaK8W7tWNyX7sLNoUNCodw+5pQW11Or5dPDED097
         XJIPYSuI1b/T2uDnhU1BzkqdmggRNWGaOrEF0r0sVNMVbmPmq1KFrb67TuQn7hxx5gU1
         mB8Q==
X-Gm-Message-State: AOAM533nUHyRKoJI4tTCIONd2s4vWF56ZmXSSWi7vVnf5Ss4qxe6jueJ
	wPmRrSfbeSxKNaxFERfrt6PHkamo13DV1A==
X-Google-Smtp-Source: ABdhPJwYGMV1TUX8/71l+rISBfMvO1tqJgVtPQEeagcsGv1aE6tg8d6s4uhGL/Jd6RMSXW1vhFivFA==
X-Received: by 2002:aa7:da46:: with SMTP id w6mr11342388eds.30.1618590905054;
        Fri, 16 Apr 2021 09:35:05 -0700 (PDT)
From: Razvan Virtan <virtanrazvan@gmail.com>
X-Google-Original-From: Razvan Virtan <razvanvirtan@gmail.com>
To: justin.he@arm.com
Cc: minios-devel@lists.xen.org
Subject: Re: [RFCv4,21/35] plat/pci_bus: Change pci_device.base from u16 to unsigned long
Date: Fri, 16 Apr 2021 19:35:03 +0300
Message-Id: <20210416163503.12321-1-razvanvirtan@gmail.com>
X-Mailer: git-send-email 2.17.1
In-Reply-To: <20201223073857.118076-22-justin.he@arm.com>
References: <20201223073857.118076-22-justin.he@arm.com>

All good with this patch.

Reviewed-by: Razvan Virtan <virtanrazvan@gmail.com>


From minios-devel-bounces@lists.xenproject.org Mon Apr 19 10:04:48 2021
Return-path: <minios-devel-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xenproject.org
Delivery-date: Mon, 19 Apr 2021 10:04:48 +0000
Received: from list by lists.xenproject.org with outflank-mailman.112784.215070 (Exim 4.92)
	(envelope-from <minios-devel-bounces@lists.xenproject.org>)
	id 1lYQlo-00007q-I5; Mon, 19 Apr 2021 10:04:44 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 112784.215070; Mon, 19 Apr 2021 10:04:44 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <minios-devel-bounces@lists.xenproject.org>)
	id 1lYQlo-00007j-Ek; Mon, 19 Apr 2021 10:04:44 +0000
Received: by outflank-mailman (input) for mailman id 112784;
 Mon, 19 Apr 2021 10:04:42 +0000
Received: from all-amaz-eas1.inumbo.com ([34.197.232.57]
 helo=us1-amaz-eas2.inumbo.com)
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=dkgB=JQ=upb.ro=vlad_andrei.badoiu@srs-us1.protection.inumbo.net>)
 id 1lYQlm-00007e-32
 for minios-devel@lists.xen.org; Mon, 19 Apr 2021 10:04:42 +0000
Received: from mx.upb.ro (unknown [141.85.13.200])
 by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS
 id 5b6f9bb4-e331-441c-a314-ca30a938848e;
 Mon, 19 Apr 2021 10:04:40 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1])
 by mx.upb.ro (Postfix) with ESMTP id AFE71B5600A2;
 Mon, 19 Apr 2021 13:04:37 +0300 (EEST)
Received: from mx.upb.ro ([127.0.0.1])
 by localhost (mx.upb.ro [127.0.0.1]) (amavisd-new, port 10032)
 with ESMTP id 1PqhMCEx5lN9; Mon, 19 Apr 2021 13:04:35 +0300 (EEST)
Received: from localhost (localhost [127.0.0.1])
 by mx.upb.ro (Postfix) with ESMTP id C2F80B5600AD;
 Mon, 19 Apr 2021 13:04:35 +0300 (EEST)
Received: from mx.upb.ro ([127.0.0.1])
 by localhost (mx.upb.ro [127.0.0.1]) (amavisd-new, port 10026)
 with ESMTP id JYGwVSygBXVV; Mon, 19 Apr 2021 13:04:35 +0300 (EEST)
Received: from mx.upb.ro (localhost [127.0.0.1])
 by mx.upb.ro (Postfix) with ESMTP id A89CCB5600A2;
 Mon, 19 Apr 2021 13:04:35 +0300 (EEST)
X-BeenThere: minios-devel@lists.xenproject.org
List-Id: Mini-os development list <minios-devel.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/minios-devel>, 
 <mailto:minios-devel-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:minios-devel@lists.xenproject.org>
List-Help: <mailto:minios-devel-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/minios-devel>, 
 <mailto:minios-devel-request@lists.xenproject.org?subject=subscribe>
Errors-To: minios-devel-bounces@lists.xenproject.org
Precedence: list
Sender: "Minios-devel" <minios-devel-bounces@lists.xenproject.org>
X-Inumbo-ID: 5b6f9bb4-e331-441c-a314-ca30a938848e
DKIM-Filter: OpenDKIM Filter v2.10.3 mx.upb.ro C2F80B5600AD
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=upb.ro;
	s=96342B8A-77E4-11E5-BA93-D93D0963A2DF; t=1618826675;
	bh=f+GjiRv3I241k3xygjS5D/FVMAQfTJlabtxIQ0OuI/A=;
	h=Date:From:To:Message-ID:MIME-Version;
	b=rAX4mH0wjeOZsyrgr3C5SV9RlaR1DqJN7mKTjHwYuL06YSRG1F+KxDY/y2LPDuYgi
	 u5M1AmeB4sUgYoGVXcHeAMGPMnJlJc/AVG/Q5c2YvJa++i+7dM0rPpLYy5uTXwNcnc
	 oR1w3bUtfX/KDLfQJijySK2PMGaD4R6roJNWePZ0=
X-Virus-Scanned: amavisd-new at upb.ro
Date: Mon, 19 Apr 2021 13:04:35 +0300 (EEST)
From: Vlad-Andrei =?utf-8?Q?B=C4=82DOIU?= <vlad_andrei.badoiu@upb.ro>
To: Simon Kuenzer <simon.kuenzer@neclab.eu>
Cc: minios-devel <minios-devel@lists.xen.org>
Message-ID: <1835740745.11948987.1618826675539.JavaMail.zimbra@upb.ro>
In-Reply-To: <20201218180924.27217-2-simon.kuenzer@neclab.eu>
References: <20201218180924.27217-1-simon.kuenzer@neclab.eu> <20201218180924.27217-2-simon.kuenzer@neclab.eu>
Subject: Re: [UNIKRAFT PATCH 1/7] build: Enable extending pre-processing
 rules
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
X-Mailer: Zimbra 8.8.15_GA_3991 (ZimbraWebClient - FF87 (Linux)/8.8.15_GA_3980)
Thread-Topic: build: Enable extending pre-processing rules
Thread-Index: nK6jPE11HkBIyZ3iYX8j9NjTRCOR8g==

Hi Simon,

Thank you for the patch. It works alright.

Reviewed-by: Vlad-Andrei Badoiu <vlad_andrei.badoiu@upb.ro>

----- Original Message -----
From: "Simon Kuenzer" <simon.kuenzer@neclab.eu>
To: "minios-devel" <minios-devel@lists.xen.org>
Cc: "Simon Kuenzer" <simon.kuenzer@neclab.eu>
Sent: Friday, December 18, 2020 8:09:18 PM
Subject: [UNIKRAFT PATCH 1/7] build: Enable extending pre-processing rules

Similar to build rules, we enable extending the supported pre-process
rules. This can be achieved by specifying a pre-process rule definition
within a libraries' `Makefule.rules` with the following name scheme:

preprule_<source file extension>

Examples:
 preprule_m4 for *.m4 source files
 preprule_awk for *.awk source files

Signed-off-by: Simon Kuenzer <simon.kuenzer@neclab.eu>
---
 support/build/Makefile.rules | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/support/build/Makefile.rules b/support/build/Makefile.rules
index 9a5963fd..82d8fd7c 100644
--- a/support/build/Makefile.rules
+++ b/support/build/Makefile.rules
@@ -634,12 +634,14 @@ endef
 
 # wrapper for preprule_*,
 # selects appropriate pre-process rule depending on file extension
+# if there is no such pre-process rule available, we throw an error.
 #
 # preprule $libname,$source,$preptarget,$extraflags(optional)
 define preprule =
-$(if $(filter %.m4   ,$(2)),$(call preprule_m4 ,$(1),$(2),$(3),$(4)),\
-$(error $(3): missing pre-processing rule for source type $(suffix $(2))) \
-)
+$(if $(filter preprule_$(call fileext,$(strip $(2))),$(.VARIABLES)),,\
+$(error preprule_$(call fileext,$(strip $(2))) is not defined: Failed to install rule for $(2)))
+
+$(call preprule_$(call fileext,$(strip $(2))),$(strip $(1)),$(strip $(2)),$(strip $(3)),$(strip $(4)),$(strip $(5)))
 endef
 
 
-- 
2.20.1


From minios-devel-bounces@lists.xenproject.org Mon Apr 19 10:05:09 2021
Return-path: <minios-devel-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xenproject.org
Delivery-date: Mon, 19 Apr 2021 10:05:09 +0000
Received: from list by lists.xenproject.org with outflank-mailman.112789.215073 (Exim 4.92)
	(envelope-from <minios-devel-bounces@lists.xenproject.org>)
	id 1lYQmD-0000CW-KL; Mon, 19 Apr 2021 10:05:09 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 112789.215073; Mon, 19 Apr 2021 10:05:09 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <minios-devel-bounces@lists.xenproject.org>)
	id 1lYQmD-0000CP-HT; Mon, 19 Apr 2021 10:05:09 +0000
Received: by outflank-mailman (input) for mailman id 112789;
 Mon, 19 Apr 2021 10:05:07 +0000
Received: from all-amaz-eas1.inumbo.com ([34.197.232.57]
 helo=us1-amaz-eas2.inumbo.com)
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=dkgB=JQ=upb.ro=vlad_andrei.badoiu@srs-us1.protection.inumbo.net>)
 id 1lYQmB-0000CK-TF
 for minios-devel@lists.xen.org; Mon, 19 Apr 2021 10:05:07 +0000
Received: from mx.upb.ro (unknown [141.85.13.200])
 by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS
 id 22c32751-4dd7-4cc3-b5f0-bc87f065dd01;
 Mon, 19 Apr 2021 10:05:07 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1])
 by mx.upb.ro (Postfix) with ESMTP id 79C06B5600B6;
 Mon, 19 Apr 2021 13:05:06 +0300 (EEST)
Received: from mx.upb.ro ([127.0.0.1])
 by localhost (mx.upb.ro [127.0.0.1]) (amavisd-new, port 10032)
 with ESMTP id jvYBk0iOEV74; Mon, 19 Apr 2021 13:05:04 +0300 (EEST)
Received: from localhost (localhost [127.0.0.1])
 by mx.upb.ro (Postfix) with ESMTP id 6813BB5600B3;
 Mon, 19 Apr 2021 13:05:04 +0300 (EEST)
Received: from mx.upb.ro ([127.0.0.1])
 by localhost (mx.upb.ro [127.0.0.1]) (amavisd-new, port 10026)
 with ESMTP id 398an_g2cVdY; Mon, 19 Apr 2021 13:05:04 +0300 (EEST)
Received: from mx.upb.ro (mx.upb.ro [141.85.13.5])
 by mx.upb.ro (Postfix) with ESMTP id 47D6BB560099;
 Mon, 19 Apr 2021 13:05:04 +0300 (EEST)
X-BeenThere: minios-devel@lists.xenproject.org
List-Id: Mini-os development list <minios-devel.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/minios-devel>, 
 <mailto:minios-devel-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:minios-devel@lists.xenproject.org>
List-Help: <mailto:minios-devel-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/minios-devel>, 
 <mailto:minios-devel-request@lists.xenproject.org?subject=subscribe>
Errors-To: minios-devel-bounces@lists.xenproject.org
Precedence: list
Sender: "Minios-devel" <minios-devel-bounces@lists.xenproject.org>
X-Inumbo-ID: 22c32751-4dd7-4cc3-b5f0-bc87f065dd01
DKIM-Filter: OpenDKIM Filter v2.10.3 mx.upb.ro 6813BB5600B3
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=upb.ro;
	s=96342B8A-77E4-11E5-BA93-D93D0963A2DF; t=1618826704;
	bh=voiaNKV0M0NtYWt/R2t5YYj6+GUuXagFYZjMQAW6/t0=;
	h=Date:From:To:Message-ID:MIME-Version;
	b=Uk+sxPV+cidnh3j7lLqrOxcZT75kWtMoALl6hCQK/BTw1WYQRhtnSYIPBTnjHYV+H
	 zpE8dXSl5tDJ+VAlVoqIQ6RSIyYDOVMU2WlZkB9PK1eLO1HqwzRF5yfTt+a8DfUiw5
	 mgOrXMpD3K8FZPOkwS3fSNRxupe458eLFm1lcTQc=
X-Virus-Scanned: amavisd-new at upb.ro
Date: Mon, 19 Apr 2021 13:05:04 +0300 (EEST)
From: Vlad-Andrei =?utf-8?Q?B=C4=82DOIU?= <vlad_andrei.badoiu@upb.ro>
To: Simon Kuenzer <simon.kuenzer@neclab.eu>
Cc: minios-devel <minios-devel@lists.xen.org>
Message-ID: <259996553.11949104.1618826704240.JavaMail.zimbra@upb.ro>
In-Reply-To: <20201218180924.27217-3-simon.kuenzer@neclab.eu>
References: <20201218180924.27217-1-simon.kuenzer@neclab.eu> <20201218180924.27217-3-simon.kuenzer@neclab.eu>
Subject: Re: [UNIKRAFT PATCH 2/7] build: Use secondary expansion for M4
 pre-processing
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
X-Mailer: Zimbra 8.8.15_GA_3991 (ZimbraWebClient - FF87 (Linux)/8.8.15_GA_3980)
Thread-Topic: build: Use secondary expansion for M4 pre-processing
Thread-Index: UWFc5GOpIZZc0GT+8OhfnEyTMrOqmw==

Reviewed-by: Vlad-Andrei Badoiu <vlad_andrei.badoiu@upb.ro>

----- Original Message -----
From: "Simon Kuenzer" <simon.kuenzer@neclab.eu>
To: "minios-devel" <minios-devel@lists.xen.org>
Cc: "Simon Kuenzer" <simon.kuenzer@neclab.eu>
Sent: Friday, December 18, 2020 8:09:19 PM
Subject: [UNIKRAFT PATCH 2/7] build: Use secondary expansion for M4 pre-processing

Similar to our build rules, we enable secondary expansion of
flags and includes to M4 pre-processing rules.

Signed-off-by: Simon Kuenzer <simon.kuenzer@neclab.eu>
---
 support/build/Makefile.rules | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/support/build/Makefile.rules b/support/build/Makefile.rules
index 82d8fd7c..44701cd2 100644
--- a/support/build/Makefile.rules
+++ b/support/build/Makefile.rules
@@ -620,10 +620,10 @@ endef
 define preprule_m4 =
 $(3): $(2) | prepare
 	$(call build_cmd,M4,$(1),$(3),\
-		$(M4)  $(M4INCLUDES) $(M4INCLUDES-y) \
-		       $($(call vprefix_lib,$(1),M4INCLUDES)) $($(call vprefix_lib,$(1),M4INCLUDES-y)) \
-		       $(M4FLAGS) $(M4FLAGS-y) \
-		       $($(call vprefix_lib,$(1),M4FLAGS)) $($(call vprefix_lib,$(1),M4FLAGS-y)) \
+		$(M4)  $$(M4INCLUDES) $$(M4INCLUDES-y) \
+		       $$($(call vprefix_lib,$(1),M4INCLUDES)) $$($(call vprefix_lib,$(1),M4INCLUDES-y)) \
+		       $$(M4FLAGS) $$(M4FLAGS-y) \
+		       $$($(call vprefix_lib,$(1),M4FLAGS)) $$($(call vprefix_lib,$(1),M4FLAGS-y)) \
 		       $(4) \
 		       $(2) > $(3)
 	)
-- 
2.20.1


From minios-devel-bounces@lists.xenproject.org Mon Apr 19 10:05:29 2021
Return-path: <minios-devel-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xenproject.org
Delivery-date: Mon, 19 Apr 2021 10:05:29 +0000
Received: from list by lists.xenproject.org with outflank-mailman.112791.215078 (Exim 4.92)
	(envelope-from <minios-devel-bounces@lists.xenproject.org>)
	id 1lYQmX-0000E8-NA; Mon, 19 Apr 2021 10:05:29 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 112791.215078; Mon, 19 Apr 2021 10:05:29 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <minios-devel-bounces@lists.xenproject.org>)
	id 1lYQmX-0000E0-JY; Mon, 19 Apr 2021 10:05:29 +0000
Received: by outflank-mailman (input) for mailman id 112791;
 Mon, 19 Apr 2021 10:05:28 +0000
Received: from all-amaz-eas1.inumbo.com ([34.197.232.57]
 helo=us1-amaz-eas2.inumbo.com)
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=dkgB=JQ=upb.ro=vlad_andrei.badoiu@srs-us1.protection.inumbo.net>)
 id 1lYQmW-0000Dt-BD
 for minios-devel@lists.xen.org; Mon, 19 Apr 2021 10:05:28 +0000
Received: from mx.upb.ro (unknown [141.85.13.5])
 by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS
 id 1435bd5f-00dc-4797-b541-5dfa9fb48860;
 Mon, 19 Apr 2021 10:05:27 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1])
 by mx.upb.ro (Postfix) with ESMTP id 63B59B560099;
 Mon, 19 Apr 2021 13:05:26 +0300 (EEST)
Received: from mx.upb.ro ([127.0.0.1])
 by localhost (mx.upb.ro [127.0.0.1]) (amavisd-new, port 10032)
 with ESMTP id QpNKBlhCQD_3; Mon, 19 Apr 2021 13:05:24 +0300 (EEST)
Received: from localhost (localhost [127.0.0.1])
 by mx.upb.ro (Postfix) with ESMTP id 5507CB5600AD;
 Mon, 19 Apr 2021 13:05:24 +0300 (EEST)
Received: from mx.upb.ro ([127.0.0.1])
 by localhost (mx.upb.ro [127.0.0.1]) (amavisd-new, port 10026)
 with ESMTP id FmNIp4K1mulm; Mon, 19 Apr 2021 13:05:24 +0300 (EEST)
Received: from mx.upb.ro (mx.upb.ro [141.85.13.5])
 by mx.upb.ro (Postfix) with ESMTP id 3A2BAB560099;
 Mon, 19 Apr 2021 13:05:24 +0300 (EEST)
X-BeenThere: minios-devel@lists.xenproject.org
List-Id: Mini-os development list <minios-devel.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/minios-devel>, 
 <mailto:minios-devel-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:minios-devel@lists.xenproject.org>
List-Help: <mailto:minios-devel-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/minios-devel>, 
 <mailto:minios-devel-request@lists.xenproject.org?subject=subscribe>
Errors-To: minios-devel-bounces@lists.xenproject.org
Precedence: list
Sender: "Minios-devel" <minios-devel-bounces@lists.xenproject.org>
X-Inumbo-ID: 1435bd5f-00dc-4797-b541-5dfa9fb48860
DKIM-Filter: OpenDKIM Filter v2.10.3 mx.upb.ro 5507CB5600AD
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=upb.ro;
	s=96342B8A-77E4-11E5-BA93-D93D0963A2DF; t=1618826724;
	bh=c7Eu0Wmlwln10/5lhHQPlb8/yOuBj5QA0Iu90wlpFK4=;
	h=Date:From:To:Message-ID:MIME-Version;
	b=JbAYSBD1ezIhMsKvZ5ysCojxPeNAWg4eTZrNImbGTp0w/SQcW/mvzPbKNNn05GLDS
	 EbxUeYG0+wkhPq7yxnXjNim7+MgADzt4gSoVVSV7hbGvFNri3eJ/boufDR7dliP/gy
	 5v4fO0QqRMzw1/IBU4GrpOpNYkuVyhxYpp1GAZ1g=
X-Virus-Scanned: amavisd-new at upb.ro
Date: Mon, 19 Apr 2021 13:05:24 +0300 (EEST)
From: Vlad-Andrei =?utf-8?Q?B=C4=82DOIU?= <vlad_andrei.badoiu@upb.ro>
To: Simon Kuenzer <simon.kuenzer@neclab.eu>
Cc: minios-devel <minios-devel@lists.xen.org>
Message-ID: <1525740821.11949179.1618826724197.JavaMail.zimbra@upb.ro>
In-Reply-To: <20201218180924.27217-4-simon.kuenzer@neclab.eu>
References: <20201218180924.27217-1-simon.kuenzer@neclab.eu> <20201218180924.27217-4-simon.kuenzer@neclab.eu>
Subject: Re: [UNIKRAFT PATCH 3/7] build: Per-file flags and includes for M4
 pre-processing
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
X-Mailer: Zimbra 8.8.15_GA_3991 (ZimbraWebClient - FF87 (Linux)/8.8.15_GA_3980)
Thread-Topic: build: Per-file flags and includes for M4 pre-processing
Thread-Index: i3RcaWSYTuqinUuIYmCxWxDW1r2DPA==

Thanks!

Reviewed-by: Vlad-Andrei Badoiu <vlad_andrei.badoiu@upb.ro>

----- Original Message -----
From: "Simon Kuenzer" <simon.kuenzer@neclab.eu>
To: "minios-devel" <minios-devel@lists.xen.org>
Cc: "Simon Kuenzer" <simon.kuenzer@neclab.eu>
Sent: Friday, December 18, 2020 8:09:20 PM
Subject: [UNIKRAFT PATCH 3/7] build: Per-file flags and includes for M4 pre-processing

Similar to build rules, we add support for specifying file-local
flags and includes to M4 pre-processing rules. This can be done
through the following variables:
 <LIBNAME>_<SOURCE NAME>_M4FLAGS
 <LIBNAME>_<SOURCE NAME>_M4INCLUDES

Example: Setting `-myflag` to the M4 pre-processing of `code.m4`:
 LIBMYLIB_SRCS += $(LIBMYLIB_BASE)/code.m4>.c
 LIBMYLIB_CODE_M4FLAGS += -myflag

Signed-off-by: Simon Kuenzer <simon.kuenzer@neclab.eu>
---
 support/build/Makefile.rules | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/support/build/Makefile.rules b/support/build/Makefile.rules
index 44701cd2..6a8c2099 100644
--- a/support/build/Makefile.rules
+++ b/support/build/Makefile.rules
@@ -622,8 +622,10 @@ $(3): $(2) | prepare
 	$(call build_cmd,M4,$(1),$(3),\
 		$(M4)  $$(M4INCLUDES) $$(M4INCLUDES-y) \
 		       $$($(call vprefix_lib,$(1),M4INCLUDES)) $$($(call vprefix_lib,$(1),M4INCLUDES-y)) \
+		       $$($(call vprefix_src,$(1),$(2),,M4INCLUDES)) $$($(call vprefix_src,$(1),$(2),,M4INCLUDES-y)) \
 		       $$(M4FLAGS) $$(M4FLAGS-y) \
 		       $$($(call vprefix_lib,$(1),M4FLAGS)) $$($(call vprefix_lib,$(1),M4FLAGS-y)) \
+		       $$($(call vprefix_src,$(1),$(2),,M4FLAGS)) $$($(call vprefix_src,$(1),$(2),,M4FLAGS-y)) \
 		       $(4) \
 		       $(2) > $(3)
 	)
-- 
2.20.1


From minios-devel-bounces@lists.xenproject.org Mon Apr 19 10:05:59 2021
Return-path: <minios-devel-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xenproject.org
Delivery-date: Mon, 19 Apr 2021 10:05:59 +0000
Received: from list by lists.xenproject.org with outflank-mailman.112792.215082 (Exim 4.92)
	(envelope-from <minios-devel-bounces@lists.xenproject.org>)
	id 1lYQn0-0000Fj-Py; Mon, 19 Apr 2021 10:05:58 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 112792.215082; Mon, 19 Apr 2021 10:05:58 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <minios-devel-bounces@lists.xenproject.org>)
	id 1lYQn0-0000Fc-MX; Mon, 19 Apr 2021 10:05:58 +0000
Received: by outflank-mailman (input) for mailman id 112792;
 Mon, 19 Apr 2021 10:05:57 +0000
Received: from all-amaz-eas1.inumbo.com ([34.197.232.57]
 helo=us1-amaz-eas2.inumbo.com)
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=dkgB=JQ=upb.ro=vlad_andrei.badoiu@srs-us1.protection.inumbo.net>)
 id 1lYQmz-0000FX-4y
 for minios-devel@lists.xen.org; Mon, 19 Apr 2021 10:05:57 +0000
Received: from mx.upb.ro (unknown [141.85.13.200])
 by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS
 id 80435bef-94f9-4a16-be17-b1d87c1d33da;
 Mon, 19 Apr 2021 10:05:56 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1])
 by mx.upb.ro (Postfix) with ESMTP id 8B7FAB5600AE;
 Mon, 19 Apr 2021 13:05:55 +0300 (EEST)
Received: from mx.upb.ro ([127.0.0.1])
 by localhost (mx.upb.ro [127.0.0.1]) (amavisd-new, port 10032)
 with ESMTP id yY1Sgh8dp2w6; Mon, 19 Apr 2021 13:05:53 +0300 (EEST)
Received: from localhost (localhost [127.0.0.1])
 by mx.upb.ro (Postfix) with ESMTP id 7E8A1B5600B2;
 Mon, 19 Apr 2021 13:05:53 +0300 (EEST)
Received: from mx.upb.ro ([127.0.0.1])
 by localhost (mx.upb.ro [127.0.0.1]) (amavisd-new, port 10026)
 with ESMTP id TYO7kz9MkC87; Mon, 19 Apr 2021 13:05:53 +0300 (EEST)
Received: from mx.upb.ro (mx.upb.ro [141.85.13.5])
 by mx.upb.ro (Postfix) with ESMTP id 5D1E8B5600AD;
 Mon, 19 Apr 2021 13:05:53 +0300 (EEST)
X-BeenThere: minios-devel@lists.xenproject.org
List-Id: Mini-os development list <minios-devel.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/minios-devel>, 
 <mailto:minios-devel-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:minios-devel@lists.xenproject.org>
List-Help: <mailto:minios-devel-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/minios-devel>, 
 <mailto:minios-devel-request@lists.xenproject.org?subject=subscribe>
Errors-To: minios-devel-bounces@lists.xenproject.org
Precedence: list
Sender: "Minios-devel" <minios-devel-bounces@lists.xenproject.org>
X-Inumbo-ID: 80435bef-94f9-4a16-be17-b1d87c1d33da
DKIM-Filter: OpenDKIM Filter v2.10.3 mx.upb.ro 7E8A1B5600B2
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=upb.ro;
	s=96342B8A-77E4-11E5-BA93-D93D0963A2DF; t=1618826753;
	bh=MUXajaozoJ5kovWP9gVMlqnYw+MO8dfEyuXcSWPeP38=;
	h=Date:From:To:Message-ID:MIME-Version;
	b=MNz30ZFREzViUJccKMDAWZTWxNOo7jjnu9MSNO1u+WobwRQYRbRCucD9uNtD0aApJ
	 LoObf6bB5M2E/QBjUSHGsvyWbluNxgE6KLqsv50CvSBES9meOku3pNXjYaG9fiUOs0
	 tHjeiV1xfpt41FdoUne0/Kp6BQP6UVDRJ7Quibfo=
X-Virus-Scanned: amavisd-new at upb.ro
Date: Mon, 19 Apr 2021 13:05:53 +0300 (EEST)
From: Vlad-Andrei =?utf-8?Q?B=C4=82DOIU?= <vlad_andrei.badoiu@upb.ro>
To: Simon Kuenzer <simon.kuenzer@neclab.eu>
Cc: minios-devel <minios-devel@lists.xen.org>
Message-ID: <78070902.11949319.1618826753339.JavaMail.zimbra@upb.ro>
In-Reply-To: <20201218180924.27217-5-simon.kuenzer@neclab.eu>
References: <20201218180924.27217-1-simon.kuenzer@neclab.eu> <20201218180924.27217-5-simon.kuenzer@neclab.eu>
Subject: Re: [UNIKRAFT PATCH 4/7] build: Pre-processing rule for AWK
 progfiles
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
X-Mailer: Zimbra 8.8.15_GA_3991 (ZimbraWebClient - FF87 (Linux)/8.8.15_GA_3980)
Thread-Topic: build: Pre-processing rule for AWK progfiles
Thread-Index: xWtImWh53SnMAr2IdDTU/Bp11WJc7g==

Reviewed-by: Vlad-Andrei Badoiu <vlad_andrei.badoiu@upb.ro>

----- Original Message -----
From: "Simon Kuenzer" <simon.kuenzer@neclab.eu>
To: "minios-devel" <minios-devel@lists.xen.org>
Cc: "Simon Kuenzer" <simon.kuenzer@neclab.eu>
Sent: Friday, December 18, 2020 8:09:21 PM
Subject: [UNIKRAFT PATCH 4/7] build: Pre-processing rule for AWK progfiles

Introduces an AWK pre-processing rule as another way for generating source
files based on AWK progfiles. One intention of this is to simplify
`Makefile.uk` of `lib/syscall_shim`.
The source file is treated as the AWK progfile which will be executed over
given includes (`AWKINCLUDES[-y]`). Because global flags and includes
would not be meaningful for AWK rules, we support only library-local and
file-local scopes.

Example of compiling `uk_syscall6.o` from `uk_syscall6.awk`
in `lib/syscall_shim`:
 LIBSYSCALL_SHIM_SRCS += $(LIBSYSCALL_SHIM_BASE)/gen_uk_syscall6.awk>.c
 LIBSYSCALL_SHIM_GEN_UK_SYSCALL6_AWKFLAGS    += -F '-'
 LIBSYSCALL_SHIM_GEN_UK_SYSCALL6_AWKINCLUDES += $(LIBSYSCALL_SHIM_BUILD)/provided_syscalls.h.in

Signed-off-by: Simon Kuenzer <simon.kuenzer@neclab.eu>
---
 support/build/Makefile.rules | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/support/build/Makefile.rules b/support/build/Makefile.rules
index 6a8c2099..e1c078c3 100644
--- a/support/build/Makefile.rules
+++ b/support/build/Makefile.rules
@@ -634,6 +634,30 @@ UK_SRCS-y += $(2)
 $(eval $(call vprefix_lib,$(1),CLEAN-y) += $(call build_clean,$(3)))
 endef
 
+# Pre-processing rule for awk progs
+# NOTES:
+#  $source is the awk progfile and AWKINCLUDES specify the input files to
+#  process. There are no global scopes for AWKINCLUDES and AWKFLAGS available
+#  because it would not be meaningful.
+define preprule_awk =
+$(3): $(2) \
+      $$($(call vprefix_lib,$(1),AWKINCLUDES)) $$($(call vprefix_lib,$(1),AWKINCLUDES-y)) \
+      $$($(call vprefix_src,$(1),$(2),,AWKINCLUDES)) $$($(call vprefix_src,$(1),$(2),,AWKINCLUDES-y)) \
+      | prepare
+	$(call build_cmd,AWK,$(1),$(3),\
+		$(AWK) -f $(2) \
+		       $$($(call vprefix_lib,$(1),AWKFLAGS)) $$($(call vprefix_lib,$(1),AWKFLAGS-y)) \
+		       $$($(call vprefix_src,$(1),$(2),,AWKFLAGS)) $$($(call vprefix_src,$(1),$(2),,AWKFLAGS-y)) \
+		       $(4) \
+		       $$($(call vprefix_lib,$(1),AWKINCLUDES)) $$($(call vprefix_lib,$(1),AWKINCLUDES-y)) \
+		       $$($(call vprefix_src,$(1),$(2),,AWKINCLUDES)) $$($(call vprefix_src,$(1),$(2),,AWKINCLUDES-y)) \
+		       > $(3)
+	)
+
+UK_SRCS-y += $(2)
+$(eval $(call vprefix_lib,$(1),CLEAN-y) += $(call build_clean,$(3)))
+endef
+
 # wrapper for preprule_*,
 # selects appropriate pre-process rule depending on file extension
 # if there is no such pre-process rule available, we throw an error.
-- 
2.20.1


From minios-devel-bounces@lists.xenproject.org Mon Apr 19 10:12:38 2021
Return-path: <minios-devel-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xenproject.org
Delivery-date: Mon, 19 Apr 2021 10:12:38 +0000
Received: from list by lists.xenproject.org with outflank-mailman.112793.215085 (Exim 4.92)
	(envelope-from <minios-devel-bounces@lists.xenproject.org>)
	id 1lYQtR-00013g-Aw; Mon, 19 Apr 2021 10:12:37 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 112793.215085; Mon, 19 Apr 2021 10:12:37 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <minios-devel-bounces@lists.xenproject.org>)
	id 1lYQtR-00013Z-7D; Mon, 19 Apr 2021 10:12:37 +0000
Received: by outflank-mailman (input) for mailman id 112793;
 Mon, 19 Apr 2021 10:12:35 +0000
Received: from all-amaz-eas1.inumbo.com ([34.197.232.57]
 helo=us1-amaz-eas2.inumbo.com)
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=dkgB=JQ=upb.ro=vlad_andrei.badoiu@srs-us1.protection.inumbo.net>)
 id 1lYQtP-00012j-JY
 for minios-devel@lists.xen.org; Mon, 19 Apr 2021 10:12:35 +0000
Received: from mx.upb.ro (unknown [141.85.13.210])
 by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS
 id f4cc983e-f167-4d29-83df-87b0efd13e26;
 Mon, 19 Apr 2021 10:12:33 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1])
 by mx.upb.ro (Postfix) with ESMTP id AF88CB5600A6;
 Mon, 19 Apr 2021 13:12:32 +0300 (EEST)
Received: from mx.upb.ro ([127.0.0.1])
 by localhost (mx.upb.ro [127.0.0.1]) (amavisd-new, port 10032)
 with ESMTP id uO4fOqdUR2T5; Mon, 19 Apr 2021 13:12:30 +0300 (EEST)
Received: from localhost (localhost [127.0.0.1])
 by mx.upb.ro (Postfix) with ESMTP id 33C6AB5600AD;
 Mon, 19 Apr 2021 13:12:30 +0300 (EEST)
Received: from mx.upb.ro ([127.0.0.1])
 by localhost (mx.upb.ro [127.0.0.1]) (amavisd-new, port 10026)
 with ESMTP id Cs0EsB9vjM17; Mon, 19 Apr 2021 13:12:30 +0300 (EEST)
Received: from mx.upb.ro (mx.upb.ro [141.85.13.5])
 by mx.upb.ro (Postfix) with ESMTP id 1369FB5600A6;
 Mon, 19 Apr 2021 13:12:30 +0300 (EEST)
X-BeenThere: minios-devel@lists.xenproject.org
List-Id: Mini-os development list <minios-devel.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/minios-devel>, 
 <mailto:minios-devel-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:minios-devel@lists.xenproject.org>
List-Help: <mailto:minios-devel-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/minios-devel>, 
 <mailto:minios-devel-request@lists.xenproject.org?subject=subscribe>
Errors-To: minios-devel-bounces@lists.xenproject.org
Precedence: list
Sender: "Minios-devel" <minios-devel-bounces@lists.xenproject.org>
X-Inumbo-ID: f4cc983e-f167-4d29-83df-87b0efd13e26
DKIM-Filter: OpenDKIM Filter v2.10.3 mx.upb.ro 33C6AB5600AD
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=upb.ro;
	s=96342B8A-77E4-11E5-BA93-D93D0963A2DF; t=1618827150;
	bh=MGdaxCUyJQzlFFdm4E7aUYe1pNr4n8Y0pA+ofGH/YYo=;
	h=Date:From:To:Message-ID:MIME-Version;
	b=Jwi2nfvxg5QtUHu0E2lKbd/5Lrf8lJ9H2ljEkLTQz/HPFZl6Ht3zGOhKR8nzUZJ/Q
	 kYCk9mXEGuPMVY6Jw0TYD3XteHqxGWXWGmEbf8IFQnoaFW4acj/6MPiaFmE2Q0IsdE
	 DQQ/CdVrabyYAOkHWfBuo4v0LWeVX0We+D4iDuqY=
X-Virus-Scanned: amavisd-new at upb.ro
Date: Mon, 19 Apr 2021 13:12:30 +0300 (EEST)
From: Vlad-Andrei =?utf-8?Q?B=C4=82DOIU?= <vlad_andrei.badoiu@upb.ro>
To: Simon Kuenzer <simon.kuenzer@neclab.eu>
Cc: minios-devel <minios-devel@lists.xen.org>
Message-ID: <9952974.11951245.1618827150042.JavaMail.zimbra@upb.ro>
In-Reply-To: <20201218180924.27217-6-simon.kuenzer@neclab.eu>
References: <20201218180924.27217-1-simon.kuenzer@neclab.eu> <20201218180924.27217-6-simon.kuenzer@neclab.eu>
Subject: Re: [UNIKRAFT PATCH 5/7] build: Introduce pre-processing build
 stage (`preprocess`)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
X-Mailer: Zimbra 8.8.15_GA_3991 (ZimbraWebClient - FF87 (Linux)/8.8.15_GA_3980)
Thread-Topic: build: Introduce pre-processing build stage (`preprocess`)
Thread-Index: CkxCKYFSYn0emHCkxmRMgoD442i+1Q==

Hi Simon,

Thanks! One note for the future is ukconfig which is a dep for both preprocess
and prepare.

Reviewed-by: Vlad-Andrei Badoiu <vlad_andrei.badoiu@upb.ro>

----- Original Message -----
From: "Simon Kuenzer" <simon.kuenzer@neclab.eu>
To: "minios-devel" <minios-devel@lists.xen.org>
Cc: "Simon Kuenzer" <simon.kuenzer@neclab.eu>
Sent: Friday, December 18, 2020 8:09:22 PM
Subject: [UNIKRAFT PATCH 5/7] build: Introduce pre-processing build stage (`preprocess`)

Introduces the pre-process build stage which is executed after
`prepare` and before compiling object files. This is done in
order to let header files be generated later.

Signed-off-by: Simon Kuenzer <simon.kuenzer@neclab.eu>
---
 Makefile                     |  9 ++++++++-
 support/build/Makefile.rules | 18 ++++++++++--------
 2 files changed, 18 insertions(+), 9 deletions(-)

diff --git a/Makefile b/Makefile
index 76145d27..63e42067 100644
--- a/Makefile
+++ b/Makefile
@@ -278,6 +278,8 @@ UK_FETCH:=
 UK_FETCH-y:=
 UK_PREPARE:=
 UK_PREPARE-y:=
+UK_PREPROCESS:=
+UK_PREPROCESS-y:=
 UK_PLATS:=
 UK_PLATS-y:=
 UK_LIBS:=
@@ -652,7 +654,7 @@ endif
 # include Makefile for platform linking (`Linker.uk`)
 $(foreach plat,$(UK_PLATS),$(eval $(call _import_linker,$(plat))))
 
-.PHONY: prepare image libs objs clean
+.PHONY: prepare preprocess image libs objs clean
 
 fetch: $(UK_FETCH) $(UK_FETCH-y)
 
@@ -665,6 +667,8 @@ $(UK_CONFIG_OUT): $(UK_CONFIG)
 prepare: $(KCONFIG_AUTOHEADER) $(UK_CONFIG_OUT) $(UK_PREPARE) $(UK_PREPARE-y)
 prepare: $(UK_FIXDEP) | fetch
 
+preprocess: $(UK_PREPROCESS) $(UK_PREPROCESS-y) | prepare
+
 objs: $(UK_OBJS) $(UK_OBJS-y)
 
 libs: $(UK_ALIBS) $(UK_ALIBS-y) $(UK_OLIBS) $(UK_OLIBS-y)
@@ -719,6 +723,8 @@ fetch: ukconfig
 
 prepare: ukconfig
 
+preprocess: ukconfig
+
 objs: ukconfig
 
 libs: ukconfig
@@ -991,6 +997,7 @@ help:
 	@echo '  libs                   - build libraries and objects'
 	@echo '  [LIBNAME]              - build a single library'
 	@echo '  objs                   - build objects only'
+	@echo '  preprocess             - run preprocessing steps'
 	@echo '  prepare                - run preparation steps'
 	@echo '  fetch                  - fetch, extract, and patch remote code'
 	@echo ''
diff --git a/support/build/Makefile.rules b/support/build/Makefile.rules
index e1c078c3..1797d134 100644
--- a/support/build/Makefile.rules
+++ b/support/build/Makefile.rules
@@ -390,7 +390,7 @@ endef
 # buildrule_* $libname,$source,$variant,$target,$extraflags
 
 define buildrule_S_ =
-$(4): $(2) | prepare
+$(4): $(2) | preprocess
 	$(call build_cmd_fixdep,AS,$(1),$(4),\
 		$(AS)  $$(COMPFLAGS) $$(COMPFLAGS-y) \
 		       $$($(call vprefix_lib,$(1),COMPFLAGS)) $$($(call vprefix_lib,$(1),COMPFLAGS-y)) \
@@ -417,7 +417,7 @@ endef
 buildrule_sx = $(call buildrule_S_,$(1),$(2),$(3),$(4))
 
 define buildrule_s =
-$(4): $(2) | prepare
+$(4): $(2) | preprocess
 	$(call build_cmd,AS,$(1),$(4),\
 		$(AS)  $$(COMPFLAGS) $$(COMPFLAGS-y) \
 		       $$($(call vprefix_lib,$(1),COMPFLAGS)) $$($(call vprefix_lib,$(1),COMPFLAGS-y)) \
@@ -442,7 +442,7 @@ $(eval $(call vprefix_lib,$(1),CLEAN-y) += $(call build_clean,$(4)) $(call out2d
 endef
 
 define buildrule_c =
-$(4): $(2) | prepare
+$(4): $(2) | preprocess
 	$(call build_cmd_fixdep,CC,$(1),$(4),\
 		$(CC)  $$(COMPFLAGS) $$(COMPFLAGS-y) \
 		       $$($(call vprefix_lib,$(1),COMPFLAGS)) $$($(call vprefix_lib,$(1),COMPFLAGS-y)) \
@@ -467,7 +467,7 @@ $(eval $(call vprefix_lib,$(1),CLEAN-y) += $(call build_clean,$(4)) $(call out2d
 endef
 
 define buildrule_cxx =
-$(4): $(2) | prepare
+$(4): $(2) | preprocess
 	$(call build_cmd_fixdep,CXX,$(1),$(4),\
 		$(CXX) $$(COMPFLAGS) $$(COMPFLAGS-y) \
 		       $$(CXXINCLUDES) $$(CXXINCLUDES-y) \
@@ -499,7 +499,7 @@ buildrule_C   = $(call buildrule_cxx,$(1),$(2),$(3),$(4))
 buildrule_c$(plus)$(plus) = $(call buildrule_cxx,$(1),$(2),$(3),$(4))
 
 define buildrule_go =
-$(4): $(2) | prepare
+$(4): $(2) | preprocess
 	$(call build_cmd,GOC,$(1),$(4),\
 		$(GOC) $$(COMPFLAGS) $$(COMPFLAGS-y) \
 		       $$(GOCINCLUDES) $$(GOCINCLUDES-y) \
@@ -531,7 +531,7 @@ $(eval EXTRA_LD_SCRIPT-y += $(1))
 endef
 
 define buildrule_S_lds =
-$(4): $(2) | prepare
+$(4): $(2) | preprocess
 	$(call build_cmd_fixdep,LDS,$(1),$(4),\
 		$(AS)  -E -P -x assembler-with-cpp $$(COMPFLAGS) $$(COMPFLAGS-y) \
 		       $$(ASINCLUDES) $$(ASINCLUDES-y) \
@@ -569,7 +569,7 @@ endef
 
 ## Add the linker file to the common variable used for linker script
 define buildrule_ld  =
-$(2): | prepare
+$(2): | preprocess
 
 $(eval $(call vprefix_lib,$(1),LDS-y) += $(2))
 
@@ -583,7 +583,7 @@ $(if $(strip $($(call uc,$(1))_PLATS)),\
 endef
 
 define buildrule_dts =
-$(4) : $(2) | prepare
+$(4) : $(2) | preprocess
 	$(call build_cmd,DTC,$(1),$(4),\
 	       $(DTC) -I dts -O dtb -o $$(@) $$(<)\
 	)
@@ -631,6 +631,7 @@ $(3): $(2) | prepare
 	)
 
 UK_SRCS-y += $(2)
+UK_PREPROCESS-y += $(3)
 $(eval $(call vprefix_lib,$(1),CLEAN-y) += $(call build_clean,$(3)))
 endef
 
@@ -655,6 +656,7 @@ $(3): $(2) \
 	)
 
 UK_SRCS-y += $(2)
+UK_PREPROCESS-y += $(3)
 $(eval $(call vprefix_lib,$(1),CLEAN-y) += $(call build_clean,$(3)))
 endef
 
-- 
2.20.1


From minios-devel-bounces@lists.xenproject.org Mon Apr 19 10:13:15 2021
Return-path: <minios-devel-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xenproject.org
Delivery-date: Mon, 19 Apr 2021 10:13:15 +0000
Received: from list by lists.xenproject.org with outflank-mailman.112794.215090 (Exim 4.92)
	(envelope-from <minios-devel-bounces@lists.xenproject.org>)
	id 1lYQu3-00015l-DM; Mon, 19 Apr 2021 10:13:15 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 112794.215090; Mon, 19 Apr 2021 10:13:15 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <minios-devel-bounces@lists.xenproject.org>)
	id 1lYQu3-00015e-AB; Mon, 19 Apr 2021 10:13:15 +0000
Received: by outflank-mailman (input) for mailman id 112794;
 Mon, 19 Apr 2021 10:13:15 +0000
Received: from all-amaz-eas1.inumbo.com ([34.197.232.57]
 helo=us1-amaz-eas2.inumbo.com)
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=dkgB=JQ=upb.ro=vlad_andrei.badoiu@srs-us1.protection.inumbo.net>)
 id 1lYQu3-00015Z-20
 for minios-devel@lists.xen.org; Mon, 19 Apr 2021 10:13:15 +0000
Received: from mx.upb.ro (unknown [141.85.13.230])
 by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS
 id 08d44cbe-4ab7-4867-b8ac-5345dbc78271;
 Mon, 19 Apr 2021 10:13:14 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1])
 by mx.upb.ro (Postfix) with ESMTP id 5F90AB5600A2;
 Mon, 19 Apr 2021 13:13:13 +0300 (EEST)
Received: from mx.upb.ro ([127.0.0.1])
 by localhost (mx.upb.ro [127.0.0.1]) (amavisd-new, port 10032)
 with ESMTP id aJBOq5Rp8p-k; Mon, 19 Apr 2021 13:13:11 +0300 (EEST)
Received: from localhost (localhost [127.0.0.1])
 by mx.upb.ro (Postfix) with ESMTP id 85892B5600A6;
 Mon, 19 Apr 2021 13:13:11 +0300 (EEST)
Received: from mx.upb.ro ([127.0.0.1])
 by localhost (mx.upb.ro [127.0.0.1]) (amavisd-new, port 10026)
 with ESMTP id Yu6ouv__OnkT; Mon, 19 Apr 2021 13:13:11 +0300 (EEST)
Received: from mx.upb.ro (mx.upb.ro [141.85.13.5])
 by mx.upb.ro (Postfix) with ESMTP id 6931DB560099;
 Mon, 19 Apr 2021 13:13:11 +0300 (EEST)
X-BeenThere: minios-devel@lists.xenproject.org
List-Id: Mini-os development list <minios-devel.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/minios-devel>, 
 <mailto:minios-devel-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:minios-devel@lists.xenproject.org>
List-Help: <mailto:minios-devel-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/minios-devel>, 
 <mailto:minios-devel-request@lists.xenproject.org?subject=subscribe>
Errors-To: minios-devel-bounces@lists.xenproject.org
Precedence: list
Sender: "Minios-devel" <minios-devel-bounces@lists.xenproject.org>
X-Inumbo-ID: 08d44cbe-4ab7-4867-b8ac-5345dbc78271
DKIM-Filter: OpenDKIM Filter v2.10.3 mx.upb.ro 85892B5600A6
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=upb.ro;
	s=96342B8A-77E4-11E5-BA93-D93D0963A2DF; t=1618827191;
	bh=B70gYn5X+KciBolBZPeE7ITwTxh3pSyOU4xKXxdd1TQ=;
	h=Date:From:To:Message-ID:MIME-Version;
	b=Fk+kaPKrjMuTTnz55+gayr6MR5KC3wZ7kkiWGd+txN8hmMoFky79CQTQPEVBXS60q
	 AFGQl3d6ephVbx5RkJe5TffQtuA97mkOVLwere76g/F+DR2tJ/HmtiD2TKrureo88B
	 3JxyaDBE1N/189tpIH+VvXEqf3TxMeUyZ2nRJN3k=
X-Virus-Scanned: amavisd-new at upb.ro
Date: Mon, 19 Apr 2021 13:13:11 +0300 (EEST)
From: Vlad-Andrei =?utf-8?Q?B=C4=82DOIU?= <vlad_andrei.badoiu@upb.ro>
To: Simon Kuenzer <simon.kuenzer@neclab.eu>
Cc: minios-devel <minios-devel@lists.xen.org>
Message-ID: <1017143760.11951489.1618827191399.JavaMail.zimbra@upb.ro>
In-Reply-To: <20201218180924.27217-8-simon.kuenzer@neclab.eu>
References: <20201218180924.27217-1-simon.kuenzer@neclab.eu> <20201218180924.27217-8-simon.kuenzer@neclab.eu>
Subject: Re: [UNIKRAFT PATCH 7/7] build: Support generating C/C++ headers
 with pre-processing
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
X-Mailer: Zimbra 8.8.15_GA_3991 (ZimbraWebClient - FF87 (Linux)/8.8.15_GA_3980)
Thread-Topic: build: Support generating C/C++ headers with pre-processing
Thread-Index: +pQoIz6Zjbe06+m9xcHIzi95OdrM+Q==

Thank you!
Reviewed-by: Vlad-Andrei Badoiu <vlad_andrei.badoiu@upb.ro>

----- Original Message -----
From: "Simon Kuenzer" <simon.kuenzer@neclab.eu>
To: "minios-devel" <minios-devel@lists.xen.org>
Cc: "Simon Kuenzer" <simon.kuenzer@neclab.eu>
Sent: Friday, December 18, 2020 8:09:24 PM
Subject: [UNIKRAFT PATCH 7/7] build: Support generating C/C++ headers with pre-processing

Supports generating C/C++ header files by the pre-processing rules
of the build system.

Example:
 LIBMYLIB_SRCS += $(LIBMYLIB_BASE)/header.m4>.h

Signed-off-by: Simon Kuenzer <simon.kuenzer@neclab.eu>
---
 support/build/Makefile.rules | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/support/build/Makefile.rules b/support/build/Makefile.rules
index 1aca3391..48c3f4ff 100644
--- a/support/build/Makefile.rules
+++ b/support/build/Makefile.rules
@@ -602,6 +602,16 @@ endef
 # Aliases for pre-processed files (e.g., *.in)
 buildrule_in   = $(call buildrule_noop_,$(1),$(2))
 
+# Aliases for C headers
+buildrule_h   = $(call buildrule_noop_,$(1),$(2))
+
+# Aliases for C++ headers
+buildrule_hp  = $(call buildrule_noop_,$(1),$(2))
+buildrule_hh  = $(call buildrule_noop_,$(1),$(2))
+buildrule_hpp = $(call buildrule_noop_,$(1),$(2))
+buildrule_HPP = $(call buildrule_noop_,$(1),$(2))
+buildrule_H   = $(call buildrule_noop_,$(1),$(2))
+
 # wrapper for buildrule_*,
 # selects appropriate buildrule depending on file extension,
 # if there is no such buildrule available, we throw an error.
-- 
2.20.1


From minios-devel-bounces@lists.xenproject.org Mon Apr 19 10:14:35 2021
Return-path: <minios-devel-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xenproject.org
Delivery-date: Mon, 19 Apr 2021 10:14:35 +0000
Received: from list by lists.xenproject.org with outflank-mailman.112795.215094 (Exim 4.92)
	(envelope-from <minios-devel-bounces@lists.xenproject.org>)
	id 1lYQvK-00017j-PG; Mon, 19 Apr 2021 10:14:34 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 112795.215094; Mon, 19 Apr 2021 10:14:34 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <minios-devel-bounces@lists.xenproject.org>)
	id 1lYQvK-00017c-HG; Mon, 19 Apr 2021 10:14:34 +0000
Received: by outflank-mailman (input) for mailman id 112795;
 Mon, 19 Apr 2021 10:14:33 +0000
Received: from all-amaz-eas1.inumbo.com ([34.197.232.57]
 helo=us1-amaz-eas2.inumbo.com)
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=dkgB=JQ=upb.ro=vlad_andrei.badoiu@srs-us1.protection.inumbo.net>)
 id 1lYQvJ-00017X-Bz
 for minios-devel@lists.xen.org; Mon, 19 Apr 2021 10:14:33 +0000
Received: from mx.upb.ro (unknown [141.85.13.200])
 by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS
 id 06d65ed2-7c07-4c75-bb0d-b4b9f653522a;
 Mon, 19 Apr 2021 10:14:32 +0000 (UTC)
Received: from localhost (localhost [127.0.0.1])
 by mx.upb.ro (Postfix) with ESMTP id CB673B560099;
 Mon, 19 Apr 2021 13:14:30 +0300 (EEST)
Received: from mx.upb.ro ([127.0.0.1])
 by localhost (mx.upb.ro [127.0.0.1]) (amavisd-new, port 10032)
 with ESMTP id E2_EH2hfbjjQ; Mon, 19 Apr 2021 13:14:29 +0300 (EEST)
Received: from localhost (localhost [127.0.0.1])
 by mx.upb.ro (Postfix) with ESMTP id DDE0EB5600A2;
 Mon, 19 Apr 2021 13:14:28 +0300 (EEST)
Received: from mx.upb.ro ([127.0.0.1])
 by localhost (mx.upb.ro [127.0.0.1]) (amavisd-new, port 10026)
 with ESMTP id gHLvqszP1F0C; Mon, 19 Apr 2021 13:14:28 +0300 (EEST)
Received: from mx.upb.ro (mx.upb.ro [141.85.13.5])
 by mx.upb.ro (Postfix) with ESMTP id C28C8B560099;
 Mon, 19 Apr 2021 13:14:28 +0300 (EEST)
X-BeenThere: minios-devel@lists.xenproject.org
List-Id: Mini-os development list <minios-devel.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/minios-devel>, 
 <mailto:minios-devel-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:minios-devel@lists.xenproject.org>
List-Help: <mailto:minios-devel-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/minios-devel>, 
 <mailto:minios-devel-request@lists.xenproject.org?subject=subscribe>
Errors-To: minios-devel-bounces@lists.xenproject.org
Precedence: list
Sender: "Minios-devel" <minios-devel-bounces@lists.xenproject.org>
X-Inumbo-ID: 06d65ed2-7c07-4c75-bb0d-b4b9f653522a
DKIM-Filter: OpenDKIM Filter v2.10.3 mx.upb.ro DDE0EB5600A2
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=upb.ro;
	s=96342B8A-77E4-11E5-BA93-D93D0963A2DF; t=1618827268;
	bh=y03Hv9V9AVnaui9M8M/augdC6vSjhF1HJSDSuJ03XdE=;
	h=Date:From:To:Message-ID:MIME-Version;
	b=ZcqKyQ27SoGHGUBLh/GcPHKSTh2dk1W3VNCqotlpt+P32owGT47Wc4Af29BqCERfW
	 /ivWUqxa15z0ulHg/jWm3ybz6enTTH4MqWNT0yPMPGWesIpmuMIyFIuLFJ53AU3/TX
	 rem7/+KENca/M+oOxYhR7ffA/BRkdYRpPojsolJI=
X-Virus-Scanned: amavisd-new at upb.ro
Date: Mon, 19 Apr 2021 13:14:28 +0300 (EEST)
From: Vlad-Andrei =?utf-8?Q?B=C4=82DOIU?= <vlad_andrei.badoiu@upb.ro>
To: Simon Kuenzer <simon.kuenzer@neclab.eu>
Cc: minios-devel <minios-devel@lists.xen.org>
Message-ID: <463831435.11951816.1618827268758.JavaMail.zimbra@upb.ro>
In-Reply-To: <20201218180924.27217-7-simon.kuenzer@neclab.eu>
References: <20201218180924.27217-1-simon.kuenzer@neclab.eu> <20201218180924.27217-7-simon.kuenzer@neclab.eu>
Subject: Re: [UNIKRAFT PATCH 6/7] build: `*.in` files as pure pre-processed
 files
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
X-Mailer: Zimbra 8.8.15_GA_3991 (ZimbraWebClient - FF87 (Linux)/8.8.15_GA_3980)
Thread-Topic: build: `*.in` files as pure pre-processed files
Thread-Index: UHDZ8stVijUQ38rmXOT3BpMyP/0Mrg==

Looks good!

Reviewed-by: Vlad-Andrei Badoiu <vlad_andrei.badoiu@upb.ro>

----- Original Message -----
From: "Simon Kuenzer" <simon.kuenzer@neclab.eu>
To: "minios-devel" <minios-devel@lists.xen.org>
Cc: "Simon Kuenzer" <simon.kuenzer@neclab.eu>
Sent: Friday, December 18, 2020 8:09:23 PM
Subject: [UNIKRAFT PATCH 6/7] build: `*.in` files as pure pre-processed files

Registers `*.in` files as purely pre-processed files. The idea is
that such generated files can be used/included by other source
files during pre-processing or compiling.

Example:
 LIBMYLIB_SRCS += $(LIBMYLIB_BASE)/source.m4>.in

Signed-off-by: Simon Kuenzer <simon.kuenzer@neclab.eu>
---
 support/build/Makefile.rules | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/support/build/Makefile.rules b/support/build/Makefile.rules
index 1797d134..1aca3391 100644
--- a/support/build/Makefile.rules
+++ b/support/build/Makefile.rules
@@ -593,6 +593,15 @@ $(eval $(call vprefix_lib,$(1),DTB-y) += $(4))
 $(eval $(call vprefix_lib,$(1),CLEAN-y) += $(call build_clean,$(4)))
 endef
 
+# terminating build rule
+# Only make sure that the file is registered to the preprocess stage
+define buildrule_noop_ =
+UK_PREPROCESS-y += $(2)
+endef
+
+# Aliases for pre-processed files (e.g., *.in)
+buildrule_in   = $(call buildrule_noop_,$(1),$(2))
+
 # wrapper for buildrule_*,
 # selects appropriate buildrule depending on file extension,
 # if there is no such buildrule available, we throw an error.
-- 
2.20.1


From minios-devel-bounces@lists.xenproject.org Mon Apr 19 14:32:43 2021
Return-path: <minios-devel-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xenproject.org
Delivery-date: Mon, 19 Apr 2021 14:32:43 +0000
Received: from list by lists.xenproject.org with outflank-mailman.113012.215387 (Exim 4.92)
	(envelope-from <minios-devel-bounces@lists.xenproject.org>)
	id 1lYUx7-0001Eq-8T; Mon, 19 Apr 2021 14:32:41 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 113012.215387; Mon, 19 Apr 2021 14:32:41 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <minios-devel-bounces@lists.xenproject.org>)
	id 1lYUx7-0001Ej-5e; Mon, 19 Apr 2021 14:32:41 +0000
Received: by outflank-mailman (input) for mailman id 113012;
 Mon, 19 Apr 2021 14:32:40 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=PtJL=JQ=gmail.com=virtanrazvan@srs-us1.protection.inumbo.net>)
 id 1lYUx6-0001Ee-Cb
 for minios-devel@lists.xen.org; Mon, 19 Apr 2021 14:32:40 +0000
Received: from mail-ej1-x634.google.com (unknown [2a00:1450:4864:20::634])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id 26db16a2-b6ca-43df-ae63-d6a6712ed0f9;
 Mon, 19 Apr 2021 14:32:39 +0000 (UTC)
Received: by mail-ej1-x634.google.com with SMTP id v6so51971743ejo.6
 for <minios-devel@lists.xen.org>; Mon, 19 Apr 2021 07:32:39 -0700 (PDT)
Received: from razvan-Lenovo-Legion-Y530-15ICH.local
 ([2a02:2f08:c211:9400:5553:7381:ecb7:7bf6])
 by smtp.gmail.com with ESMTPSA id p24sm13250426edt.5.2021.04.19.07.32.37
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Mon, 19 Apr 2021 07:32:38 -0700 (PDT)
X-BeenThere: minios-devel@lists.xenproject.org
List-Id: Mini-os development list <minios-devel.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/minios-devel>, 
 <mailto:minios-devel-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:minios-devel@lists.xenproject.org>
List-Help: <mailto:minios-devel-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/minios-devel>, 
 <mailto:minios-devel-request@lists.xenproject.org?subject=subscribe>
Errors-To: minios-devel-bounces@lists.xenproject.org
Precedence: list
Sender: "Minios-devel" <minios-devel-bounces@lists.xenproject.org>
X-Inumbo-ID: 26db16a2-b6ca-43df-ae63-d6a6712ed0f9
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20161025;
        h=from:to:cc:subject:date:message-id:in-reply-to:references;
        bh=zluDJxpE/IQwO4S8SefXbOHYPIOCFN+xXyrR5KO46ow=;
        b=XDGbAH3MuG/EItpiBi6pmFk9QeNaH+b6F40ialnCV79/E1NSwjZHgjN4pywtPbsstT
         oBEwiOxX358etBS7O3FSuBOZPkn91QgCneK1YgjGGNaN1gtEnzJI/nuzVGUBrPZR3eHn
         3xeuDF6X2T7A15rke4mvoM9jgaStkNCVN4VIYtGSEgXJ7bUrTS3AhijInnUjglCsKWHs
         g87DzZQFDrT64JI1dFf0AGIhylxO6uxjtQfZ6zPMRm8LQdvBtuW4xVhKZN7/8wbQn2Sr
         eIScuoo2mH7knr4phm7/+nWGbyvWO60gR033CeeZZZgsMxhxQf+6b9Hyr8kx5/5j6lgo
         LNrQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to
         :references;
        bh=zluDJxpE/IQwO4S8SefXbOHYPIOCFN+xXyrR5KO46ow=;
        b=MetFhyMCCw/18J8JtwKPIMBUZlWUmyIZuL/a6cbUuqONSHAQMjVzuGpNP9CdfA6mJ9
         GiPFARwxF2FY52H6jc5jk0Hj30Di7IaJXbthXz451efcX3Hk1bxR5RN+Wysmav9hi53v
         6xCX5EIvbCvF7jIFflxvUou5uqRkoMjUd3OPNcRKaX+FhkCD02CKXvQjOSsq8X7fOabC
         V6QbDd0X2gr+thj3GP9ga462udV4p4f9nhSqOyFoRDy9gNBSpLq6XDTAsb4wLjxhaonO
         Nwuxj+pwJTmumo1K+MP47fiiahmivVmWWg95MonV0hy3SB31JkSqRvW+G5QEqxmQ+ofD
         G8iw==
X-Gm-Message-State: AOAM533f/a5Rm5cbZOatwhAwobSASQqOnGQ84Bi0u7JFMvHubKWHLR0f
	LnoyJeMFeUUK5uAmlk3RG0Y=
X-Google-Smtp-Source: ABdhPJxDk5aGmPz/8MhrrCs46xDFXxj2INa6ei66CuEN1lvVwokBjfR9v8iI9pfKofCoHrmJBThXUQ==
X-Received: by 2002:a17:907:3e1f:: with SMTP id hp31mr22233699ejc.163.1618842758642;
        Mon, 19 Apr 2021 07:32:38 -0700 (PDT)
From: Razvan Virtan <virtanrazvan@gmail.com>
X-Google-Original-From: Razvan Virtan <razvanvirtan@gmail.com>
To: justin.he@arm.com
Cc: minios-devel@lists.xen.org
Subject: Re: [RFCv4,20/35] build: Make KVM_PCI default enable on arm64 
Date: Mon, 19 Apr 2021 17:32:34 +0300
Message-Id: <20210419143234.9909-1-razvanvirtan@gmail.com>
X-Mailer: git-send-email 2.17.1
In-Reply-To: <20201223073857.118076-21-justin.he@arm.com>
References: <20201223073857.118076-21-justin.he@arm.com>

Hi, Justin.
All good with this patch.

Reviewed-by: Razvan Virtan <virtanrazvan@gmail.com>


From minios-devel-bounces@lists.xenproject.org Mon Apr 19 14:42:21 2021
Return-path: <minios-devel-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xenproject.org
Delivery-date: Mon, 19 Apr 2021 14:42:21 +0000
Received: from list by lists.xenproject.org with outflank-mailman.113020.215392 (Exim 4.92)
	(envelope-from <minios-devel-bounces@lists.xenproject.org>)
	id 1lYV6S-000275-0Z; Mon, 19 Apr 2021 14:42:20 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 113020.215392; Mon, 19 Apr 2021 14:42:19 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <minios-devel-bounces@lists.xenproject.org>)
	id 1lYV6R-00026y-TU; Mon, 19 Apr 2021 14:42:19 +0000
Received: by outflank-mailman (input) for mailman id 113020;
 Mon, 19 Apr 2021 14:42:18 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=PtJL=JQ=gmail.com=virtanrazvan@srs-us1.protection.inumbo.net>)
 id 1lYV6Q-00026t-9K
 for minios-devel@lists.xen.org; Mon, 19 Apr 2021 14:42:18 +0000
Received: from mail-ej1-x629.google.com (unknown [2a00:1450:4864:20::629])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id 5545f1b1-0177-41c1-b088-c6485f1f29c1;
 Mon, 19 Apr 2021 14:42:17 +0000 (UTC)
Received: by mail-ej1-x629.google.com with SMTP id n2so53288509ejy.7
 for <minios-devel@lists.xen.org>; Mon, 19 Apr 2021 07:42:17 -0700 (PDT)
Received: from razvan-Lenovo-Legion-Y530-15ICH.local
 ([2a02:2f08:c211:9400:5553:7381:ecb7:7bf6])
 by smtp.gmail.com with ESMTPSA id x7sm12760334eds.67.2021.04.19.07.42.16
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Mon, 19 Apr 2021 07:42:16 -0700 (PDT)
X-BeenThere: minios-devel@lists.xenproject.org
List-Id: Mini-os development list <minios-devel.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/minios-devel>, 
 <mailto:minios-devel-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:minios-devel@lists.xenproject.org>
List-Help: <mailto:minios-devel-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/minios-devel>, 
 <mailto:minios-devel-request@lists.xenproject.org?subject=subscribe>
Errors-To: minios-devel-bounces@lists.xenproject.org
Precedence: list
Sender: "Minios-devel" <minios-devel-bounces@lists.xenproject.org>
X-Inumbo-ID: 5545f1b1-0177-41c1-b088-c6485f1f29c1
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20161025;
        h=from:to:cc:subject:date:message-id:in-reply-to:references;
        bh=zluDJxpE/IQwO4S8SefXbOHYPIOCFN+xXyrR5KO46ow=;
        b=MokCBB0peb8yzL9aQ/+XsNFoeQF8Wbpp0QWm0QdYiu2pkHM/fjWCNTcua5xRuwQNoY
         cR9oq/JAvYS+bukAxocfpZguGZLORYhzdZtnn8M9+jePH/gYsDIS6Sq5jqZH163yFTOt
         MNf6Jz/XZ+BzVj5k01LFgUE2cf/8lSq2uT/e4oFP71eKAY3TzhNrIMmCZkk5oKMPq5Nn
         5cKf/pdkGyC4vqpQfACOnL0t85i7TojLJlsDlN5WrN72/fNCsMxOd7u4Pnj0gD+VKtfb
         mzR6BQjW+I0ypHzJsKnFAjFDo4u4datEd9t/+HceAdmu6zA4/ixUbxUicjMBV50weOIL
         rJJg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to
         :references;
        bh=zluDJxpE/IQwO4S8SefXbOHYPIOCFN+xXyrR5KO46ow=;
        b=pnm226Pbxbmj4AP0oWTJvupR6jeYUlWluhnAoEWzKPYB29e8benJKI1av3aLkcg7Y/
         3IVKgKyGJpk2nTCOkTILWylzepPzWI/IQsqV6X31ckkCD79eqDqGQtn2LNTLNWof/6AG
         YeX8N9w3SpQNG32cFBdJD1j+YFXBXpkYT84pYRiglKArXEjREoRnIQ09G9T5mBd9MuBM
         DqiRskjy0QWiM5OYEX2RzwEfHQG76Rc/y333mkGJHjLBmn4olZh/Dpylr9quko6G1yiI
         OfCbUbDImQW74D8SQVlvBZur8LOKbh/lFkZ9WyWBrOvff2LCbBiohB1BSFYOjCeRIXt1
         fGfQ==
X-Gm-Message-State: AOAM532JqTp846w5Lw7QQnoRDCL+PuxsFm5corDoJveQS7bg2kuKL33k
	zq9398DbO6p8hlpfSNag4hI=
X-Google-Smtp-Source: ABdhPJyHWmRPymQ2SoTntVA897ZFpadDOvJj3oiqTS0d8VOAemPR8Pe6ADPBrYB5fBEJto5+C3nMfw==
X-Received: by 2002:a17:906:170f:: with SMTP id c15mr22201109eje.358.1618843336773;
        Mon, 19 Apr 2021 07:42:16 -0700 (PDT)
From: Razvan Virtan <virtanrazvan@gmail.com>
X-Google-Original-From: Razvan Virtan <razvanvirtan@gmail.com>
To: justin.he@arm.com
Cc: minios-devel@lists.xen.org
Subject: Re: [RFCv4,22/35] build: Enable pci library on arm64 
Date: Mon, 19 Apr 2021 17:42:14 +0300
Message-Id: <20210419144214.10552-1-razvanvirtan@gmail.com>
X-Mailer: git-send-email 2.17.1
In-Reply-To: <20201223073857.118076-23-justin.he@arm.com>
References: <20201223073857.118076-23-justin.he@arm.com>

Hi, Justin.
All good with this patch.

Reviewed-by: Razvan Virtan <virtanrazvan@gmail.com>


From minios-devel-bounces@lists.xenproject.org Mon Apr 19 15:07:58 2021
Return-path: <minios-devel-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xenproject.org
Delivery-date: Mon, 19 Apr 2021 15:07:58 +0000
Received: from list by lists.xenproject.org with outflank-mailman.113046.215420 (Exim 4.92)
	(envelope-from <minios-devel-bounces@lists.xenproject.org>)
	id 1lYVVF-0004E4-I5; Mon, 19 Apr 2021 15:07:57 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 113046.215420; Mon, 19 Apr 2021 15:07:57 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <minios-devel-bounces@lists.xenproject.org>)
	id 1lYVVF-0004Dx-F0; Mon, 19 Apr 2021 15:07:57 +0000
Received: by outflank-mailman (input) for mailman id 113046;
 Mon, 19 Apr 2021 15:07:56 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=PtJL=JQ=gmail.com=virtanrazvan@srs-us1.protection.inumbo.net>)
 id 1lYVVE-0004Ds-BA
 for minios-devel@lists.xen.org; Mon, 19 Apr 2021 15:07:56 +0000
Received: from mail-ej1-x636.google.com (unknown [2a00:1450:4864:20::636])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id ac68a6b3-ee0f-46f6-bb54-b74157e0d012;
 Mon, 19 Apr 2021 15:07:55 +0000 (UTC)
Received: by mail-ej1-x636.google.com with SMTP id r9so53456239ejj.3
 for <minios-devel@lists.xen.org>; Mon, 19 Apr 2021 08:07:55 -0700 (PDT)
Received: from razvan-Lenovo-Legion-Y530-15ICH.local
 ([2a02:2f08:c211:9400:5553:7381:ecb7:7bf6])
 by smtp.gmail.com with ESMTPSA id u4sm10575407ejf.11.2021.04.19.08.07.45
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Mon, 19 Apr 2021 08:07:54 -0700 (PDT)
X-BeenThere: minios-devel@lists.xenproject.org
List-Id: Mini-os development list <minios-devel.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/minios-devel>, 
 <mailto:minios-devel-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:minios-devel@lists.xenproject.org>
List-Help: <mailto:minios-devel-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/minios-devel>, 
 <mailto:minios-devel-request@lists.xenproject.org?subject=subscribe>
Errors-To: minios-devel-bounces@lists.xenproject.org
Precedence: list
Sender: "Minios-devel" <minios-devel-bounces@lists.xenproject.org>
X-Inumbo-ID: ac68a6b3-ee0f-46f6-bb54-b74157e0d012
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20161025;
        h=from:to:cc:subject:date:message-id:in-reply-to:references;
        bh=zluDJxpE/IQwO4S8SefXbOHYPIOCFN+xXyrR5KO46ow=;
        b=aB+VJwoqVYcIDt0PLySK8i541JaPgpycA0w65pDzVHo9oYZwOcqKXndDhI1R7uCztl
         lXMLH1l1uHnMr8UhG5RVBcu1vEde2WP+BLefr8iIwYhPorsGQuEvsT/nphmHvsuRB81C
         Uhla6LMjurA+uWRE3jnnKnvObS53x0W2h6N1ID0vlgOSvJw4JcEbCTkWhFqjdRyXNCkN
         5K4aR638X1S5zannva2G6SZZIfW6E4CS7duH22S72LwCc3KeUToTmPcxRHRih3Up4nFR
         2oitBBct1/zZDvzuelPon0S0J8xXWIeyBf8vwUmg9m2z4nFcNfT19L16zt6z6sp4Kwvl
         N5Ug==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to
         :references;
        bh=zluDJxpE/IQwO4S8SefXbOHYPIOCFN+xXyrR5KO46ow=;
        b=YPTomSLxR8knmy5LWuwKFpK6zc1NM91hMcWackas4mslCgtpqsO3tCqviONt7qBxuz
         h6bAvn7rAueFA28ec3YNr2jEBofVfSWEJHQgIdvNOe98PiT6xsf37cxmgYTKl7w/GoA1
         FRvOce4kz3xnI57DuWIjNC1eeaHpyIgWMn7YMxIZiR/Uoo9eXjQUFMVnarT9mTVkqLtF
         nBRbmAmRXbYcuhz4/UXCvOK0tYgzCyYsUI1uBn1PLMFBn49b5ZXEJuApRezPHooC3ce+
         VG7lp5+2trUZr8d0J3SscykPjS8eGKRTFGxGsSx/JH3VIruwT+doXfeANUDLLuVxLgjW
         hHYw==
X-Gm-Message-State: AOAM530dotzwY4RL6gyCxb2+BqR5HCn0779x6/MLPjJpHFgdeLUWxNgL
	I3sNtpyJEHk56i9xl3WkEFc=
X-Google-Smtp-Source: ABdhPJyXaWYrDNmsCSuiD7hMvoWBo+omukw1LHnXxnIIDS/Em4YK/jt3FjkHimnF1Q22fGVQbLLqrw==
X-Received: by 2002:a17:906:53cd:: with SMTP id p13mr22437328ejo.379.1618844874756;
        Mon, 19 Apr 2021 08:07:54 -0700 (PDT)
From: Razvan Virtan <virtanrazvan@gmail.com>
X-Google-Original-From: Razvan Virtan <razvanvirtan@gmail.com>
To: justin.he@arm.com
Cc: minios-devel@lists.xen.org
Subject: Re: [RFCv4,23/35] plat/pci_ecam: Fix a lot compilation warnings in pci_ecam
Date: Mon, 19 Apr 2021 18:07:37 +0300
Message-Id: <20210419150737.13777-1-razvanvirtan@gmail.com>
X-Mailer: git-send-email 2.17.1
In-Reply-To: <20201223073857.118076-24-justin.he@arm.com>
References: <20201223073857.118076-24-justin.he@arm.com>

Hi, Justin.
All good with this patch.

Reviewed-by: Razvan Virtan <virtanrazvan@gmail.com>


From minios-devel-bounces@lists.xenproject.org Tue Apr 20 07:36:09 2021
Return-path: <minios-devel-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xenproject.org
Delivery-date: Tue, 20 Apr 2021 07:36:09 +0000
Received: from list by lists.xenproject.org with outflank-mailman.113363.216001 (Exim 4.92)
	(envelope-from <minios-devel-bounces@lists.xenproject.org>)
	id 1lYkvW-0001xP-HI; Tue, 20 Apr 2021 07:36:06 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 113363.216001; Tue, 20 Apr 2021 07:36:06 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <minios-devel-bounces@lists.xenproject.org>)
	id 1lYkvW-0001xI-EU; Tue, 20 Apr 2021 07:36:06 +0000
Received: by outflank-mailman (input) for mailman id 113363;
 Tue, 20 Apr 2021 07:36:05 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=KWFV=JR=arm.com=jianyong.wu@srs-us1.protection.inumbo.net>)
 id 1lYkvV-0001xD-7W
 for minios-devel@lists.xenproject.org; Tue, 20 Apr 2021 07:36:05 +0000
Received: from foss.arm.com (unknown [217.140.110.172])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTP
 id 91d9820a-4436-4ff4-8f1f-548ef9e0df42;
 Tue, 20 Apr 2021 07:36:03 +0000 (UTC)
Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14])
 by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 40F391435;
 Tue, 20 Apr 2021 00:36:03 -0700 (PDT)
Received: from entos-thunderx2-desktop.shanghai.arm.com
 (entos-thunderx2-desktop.shanghai.arm.com [10.169.212.218])
 by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 24DD73F85F;
 Tue, 20 Apr 2021 00:36:00 -0700 (PDT)
X-BeenThere: minios-devel@lists.xenproject.org
List-Id: Mini-os development list <minios-devel.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/minios-devel>, 
 <mailto:minios-devel-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:minios-devel@lists.xenproject.org>
List-Help: <mailto:minios-devel-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/minios-devel>, 
 <mailto:minios-devel-request@lists.xenproject.org?subject=subscribe>
Errors-To: minios-devel-bounces@lists.xenproject.org
Precedence: list
Sender: "Minios-devel" <minios-devel-bounces@lists.xenproject.org>
X-Inumbo-ID: 91d9820a-4436-4ff4-8f1f-548ef9e0df42
From: Jianyong Wu <jianyong.wu@arm.com>
To: minios-devel@lists.xenproject.org,
	sharan.santhanam@neclab.eu,
	virtanrazvan@gmail.com,
	simon.kuenzer@neclab.eu,
	jianyong.wu@arm.com
Cc: justin.he@arm.com
Subject: [PATCH] arm/entry: set x0 before cache maintenance.
Date: Tue, 20 Apr 2021 15:35:51 +0800
Message-Id: <20210420073551.24971-1-jianyong.wu@arm.com>
X-Mailer: git-send-email 2.17.1

There is a long standing issue in entry code of arm that x0 is not
set before using it in clean_and_invalidate_dcache_range. This error
can be caught by kvm and result in core dump.
Here, x0 is set to the location where stores dtb before cache maintain.

Signed-off-by: Jianyong Wu <jianyong.wu@arm.com>
---
 plat/kvm/arm/entry64.S    | 5 +++++
 plat/kvm/arm/link64.lds.S | 1 +
 2 files changed, 6 insertions(+)

diff --git a/plat/kvm/arm/entry64.S b/plat/kvm/arm/entry64.S
index c4de334..2c36d6d 100644
--- a/plat/kvm/arm/entry64.S
+++ b/plat/kvm/arm/entry64.S
@@ -92,6 +92,11 @@ ENTRY(_libkvmplat_entry)
 	add x27, x26, x17
 	add x27, x27, #__STACK_SIZE
 	sub x1, x27, x25
+
+	/*
+	 * set x0 as the start of ram address.
+	 */
+	ldr x0, = _start_ram_addr;
 	bl clean_and_invalidate_dcache_range
 
 	/* Disable the MMU and D-Cache. */
diff --git a/plat/kvm/arm/link64.lds.S b/plat/kvm/arm/link64.lds.S
index 4f8fcc3..cfe1454 100644
--- a/plat/kvm/arm/link64.lds.S
+++ b/plat/kvm/arm/link64.lds.S
@@ -56,6 +56,7 @@ SECTIONS {
 
 	/* Place DTB binary at the beginning of the RAM */
 	_dtb = .;
+	_start_ram_addr = .;
 	. = . + DTB_RESERVED_SIZE;
 
 	/* Code */
-- 
2.17.1



From minios-devel-bounces@lists.xenproject.org Tue Apr 20 07:39:46 2021
Return-path: <minios-devel-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xenproject.org
Delivery-date: Tue, 20 Apr 2021 07:39:46 +0000
Received: from list by lists.xenproject.org with outflank-mailman.113366.216011 (Exim 4.92)
	(envelope-from <minios-devel-bounces@lists.xenproject.org>)
	id 1lYkz3-00021L-TB; Tue, 20 Apr 2021 07:39:45 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 113366.216011; Tue, 20 Apr 2021 07:39:45 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <minios-devel-bounces@lists.xenproject.org>)
	id 1lYkz3-00021E-QU; Tue, 20 Apr 2021 07:39:45 +0000
Received: by outflank-mailman (input) for mailman id 113366;
 Tue, 20 Apr 2021 07:39:44 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=82Yt=JR=gmail.com=virtanrazvan@srs-us1.protection.inumbo.net>)
 id 1lYkz2-000218-KK
 for minios-devel@lists.xen.org; Tue, 20 Apr 2021 07:39:44 +0000
Received: from mail-ej1-x62d.google.com (unknown [2a00:1450:4864:20::62d])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id fbc35196-ea0e-44ee-b4e7-705c0b2fd481;
 Tue, 20 Apr 2021 07:39:43 +0000 (UTC)
Received: by mail-ej1-x62d.google.com with SMTP id n2so56754325ejy.7
 for <minios-devel@lists.xen.org>; Tue, 20 Apr 2021 00:39:43 -0700 (PDT)
Received: from razvan-Lenovo-Legion-Y530-15ICH.local
 ([2a02:2f08:c211:9400:bd11:387b:8bf4:5cee])
 by smtp.gmail.com with ESMTPSA id lb18sm11826932ejc.6.2021.04.20.00.39.42
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Tue, 20 Apr 2021 00:39:42 -0700 (PDT)
X-BeenThere: minios-devel@lists.xenproject.org
List-Id: Mini-os development list <minios-devel.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/minios-devel>, 
 <mailto:minios-devel-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:minios-devel@lists.xenproject.org>
List-Help: <mailto:minios-devel-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/minios-devel>, 
 <mailto:minios-devel-request@lists.xenproject.org?subject=subscribe>
Errors-To: minios-devel-bounces@lists.xenproject.org
Precedence: list
Sender: "Minios-devel" <minios-devel-bounces@lists.xenproject.org>
X-Inumbo-ID: fbc35196-ea0e-44ee-b4e7-705c0b2fd481
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20161025;
        h=from:to:cc:subject:date:message-id:in-reply-to:references;
        bh=z4a8iIiUTB2fhENjL9PKEvUdScZIsEVceczuTWAlujE=;
        b=ZT8gM5Gbvv8DY1qUkUZ6LeM+dVRXPnJNTDy9/PqLy82/qQpj6ZgkAS1RNMB69D/Gay
         rCrj/GTpFhwFoDTh2Ap7mf78LRH1MRtsjZsm49i9KM3Kqno/TkbuFIOBTFnsRwH3DWQb
         a2jEz1Uhnf3lA3ESQaQUGnGrk+Q/hFFaIohqcPLKyV603dAIyCiUbgp3Y73E58hFuEtG
         4zXCYeGuSKivmwg/CDXusA9Df64i9/gT9akNhVckynO+D//ktNyXY0BL8Pg5Zpmhgv1t
         jdVH5qM5hx00SOpRRid/ZRni+G8OIGWZRmpez5TrKfxtPaxMH1LxIttuBx5h+STN3Qyk
         JUxw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to
         :references;
        bh=z4a8iIiUTB2fhENjL9PKEvUdScZIsEVceczuTWAlujE=;
        b=j8UDA6vK7eMVtCVSZEbAClI6nu2r7AMrDjQuT+Iajt9LlrfCkCDNlakKUct+9+R37G
         BIgJi5fiRytrTU5Wt/Y2z5gSMpr5guI+XT64jIlEox2/CvlWZM7/fBUDjno54fAdvt8B
         wVo73gEZKwmoW0SXOWqs1D0oXlwL1oVn8WSWH/eWOXET2nIxACKW2Ss+31GabUwjhQ0v
         ZmWAtI8Lk9YqkEGcR+0cYw5KFt9q9jaAIx4cLKlyxm48T+RTXU21AHHBir0IFCjot5N2
         ZOWmxx/QpcTe1WjY9e4l/8cDLd5YqkVaEbjCHjOWnZPdblNUxqjP6rg6Y3LoVwgBYftG
         6GTg==
X-Gm-Message-State: AOAM532egJSGQPF+QoDlanr85VMflAAZGiHHp5Q8vdgcfnNljdQqvvL2
	RphpsHGJUo9fbMjG5mAfJNdBCXewtrXs4w==
X-Google-Smtp-Source: ABdhPJzs4A/k4OWYEVJLsHrcMyQYVae1x84hruWSbUeaWSkjBfl+AP/SKEW9U+h3Bg2amNIXRwnlMg==
X-Received: by 2002:a17:907:3fa2:: with SMTP id hr34mr26466024ejc.476.1618904383010;
        Tue, 20 Apr 2021 00:39:43 -0700 (PDT)
From: Razvan Virtan <virtanrazvan@gmail.com>
X-Google-Original-From: Razvan Virtan <razvanvirtan@gmail.com>
To: justin.he@arm.com
Cc: minios-devel@lists.xen.org
Subject: Re: [RFCv4,10/35] lib/ukbus: Adjust default bus register priority
Date: Tue, 20 Apr 2021 10:39:40 +0300
Message-Id: <20210420073940.10963-1-razvanvirtan@gmail.com>
X-Mailer: git-send-email 2.17.1
In-Reply-To: <20201223073857.118076-11-justin.he@arm.com>
References: <20201223073857.118076-11-justin.he@arm.com>

Hi, Justin.
In `ctors.h` the `UK_CTOR_FUNC` macro is marked as
`/* DELETEME: Compatibility wrapper for existing code, to be removed! */`.

Therefore, I think we could change the definition of `_UK_BUS_REGISTER_CTOR` from

```#define _UK_BUS_REGISTER_CTOR(CTOR, prio)  \
	UK_CTOR_FUNC(prio, CTOR)```

to

```#define _UK_BUS_REGISTER_CTOR(CTOR, prio)  \
	UK_CTOR_PRIO(CTOR, prio)```

Reviewed-by: Razvan Virtan <virtanrazvan@gmail.com>


From minios-devel-bounces@lists.xenproject.org Tue Apr 20 08:56:41 2021
Return-path: <minios-devel-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xenproject.org
Delivery-date: Tue, 20 Apr 2021 08:56:41 +0000
Received: from list by lists.xenproject.org with outflank-mailman.113405.216080 (Exim 4.92)
	(envelope-from <minios-devel-bounces@lists.xenproject.org>)
	id 1lYmBU-0001WB-63; Tue, 20 Apr 2021 08:56:40 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 113405.216080; Tue, 20 Apr 2021 08:56:40 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <minios-devel-bounces@lists.xenproject.org>)
	id 1lYmBU-0001W4-32; Tue, 20 Apr 2021 08:56:40 +0000
Received: by outflank-mailman (input) for mailman id 113405;
 Tue, 20 Apr 2021 08:56:38 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=82Yt=JR=gmail.com=virtanrazvan@srs-us1.protection.inumbo.net>)
 id 1lYmBS-0001Vz-Lr
 for minios-devel@lists.xen.org; Tue, 20 Apr 2021 08:56:38 +0000
Received: from mail-ed1-x52d.google.com (unknown [2a00:1450:4864:20::52d])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id f19d34a3-6641-48d3-a42b-dd53420240d9;
 Tue, 20 Apr 2021 08:56:37 +0000 (UTC)
Received: by mail-ed1-x52d.google.com with SMTP id d21so23992404edv.9
 for <minios-devel@lists.xen.org>; Tue, 20 Apr 2021 01:56:37 -0700 (PDT)
Received: from razvan-Lenovo-Legion-Y530-15ICH.local
 ([2a02:2f08:c211:9400:bd11:387b:8bf4:5cee])
 by smtp.gmail.com with ESMTPSA id f20sm8823498ejw.36.2021.04.20.01.56.36
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Tue, 20 Apr 2021 01:56:36 -0700 (PDT)
X-BeenThere: minios-devel@lists.xenproject.org
List-Id: Mini-os development list <minios-devel.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/minios-devel>, 
 <mailto:minios-devel-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:minios-devel@lists.xenproject.org>
List-Help: <mailto:minios-devel-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/minios-devel>, 
 <mailto:minios-devel-request@lists.xenproject.org?subject=subscribe>
Errors-To: minios-devel-bounces@lists.xenproject.org
Precedence: list
Sender: "Minios-devel" <minios-devel-bounces@lists.xenproject.org>
X-Inumbo-ID: f19d34a3-6641-48d3-a42b-dd53420240d9
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20161025;
        h=from:to:cc:subject:date:message-id:in-reply-to:references;
        bh=tt2Rtwo2NI0ej69YMX4fzGZgiEjbTQMC42SyjubiP4w=;
        b=JnHRfLNY9pXgNcuUQh/dwWRbp+5oL/FsHElqwM0ejyQm+58ISnT0YAf1yMaLfqCqC0
         EGWDKoFWCuXdFt4QdtOMv/N0wWWIKl07IyBoaXfGXIReQlqoB4sL260PRzxxSlJh9dnl
         H1oiK8HAfTtMgihUrQvkwxUBO3kZe3sBMLipjO3jt1kS/UwO1z7ilZej6FeeWoNmcdgs
         G96WuhqzSNGTDxlR7SnAWco1chzNvX4KQzT1CRJghhXTXLp6VX637iNSBxe3vmi+EruQ
         obNg7RBpxeRvSLRfsF50sMURzohkK2kWGdAPII+CTQ4QO7TJ+sj1Jqy4PjKVHaX4USe2
         FdRA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to
         :references;
        bh=tt2Rtwo2NI0ej69YMX4fzGZgiEjbTQMC42SyjubiP4w=;
        b=SrgUUFnVnQzaoHqSi+v5XqYx9OfHRqE6Y8lAbmq7YyR6WeIQmHCuChCnam5wqGn2Bo
         f1JzZZAGvYybDDVf0co8GgfJLHACheFDJkTFxtPF2gv12Cq6fsahdlOan0oE37/tVc6F
         jyFiQ5hNcePIQ2kDAfVvdmzGeYCL8YpK+pQKFmuwAbxma63rQ36xIOul1vBrGUof9y5o
         UHty27uqkuOHIMCD3hwqCidKdjWlX1dG2jU3D8YAXO47P8H7ig77hPqQP/u2cM24iba3
         EREj6eFTM3LIGzRMmDj7Mi3W/mYn38ubVuKJ0ZnfmTkzdTdXjaBI8ChVQ+MvDl+HhTo+
         EHBg==
X-Gm-Message-State: AOAM530I7fHdSM8FMSRsthMHK3FQk2QxnbNBCfjzUGun0zePrztd0X3f
	ArmkAgvVaCLohsJwQm6i8sA=
X-Google-Smtp-Source: ABdhPJzv5+toEFCPuOgOor5WZADMB8kBCCfHR9xSJuXT8Hq5e0OtSLtuVgStMLKPUh+4KJToYDRY6A==
X-Received: by 2002:aa7:c442:: with SMTP id n2mr28999581edr.63.1618908996934;
        Tue, 20 Apr 2021 01:56:36 -0700 (PDT)
From: Razvan Virtan <virtanrazvan@gmail.com>
X-Google-Original-From: Razvan Virtan <razvanvirtan@gmail.com>
To: justin.he@arm.com
Cc: minios-devel@lists.xen.org
Subject: Re: [RFCv4,25/35] plat/virtio: Change irq,base from u16 to u64 on arm64 
Date: Tue, 20 Apr 2021 11:56:35 +0300
Message-Id: <20210420085635.15643-1-razvanvirtan@gmail.com>
X-Mailer: git-send-email 2.17.1
In-Reply-To: <20201223073857.118076-26-justin.he@arm.com>
References: <20201223073857.118076-26-justin.he@arm.com>

All good with this patch.

Reviewed-by: Razvan Virtan <virtanrazvan@gmail.com>


From minios-devel-bounces@lists.xenproject.org Thu Apr 22 09:44:48 2021
Return-path: <minios-devel-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xenproject.org
Delivery-date: Thu, 22 Apr 2021 09:44:48 +0000
Received: from list by lists.xenproject.org with outflank-mailman.115239.219760 (Exim 4.92)
	(envelope-from <minios-devel-bounces@lists.xenproject.org>)
	id 1lZVt7-000501-PT; Thu, 22 Apr 2021 09:44:45 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 115239.219760; Thu, 22 Apr 2021 09:44:45 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <minios-devel-bounces@lists.xenproject.org>)
	id 1lZVt7-0004zu-M9; Thu, 22 Apr 2021 09:44:45 +0000
Received: by outflank-mailman (input) for mailman id 115239;
 Thu, 22 Apr 2021 09:44:44 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=Di4h=JT=gmail.com=virtanrazvan@srs-us1.protection.inumbo.net>)
 id 1lZVt6-0004zm-38
 for minios-devel@lists.xen.org; Thu, 22 Apr 2021 09:44:44 +0000
Received: from mail-ed1-x52a.google.com (unknown [2a00:1450:4864:20::52a])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id bf5d07dd-5736-4eda-97dc-f383effc6300;
 Thu, 22 Apr 2021 09:44:43 +0000 (UTC)
Received: by mail-ed1-x52a.google.com with SMTP id s15so52680568edd.4
 for <minios-devel@lists.xen.org>; Thu, 22 Apr 2021 02:44:43 -0700 (PDT)
Received: from razvan-Lenovo-Legion-Y530-15ICH.local
 ([2a02:2f08:c211:9400:f8fb:7ca2:835f:c30e])
 by smtp.gmail.com with ESMTPSA id y26sm1474325ejj.98.2021.04.22.02.44.41
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Thu, 22 Apr 2021 02:44:41 -0700 (PDT)
X-BeenThere: minios-devel@lists.xenproject.org
List-Id: Mini-os development list <minios-devel.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/minios-devel>, 
 <mailto:minios-devel-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:minios-devel@lists.xenproject.org>
List-Help: <mailto:minios-devel-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/minios-devel>, 
 <mailto:minios-devel-request@lists.xenproject.org?subject=subscribe>
Errors-To: minios-devel-bounces@lists.xenproject.org
Precedence: list
Sender: "Minios-devel" <minios-devel-bounces@lists.xenproject.org>
X-Inumbo-ID: bf5d07dd-5736-4eda-97dc-f383effc6300
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20161025;
        h=from:to:cc:subject:date:message-id:in-reply-to:references;
        bh=tt2Rtwo2NI0ej69YMX4fzGZgiEjbTQMC42SyjubiP4w=;
        b=D0ML4bgdcWf8t8Sd06IO2OOQsIIh1/e+8GhGnshxBw32vwJiKGf2ZL4UOMq8Naqoqz
         4Ed/uaJG82M+LarQ/DCHxv0dHyMJ8I5dEL9VIphzMM+drxEb0mqfTIvJKhPOF6voZSWh
         BCaz7x/iUfyCO8s5IKYcmF/FjuiRKcnXH0TvTZsM/aN3RgCqIg+orwQ5ObTD9opLB4m4
         S8D/3JTJ+3R1IViID4H54KkxKfBRDrM92MbyI3br1GjnfAg3t9iPMDpo75Zu8NyCbasW
         4AXryUzz4/FX3jLEgMwmAGNNgOSJ/d/0Krzumc520Vx0C7SGGpjLVpDQO1C059imFMJW
         h/ZQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to
         :references;
        bh=tt2Rtwo2NI0ej69YMX4fzGZgiEjbTQMC42SyjubiP4w=;
        b=TApy5TbfooB3PprWDZyoCsLWLB70E3ndWlIomqfRWjjc0T+IsL5QNbzmCrLeFDYuPZ
         K5u3sRWePUoyh1gXAE18Vfhw2vVOWByIvYoCWUhU2z3WQqfbc8oVs9xPjtxqKoH5NsgJ
         gb9JpoNx4dyZOPw9wj3PpFFGlBAn8vg2rFEbAuWIMmPq9uz5qo9m3Fc9KrImkqS4WXcz
         Lm51l7cBxaH3914oJ3DOyCT7IhHuJ08rcYUr3/1Jg0qgVFnzA7NCpHmP9t8Wp2gLy6Pw
         fsbraDbpBzv2sXVdm1Kyz7CkcRg8hWZTO/+8hqbaxZwxTLmN3hlA3I58ocPhTvFlTXX3
         IW+A==
X-Gm-Message-State: AOAM531S2k2D0M7oS/4OybtyFRo8zzEz6aBfipKI8v65X9yRFuXWPD4B
	+zOCo9bHHMQpK0EWkByXuBc=
X-Google-Smtp-Source: ABdhPJwtE/owaf0wc/F6l4zc/NhqmVE+53f+fKtzqjSNLc7jsHxG3GLUHbZvgvFoWm8AbikR+8Y4Zw==
X-Received: by 2002:a05:6402:34cd:: with SMTP id w13mr2700193edc.73.1619084682265;
        Thu, 22 Apr 2021 02:44:42 -0700 (PDT)
From: Razvan Virtan <virtanrazvan@gmail.com>
X-Google-Original-From: Razvan Virtan <razvanvirtan@gmail.com>
To: justin.he@arm.com
Cc: minios-devel@lists.xen.org
Subject: Re: [RFCv4,06/35] plat/kvm: arm64: Fix arm64 memory layout for pcie ecam  
Date: Thu, 22 Apr 2021 12:44:39 +0300
Message-Id: <20210422094439.14071-1-razvanvirtan@gmail.com>
X-Mailer: git-send-email 2.17.1
In-Reply-To: <20201223073857.118076-7-justin.he@arm.com>
References: <20201223073857.118076-7-justin.he@arm.com>

All good with this patch.

Reviewed-by: Razvan Virtan <virtanrazvan@gmail.com>


From minios-devel-bounces@lists.xenproject.org Thu Apr 22 09:45:04 2021
Return-path: <minios-devel-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xenproject.org
Delivery-date: Thu, 22 Apr 2021 09:45:04 +0000
Received: from list by lists.xenproject.org with outflank-mailman.115240.219763 (Exim 4.92)
	(envelope-from <minios-devel-bounces@lists.xenproject.org>)
	id 1lZVtQ-00057C-RT; Thu, 22 Apr 2021 09:45:04 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 115240.219763; Thu, 22 Apr 2021 09:45:04 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <minios-devel-bounces@lists.xenproject.org>)
	id 1lZVtQ-000575-OU; Thu, 22 Apr 2021 09:45:04 +0000
Received: by outflank-mailman (input) for mailman id 115240;
 Thu, 22 Apr 2021 09:45:03 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=Di4h=JT=gmail.com=virtanrazvan@srs-us1.protection.inumbo.net>)
 id 1lZVtP-000570-Me
 for minios-devel@lists.xen.org; Thu, 22 Apr 2021 09:45:03 +0000
Received: from mail-ed1-x52d.google.com (unknown [2a00:1450:4864:20::52d])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id bdcde395-46c1-491a-b64e-b0ddbf943fca;
 Thu, 22 Apr 2021 09:45:03 +0000 (UTC)
Received: by mail-ed1-x52d.google.com with SMTP id y3so16373638eds.5
 for <minios-devel@lists.xen.org>; Thu, 22 Apr 2021 02:45:02 -0700 (PDT)
Received: from razvan-Lenovo-Legion-Y530-15ICH.local
 ([2a02:2f08:c211:9400:f8fb:7ca2:835f:c30e])
 by smtp.gmail.com with ESMTPSA id u1sm1609085edv.90.2021.04.22.02.45.01
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Thu, 22 Apr 2021 02:45:02 -0700 (PDT)
X-BeenThere: minios-devel@lists.xenproject.org
List-Id: Mini-os development list <minios-devel.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/minios-devel>, 
 <mailto:minios-devel-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:minios-devel@lists.xenproject.org>
List-Help: <mailto:minios-devel-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/minios-devel>, 
 <mailto:minios-devel-request@lists.xenproject.org?subject=subscribe>
Errors-To: minios-devel-bounces@lists.xenproject.org
Precedence: list
Sender: "Minios-devel" <minios-devel-bounces@lists.xenproject.org>
X-Inumbo-ID: bdcde395-46c1-491a-b64e-b0ddbf943fca
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20161025;
        h=from:to:cc:subject:date:message-id:in-reply-to:references;
        bh=dVqoXWAcIzNaLaLx2nlC+0z4WuRTZsA/fpXaCWjJqKE=;
        b=eIaTNq0uOgaPF/tVfqkzp25jH51pmrULFTnstYylNVtaCFMW4jAPUfwfWwgqF2nnPh
         MHKlPgua5yqOecl8P/YRxzWCHt7eU+zbfdyaAriGm/1fpDETWwi9edw1vQA/DFg6FWjC
         dsNeE/M9AjS2y4aYg9j779NzRGu5gOPYSUsxaptNF02r/rY5ktzJjzgvKlLrC+2Bs/go
         sJC36P6+MT4pJhJR7sV5bX3HWgP76r8EVSZ/SlmEhnt/oOvdssqewMbVYv5GZqHHjatt
         1EUyO5BJPNIOGj+oO9QAbG0g3riq2K1V1r+vj2g5wAc5hWcRQSfqJtpcqf3tp5UjleG8
         3ukQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to
         :references;
        bh=dVqoXWAcIzNaLaLx2nlC+0z4WuRTZsA/fpXaCWjJqKE=;
        b=bsdXEQ2M9RxMTscV/JFDqfnSE8Pk8xyBi8Nz0AqphPgZAvShJ5tS7SNwzYHB1kq1pF
         9seCpK7sA+2YeFpVld6vPgsf0QwKisU/lUWX24HDHmIPS84jS2BCy/DYSTDwmnZa4qom
         26aRBdOP2xsLIc+he6rwk/8ZdWeSTElLD5AhcyMBE3BjAnH6ftOcWw54RsUbAuTeIU4/
         6CJV3LtJLX8V35KtOHZvijD7KF4OAKcf5VuF7f0Vu13GNu8hduybAjhlLiHKdjbdn8z3
         tlWiwEbp7bB3IuUoAjM/b60ua2pR/LSuIwT3SQZpxFi0tId/GYlj1FXJwkEMWLmtVDrB
         nm0A==
X-Gm-Message-State: AOAM5308LVoYBhibDEn+ErXW2XYFowiq9ADfP+nZQUFVUrWBc40aJwcH
	x0vYPb7tATHdR5HBEc7joi4=
X-Google-Smtp-Source: ABdhPJyX1tn/OiC53lQX1hxAqfGEAKtsfki7iwToEV9OlNomE+5BUpXjYQIB5yus+/o8tskli7+F8g==
X-Received: by 2002:a05:6402:1004:: with SMTP id c4mr2698068edu.364.1619084702193;
        Thu, 22 Apr 2021 02:45:02 -0700 (PDT)
From: Razvan Virtan <virtanrazvan@gmail.com>
X-Google-Original-From: Razvan Virtan <razvanvirtan@gmail.com>
To: justin.he@arm.com
Cc: minios-devel@lists.xen.org
Subject: Re: [RFCv4,28/35] plat/kvm/arm: Add a memory hole at the beginning 128M
Date: Thu, 22 Apr 2021 12:45:00 +0300
Message-Id: <20210422094500.14140-1-razvanvirtan@gmail.com>
X-Mailer: git-send-email 2.17.1
In-Reply-To: <20201223073857.118076-29-justin.he@arm.com>
References: <20201223073857.118076-29-justin.he@arm.com>

This patch looks good to me, I've only found a problem with a comment:

@@ -83,14 +87,29 @@  ENTRY(create_pagetables)
 	bl  link_l0_pagetable
 
 	/*
-	 * Using 1GiB block to map device address space (0x0 ~ 0x3fffffff)

I think the comment below should become "Using 1GiB block to map the hole memory (0x0 ~ 0x7ffffff) and device
address space (0x8000000 ~ 0x3fffffff)", since the device address space doesn't start at 0x0 anymore.

+	 * Using 1GiB block to map the hole memory (0x0 ~ 0x7ffffff) and device
+	 * address space (0x0 ~ 0x3fffffff)
 	 */
-	add x6, x14, #L1_TABLE_OFFSET
+	/* Build a L2 block pagetable */
+	add x6, x14, #L2_TABLE_OFFSET
+	ldr x7, =0 /* NONE ATTR*/
+	mov x8, #HOLE_START
+	mov x9, x8
+	ldr x10, =HOLE_MEM_ENTRIES
+	bl  build_l2_block_pagetable
+
+	add x6, x14, #L2_TABLE_OFFSET
 	ldr x7, =SECT_ATTR_DEVICE_nGnRE
 	mov x8, #DEVICE_ADDR_START
 	mov x9, x8
-	mov x10, #1
-	bl  build_l1_block_pagetable
+	ldr x10, =DEVICE_ENTRIES
+	bl  build_l2_block_pagetable
+
+	/* Link this L2 block pagetable to L1 entry */
+	add x6, x14, #L1_TABLE_OFFSET
+	mov x8, #HOLE_START
+	add x9, x14, #L2_TABLE_OFFSET
+	bl  link_l1_pagetable

Reviewed-by: Razvan Virtan <virtanrazvan@gmail.com>


From minios-devel-bounces@lists.xenproject.org Thu Apr 22 14:25:47 2021
Return-path: <minios-devel-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xenproject.org
Delivery-date: Thu, 22 Apr 2021 14:25:47 +0000
Received: from list by lists.xenproject.org with outflank-mailman.115451.220268 (Exim 4.92)
	(envelope-from <minios-devel-bounces@lists.xenproject.org>)
	id 1lZaGz-0001EZ-1p; Thu, 22 Apr 2021 14:25:41 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 115451.220268; Thu, 22 Apr 2021 14:25:41 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <minios-devel-bounces@lists.xenproject.org>)
	id 1lZaGy-0001ES-V0; Thu, 22 Apr 2021 14:25:40 +0000
Received: by outflank-mailman (input) for mailman id 115451;
 Thu, 22 Apr 2021 14:25:39 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=Di4h=JT=gmail.com=virtanrazvan@srs-us1.protection.inumbo.net>)
 id 1lZaGx-0001EN-3u
 for minios-devel@lists.xen.org; Thu, 22 Apr 2021 14:25:39 +0000
Received: from mail-ed1-x533.google.com (unknown [2a00:1450:4864:20::533])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id 9b54efc2-326c-48e9-99e9-aa327feeefe0;
 Thu, 22 Apr 2021 14:25:38 +0000 (UTC)
Received: by mail-ed1-x533.google.com with SMTP id e7so53610367edu.10
 for <minios-devel@lists.xen.org>; Thu, 22 Apr 2021 07:25:38 -0700 (PDT)
Received: from localhost.localdomain ([46.97.169.5])
 by smtp.gmail.com with ESMTPSA id v5sm2237366edx.87.2021.04.22.07.25.36
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Thu, 22 Apr 2021 07:25:37 -0700 (PDT)
X-BeenThere: minios-devel@lists.xenproject.org
List-Id: Mini-os development list <minios-devel.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/minios-devel>, 
 <mailto:minios-devel-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:minios-devel@lists.xenproject.org>
List-Help: <mailto:minios-devel-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/minios-devel>, 
 <mailto:minios-devel-request@lists.xenproject.org?subject=subscribe>
Errors-To: minios-devel-bounces@lists.xenproject.org
Precedence: list
Sender: "Minios-devel" <minios-devel-bounces@lists.xenproject.org>
X-Inumbo-ID: 9b54efc2-326c-48e9-99e9-aa327feeefe0
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20161025;
        h=from:to:cc:subject:date:message-id:in-reply-to:references;
        bh=kZtj2MECe8cU6y5LRqK4iB4oFKpFAKGjzXZu3VKPOO8=;
        b=RSq5y+dxTPba2XNLTx9PG8x/MKqSr4usLXgBXLN42UwkBp7KGQFwMl/pmJElGuvT2H
         j2gMK0qP+6cwqrzXXc1YVxO+2A2zhC0JfuFtt5Jadmy6/9RErRUVmrBzy7E4nVVRdAWU
         qYDpRzDv/BSo7pAVdamfj5GqU5MnbKySqgaoFffzybbBbihYmGbAs/t8rCjitIXXbMbR
         thkY6c9XYDXRMaTSZRHFojcHKzVLp/Hs0Py0S94Ov6dUB24qBL0ZndzhmOrROQnlExY8
         Up9v1yu9TW13Vs3lz4xTMT1Fr33mb1kYBE6g0Vg7e8ttKikt0bzMqhNvKvxlGWYQPYj0
         TS/Q==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to
         :references;
        bh=kZtj2MECe8cU6y5LRqK4iB4oFKpFAKGjzXZu3VKPOO8=;
        b=OO1b4AwgFI1q28v+cFvctS5vIlrAMGPBLHwRTH1Kl9tdNfdr0mnr+P9//s/CC8y650
         t/+jbcDc/EEAd+zvTr2ZwkDsjPuXIVarILUErlbpR2TBZRboYEGMKwoS7Rzb/p0o/u1I
         96SJ8pRlVSll+H+CuAYf8saxvMGd8T/sTZ3aCOry08fCnQGW1nsJps2k31l2RHWYID40
         kThw8javZo8CUzHrbUjGS0T21Z3/pHovFtqVquImOgkprfO0LNlnuxxZSRfiPx7QlQWm
         7kKclaZz/FO5/ZTWL30QzWrAsB8Ith5iwl4EOD7nJqt3GsL5/X4HhiiqGNT2wX2CvxPA
         hVOg==
X-Gm-Message-State: AOAM533TjC64rBvFtjhwVjXVguFbeB+ROcDnKjjRHz2Vp5G53l8EPgzb
	A8e9Ev1bHcTvcGCo+N5SthY=
X-Google-Smtp-Source: ABdhPJyfWaydohAWKLCWRpVDYjXPkoRmC0TnofsNcWmIa+pSYHiDcTDj/dNrAXn8Oq4t84YTuO25JA==
X-Received: by 2002:a05:6402:5205:: with SMTP id s5mr4202027edd.65.1619101537365;
        Thu, 22 Apr 2021 07:25:37 -0700 (PDT)
From: Razvan Virtan <virtanrazvan@gmail.com>
X-Google-Original-From: Razvan Virtan <razvanvirtan@gmail.com>
To: justin.he@arm.com
Cc: minios-devel@lists.xen.org
Subject: Re: [RFCv4,14/35] plat/ofw: Support completed ranges mapping 
Date: Thu, 22 Apr 2021 17:25:35 +0300
Message-Id: <20210422142535.26769-1-razvanvirtan@gmail.com>
X-Mailer: git-send-email 2.17.1
In-Reply-To: <20201223073857.118076-15-justin.he@arm.com>
References: <20201223073857.118076-15-justin.he@arm.com>

Hi, Justin.
This patch looks good to me. Since we support more than 1:1 mapping now, I think
this comment (from "a/plat/drivers/ofw/fdt.c", line 267) can be removed:

"/* Handle ranges property, currently only 1:1 mapping is supported */"

Reviewed-by: Razvan Virtan <virtanrazvan@gmail.com>


From minios-devel-bounces@lists.xenproject.org Fri Apr 30 09:40:38 2021
Return-path: <minios-devel-bounces@lists.xenproject.org>
Envelope-to: archives@lists.xenproject.org
Delivery-date: Fri, 30 Apr 2021 09:40:38 +0000
Received: from list by lists.xenproject.org with outflank-mailman.120438.227755 (Exim 4.92)
	(envelope-from <minios-devel-bounces@lists.xenproject.org>)
	id 1lcPdU-0000MX-8u; Fri, 30 Apr 2021 09:40:36 +0000
X-Outflank-Mailman: Message body and most headers restored to incoming version
Received: by outflank-mailman (output) from mailman id 120438.227755; Fri, 30 Apr 2021 09:40:36 +0000
Received: from localhost ([127.0.0.1] helo=lists.xenproject.org)
	by lists.xenproject.org with esmtp (Exim 4.92)
	(envelope-from <minios-devel-bounces@lists.xenproject.org>)
	id 1lcPdU-0000MQ-61; Fri, 30 Apr 2021 09:40:36 +0000
Received: by outflank-mailman (input) for mailman id 120438;
 Fri, 30 Apr 2021 09:40:35 +0000
Received: from us1-rack-iad1.inumbo.com ([172.99.69.81])
 by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from
 <SRS0=hxvw=J3=gmail.com=gabi.mocanu98@srs-us1.protection.inumbo.net>)
 id 1lcPdS-0000ML-UB
 for minios-devel@lists.xen.org; Fri, 30 Apr 2021 09:40:35 +0000
Received: from mail-wr1-x42a.google.com (unknown [2a00:1450:4864:20::42a])
 by us1-rack-iad1.inumbo.com (Halon) with ESMTPS
 id cbbda912-89d4-47d6-827a-52c2aedfd1fe;
 Fri, 30 Apr 2021 09:40:34 +0000 (UTC)
Received: by mail-wr1-x42a.google.com with SMTP id x5so19547046wrv.13
 for <minios-devel@lists.xen.org>; Fri, 30 Apr 2021 02:40:33 -0700 (PDT)
Received: from localhost.localdomain ([188.173.197.103])
 by smtp.gmail.com with ESMTPSA id c2sm2548938wmr.22.2021.04.30.02.40.32
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Fri, 30 Apr 2021 02:40:32 -0700 (PDT)
X-BeenThere: minios-devel@lists.xenproject.org
List-Id: Mini-os development list <minios-devel.lists.xenproject.org>
List-Unsubscribe: <https://lists.xenproject.org/mailman/options/minios-devel>, 
 <mailto:minios-devel-request@lists.xenproject.org?subject=unsubscribe>
List-Post: <mailto:minios-devel@lists.xenproject.org>
List-Help: <mailto:minios-devel-request@lists.xenproject.org?subject=help>
List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/minios-devel>, 
 <mailto:minios-devel-request@lists.xenproject.org?subject=subscribe>
Errors-To: minios-devel-bounces@lists.xenproject.org
Precedence: list
Sender: "Minios-devel" <minios-devel-bounces@lists.xenproject.org>
X-Inumbo-ID: cbbda912-89d4-47d6-827a-52c2aedfd1fe
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20161025;
        h=from:to:cc:subject:date:message-id:in-reply-to:references
         :mime-version:content-transfer-encoding;
        bh=8MHycNBcsGO9qWmaGZnTjV636mDpRd46esDyeRhxoto=;
        b=TG7GebbYBVPQtOeKF4LTgW0vrbjFx/qkCyzozWBeYYkPcjJS39eXCf3nSycWs/JECl
         uCfraNQXlVRHM6YRA2qbXcuh4TQH/4L3Cg85M7sofsV6ecgORICRLR2TvPtnNyr/9hTj
         U5KT0h61jpzr05fsRXMWoSQxfD8Rxreni9IH2MTATUnIHIQnGjl96mGeHpYNAo2jurda
         qn+7U9v53EZBwV3REX/mbyL1EqWZXt95sTTdB9V/PGdEiD+knvO76ZtPyx/zqa3pc2Rn
         7eFvNT1++B6BvK8G2K8mgthNb2YdBjwQqzQcipT5mLbZJAUNzlm9vnNGrdJfO+Urbo/1
         ijKw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to
         :references:mime-version:content-transfer-encoding;
        bh=8MHycNBcsGO9qWmaGZnTjV636mDpRd46esDyeRhxoto=;
        b=qaCap3BtBWhyrSoZqvlua4cMRifIFqC3h98+w9i5Lw4HgzGggPNLGevil3rcRyeG8e
         PL/Wp+OGFC51JwObjlRzJTueXYeR9RuD2g6b65tgEhIqrJL/AS85Zk65OCTIUKWo/3d3
         lr2jjtzgmmjucrnudb9l0dLHkaNuUnynsGeKjpdKyqg9lSeL3XyBr8+JiK/1dW/Ne0IY
         +plkucEmrhofO8apKplg4Zn5j7CsquJ3UnHa1LDrRSjIRCzIxc3bT+r0leH3DjDd7KlE
         KNW1fWOo+7N0lnkSzhV8Qpu3ZFNhvHWyLOYAs2X/9TIArU4dNhpq50Q9HOzwkNYxigJ8
         AlvQ==
X-Gm-Message-State: AOAM532I+jEhVYMxtNkyCfVjpzk0+3uEsZOeAKPxeK+MY+CZK6a6igaz
	S1qzAs7eoYXxCpIg7/97dTA=
X-Google-Smtp-Source: ABdhPJwi/yp+Y2vVTjeWq4151uWNNpCuP1OjMefE4pii4RDvteXoqCDVFWlTxx2guONxOVdRjNv39Q==
X-Received: by 2002:adf:f28c:: with SMTP id k12mr5470204wro.272.1619775632954;
        Fri, 30 Apr 2021 02:40:32 -0700 (PDT)
From: Mocanu Gabriel <gabi.mocanu98@gmail.com>
To: simon.kuenzer@neclab.eu
Cc: minios-devel@lists.xen.org
Subject: Re: [UNIKRAFT PATCH] plat/xen: x86: Detect initrd entry from start_info
Date: Fri, 30 Apr 2021 12:40:31 +0300
Message-Id: <20210430094031.58999-1-gabi.mocanu98@gmail.com>
X-Mailer: git-send-email 2.27.0
In-Reply-To: <20201001124325.11042-1-simon.kuenzer@neclab.eu>
References: <20201001124325.11042-1-simon.kuenzer@neclab.eu>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit


Hi Simon,

I tested and everything seems fine to me. I also inspected that memory area and
everything was good.

Thanks,
Mocanu Gabriel


