Received: by 2002:ac2:5042:0:0:0:0:0 with SMTP id a2csp642208lfm; Wed, 8 Jul 2020 10:56:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxIJvI/IsgNgY4anMhXNockF/4PqtSHnLmLwdHhW0aw1qbnLh/GTHOOvU6vrZmJqismZdr9 X-Received: by 2002:a25:24b:: with SMTP id 72mr39304015ybc.12.1594231010638; Wed, 08 Jul 2020 10:56:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594231010; cv=none; d=google.com; s=arc-20160816; b=nOhI5gmB9i6Oqh0DjzCOyIVjjo96dSDVLlBMEmYXQ9mDmL7I8IXn+AyA0jae5lL1WW Oz/bTd4qSzYyEJT0Vne6bf2GVffO38ASPq6YaT1WHgW2Gciwx4mNFVrq74RiHStJ5b6P Tp0k0JWMxqGA8porSd2PDxx42EmPGcABbuV2ZlfkqyRP6wN5XAcnbYDe+uqg6oE6EZY3 KMajtdScH8A0hb+EXJYC1B6Nw/QGZk0aCjxOtHDgWIGL/lFgle7Js7bqgvEyhiJ/DnKb YADXIoXKsXwPVOnrjo3019DAjrjuwPyXI72ZT05XpRb/hpX1KNC6t5wAKojHpYNbKnpj os9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:autocrypt:references:to:from:subject:dkim-signature; bh=U22wiPzF5RU+s2ekAx6AOl4uGlWcRAb453GfD82ZKhI=; b=GDbMQhmm9yqGhqlH7Fqvb6oE/qSSlewBE0Buv2Kf9FgO7WTOJ1JOTaPQgNUuhuCQR9 44JwcB8iU+t/yozoIw1sPtQFWzQ4gbcG22+RwQsl2xITNrvsmSWq/zPVcSTyS/uAJqo4 6ICFJM8z3YIgiVXPvGQNf2mbOM4iQasqkMQ/vmcbjzdVafLLPUe95dvrCkz69rZ2w0Jh rlcnW986f5YxrP4MWSmq2MIQuE8sIvBPzWI0nuvAiMXO4nPctqR4+BSpJd6z6f9ZjbiP VE2YcX0N05tVTbKj2jyuDHRyli1c4V0NixWgfkOG83Llpa14pioWgpbjnWeFJILR+0Ae lQ+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=r2Z4Wr7X; spf=pass (google.com: domain of qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=amsat.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id l18si337645ybk.457.2020.07.08.10.56.50 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 08 Jul 2020 10:56:50 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=r2Z4Wr7X; spf=pass (google.com: domain of qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=amsat.org Received: from localhost ([::1]:35924 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jtEJO-0005FC-1P for alex.bennee@linaro.org; Wed, 08 Jul 2020 13:56:50 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39224) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jtEJA-0005EH-Jt; Wed, 08 Jul 2020 13:56:36 -0400 Received: from mail-wr1-x443.google.com ([2a00:1450:4864:20::443]:37666) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jtEJ7-0000ES-84; Wed, 08 Jul 2020 13:56:36 -0400 Received: by mail-wr1-x443.google.com with SMTP id a6so49932164wrm.4; Wed, 08 Jul 2020 10:56:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:from:to:cc:references:autocrypt:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=U22wiPzF5RU+s2ekAx6AOl4uGlWcRAb453GfD82ZKhI=; b=r2Z4Wr7X8gfFC1/cRRJAelXMyipOkpKqLZiiPdq4DJxeBAZxVywTm/rk8P7mmV+QYd SQL8Tuqmao2lS40+2ET+boBL2Uy7okY3h+HX5g3HlL23X+/ZXbLD7mONnXsuabOdqkGt R+AA8/kP7sXzue5BxIie3Tf/tOCWtWsF6QWrP/y152QxtZIkkpZ3XwFtU6Z8RXEM+noy 496zBLMD4eI+AuaFIlba0EM6KcROZsFYeIsRD4eJVlqCuCPo9O4Npf4V1kUjAld8NRlu GrMHQiG5U8yiEX2DLQglR4eFW+oQpQKMtR+wCBF9/CSem5IffF+xvVnYWsjkUkFbFVMl ounw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:from:to:cc:references:autocrypt :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=U22wiPzF5RU+s2ekAx6AOl4uGlWcRAb453GfD82ZKhI=; b=AdmiFTPeJ242DLFA1/g8Sf76Bh6xPDcCY3iNm8MSpG1s0Dw1P9HVwicOAMQx8bzH5F MBnjKmtKKji797k6H9Nf1ZssAkzDhhszTxsEKlpKlshp/5FjN2Ij9dXnW1cZ2iM/VA6Q DdpqNc3Py0qADx7Kjk6eXvDlJkwG67m8WPN/Ka9eM5HI5IE5yj3Qt982VnIcwsPKsL3J LFCJ5Q6Eac4s5UfHbaAvXKJgJtEiSYRS0xoGPy7jcJMqdTByI6p9rU/aqLydLmnatpak pEljlxnGZwXX5giUsJ4udbz8omAUs6syCsfGTSJMJghsbyZA1XXDAV9IX222KUjhY+Nr Nsog== X-Gm-Message-State: AOAM533I/2mYsQSoXBYYJ1o/QPvfo0CTUDmMk++clktOmzlL1pM/5+zQ OHV2ntxbN7oUV8OvdN9GKWM= X-Received: by 2002:a5d:4903:: with SMTP id x3mr63261187wrq.351.1594230991418; Wed, 08 Jul 2020 10:56:31 -0700 (PDT) Received: from [192.168.1.36] (138.red-83-57-170.dynamicip.rima-tde.net. [83.57.170.138]) by smtp.gmail.com with ESMTPSA id w16sm1303673wrg.95.2020.07.08.10.56.30 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 08 Jul 2020 10:56:30 -0700 (PDT) Subject: Re: [PATCH v4 05/12] hw/arm: Add NPCM730 and NPCM750 SoC models From: =?UTF-8?Q?Philippe_Mathieu-Daud=c3=a9?= To: Havard Skinnemoen , peter.maydell@linaro.org References: <20200707184730.3047754-1-hskinnemoen@google.com> <20200707184730.3047754-6-hskinnemoen@google.com> <4b7130f2-032c-3067-b2b6-876a2b17b707@amsat.org> Autocrypt: addr=f4bug@amsat.org; keydata= mQINBDU8rLoBEADb5b5dyglKgWF9uDbIjFXU4gDtcwiga9wJ/wX6xdhBqU8tlQ4BroH7AeRl u4zXP0QnBDAG7EetxlQzcfYbPmxFISWjckDBFvDbFsojrZmwF2/LkFSzlvKiN5KLghzzJhLO HhjGlF8deEZz/d/G8qzO9mIw8GIBS8uuWh6SIcG/qq7+y+2+aifaj92EdwU79apZepT/U3vN YrfcAuo1Ycy7/u0hJ7rlaFUn2Fu5KIgV2O++hHYtCCQfdPBg/+ujTL+U+sCDawCyq+9M5+LJ ojCzP9rViLZDd/gS6jX8T48hhidtbtsFRj/e9QpdZgDZfowRMVsRx+TB9y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4x/5uOZrysjFvhtR8YGm08h+8vS n0JCnJD5aBhiVdkohEFAz7e5YNrAg6kOA5IVRHB44lTBOatLqz7ntwdGD0rteKuHaUuXpTYy CRqCVAKqFJtxhvJvaX0vLS1Z2dwtDwhjfIdgPiKEGOgCNGH7R8l+aaM4OPOd Message-ID: <2d1e272b-6575-30df-22ff-5d720973951d@amsat.org> Date: Wed, 8 Jul 2020 19:56:30 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: <4b7130f2-032c-3067-b2b6-876a2b17b707@amsat.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2a00:1450:4864:20::443; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wr1-x443.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: 0 X-Spam_score: 0.0 X-Spam_bar: / X-Spam_report: (0.0 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=1, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-arm@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kfting@nuvoton.com, qemu-arm@nongnu.org, Joel Stanley , Avi.Fishman@nuvoton.com, qemu-devel@nongnu.org Errors-To: qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org Sender: "Qemu-arm" X-TUID: +6FsNtrwK72u On 7/8/20 7:31 PM, Philippe Mathieu-Daudé wrote: > Hi Havard, > > On 7/7/20 8:47 PM, Havard Skinnemoen wrote: >> The Nuvoton NPCM7xx SoC family are used to implement Baseboard >> Management Controllers in servers. While the family includes four SoCs, >> this patch implements limited support for two of them: NPCM730 (targeted >> for Data Center applications) and NPCM750 (targeted for Enterprise >> applications). >> >> This patch includes little more than the bare minimum needed to boot a >> Linux kernel built with NPCM7xx support in direct-kernel mode: >> >> - Two Cortex-A9 CPU cores with built-in periperhals. >> - Global Configuration Registers. >> - Clock Management. >> - 3 Timer Modules with 5 timers each. >> - 4 serial ports. >> >> The chips themselves have a lot more features, some of which will be >> added to the model at a later stage. [...] >> +static void npcm7xx_realize(DeviceState *dev, Error **errp) >> +{ >> + NPCM7xxState *s = NPCM7XX(dev); >> + NPCM7xxClass *nc = NPCM7XX_GET_CLASS(s); >> + Error *err = NULL; >> + int i; >> + >> + /* I/O space -- unimplemented unless overridden below. */ >> + create_unimplemented_device("npcm7xx.io", NPCM7XX_MMIO_BA, NPCM7XX_MMIO_SZ); > > I still insist this is not the best, but as "The data sheet for these > SoCs is not generally available" there is not much I can suggest to > improve. From your other comment I found: https://github.com/Nuvoton-Israel/bootblock/blob/master/SWC_HAL/Chips/npcm750/npcm750.h In particular: #define AHB1_BASE_ADDR 0xF0000000 /* AHB1 allocation (Including APB allocations) */ #define AHB18_BASE_ADDR 0x80000000 /* AHB18 allocation */ #define AHB3_BASE_ADDR 0xA0000000 /* AHB3 allocation */ #define XBUSR_BASE_ADDR 0xC0002000 /* XBUS registers */ #define AHB14_BASE_ADDR 0xE0000000 /* AHB14 Allocation */ #define APB14_BASE_ADDR 0xE0000000 /* APB14 Allocation */ #define VDMX_BASE_ADDR 0xE0800000 /* VDMX */ XBUS doesn't seem important. If SPI flashes aren't connected, returning bus transaction sounds correct: #define SPI0CS0_BASE_ADDR 0x80000000 /* SPI0 direct access CS0 */ #define SPI0CS1_BASE_ADDR 0x88000000 /* SPI0 direct access CS1 */ #define SPI0CS2_BASE_ADDR 0x90000000 /* SPI0 direct access CS2 */ #define SPI0CS3_BASE_ADDR 0x98000000 /* SPI0 direct access CS3 */ #define SPI3CS0_BASE_ADDR 0xA0000000 /* SPI3 direct access CS0 */ #define SPI3CS1_BASE_ADDR 0xA8000000 /* SPI3 direct access CS1 */ #define SPI3CS2_BASE_ADDR 0xB0000000 /* SPI3 direct access CS2 */ #define SPI3CS3_BASE_ADDR 0xB8000000 /* SPI3 direct access CS3 */ So I'd prefer you use: create_unimplemented_device("npcm7xx.AHB1", 0xf0000000, 256 * MiB); Maybe for the PCI root complex: create_unimplemented_device("npcm7xx.AHB14", 0xe0000000, 256 * MiB); What do you think? Regards, Phil.