From nobody Sat Apr 27 10:33:00 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1594087716; cv=none; d=zohomail.com; s=zohoarc; b=AKZStJvgHAvkrpLPz6nNe1bWAZJyQJghLASk+piIObH0GeulnECeZeVyy+ezWUfCtQKJZmIpClI+hWNljqxGIrB2MFhX5BjcZVIC/NjCpcS/ifxf85CqMtwi3RzSZz7tF2o3UAFfldsonY1sI6RRt6GGDxp7gTNCXuXBMuCW878= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1594087716; h=Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=YmRCz4CwArI7TD+I+EW3fguN01b3jj4dYKCICNEeHC4=; b=KdiGZmORAp354D/B5vYh0uboNtXkVdnx5RdBlnv3mZFaGPMAgQUn130I0sA6h9+ThPQunObttiwz4k6D5FzwdvNK7+xEYf/dZhV2GNBDiB4rkOQwLV9o4OQxuMvleUxsc7ISZ41APsW7tVEyFHIXWsJRjEpPZz1V0ERYeAGaM24= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1594087716227177.8603043411215; Mon, 6 Jul 2020 19:08:36 -0700 (PDT) Received: from localhost ([::1]:49788 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jsd2B-0005ub-28 for importer@patchew.org; Mon, 06 Jul 2020 22:08:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54742) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jsd1N-0005Sq-Sw; Mon, 06 Jul 2020 22:07:45 -0400 Received: from mail-qt1-x843.google.com ([2607:f8b0:4864:20::843]:35743) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jsd1K-0005bb-7S; Mon, 06 Jul 2020 22:07:45 -0400 Received: by mail-qt1-x843.google.com with SMTP id b25so9213599qto.2; Mon, 06 Jul 2020 19:07:41 -0700 (PDT) Received: from localhost.localdomain ([177.188.126.13]) by smtp.gmail.com with ESMTPSA id t36sm25323735qtj.58.2020.07.06.19.07.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Jul 2020 19:07:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=YmRCz4CwArI7TD+I+EW3fguN01b3jj4dYKCICNEeHC4=; b=TfSt0N1N9W77+ZlljQ6gGaYzMJg2ImLigjRQfF2w2/MTEim/xEMIUVDY4k2JFoqgBc qewGHL4vNugZZVq5J6ySJLWpVjLBylJ99PqNKyp5WVsQ6Gbu/QGeHZGwYUxBmwrxt2JF OxoKprEP/9/gOpMbyrMqR11S1gW/appK77/jueYGBayCWGz/lWXFnNm4qejaYP9QNOgh DKIHvmEYeA0oyPJg2hamy28315Mh33GLATitz6oB2c9I8ugY7DhyB8/k4Wi9TgnVhlQ9 3cgFSqmluuQPbaCxylT3B5/hnM8ndf0m/aqieH6SRKzDGMd2xyVxwuCkd3EManYt6i6u VtkQ== 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:mime-version :content-transfer-encoding; bh=YmRCz4CwArI7TD+I+EW3fguN01b3jj4dYKCICNEeHC4=; b=YhQEcZQdymRogz80w8sZVnNRs4JuQm5SqRgDVnRTuKv+MTPrSOMJ5f0NG/ivnmXcQ0 iqNVvbL5C1NRJ3tiUpa/Oe9kPhZW8LZqAMrcQ/SNv4+il9qHjOUH4Mjvo/k1HGu+PLV+ +lk6F7a4Y2+Yu6Jx6bEx4QuMst8G1OLfL2o4mBEdgLmxmRTOwybJLHliQFjgYAhZdhFD ipRS8ZwCn3gudtwffOcW0j/CNFZ8ppDnChIMdBpT6tc9zOeJaRDjv31ykX8c5YtZ7ZT1 XUwpE3ApgCUqi/qon1qkJi2Iz7q2ltiliCEOdCe+U8jt+U7rEYJ6BbsMDCFYnt6ykvhk tMAw== X-Gm-Message-State: AOAM530JiUDJKG0XsReibNMWWEwPBQRpheFWK27DZe6LC9ScCg+2VmI1 uxPv+JAsult3WYzd+/fMdEilDQ+47rw= X-Google-Smtp-Source: ABdhPJz7mPRSBvkiD/TR4KVHXeuIjk50m84eEH8vtO6+mk4Zgmmc/pBPZsR+YTmTYEYdyMrvyyfv7g== X-Received: by 2002:ac8:4e03:: with SMTP id c3mr52498987qtw.82.1594087659942; Mon, 06 Jul 2020 19:07:39 -0700 (PDT) From: Julio Faracco To: qemu-riscv@nongnu.org Subject: [PATCH] riscv: Add OpenTitan Big Number (OTBN) device address Date: Mon, 6 Jul 2020 23:07:28 -0300 Message-Id: <20200707020728.23420-1-jcfaracco@gmail.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::843; envelope-from=jcfaracco@gmail.com; helo=mail-qt1-x843.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: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: sagark@eecs.berkeley.edu, kbastian@mail.uni-paderborn.de, qemu-devel@nongnu.org, palmer@dabbelt.com, Alistair.Francis@wdc.com, Julio Faracco Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" This commit adds basics skecthes to implemente a OTBN unit. OTBN has address 0x50000000 and size 0x400000. For further reference, see OTBN docummentation: https://docs.opentitan.org/hw/ip/otbn/doc/ Signed-off-by: Julio Faracco Reviewed-by: Bin Meng --- hw/riscv/opentitan.c | 5 ++++- include/hw/riscv/opentitan.h | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/hw/riscv/opentitan.c b/hw/riscv/opentitan.c index 19223e4c29..8a5d060b57 100644 --- a/hw/riscv/opentitan.c +++ b/hw/riscv/opentitan.c @@ -50,7 +50,8 @@ static const struct MemmapEntry { [IBEX_ALERT_HANDLER] =3D { 0x40130000, 0x10000 }, [IBEX_NMI_GEN] =3D { 0x40140000, 0x10000 }, [IBEX_USBDEV] =3D { 0x40150000, 0x10000 }, - [IBEX_PADCTRL] =3D { 0x40160000, 0x10000 } + [IBEX_PADCTRL] =3D { 0x40160000, 0x10000 }, + [IBEX_OTBN] =3D { 0x50000000, 0x400000 } }; =20 static void opentitan_board_init(MachineState *machine) @@ -183,6 +184,8 @@ static void lowrisc_ibex_soc_realize(DeviceState *dev_s= oc, Error **errp) memmap[IBEX_USBDEV].base, memmap[IBEX_USBDEV].size); create_unimplemented_device("riscv.lowrisc.ibex.padctrl", memmap[IBEX_PADCTRL].base, memmap[IBEX_PADCTRL].size); + create_unimplemented_device("riscv.lowrisc.ibex.otbn", + memmap[IBEX_PADCTRL].base, memmap[IBEX_OTBN].size); } =20 static void lowrisc_ibex_soc_class_init(ObjectClass *oc, void *data) diff --git a/include/hw/riscv/opentitan.h b/include/hw/riscv/opentitan.h index 8f29b9cbbf..c739d44fbc 100644 --- a/include/hw/riscv/opentitan.h +++ b/include/hw/riscv/opentitan.h @@ -68,6 +68,7 @@ enum { IBEX_NMI_GEN, IBEX_USBDEV, IBEX_PADCTRL, + IBEX_OTBN, }; =20 enum { --=20 2.25.1