From nobody Mon Nov 23 04:34:24 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=none dis=none) header.from=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1794198247; cv=none; d=zohomail.com; s=zohoarc; b=glWXf5FcFXRBVG2w52DN/6gvnVdJIFw3h3g3VeODf9k1IsMuDQOFoF25SGaFkRn8VWdLrb2EsCrcGVvI4D9VUSrJ14Pen7QCmdpClPPbwEYBA7RqIg+Vx1yP3nBg1JB/d/LVRLYXPCou/ACk5V+FytIxceFO4i0rChtn7Ptsqjs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1794198247; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=Dz/CV/mROt6Y8wC6PAwEvXMn4zKJxF55fBN/9sOS2SU=; b=ZJ8lHRVGOXyOVXuhRHw4W1QQVyydaP8K0rYjzdz6O6t/xHbFUsP8xRQIgtncEGRMpZmHecea//QaYFNjMROpdQfqxXAAhxPUs70FiOOY1LukDA1hqfcMo0omOxl2SZiH6EIjBtwoSyKGeH/mgE2d7qLvdmRQq+G7uB3kMoZDbRI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass header.from= (p=none dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 179419824795393.22506279771744; Sun, 8 Nov 2026 20:24:07 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xQGuc-0003lr-Ay; Sun, 08 Nov 2026 23:23:18 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xQGua-0003l3-RI for qemu-devel@nongnu.org; Sun, 08 Nov 2026 23:23:16 -0500 Received: from mx0b-0031df01.pphosted.com ([205.220.180.131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xQGuX-0008Rf-VZ for qemu-devel@nongnu.org; Sun, 08 Nov 2026 23:23:16 -0500 Received: from pps.filterd (m0279870.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 6A94B8KF3382549 for ; Mon, 9 Nov 2026 04:23:11 GMT Received: from mail-dy1-f199.google.com (mail-dy1-f199.google.com [74.125.82.199]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4hu6x2g0tv-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Mon, 09 Nov 2026 04:23:11 +0000 (GMT) Received: by mail-dy1-f199.google.com with SMTP id 5a478bee46e88-36ecd5db581so99476eec.0 for ; Sun, 08 Nov 2026 20:23:11 -0800 (PST) Received: from hu-bcain-lv.qualcomm.com (Global_NAT1.qualcomm.com. [129.46.96.20]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-372669d2826sm10156773eec.29.2026.11.08.20.23.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 08 Nov 2026 20:23:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= Dz/CV/mROt6Y8wC6PAwEvXMn4zKJxF55fBN/9sOS2SU=; b=CPdyJk2wG3dbXX5K GPFSStkrlW7hilXzBtBDg+BEO0Pa9xNK9xr/PCUK9G2Q+ieoYkdzpXPJ3T5KEdpk NnkpFH2mIOy8iOXAKV1kIuBfZka+YBbp6GMP8aZoIBwfFhjo+Qf0yEa28qJ6o+8g bTk1nQtZmpIBSAgqmjxfcRpDO8IIV0Q6/QZzM+vjFIdujU4r+BqY1lzPOThwRxST jzkwDuFdKOfGntuBQIIhaEGCu4L+XXqoDpb5SGSMuFaiv+UDNnfL8J7UqDH+0K3z af21uw0iJi8JZ+ueiDagqe4iNn41heMlNRa2HEGPDPQr+x0NiWPbjMEsaXIVs9EI l9SZcw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1794198190; x=1794802990; darn=nongnu.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to:content-type; bh=Dz/CV/mROt6Y8wC6PAwEvXMn4zKJxF55fBN/9sOS2SU=; b=bVuIouFskbSN2ILYQuCaR/vc6tSZlBYET6lJnwuWmp5GxyI9haFVBUR8lwjwsIeLdN N9aqLBJvxzq5e5QNNUbZaFpEFRoTw7E7fcsePdnunQqwpqoUlVwGyhB0R8odhjGBNljr 4CtQweIioH3WbTmUpdICprs/9mwjbHQdOORQoiy5WqreEZQmlQ+O9aySHkpH1v7uaUUO /xQtff0EpSuTp4iNQmuLMurXXgxgrdh/obgCk2Pl9yWD7uwSDp9hURCF10uqSRsU5Fzm dXqZb+0Ai2dOPYp9YOhj9q0bAFys6gnx2xWUvj+xGKJc+5zPmXUohHyVNGrbdEy+4rUy c43Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1794198190; x=1794802990; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=Dz/CV/mROt6Y8wC6PAwEvXMn4zKJxF55fBN/9sOS2SU=; b=owLBSpVoiU3AjXWIUjE+Jm47M7H0yM0+OSFD8eMLgvV87SIY4DmdJsEIeU6RPp/dTA X3dUIEJUsEWWxkT5LaTNRoAtQak8YUzViW9JAAo0jFNUDxLKysnc0dhJERmMKAeqE0lx g0J1+lm2zm6zFY8g+y4VexlxPnAev6FY8/8XaVXNribdhYYRdVKaSKfxGgY+dXUiSKpm u7tgwDOALYe7S97k3WFjEbf/naMYwF3Bx5jgBpa9/RsjcKESLniDuK2lvk1HqSVOC9Y4 2AtXZD/Qp94srQG/E+SiNJq4O/S9dun9eENW8/QXsnt6fS2sg7phwGkfcaZPk2lCiWYb oRLw== X-Gm-Message-State: APuU4Z9lieBDFsMdXf6q2fHisMIeUZ0nCxzxaEHRmlSKtqwX2IGnWeha 6rJs2FGXvNtS0+dcbPzMPqfZIanUcPuDI9HwHjNTZ60QCx+M4V7fDQyWSp2Uso4O0bnDTnZp9Pu lUSLZPDKoOE0hjVy3JCPvU7dknBuBPX0YlP3KX5ipPumMnNO30G4hxixeHyohN0bdDg== X-Gm-Gg: AYBFou0qdTHh6nWAKjmcLmNTHdNS6IadZVwAiA4tcxVtY/PBK1SrpxXnBHxczq5oJ9Z 3w7QJaRiOJeP1Yajah1j6kwRBdV4VE1UcuJokeeeCq39+dH18/NtEDkh5DTpI2JNENAkEKW/oAS +85JVur9LxgRe0QHP9HoNvuzU40vulevdQy4zPnu1LN1uQkEsjJH1sC3koC4++iN2dEJuJ9sJKM MFh5VcyKjdNE22iGSRTNj3/rYeHN1MCEQPFOBlnAQx7KDdJ3b/6jYa0VDKky0xJ8OEB19ARs6RY tD9y8LnkY9zc4foQJp9V8HmfuSTqQS8gX4PN2wpatEA6xjtz6s42NTRUIhDWHO5ED/156JF+93e TLOMogxaRQZCpZQB7lPIIHzbcXAQqMKRit0kM2JEWQsivp6wI4qkks/+IRa4UmeRx9AQQhdcl8B 9iqpN3/52t2oNVeI31Ew30xA== X-Received: by 2002:a05:7300:ec97:b0:36e:3a0a:2953 with SMTP id 5a478bee46e88-37256bf38f9mr5564931eec.41.1794198190266; Sun, 08 Nov 2026 20:23:10 -0800 (PST) X-Received: by 2002:a05:7300:ec97:b0:36e:3a0a:2953 with SMTP id 5a478bee46e88-37256bf38f9mr5564901eec.41.1794198189666; Sun, 08 Nov 2026 20:23:09 -0800 (PST) From: Brian Cain To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , Brian Cain Subject: [PATCH 1/5] docs/system/hexagon: describe machine models and memory maps Date: Sun, 8 Nov 2026 20:23:02 -0800 Message-Id: <20261109042307.1301438-2-brian.cain@oss.qualcomm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20261109042307.1301438-1-brian.cain@oss.qualcomm.com> References: <20261109042307.1301438-1-brian.cain@oss.qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Authority-Analysis: v=2.4 cv=TMjQ2Fla c=1 sm=1 tr=0 ts=6af14aaf cx=c_pps a=cFYjgdjTJScbgFmBucgdfQ==:117 a=ouPCqIW2jiPt+lZRy3xVPw==:17 a=IkcTkHD0fZMA:10 a=zJRp6_cAMcgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=gowsoOTTUOVcmtlkKump:22 a=NEAV23lmAAAA:8 a=EUspDBNiAAAA:8 a=XEA1TDPqdI0cZNt5_OoA:9 a=QEXdDO2ut3YA:10 a=scEy_gLbYbu1JhEsrz4S:22 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMTA5MDAxNyBTYWx0ZWRfX2KSRQyPfIcne 9PzmmJUN7/Bk0SpwI8/6eeCSmDcp+WaTW7Sc4nTO+94I9E6flYmr/X80HQckrq0QYQhgpuKYeEp vIECQHxA5jPIetY3V2DFUUxqSeuMhQn1X5zd+NSExNAgDdYXvn4oDEFsaiNUTdNEHQzk7O5J6om H687CeJ8MgNQNBoRF+tc4NfEIkP/DC0ZtLzwLj/OFLCmFD2XM2eBwPKYxXkhcaXEd3fKzpecutc S+5+HClehpJ2qjrAQ0N5XvelbqrlERVyGaSSa5cNR6aFcDqpsATYlh67PS5AsSpiQQqGJANVKcY B6pQgRRFj4pwAxM1vogx0r8tr+WDm1v6Nic5gs+RXDcxTNEPIYt3b+XZc7n9c4hQCSmZl8iE924 GgGVcgy3uVarKQyBWjd/+hb7XoMLlg8I2mvo/KChtT8F3/IVWH/8bkeN05rfs4dDx8XmF1g0LRS INn4iWFfd2I2zw3tFQA== X-Proofpoint-GUID: Fiy0aNr2qk9G7NmyRJYJar_25wAud38c X-Proofpoint-Spam-Info: AW1haW4tMjYxMTA5MDAxNyBTYWx0ZWRfXyY+tO5LT2Eg1 09ljtUdU2EUN2W+KLYcngm15+qg/LvdWMmoOfnjqrcOJ/iVHhYWXhFpWFo/2Smbe5ApAYsEDG2o bVEEq+sKZU2rBHsEBLs3fHgIl6twRS0= X-Proofpoint-ORIG-GUID: Fiy0aNr2qk9G7NmyRJYJar_25wAud38c X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-11-09_02,2026-11-06_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 adultscore=0 lowpriorityscore=0 clxscore=1015 malwarescore=0 phishscore=0 priorityscore=1501 spamscore=0 bulkscore=0 impostorscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2611040001 definitions=main-2611090017 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=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.180.131; envelope-from=brian.cain@oss.qualcomm.com; helo=mx0b-0031df01.pphosted.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @qualcomm.com) X-ZM-MESSAGEID: 1794198248733158500 Signed-off-by: Brian Cain Reviewed-by: Pierrick Bouvier --- docs/system/hexagon/cdsp.rst | 41 +++++++++++++++----------------- docs/system/hexagon/machines.rst | 38 +++++++++++++++++++++++++++++ docs/system/target-hexagon.rst | 5 ++-- 3 files changed, 60 insertions(+), 24 deletions(-) create mode 100644 docs/system/hexagon/machines.rst diff --git a/docs/system/hexagon/cdsp.rst b/docs/system/hexagon/cdsp.rst index 8d3a1f611b0..3556d8a8aa0 100644 --- a/docs/system/hexagon/cdsp.rst +++ b/docs/system/hexagon/cdsp.rst @@ -1,21 +1,12 @@ .. SPDX-License-Identifier: GPL-2.0-or-later =20 -Compute DSP -=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D +Board-specific boot firmware +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D =20 -A Hexagon CDSP is designed as a computation offload device for an SoC. The -``V66G_1024`` machine contains: - -* L2VIC interrupt controller -* QTimer timer device - -This machine will support any Hexagon CPU, but will default to ``v66``. - -H2 boot firmware ----------------- - -These machines can be started through the H2 hypervisor images shipped in -``pc-bios``, selected with ``-bios``: +The CDSP/NSP machines can use the host firmware shipped in ``pc-bios``, +selected with ``-bios``. These images contain H2 and either the ``booter`` +or ``loadlinux`` loader. Use ``-L`` to specify QEMU's firmware directory +when running an uninstalled build. =20 .. list-table:: :header-rows: 1 @@ -45,16 +36,22 @@ These machines can be started through the H2 hypervisor= images shipped in - ``0xa0000000`` - ``sa8797p_nsp0`` =20 +``hexagon_loadlinux_`` + Boots a guest operating system written for the Hexagon VM interface. + Despite the name, it is not specific to Linux. H2 starts the guest from + an image that QEMU has placed at the ``-kernel`` address in the table + above. + ``hexagon_booter_`` - H2 plus a loader that reads guest ELF files from the host through QEMU - semihosting:: + Runs H2 user programs. The booter creates a VM, loads a program + that it reads from the host through semihosting, and waits for the + program to exit:: =20 qemu-system-hexagon -M qcs6490-cdsp -serial stdio -display none \ -bios hexagon_booter_qcs6490_cdsp \ - -semihosting-config enable=3Don,target=3Dnative,arg=3Dbooter,arg= =3Dguest.elf + -semihosting-config enable=3Don,target=3Dnative,arg=3Dbooter,arg= =3Dprog.elf =20 - Guests are loaded at ``0xa2000000``. + Programs are loaded at ``0xa2000000`` by default; the booter's + ``--guest_base`` option changes this (``arg=3D--help`` lists its options= ). =20 -``hexagon_loadlinux_`` - H2 plus a loader that starts a kernel which QEMU has placed at the - ``-kernel`` address in the table above. + For more info, see . diff --git a/docs/system/hexagon/machines.rst b/docs/system/hexagon/machine= s.rst new file mode 100644 index 00000000000..a4760b7a5b1 --- /dev/null +++ b/docs/system/hexagon/machines.rst @@ -0,0 +1,38 @@ +.. SPDX-License-Identifier: GPL-2.0-or-later + +Hexagon machines +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D + +Choose a machine that matches the runtime environment for the program and +the Hexagon ISA it targets. Hexagon machines fall into two broad categorie= s: +simulator-compatible machines and board-specific DSP subsystem machines. + +Simulator-compatible machines +----------------------------- + +Simulator-compatible machines support standalone SDK OS and QuRT programs +intended for the Hexagon simulator environment. They provide the common +Hexagon system facilities expected by those programs, including interrupt +and timer services, local memory, semihosting, and a configuration table +that describes the selected model's capabilities. + +Select the model that matches the program's target ISA and threading +requirements. ``V66G_1024`` is the default when ``-M`` is omitted; ``sim`` +selects the most modern simulator-style machine. + +The virtual machine (``virt``) +------------------------------ + +``virt`` is a synthetic simulator-compatible board for operating systems a= nd +bare-metal programs. QEMU supplies a device tree that describes the virtual +hardware available to the guest, including CPUs, interrupt controller, +console, virtio devices, and accelerator capabilities. See :doc:`boot` for +its boot protocol. + +Board-specific CDSP and NSP machines +------------------------------------ + +Board-specific CDSP and NSP machines model the DSP subsystem of a named +SoC. + +Firmware choices are listed in :doc:`cdsp`. diff --git a/docs/system/target-hexagon.rst b/docs/system/target-hexagon.rst index 5d48cf401ad..5a646fd0d04 100644 --- a/docs/system/target-hexagon.rst +++ b/docs/system/target-hexagon.rst @@ -21,8 +21,8 @@ reset and the first instructions are fetched from DDR via= the EVB/reset vector. In a real system, a TBU/SMMU would normally arbitrate AXI accesses but we don't have a need to model that for QEMU. =20 -Hexagon DSP cores use simultaneous multithreading (SMT) with as many as 8 -hardware threads. +Hexagon DSP cores use simultaneous multithreading (SMT). The number of +hardware threads depends on the machine. =20 .. admonition:: Diagram =20 @@ -100,6 +100,7 @@ machines. This can be further configured through ``-sem= ihosting-config``. Hexagon Features =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D .. toctree:: + hexagon/machines hexagon/emulation hexagon/cdsp =20 --=20 2.34.1 From nobody Mon Nov 23 04:34:24 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=none dis=none) header.from=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1794198232; cv=none; d=zohomail.com; s=zohoarc; b=foCGU9Ex/vkMC2l4NXlMu9jKGugxEK3hqbj8zgVOzXZ20THr6ZQpwKXYFLTaS9VWodjrYnLMw+OoD77gEkTYokW71bYbz/XqcaCvgFFmxjhacV42QcMlhil+eXFFFgvqdYsgoiK64G/kk5oCc7f+G34T3V3guFNDcfdkG/yZEMs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1794198232; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=UsnV40nPJLMnMgucmH6rW1Gml1ueCy6PZprIsQcNcBg=; b=bKTc8EtcsulpfwrV19nyoJgZ1RYSUCJns6qaY+p7y269FS2KEPq4sQzyw+62sKtIuMb4ylFu565kqMZk8PZQ1OnlTnzMnjrruElG6gyY11In1YIuJRy50VQUovRkCeJ6PShpVt6U1lSq8cCUI57TcnWWjOxaYxVVyv6ppt2kSYI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass header.from= (p=none dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 17941982327361003.5542236500389; Sun, 8 Nov 2026 20:23:52 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xQGuc-0003ls-Cf; Sun, 08 Nov 2026 23:23:18 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xQGuZ-0003kw-Vh for qemu-devel@nongnu.org; Sun, 08 Nov 2026 23:23:16 -0500 Received: from mx0b-0031df01.pphosted.com ([205.220.180.131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xQGuX-0008Rn-UJ for qemu-devel@nongnu.org; Sun, 08 Nov 2026 23:23:15 -0500 Received: from pps.filterd (m0279870.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 6A94B0Vf3382413 for ; Mon, 9 Nov 2026 04:23:13 GMT Received: from mail-dy1-f197.google.com (mail-dy1-f197.google.com [74.125.82.197]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4hu6x2g0u0-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Mon, 09 Nov 2026 04:23:12 +0000 (GMT) Received: by mail-dy1-f197.google.com with SMTP id 5a478bee46e88-341eff9e381so1307456eec.1 for ; Sun, 08 Nov 2026 20:23:12 -0800 (PST) Received: from hu-bcain-lv.qualcomm.com (Global_NAT1.qualcomm.com. [129.46.96.20]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-372669d2826sm10156773eec.29.2026.11.08.20.23.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 08 Nov 2026 20:23:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= UsnV40nPJLMnMgucmH6rW1Gml1ueCy6PZprIsQcNcBg=; b=duxZZc8u9n2/BUDc APAc6l6+YInInJH52MSUE1ttldEyvi3fe4f6r7Ja/wc60WI/AU+qk4dwaLN7fXvF un11IB6sf1u2Aa8CRjm9Mh+04+hZNIONYNd/AfzlrqI2h9Gvof4mAPoHdiEavqy9 3k1NGdfbwXHc0dFk16eDkVFWHGPZboojV8xY4CcwPkXBwGVD87LSKru/0EiSfJXS vDa+NGTnStV5VVk20QXR+oxrX7R6LwUnSfp9ogip/Mv/yVs7mCeQoaIvhd/CZC3H Nptul5xjSCZ8b3HPuPcg4NIq09ZuooOuqfKKqGxz3B3LarXjq+n/Cz1bSjAYDT/b /Xhhnw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1794198192; x=1794802992; darn=nongnu.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to:content-type; bh=UsnV40nPJLMnMgucmH6rW1Gml1ueCy6PZprIsQcNcBg=; b=JBGLBVBV3Op0pq/thGZ1/gRD0HEtiXX0GBEZ+g0ozRhVtKPBsV8uV0vTamX9gwZCAo fUN5XvqVt++9IMimaIZbxwtIXRwCTY+2OaLn08+lJsCONy9ZHWE0Pcr4wKl5H5SIDPfK QOwIhNobz/JiGwUIWh/w9JxXC4v6NE3Ozl6qi0B3MA1vUAU+lmjFoNu5mNZcSVUoHj6T XB0kUfu5hGeubESi9XnWtorhIPgdMQq6xo0lS9+Avg6hmnvzPiq9Kn2mMVq9UkkHNdQn cQuKvirBElEiVL84/pXZek9WScoFr8dJ27d1wpGE+uaxDrieyMuKHu76yqg8yrbPLC+f U+mQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1794198192; x=1794802992; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=UsnV40nPJLMnMgucmH6rW1Gml1ueCy6PZprIsQcNcBg=; b=25AyUAKDeVBJMw+/ucU1mHTsTPHr/N2e4GaaNk1+AqZ6Nx72ofnSu1QvmnlNkccPo1 y7V9UCgGu3hsPOs9kYxKLyabmJ+HGPoioMhpfh/DoiNux/K4hSCRkCgM1ZDpXar0TJoD Dk3eCKM8z+2Smudi133T+8zAjvB13gYdIyvxYdjQNC0t3XfYMrExdDDRele3Fiwec2LM udkv2VIhU3kiMs3cA6cwgAyskOymuRv6S9TcWFZN0WSIG7Bx1Yxos6Ag9IoSrOkq5xUE hjXkCLGVvzyM1pyD8pWW2lHvb6C4kiwUSr9T3i6MBLVJOhHe1osAbcRHdDV4HY9s3z9z 8ujA== X-Gm-Message-State: APuU4Z/Drq+phynG6X3mclmrNEL/8otQIxWieRgt6EO+jgZPvxKbDPpf N1efZGhWQL3MMuctR95uHPxUB5vjnoI5FY9Bh2ZnTwA+d/cyO0IbMg24vwity+oHBSkNnYj6aeI HjhaY+dv8knVxkRu60rPmbnwhP7eiM+yzCM4DnFXP1l3Np70IXia2L4DJQWMAa2fQtw== X-Gm-Gg: AYBFou3adJPM+CbAluR0E1lCtUIR/Pe30fqRbr0Zk8yfMeaXU9CNtt1P2OyfioZcLT7 5aKdU5JNgAuF/Sjb9ZGFHD20ZJu81XdnLfTTo0cUQJ7eKbZEJljgA14F2HQy542Y5fnCvn6DNec O9i02jWL86JlNxmqhpx4h1KhqNQw7sy/MHDi1jZuLldMTbm6dpDB0nOUWF57OMltrCwNtk6Sq0x 1sdAIRp34k4RYcSmMWI7mUbT38ifxIg6g7bhPh+UoWE64iCK/dJ4masTH9BV5+1LES5yBLtfQtk CGHTGX8/K9w+CKY43qqMh61512sArQJ7m09EV1z5tnp5dvJMg/CrT4U3VjpKrBos6hyE0eh9zCH AEzEPix7Jw9X2Hgqv1wzvQLCMsFLjR8UxHeJctJnO7IQaMemgJHAaHI/+nhEfgD8+Y2ciLSBppL uqg2NGUTv0a4wFuEA8PVAVVg== X-Received: by 2002:a05:7301:628a:b0:33b:c24c:d31c with SMTP id 5a478bee46e88-37256612cc6mr5456094eec.7.1794198191782; Sun, 08 Nov 2026 20:23:11 -0800 (PST) X-Received: by 2002:a05:7301:628a:b0:33b:c24c:d31c with SMTP id 5a478bee46e88-37256612cc6mr5456057eec.7.1794198191088; Sun, 08 Nov 2026 20:23:11 -0800 (PST) From: Brian Cain To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , Brian Cain Subject: [PATCH 2/5] docs/system/hexagon: update the overview and emulation limits Date: Sun, 8 Nov 2026 20:23:03 -0800 Message-Id: <20261109042307.1301438-3-brian.cain@oss.qualcomm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20261109042307.1301438-1-brian.cain@oss.qualcomm.com> References: <20261109042307.1301438-1-brian.cain@oss.qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Authority-Analysis: v=2.4 cv=TMjQ2Fla c=1 sm=1 tr=0 ts=6af14ab1 cx=c_pps a=Uww141gWH0fZj/3QKPojxA==:117 a=ouPCqIW2jiPt+lZRy3xVPw==:17 a=IkcTkHD0fZMA:10 a=zJRp6_cAMcgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=gowsoOTTUOVcmtlkKump:22 a=EUspDBNiAAAA:8 a=5uMcSSmQ1h4GQFTkCBAA:9 a=QEXdDO2ut3YA:10 a=PxkB5W3o20Ba91AHUih5:22 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMTA5MDAxNyBTYWx0ZWRfX6nxbO3g2TzXc h9x+2XEIbwaxCYWdBd2TxB89dXfiRkr1eKZo3xRxB2VLphky6AGxebOXOEFA0saXCJYQzgrGOfW jc2iMxe5Ddax1surMKlOLt7gndat7Ceyhiom+1kGqe3nY+CQwubDHQffLqrGOyQRco7cnRjFhGJ XQLKH/17/lqa/iwsIvsE2Wy8G/jaZTbnrKCVGJXREVxwIFufErX60mc17Dkx0vHeY5+9cG3jHt5 xMWFVvq98CBuqiDP9rCMOcB3Y0Z38LdmdqNGWwO1GygbNOJdpQTJ1mw1+dhT6zGYOboGul+iJFM x00hQDBU8pxjFR2g0XBEB3B7gCPMldCeqNzk8H9HWJEnMw2F7sG+Ns/Sy/fbxTmED0eZuPuw8iu AHAV1S8t0pb4W730zGhDwzS3EW1lZXmuyvbwJq0jquce4hsNqJlKf+hKiLUABHdjAcljJGZlB7W esTJa+Rl3HSYfe82MOQ== X-Proofpoint-GUID: jbCPoXNIWuafbGZ1DzbhXF6M-5pgerpO X-Proofpoint-Spam-Info: AW1haW4tMjYxMTA5MDAxNyBTYWx0ZWRfXw+OVVDPhvjJh zjqxo2xVq52sCwvTDa/cJlcG/Jg332emlgxZeDhH3zmGHwuNtpLvxfcy+ofmd8/ST973MU/Wvmn B5UFtP+83/6jv/3np9kdrRmWEYl/+w8= X-Proofpoint-ORIG-GUID: jbCPoXNIWuafbGZ1DzbhXF6M-5pgerpO X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-11-09_02,2026-11-06_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 adultscore=0 lowpriorityscore=0 clxscore=1015 malwarescore=0 phishscore=0 priorityscore=1501 spamscore=0 bulkscore=0 impostorscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2611040001 definitions=main-2611090017 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=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.180.131; envelope-from=brian.cain@oss.qualcomm.com; helo=mx0b-0031df01.pphosted.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @qualcomm.com) X-ZM-MESSAGEID: 1794198234659158500 Describe the devices that the machines instantiate, ELF boot path. Signed-off-by: Brian Cain Reviewed-by: Pierrick Bouvier --- docs/system/hexagon/emulation.rst | 18 +++++++++++++++ docs/system/target-hexagon.rst | 37 ++++++++++++++++++------------- 2 files changed, 39 insertions(+), 16 deletions(-) diff --git a/docs/system/hexagon/emulation.rst b/docs/system/hexagon/emulat= ion.rst index fb57c77ae90..41a9a8467f9 100644 --- a/docs/system/hexagon/emulation.rst +++ b/docs/system/hexagon/emulation.rst @@ -11,7 +11,25 @@ It also has support for the following architecture exten= sions: =20 - HVX (Hexagon Vector eXtensions) - `HVX floating point `_. +- HLX (see the `HLX reference manual + `_). + +User-DMA and HMX are not yet implemented. + +Machine configurations also select the available HVX contexts, VTCM, +and HMX/HLX resources. See :doc:`machines` for the machine configurations. =20 For information on the specifics of the HVX extension, please refer to the `Qualcomm Hexagon V79 HVX Programmer's Reference Manual `_. + +Emulation limits +---------------- + +The system models target functional execution. + +HVX uses 128-byte vectors; 64-byte mode is not implemented. + +See :doc:`../../devel/hexagon-sys` and +:doc:`../../devel/hexagon-l2vic` for system-register, TLB, and interrupt +details relevant to OS and firmware authors. diff --git a/docs/system/target-hexagon.rst b/docs/system/target-hexagon.rst index 5a646fd0d04..7b7d0bc31bc 100644 --- a/docs/system/target-hexagon.rst +++ b/docs/system/target-hexagon.rst @@ -8,15 +8,17 @@ Hexagon System emulator Use the ``qemu-system-hexagon`` executable to simulate a 32-bit Hexagon machine. =20 -Hexagon Machines -=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D +DSP subsystem +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =20 Hexagon DSPs are suited to various functions and generally appear in a "DSP subsystem" of a larger system-on-chip (SoC). =20 Hexagon DSPs are often included in a subsystem that looks like the diagram below. Instructions are loaded into DDR before the DSP is brought out of -reset and the first instructions are fetched from DDR via the EVB/reset ve= ctor. +reset and the first instructions are fetched from DDR via the reset vector. +QEMU's ELF boot path instead starts at the ELF entry point; the guest sets +up its own ``EVB``. =20 In a real system, a TBU/SMMU would normally arbitrate AXI accesses but we don't have a need to model that for QEMU. @@ -60,32 +62,36 @@ hardware threads depends on the machine. =20 Components ---------- -Other than l2vic and HVX, the components below are not implemented in QEMU. +The devices instantiated depend on the machine. QEMU implements the +interrupt controller, timer, configuration table, and accelerator contexts; +local RAM regions are provided where the machine configuration calls for +them. =20 * L2VIC: the L2 vectored interrupt controller. Supports 1024 input interrupts, edge- or level-triggered. The core ISA has system registers ``VID``, ``VID1`` which read through to the L2VIC device. -* QTimer: ARMSSE-based programmable timer device. Its interrupts are +* QTimer: programmable timer device. Its interrupts are wired to the L2VIC. System registers ``TIMER``, ``UTIMER`` read through to the QTimer device. * QDSP6SS: DSP subsystem features, accessible to the entire SoC, including - DSP NMI, watchdog, reset, etc. -* CSR: Configuration/Status Registers. + DSP NMI, watchdog, reset, etc. Board models provide selected registers + for firmware initialization. +* CSR: the QTimer control registers are mapped at the machine's CSR base + address; see :doc:`hexagon/machines`. * TCM: DSP-exclusive tightly-coupled memory. This memory can be used for DSPs when isolated from DDR and in some bootstrapping modes. * VTCM: DSP-exclusive vector tightly-coupled memory. This memory is acces= sed by some HVX instructions. -* HVX: the vector coprocessor supports 64 and 128-byte vector registers. - 64-byte mode is not implemented in QEMU. +* HVX: the vector coprocessor. See :doc:`hexagon/emulation` for supported + modes and instruction sets. =20 =20 Bootstrapping ------------- -Hexagon systems do not generally have access to a block device. So, for -QEMU the typical use case involves loading a binary or ELF file into memory -and executing from the indicated start address:: +Use ``-kernel`` to load an ELF file into memory and start execution at +its entry point:: =20 - $ qemu-system-hexagon -kernel ./prog -append 'arg1 arg2' + $ qemu-system-hexagon -M V68N_1024 -kernel ./prog.elf -append 'arg1 ar= g2' =20 Semihosting ----------- @@ -97,10 +103,9 @@ guest software can access the host console and filesyst= em. Read the for details. Semihosting is enabled by default on hexagon-sim-compatible machines. This can be further configured through ``-semihosting-config``. =20 -Hexagon Features -=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D .. toctree:: + :caption: Hexagon documentation + hexagon/machines hexagon/emulation hexagon/cdsp - --=20 2.34.1 From nobody Mon Nov 23 04:34:24 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=none dis=none) header.from=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1794198232; cv=none; d=zohomail.com; s=zohoarc; b=G2B7ZJyGnydx/jnc+q7QTHGA872XMGZ6XPtZcf7ePicEOFOan9zinRsdFfHm/l0rPAGCNa1ZJeNFM7R15qFaOC3Anw7TwIjLpQ/ouGyAEtQz9W9C89FtJEPXZCOXeNwjznMxaDrz1dKVfQrq5KYE87YFSnhR3Scx8/QNP3uJEjA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1794198232; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=Yf8nU9Io4DAMC/EjcnM7TnrjnmMPiXeI1NTAStZQm0s=; b=Vvs09nM94p09K2RLfgprUXwJHccwflsst2R1U1XX8T+R8EZp6GSTpwWC+xyKRmtFrsa5Y5wZqN78lDsuFmycPG53ml6arPKT+EIJB5nEXgpaKclVfFq1/EMHJKpDSexPSdH1EdqhoBuZ3Bz/uWb6eaeWxShNb8FfAleIQuetPtw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass header.from= (p=none dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1794198232223902.8871422991167; Sun, 8 Nov 2026 20:23:52 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xQGuc-0003lt-Hl; Sun, 08 Nov 2026 23:23:18 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xQGua-0003l6-W1 for qemu-devel@nongnu.org; Sun, 08 Nov 2026 23:23:17 -0500 Received: from mx0b-0031df01.pphosted.com ([205.220.180.131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xQGuZ-0008Rt-0p for qemu-devel@nongnu.org; Sun, 08 Nov 2026 23:23:16 -0500 Received: from pps.filterd (m0279869.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 6A93KIsR3889646 for ; Mon, 9 Nov 2026 04:23:13 GMT Received: from mail-dy1-f197.google.com (mail-dy1-f197.google.com [74.125.82.197]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4htuqm1g2y-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Mon, 09 Nov 2026 04:23:13 +0000 (GMT) Received: by mail-dy1-f197.google.com with SMTP id 5a478bee46e88-36a3451ea93so863653eec.1 for ; Sun, 08 Nov 2026 20:23:13 -0800 (PST) Received: from hu-bcain-lv.qualcomm.com (Global_NAT1.qualcomm.com. [129.46.96.20]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-372669d2826sm10156773eec.29.2026.11.08.20.23.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 08 Nov 2026 20:23:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= Yf8nU9Io4DAMC/EjcnM7TnrjnmMPiXeI1NTAStZQm0s=; b=HBzuCwlv+ZAbdLvK +TRo0pQRZlhDL9wfwKq5lw/A1wg5vVWrTfFLQuGz6lNo4nHrlwTHZmyuYotgkV+c W4jGm7cf1DNUe2AmSYjPQVNs7fXyqkWquygjHOT6lK8ihJJkfcoDFXwL2deU2TFo 9eeu31NKIHqpNoF5G03zawZuolPoatrzsbjgMspvBYBY3N2+SN2uUNcW7xyAD4rF AGKcSNOHImRc3bc1/pCyPaaMB+zZYpLPEA0AhJXdDG0CPXSh22BcGUIfeFN+3HVg oWiobzxcK0+BvPtCyuLpjTXqzeupMi2MjOrTQaCXfXLVUQPbTTCtkwH9gOrnA/qI bKEvkg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1794198193; x=1794802993; darn=nongnu.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to:content-type; bh=Yf8nU9Io4DAMC/EjcnM7TnrjnmMPiXeI1NTAStZQm0s=; b=M0g6jmLwdCJnMvtdf/r9+I8yJFQjSE9uHibKuPnaLASITU/q5mSSjrBYn8PNlUi46/ APLtyycjTv9/fVQ7/hFvZoFeZSGdfY9qCdwSlg216Az060Sa6BChUue9uYxrUIqakz82 32Pt/SDv44IOZqhNoHOlE3t7/YI0XuNrWM81yK6JgZB5XWnlcEY6KWi61pP/4i/fTTe0 cfv1rymfmu5NhVWPDU88TWxgpw9bkDySZO7xzGsS5zx4JqATogeqHUGcK0HqwJCDsmfC //XI2Es0xsJjCERQNCgLMFu9QmhLbgr6LZ79446qm2C5A2S2jcBCyLP8YdzjQ0/SwxrD C9CQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1794198193; x=1794802993; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=Yf8nU9Io4DAMC/EjcnM7TnrjnmMPiXeI1NTAStZQm0s=; b=ci8AKUtqsOf55BH4XLGhI8QKHLgcy1Qa+hfaQbeIzAtaOMT0KCClnumudL6/g0zJoL uTmObZ+5PJ7yQ4Sf0Z2wfQjWNPR/FhM/vM0RUty26es0exg1A2UXbN1ndYVthatTaohE UTOMg/v6U93ediqo38USk8lH5iEUNQBffwvwJ/jJ1qVF8AjgvDBQZn0IbfKTZVoGZGOv hTwHwmmwQxqVb42szhGSIsgqVxbC2VBv8bfNOtWGSt+hvdnRg/JUAcgFxcxSK/nFiz6l Lpp5rCkjv+uOzZCt5ViDO7i5CEo4B7IPQMHJSp+eIcftFFggKdtqtHxkuGr8/fwakWCD R69Q== X-Gm-Message-State: APuU4Z93LbMQ/hWiN2dZG3kMaeeBVmcScBf8UnrO4zc5yrQQRqmEEcxj 66d6RP4Q2cvpq/uskylbA2Z3FdWYVmd5qJ04lQrlXzx/fG3HJiWgv+bHzOcrQLRfG/Z7IhJycCD 812jjOR4NCcq5pRuEvM09RSrDyDJmuF6fLuaiUs1KVUdJhuuqjidJEbRJ5U0JQrjTOQ== X-Gm-Gg: AYBFou0e7u2VJmdWWzzPMOJgKQ/PuESYLUWOXlw+mOW3wAGi84kyjsSGZak0s+9OVRa jD8DQMSQ4+OsvxvwWK88L5HaJuGDs1nEgfhVJgE80eGHrN0Ky78SV/IQNdYa8VAMhAIkgOPIZ6E x3dkOuJR4Xp7/KydkrlYoIKkQqQ4BukC72/jhlidBiXkwA0oWZDnIvdZ9mfgtp9+g+w9gZ6ngfc 4KJmw8h6Lv6Yutwh9VqMDY4kCy6OpR4O9ZwIrxFhG1MsfS9Pw9H82V4y039XbOjLat9sKZme9L1 bEmWRKY0+Lzph6wFG5p2r2Q4gefRyuFy3k+u6gtdyBBY6ZfQCz8Q7A1tv5m65D33Tu6XbdugnNP BqowlhoU85c047/vOCFMnFLUSPLe9ZlPZ8HkWnkLR4gWwiTj13RnWenB96K4DfKsrBKf9ZbVrS9 M4ol+yb3hrWhwcLzdYAn/68w== X-Received: by 2002:a05:693c:880c:20b0:35f:2858:aa4b with SMTP id 5a478bee46e88-3725855eeabmr5365286eec.30.1794198192511; Sun, 08 Nov 2026 20:23:12 -0800 (PST) X-Received: by 2002:a05:693c:880c:20b0:35f:2858:aa4b with SMTP id 5a478bee46e88-3725855eeabmr5365251eec.30.1794198191927; Sun, 08 Nov 2026 20:23:11 -0800 (PST) From: Brian Cain To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , Brian Cain Subject: [PATCH 3/5] docs/system/hexagon: document boot interfaces Date: Sun, 8 Nov 2026 20:23:04 -0800 Message-Id: <20261109042307.1301438-4-brian.cain@oss.qualcomm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20261109042307.1301438-1-brian.cain@oss.qualcomm.com> References: <20261109042307.1301438-1-brian.cain@oss.qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Proofpoint-Spam-Info: AW1haW4tMjYxMTA5MDAxNyBTYWx0ZWRfX1/njEOp05tW9 O/DLXcSgmd0AxbVCl79ZXEzHYV+a49BtP6k9D0dsNz+S0HmQZlKOjicTZPeLrXCuFaXBYfGSCu/ F+QP+5EkmqPgdxWQzmKzh3bm6U4SsbI= X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMTA5MDAxNyBTYWx0ZWRfX6wd4hmTKVnCX QZy2rPLMynkIb07NrM4g4IZZbV9/RFFEwoujgmRmyFtqgTzjB3grkKNe1fAQhvOTnrIBNGE+J4Y kd5Doc+7RhqsRZUCXmav1AFmxsbXUlLGw2cXEjbRfsTfeDqmZ2KriDGvfW8r+2C9DenoqluW9EN 8SKMtXfmtEibDjpv3G6WgF16JJ0nrGhqmF+YEKil1H1rP1vxRLEHbQ0VZ+rzT+tps/WbH3tfvjA k0VnhFrKjTwXo/w+yJw+iNxT5UH772fykMOoYn2ZpfDALlAZnbjoQPuVKMhFg5Mp6StfFALYNS6 TAxwsGAMOYiqymFe+jqlAo+BcvZvanLmCiGi1a4ICxgv8ri+gtY+t+zV4mPO+bxk7SQ2d6i0a6e zLRwBvitcJApdaFgxhhngbrPppCCYKOJlhdJ58cB0Th4ToiAvwD9aaNJOxl3ar7rrGZVhErh7hS qp4PKpED7qyMoG4e+Ig== X-Authority-Analysis: v=2.4 cv=JLquIMKb c=1 sm=1 tr=0 ts=6af14ab1 cx=c_pps a=Uww141gWH0fZj/3QKPojxA==:117 a=ouPCqIW2jiPt+lZRy3xVPw==:17 a=IkcTkHD0fZMA:10 a=zJRp6_cAMcgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=_glEPmIy2e8OvE2BGh3C:22 a=EUspDBNiAAAA:8 a=P_3Ky2eAZP25M8n5cw8A:9 a=QEXdDO2ut3YA:10 a=PxkB5W3o20Ba91AHUih5:22 X-Proofpoint-GUID: Oy6Ts3fmvD6CUBfEOIFNBF0LUo6l785Z X-Proofpoint-ORIG-GUID: Oy6Ts3fmvD6CUBfEOIFNBF0LUo6l785Z X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-11-09_02,2026-11-06_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 bulkscore=0 clxscore=1015 adultscore=0 impostorscore=0 spamscore=0 phishscore=0 suspectscore=0 malwarescore=0 lowpriorityscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2611040001 definitions=main-2611090017 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=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.180.131; envelope-from=brian.cain@oss.qualcomm.com; helo=mx0b-0031df01.pphosted.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @qualcomm.com) X-ZM-MESSAGEID: 1794198234650158500 Describe ELF and raw-image loading, reset state, the DTB handoff to VM host firmware, and initial thread state. Explain UART and semihosting console routing. Signed-off-by: Brian Cain Reviewed-by: Pierrick Bouvier --- docs/system/hexagon/boot.rst | 100 +++++++++++++++++++++++++++++++++ docs/system/target-hexagon.rst | 1 + 2 files changed, 101 insertions(+) create mode 100644 docs/system/hexagon/boot.rst diff --git a/docs/system/hexagon/boot.rst b/docs/system/hexagon/boot.rst new file mode 100644 index 00000000000..36c603c69e0 --- /dev/null +++ b/docs/system/hexagon/boot.rst @@ -0,0 +1,100 @@ +.. SPDX-License-Identifier: GPL-2.0-or-later + +Hexagon boot interface +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D + +``qemu-system-hexagon`` loads the initial image. Guest startup code +initializes the stack, exception handling, and runtime state. When a +Hexagon VM host is loaded, it establishes the guest OS's boot environment. + +Initial hardware state +---------------------- + +Only hardware thread zero starts executing. Other threads start powered +off. + +Execution uses untranslated physical addresses in monitor mode. Guest soft= ware +must populate TLB entries before enabling the MMU, and set up exception ve= ctors +and interrupt masks before enabling interrupts. See +:doc:`../../devel/hexagon-sys` for the system architecture. + +QEMU sets thread zero's PC to the selected image entry address. ``EVB`` +initially contains zero; ELF startup code installs its own aligned event +vector base. + +Simulator-compatible machines +----------------------------- + +``-kernel file`` loads a little-endian Hexagon ELF, places its loadable +segments according to their physical addresses, zero-fills the segments' +remaining memory, and starts thread zero at the ELF entry point. Link +startup code for untranslated execution, with the entry point accessible +at its linked address. + +The virt machine +---------------- + +``-kernel file`` alone loads a Hexagon ELF into DDR, which starts at +``0x80000000``, and starts at its ELF entry point. + +``-bios file`` alone loads a raw firmware image at the start of DDR and +starts executing there. + +``-bios`` with ``-kernel`` boots the kernel through Hexagon VM host +firmware, as described in :ref:`hexagon-vm-boot`. The kernel window starts +at ``0xa0000000``. + +Otherwise, guest software reads the generated DTB at ``0x99800000``. +``-append`` sets its ``/chosen/bootargs`` property. + +Board-specific machines +------------------------------------ + +Both ``-kernel`` and ``-bios`` accept Hexagon ELF images. The combinations +have different meanings: + +.. list-table:: + :header-rows: 1 + + * - Options + - Loading and entry + * - ``-kernel`` alone + - Load segments at ELF physical addresses and start at the ELF entry. + * - ``-bios`` alone + - Load firmware segments at ELF physical addresses and start at its e= ntry. + * - ``-bios`` and ``-kernel`` + - Load firmware normally, relocate the kernel segments into the board= 's + kernel window, and enter firmware through a QEMU boot stub. + +The combined case is described in :ref:`hexagon-vm-boot`, using the kernel +base in :doc:`cdsp`. + +``-dtb file`` replaces the generated tree. A nonempty ``-append`` value +sets its ``/chosen/bootargs``. A replacement tree must describe the +selected hardware-thread count, actual RAM, and matching device drivers. + +.. _hexagon-vm-boot: + +Booting a kernel through Hexagon VM host firmware +------------------------------------------------- + +On the ``virt`` and board-specific machines, ``-bios`` with ``-kernel`` +starts the kernel through Hexagon VM host firmware. QEMU loads the firmware +ELF as linked and adds the machine's kernel base to the kernel ELF's +physical load addresses, so the kernel's addresses are relative to the +start of its window. The kernel must use the corresponding Hexagon VM +guest layout. QEMU starts thread zero at a boot stub at ``0x99c00000``. +The stub passes the DTB address with the low word in ``r0`` and the high +word in ``r1``, then jumps to the firmware's ELF entry point. The Hexagon +VM host defines the child VM's register and execution state. + +QEMU places the DTB after the loaded kernel. QEMU copies it to guest RAM +before entering the firmware. An optional ``-initrd`` is placed +after the DTB base. ``-initrd`` requires both ``-bios`` and ``-kernel``. + +Console and semihosting +----------------------- + +SDK simulator programs use semihosting for console I/O. The ``virt`` and +board-specific machines also provide a PL011 UART, whose host backend is +selected with ``-serial``. diff --git a/docs/system/target-hexagon.rst b/docs/system/target-hexagon.rst index 7b7d0bc31bc..e091b75c7a3 100644 --- a/docs/system/target-hexagon.rst +++ b/docs/system/target-hexagon.rst @@ -107,5 +107,6 @@ machines. This can be further configured through ``-sem= ihosting-config``. :caption: Hexagon documentation =20 hexagon/machines + hexagon/boot hexagon/emulation hexagon/cdsp --=20 2.34.1 From nobody Mon Nov 23 04:34:24 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=none dis=none) header.from=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1794198266; cv=none; d=zohomail.com; s=zohoarc; b=bM47CPiFiuskYliaYFavWkVfcy+UbPbRIrjYWE9M0mYGYwl3yLBuKpzgnwxjHphoBRxyJkm9yWOXawi5N3CgxELdUpYPeVEKFSYqTVY83qQPVtPMzpMKamnepg4jdV+pg8ZIQeKvAz6h59HpH3UuQkN3RBoDi/n80qNavtbFE7A= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1794198266; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=5b9sVZcONHvhdr0icW5woy+TVjS7/ZfhzVikLrmfLKk=; b=Ty7oT+eEw9i/9GjwBLVuagXBUFMEiLpBoapZecyxIPyvy++RzBHj7dg3sXxKPNA5Ft2lWNYZN/swS0n97QYYQX/oZknKerO/xNoThaq6zwQBv5//IAMT1N1KjiePV1jyre2g7o/hdCpUrHCacb6zD3/Wz0MN0qyVz5Kh+mfJodg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass header.from= (p=none dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1794198266002540.5940509390684; Sun, 8 Nov 2026 20:24:26 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xQGud-0003m9-8c; Sun, 08 Nov 2026 23:23:19 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xQGub-0003li-Qa for qemu-devel@nongnu.org; Sun, 08 Nov 2026 23:23:17 -0500 Received: from mx0b-0031df01.pphosted.com ([205.220.180.131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xQGuZ-0008S0-IW for qemu-devel@nongnu.org; Sun, 08 Nov 2026 23:23:17 -0500 Received: from pps.filterd (m0279869.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 6A93K1g73889169 for ; Mon, 9 Nov 2026 04:23:14 GMT Received: from mail-dy1-f197.google.com (mail-dy1-f197.google.com [74.125.82.197]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4htuqm1g30-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Mon, 09 Nov 2026 04:23:14 +0000 (GMT) Received: by mail-dy1-f197.google.com with SMTP id 5a478bee46e88-341eff9e381so1307561eec.1 for ; Sun, 08 Nov 2026 20:23:14 -0800 (PST) Received: from hu-bcain-lv.qualcomm.com (Global_NAT1.qualcomm.com. [129.46.96.20]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-372669d2826sm10156773eec.29.2026.11.08.20.23.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 08 Nov 2026 20:23:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= 5b9sVZcONHvhdr0icW5woy+TVjS7/ZfhzVikLrmfLKk=; b=Ubq4bMgG4bPEi1Px /rkOX380iPUigh6rMJ6bVlI5/MlnpvBJKmXjEexrjW810XQ4PpnP9JW4m/NwDD/u lA8Bb2Q5qNALp7stg9MLozCEeMIQSmzJdSDvh3UTM8e8iMrc+4tpUP9VpfUddi3H GpfH1m60zl940J57du2G5zo1/TytCFSfRMz0VSeZfYrX2va65Ji5VtJiZ9d0OsRG bCw+oa2TWC/tzOPQezlErZN/ifPpWvhBz10Xm6oDe+DzXRIg47tZKU2lhWRoRRUj l8mNssvvuRduV5Msi6mIUYF6eRT0h/55vEm3CbY+EBH0oCchi3dH6SVUB2IdJKMh 2PwJyA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1794198194; x=1794802994; darn=nongnu.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to:content-type; bh=5b9sVZcONHvhdr0icW5woy+TVjS7/ZfhzVikLrmfLKk=; b=jixSBWyCUcaspptNqYS9JXPaanY7JsUjJ6WfIbfRkN+LqMs3gn0lhC74YZYOGQvk88 O0Nr7jYdSWQYRhXhDBFt/80FfdJojEEtBQYQExzaFusLYZFEeVpCgd6SkHU/sfxBz97I oPjTg7x3EYifBJl5rZDqVYVL/VsyxHyOVBkXc2rH2mc75iaMpGmLR0ByUMI6LLFg9wSs c/gisIH1mtpZFrSy8YWXLTR1J01Y9q8h1sB0LEBVmsUOr3DjsdjX1APrmEW6+j5eSjqS 9OsyHHX4MSS5hKLxTwBFXWvPt/m82vJSvPrmngD6BjQ//1cRv9WhRfkxskToUbdNRzQd udMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1794198194; x=1794802994; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=5b9sVZcONHvhdr0icW5woy+TVjS7/ZfhzVikLrmfLKk=; b=aW5kXN3aNOrt9j2Un1Us88vXUs5TorI8swA1JOmFH8k9P2SrKJaLw1ryppwPj7yM9s Ghi4udEsH1itJXiE3m9MPSPrpU+rs/cg4Vxs+9mmNIx7NGml26gbjF93AG+AxvAVT0Zw xPPw4LMq2FBf0j0TbnofAf9guDntUoUoW7NEMf0BeHpU5WPIYcE+gXN0kqE/81Ig6qlz FKeUGNZM4X8KbDGQM9zIa3tE7IuucdmPkILNGniTomKhSj8X8tr8MiA1ZUFIMHWV3Fn3 kaIKUG5m+Qfrut4nquVeL2ED71ocJJIt4kbNC0BuPUNT9zil286PPkFG2NmmcHC41tnf HHQw== X-Gm-Message-State: APuU4Z8Q1wI/6g9h/NTNvB77CEMZBLCg8JazxVa7FcTXPw6t2gX2nyjV BpqPfKBmH6otVWgoh/MjBeCHjR87L7bznUqd0QfhxaJgfkkckEyIH6vpPC0pM3doptqDSZ4WEsm qbtYnjPEECpvsO5ObR3R+Ppm79lPXx6TGyK2sRHdlXCnDvfaWECJkw5HE/92kx4FWYw== X-Gm-Gg: AYBFou1PEJkB4CwD+K8YpU2UNDkPqai8zslPaqtDhgzJdu8IjbOQvmTVqn1dtYp2kWs 6g7tXqnDPtCdAgVRCLEVnrbtTbtvsdptezqXGmrcVjUCsNVvK08KwLaUfwqbO6oXS+yOS2PxGxM qhU/FaCxhCY6zPY7k6W0GxHI90Ai8uB5wJwb66Fe2x0Ar3XQxzMnHuIpD/vhqEjhjbm7yWk7BZR mqkTvq886/j6yw8wdIyiJ0PPrW0zKz5g4bTI//XhvGrw13LnlHmqrKR8yoLYN9B6QM5kQqkL/iw 9ycQf/fn8Ss2gAps1QduAshYCRgf3rfbvBEl0gdbVxkev9OVc+h4uH+dBp6Ldkas5JJU6MBU/Fu 9IXlf/XE78jxxb77+9JX7jm+W1Bv3wCp58fCq4YpgZRc9cR3jg9AoabiphXhFgSon3KqBIbW0Gb HTnTkJ6OhW5z3GpBkapwhlEw== X-Received: by 2002:a05:7301:6199:10b0:36f:29bf:4326 with SMTP id 5a478bee46e88-37250fdd781mr6241192eec.0.1794198193403; Sun, 08 Nov 2026 20:23:13 -0800 (PST) X-Received: by 2002:a05:7301:6199:10b0:36f:29bf:4326 with SMTP id 5a478bee46e88-37250fdd781mr6241157eec.0.1794198192801; Sun, 08 Nov 2026 20:23:12 -0800 (PST) From: Brian Cain To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , Brian Cain Subject: [PATCH 4/5] docs/system/hexagon: document SDK semihosting workloads Date: Sun, 8 Nov 2026 20:23:05 -0800 Message-Id: <20261109042307.1301438-5-brian.cain@oss.qualcomm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20261109042307.1301438-1-brian.cain@oss.qualcomm.com> References: <20261109042307.1301438-1-brian.cain@oss.qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Proofpoint-Spam-Info: AW1haW4tMjYxMTA5MDAxNyBTYWx0ZWRfX7vIxc1KEJydC Vtcj9DGjMcwOkok0i2ulkuPX1ZwEqFEqWrfmSdDhvjJizElNroSLtx7+TNL89Kw1glfStU22cZZ cJxFhCPeiVVPu1RewmkWjhCkhIVBGHY= X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMTA5MDAxNyBTYWx0ZWRfX3wXH9zubf/W/ wJdvVtnhZpUbdzwDKV5C2hcpVsiLKX5wk8MuBt2HEs0bJi3FFtYQ4/ppqIeOhVKtesj2MddP9pS ko6Fjj+PhC+BeahUcsSAavqqpBd3y19rXxXtUNi3yCQ3obLPCGFl3TFFAWU8Fo/QL33G4+oy61s p9uPaljY39iLyi524jWrSK/g9iOTXcpSjF3oVzHnExr//vCEOaETprMMAfg8FMbSNd4uY7jxICA FnYTN/QfcZkobLhLeN2necAy2A2K4JK5fpnY/dg641v6lHMCwbRzgfSv1nDU1oTfbL/P1zxHFa4 7+m7G6DKsUS2v5rw8EW5UfpRwdZ8E86rOW4JuPXfIqLjpu40tYzsjDUizZvBsrLNrDACG4MuCxP uDj297zn6OqNyx7vib0EIhnGUohiy9ueIwHiDE2BXvopbrVp/aQ312QhoWEH0LFraPD6hf786IR y8vf6MWpLSWnZEJSoDg== X-Authority-Analysis: v=2.4 cv=JLquIMKb c=1 sm=1 tr=0 ts=6af14ab2 cx=c_pps a=Uww141gWH0fZj/3QKPojxA==:117 a=ouPCqIW2jiPt+lZRy3xVPw==:17 a=IkcTkHD0fZMA:10 a=zJRp6_cAMcgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=_glEPmIy2e8OvE2BGh3C:22 a=EUspDBNiAAAA:8 a=9FDP4kz7Fxl891_oENQA:9 a=QEXdDO2ut3YA:10 a=PxkB5W3o20Ba91AHUih5:22 X-Proofpoint-GUID: msa1yWhpRISWyC7Sq-TAmsFVahMRFtaq X-Proofpoint-ORIG-GUID: msa1yWhpRISWyC7Sq-TAmsFVahMRFtaq X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-11-09_02,2026-11-06_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 bulkscore=0 clxscore=1015 adultscore=0 impostorscore=0 spamscore=0 phishscore=0 suspectscore=0 malwarescore=0 lowpriorityscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2611040001 definitions=main-2611090017 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=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.180.131; envelope-from=brian.cain@oss.qualcomm.com; helo=mx0b-0031df01.pphosted.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @qualcomm.com) X-ZM-MESSAGEID: 1794198267046158500 Show how to run standalone SDK programs and the QuRT loader chain with an explicit v68 machine. Signed-off-by: Brian Cain Reviewed-by: Pierrick Bouvier --- docs/system/hexagon/sdk-programs.rst | 155 +++++++++++++++++++++++++++ docs/system/target-hexagon.rst | 3 + 2 files changed, 158 insertions(+) create mode 100644 docs/system/hexagon/sdk-programs.rst diff --git a/docs/system/hexagon/sdk-programs.rst b/docs/system/hexagon/sdk= -programs.rst new file mode 100644 index 00000000000..2edfe28ad66 --- /dev/null +++ b/docs/system/hexagon/sdk-programs.rst @@ -0,0 +1,155 @@ +.. SPDX-License-Identifier: GPL-2.0-or-later + +Running SDK programs +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D + +``qemu-system-hexagon`` can run SDK programs that normally run under +``hexagon-sim``. The boot image depends on the runtime the program expects: + +.. list-table:: + :header-rows: 1 + + * - Use case + - Initial image + - Subsequent stages + * - SDK standalone OS + - ``-kernel prog.elf`` + - Startup code calls the program's ``main()`` + * - SDK QuRT dynamic program + - ``-kernel runelf.pbn`` + - QuRT loads ``run_main_on_hexagon_sim``, which loads ``userprog.so`` + +SDK programs and semihosting +---------------------------- + +The simulator-compatible machines, such as ``V66G_1024`` and +``V68N_1024``, provide semihosting by default. The SDK runtime uses +``trap0`` calls for services such as console I/O, host file access, and +program termination. + +See :ref:`hexagon-semihosting` for more info. + +The examples below use v68 SDK artifacts with ``-M V68N_1024``. + +Standalone OS programs +~~~~~~~~~~~~~~~~~~~~~~ + +By default, ``hexagon-clang`` links a bare-metal executable with the SDK's +standalone OS startup code and C runtime. This small runtime initializes +the machine, calls ``main()``, and implements hosted services through +semihosting. + +For example, save the following as ``prog.c``: + +.. code-block:: c + + #include + + int main(int argc, char **argv) + { + for (int i =3D 0; i < argc; i++) { + printf("argv[%d] =3D %s\n", i, argv[i]); + } + return 0; + } + +With the SDK tools on ``PATH``, build and run it with: + +.. code-block:: sh + + hexagon-clang -mv68 prog.c -o prog.elf + qemu-system-hexagon -M V68N_1024 -display none \ + -kernel ./prog.elf -append "foo bar" + +The program prints: + +.. code-block:: text + + argv[0] =3D ./prog.elf + argv[1] =3D foo + argv[2] =3D bar + +Guest command-line arguments +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The example above passes the arguments with ``-append``. QEMU uses the +``-kernel`` filename as the first semihosting argument and splits +``-append`` on spaces to supply the remaining arguments. The host shell +quotes keep ``foo bar`` together as the value of the QEMU option; the +guest runtime subsequently parses the semihosting command line. + +You can instead specify the semihosting command line with ``arg=3D`` optio= ns: + +.. code-block:: sh + + qemu-system-hexagon -M V68N_1024 -display none -kernel ./prog.elf \ + -semihosting-config 'enable=3Don,target=3Dnative,arg=3D./prog.elf,= arg=3Dfoo,arg=3Dbar' + +Include the program name as the first ``arg=3D`` value. + +``target=3Dnative`` selects QEMU's implementation of semihosting even when +a debugger is connected. To connect the semihosting console explicitly to +the terminal, add a character device and select it with ``chardev=3D``: + +.. code-block:: sh + + qemu-system-hexagon -M V68N_1024 -display none \ + -chardev stdio,id=3Dsemi \ + -semihosting-config enable=3Don,target=3Dnative,chardev=3Dsemi \ + -kernel ./prog.elf -append "foo bar" + +QuRT programs and the SDK loader chain +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +An SDK QuRT dynamic test consists of three guest images: + +1. ``runelf.pbn`` boots QuRT and loads a user process from a host file. +2. ``run_main_on_hexagon_sim`` is that process. It initializes the dynamic + loader and loads the application's shared object. +3. ``userprog.so`` exports ``main(int argc, char **argv)``, which the + runner invokes. + +QEMU initially loads only ``runelf.pbn``. The subsequent stages read the +other images through semihosting. Use matching SDK architecture variants +for the boot image, runner, and application. For example, with Hexagon +SDK 6.4 and its toolv19 v68 artifacts: + +.. code-block:: sh + + runelf=3D"$HEXAGON_SDK_ROOT/rtos/qurt/computev68/sdksim_bin/runelf.pbn" + runner=3D"$HEXAGON_SDK_ROOT/libs/run_main_on_hexagon/ship/hexagon_tool= v19_v68/run_main_on_hexagon_sim" + qemu-system-hexagon -M V68N_1024 -display none \ + -kernel "$runelf" -append "$runner -- ./userprog.so foo bar" + +Build ``userprog.so`` with the SDK's QuRT shared-library build rules, +including any libraries needed by the application, and place its shared +dependencies where the SDK dynamic loader can find them. + +The command line exposed through semihosting is: + +.. code-block:: text + + -- ./userprog.so foo bar + +The fields have the following roles: + +.. csv-table:: + :header: "Field", "Consumer", "Meaning" + + , SDK startup, Boot image name + , runelf.pbn, Process ELF to load + --, run_main_on_hexagon_sim, End of runner options + ./userprog.so, Dynamic loader, Shared object exporting main() + foo bar, Application, argv[1] and argv[2] + +The application's ``argv[0]`` is ``./userprog.so``. When translating an +SDK simulator command ``runelf.pbn -- runner -- userprog.so``, omit the +separator immediately after ``runelf.pbn`` from QEMU's ``-append`` value. +The separator after the runner remains part of the guest command line. + +The equivalent explicit semihosting configuration is: + +.. code-block:: sh + + qemu-system-hexagon -M V68N_1024 -display none -kernel "$runelf" \ + -semihosting-config "enable=3Don,target=3Dnative,arg=3D$runelf,arg= =3D$runner,arg=3D--,arg=3D./userprog.so,arg=3Dfoo,arg=3Dbar" diff --git a/docs/system/target-hexagon.rst b/docs/system/target-hexagon.rst index e091b75c7a3..dac8b9b3483 100644 --- a/docs/system/target-hexagon.rst +++ b/docs/system/target-hexagon.rst @@ -93,6 +93,8 @@ its entry point:: =20 $ qemu-system-hexagon -M V68N_1024 -kernel ./prog.elf -append 'arg1 ar= g2' =20 +.. _hexagon-semihosting: + Semihosting ----------- Hexagon supports a semihosting interface similar to other architectures'. @@ -107,6 +109,7 @@ machines. This can be further configured through ``-sem= ihosting-config``. :caption: Hexagon documentation =20 hexagon/machines + hexagon/sdk-programs hexagon/boot hexagon/emulation hexagon/cdsp --=20 2.34.1 From nobody Mon Nov 23 04:34:24 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=none dis=none) header.from=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1794198252; cv=none; d=zohomail.com; s=zohoarc; b=dHw9Ogg64kkYXw21ELKkZtoWevnYkaGLCFnVBAEYtsYFZqtDGLbI3xMs5V+f5KBraewu+jtDF2gJ8QNbPjuQ1mI2Dmpx7J6Fijq2wWywJh5wN7JC4Rf5sUtSTNdQ8qVHrTYmWidEhG4JtvHoevJnT3dpmZv/kjIfnInyUQV/Kbo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1794198252; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=j+33Ii10m4b61yBznsrdxGBzoM/lb/burGz/zc9kk/4=; b=lRAngKb64O5+R2hHi3fCuRTx/lVFQrSKEiPFyALDbuBtFa7NVT3U2suHJHMMh6Vwp2mFyBLVG0AXpIYpu9CNY5lXapbBV5CIW5usvLzGto3Ph8mIDDAuS/HYnF+9eoUzvgEqSheTQ5TlU9HW87QbMB/8+AbLMsIc99HkywoIOm0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass header.from= (p=none dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1794198252415370.7136100296244; Sun, 8 Nov 2026 20:24:12 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xQGuf-0003n3-6Z; Sun, 08 Nov 2026 23:23:21 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xQGud-0003mA-Fw for qemu-devel@nongnu.org; Sun, 08 Nov 2026 23:23:19 -0500 Received: from mx0b-0031df01.pphosted.com ([205.220.180.131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xQGub-0008SZ-JI for qemu-devel@nongnu.org; Sun, 08 Nov 2026 23:23:19 -0500 Received: from pps.filterd (m0279868.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 6A93K2e32936759 for ; Mon, 9 Nov 2026 04:23:16 GMT Received: from mail-dy1-f197.google.com (mail-dy1-f197.google.com [74.125.82.197]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4hsuagvr2v-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Mon, 09 Nov 2026 04:23:16 +0000 (GMT) Received: by mail-dy1-f197.google.com with SMTP id 5a478bee46e88-36fe0b57d91so556954eec.0 for ; Sun, 08 Nov 2026 20:23:16 -0800 (PST) Received: from hu-bcain-lv.qualcomm.com (Global_NAT1.qualcomm.com. [129.46.96.20]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-372669d2826sm10156773eec.29.2026.11.08.20.23.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 08 Nov 2026 20:23:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= j+33Ii10m4b61yBznsrdxGBzoM/lb/burGz/zc9kk/4=; b=mJtKRjpb/wnnRnPl VfS40QTvdwdTbJsXBjivlD6Kd/uw5Q5Cb6adlqU2XziEn+0HPvRw9t58Z4hzK/NK vB3P+sZYOQMhNy33Pc7DeYcYqlG9PHI0n9crj1xPQmfKB20h4crcjUd4GS2mBxqx aMbCOzauCA/9clbvUyKBpNjManMBB30UZ9V4u/gSEhqF4V1rVMVDMoUoaEjA5dbn XcKzEfNGy7O+234Flj2AMCpL8ar5Ryh/PxXMmso1iM2KLW/XR3lEjzIcfZ5tALFe NN5iZsau55j93YA0wTxyS6Q7bOYJCPAcmGWx+E+oispia3TMMpDa7tK6r1EC9aMf xv7pvQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1794198195; x=1794802995; darn=nongnu.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to:content-type; bh=j+33Ii10m4b61yBznsrdxGBzoM/lb/burGz/zc9kk/4=; b=ftvgvbTujEUT4V6TxBEa+h8JenHRdjBjNq5BaQScIgx5m7QrWPkoCCXmBL/6zP2U27 nYlZ9TtSKUzQOU8Jic4YJ4j6meYN5Od57XHngobDeVrXxAnrO11Z9tcGS32rIu/Lz1OB PufAFoJYbopa/nqQAX8so2jI6Vfao3FUyONbttu3AOs6nFSclSJJQ2uGDI65VpcFVKdd fIWs1juTOR2bEFgnFOXNNzYwXWCcPKb36NVhVPckEQga/bz+6A2PTNdrlvPcG2kCaiiY VLFnuB/nXln8DqKu10pAShsV7PllmVHndnx/kDM4OyXQoQ0x5qBgMfgvEUq0TcqHR54d m9RA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1794198195; x=1794802995; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=j+33Ii10m4b61yBznsrdxGBzoM/lb/burGz/zc9kk/4=; b=C462oO0xrxCniO1LPDq346OBCQoGZz3UTvObJnQGyX6AcSp/NwIiJmb7XzwpI2TuZP gj76/ZzSCaV+FKsuqJT3TJeSQwgNLBegWJ72C226k5G8y1cr96sJrFx7jxlLmzD1Y3ds SAsjCINwjiaQESw6XQAXukltabrks0SX3FT5qJ5yp1+kj9xTsCnuhdSR2LGtFfNS1+SE sb8uNf9HppJ7pItwpZPkAwpjYa0HjUgw2ZF403xzuey5AtVq47n8oNnpFst0HT5JcyMd PahOwKJUe44dEhYiz4aWyneiBRVojgJdMIfXwemPpHNL46vgyn1eMe00m1Lf4VUeJJg0 bMDg== X-Gm-Message-State: APuU4Z90KE4lVkV/rh3gbP194HTE527m+ssGKPs5LMgc2kd4Cp4WxyMI E8OXHt9srd3WhnD63NZbpv4fF/2oizZOOu4gqiCXk7Lu4xKCjyRqQVeDJ+yL/Nui+M4EfAlnnyO ReGUOeiBwNYz6xtVlAFCJE6yjQ1k8UEP7hJRZmDHtGFh7A4IWXfF83N+XgJo5kxI3/w== X-Gm-Gg: AYBFou3prdJNp9M/r4rYiFMfVr8IpOZsA0IFvTp2EDhRp3Zhi6LsVSD95uzdxwbKSxi DOP+OqOFJHnG5jLDtL008EA8nZ0GR5/RMLkA0dZ+0gwQhW18oyt/q2KzGA3O1cs9DTRDXf6gOpA tJIOk7++nZRVEcfboLXWM+iI/Iw4y/wj5I8uTtw1UWUHnnhXgNWEmC3tJpbDXtGSxkkNh4znag+ YlakZC+GCAuPcsO2Zsyqme10RBsayzJrrV7HtMSxvFof9iNzwuBcAW5VBybmJ/1stMTJ1rFS/tv KqAgEQ4w5TOVtDWAFIl32GSVoWoL8igJp/Nr0zLYSodfZfrkaOypuWOrDFLIoMCpISy84lRmpGX oqwMS5TPhcHIfmJBR5qCLWCvpC2urB30MJZv2SB3p1fZt/qDz+rDjR8RbRvGBITgtwJ11GvGDg+ x0DRmeqmyuVPxZkM0dXeKt4g== X-Received: by 2002:a05:7300:f794:b0:36d:d7ec:5e3d with SMTP id 5a478bee46e88-37256de84a4mr5841361eec.21.1794198195342; Sun, 08 Nov 2026 20:23:15 -0800 (PST) X-Received: by 2002:a05:7300:f794:b0:36d:d7ec:5e3d with SMTP id 5a478bee46e88-37256de84a4mr5841331eec.21.1794198194752; Sun, 08 Nov 2026 20:23:14 -0800 (PST) From: Brian Cain To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , Brian Cain Subject: [PATCH 5/5] docs/system/hexagon: describe integrated firmware OS boot paths Date: Sun, 8 Nov 2026 20:23:06 -0800 Message-Id: <20261109042307.1301438-6-brian.cain@oss.qualcomm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20261109042307.1301438-1-brian.cain@oss.qualcomm.com> References: <20261109042307.1301438-1-brian.cain@oss.qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMTA5MDAxNyBTYWx0ZWRfX/ozzDEzZlscF I3ayK+3TNdsfuBLYiSxZwDGZBElmjNHHUzpCllbPEKx5JXnRkKBiruuRLJ24k4CAKkwgni828qo zkI/97moRVX/a+BpRfon+64sNoTpc4SK0jl0dR90jtsGpo75zQO128KcosV+8XJOulH/0GxgkzI CmyFonVH2yO/SewWZmsAFKrq0Ars/fcmXzzCratkIYIh2HxJqgASZs2Rn63hiRaL70ChHN72QWG OnnfjLJ2uyx9SGO2ui9gi/HrHmObQ3iXp2PzyZy3Ku7fylBMW9+OhOF15DZvvf13+OxKQFmQJPr tVJ/sDpOlIePMCpBWh+te3XI1mZMTSBlG57pSN595SIBPjPkhqRyMcPMJ/kluMa/XzSWTuD9hb6 wcpiokapMIDqRLsILTzIr1E9ocwC5Lypm9/EnV9bEHSzbhmTtxTjZd2BAU5AhKYR/xGe6HWx1m8 5aKzn9tRyRcVTaavKkQ== X-Proofpoint-ORIG-GUID: Es8crcTpRaYFFmrXQMa43bn7HnKylwm1 X-Proofpoint-GUID: Es8crcTpRaYFFmrXQMa43bn7HnKylwm1 X-Proofpoint-Spam-Info: AW1haW4tMjYxMTA5MDAxNyBTYWx0ZWRfXwDtyum+bmi6L iTdsA2OLB+ySh8AOafzfVZ0IapA7NgtRtAkaaDZmOtUvrGg4YOjIUPPJjrLJhCeDMz/6Mqhn/jw lnIZinUAqhCKl2puhugyylaTSv/r82Y= X-Authority-Analysis: v=2.4 cv=V8LoQuni c=1 sm=1 tr=0 ts=6af14ab4 cx=c_pps a=Uww141gWH0fZj/3QKPojxA==:117 a=ouPCqIW2jiPt+lZRy3xVPw==:17 a=IkcTkHD0fZMA:10 a=zJRp6_cAMcgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=ZpdpYltYx_vBUK5n70dp:22 a=EUspDBNiAAAA:8 a=CuL5fRHadp1A7yorxzYA:9 a=QEXdDO2ut3YA:10 a=PxkB5W3o20Ba91AHUih5:22 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-11-09_02,2026-11-06_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 clxscore=1015 malwarescore=0 bulkscore=0 impostorscore=0 phishscore=0 adultscore=0 lowpriorityscore=0 priorityscore=1501 spamscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2611040001 definitions=main-2611090017 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=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.180.131; envelope-from=brian.cain@oss.qualcomm.com; helo=mx0b-0031df01.pphosted.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @qualcomm.com) X-ZM-MESSAGEID: 1794198252773158500 Show how to boot a Linux guest with the hexagon_loadlinux firmware, and hexagon_booter for running h2 user programs. Signed-off-by: Brian Cain Reviewed-by: Pierrick Bouvier --- docs/system/hexagon/operating-systems.rst | 50 +++++++++++++++++++++++ docs/system/target-hexagon.rst | 12 ++++++ 2 files changed, 62 insertions(+) create mode 100644 docs/system/hexagon/operating-systems.rst diff --git a/docs/system/hexagon/operating-systems.rst b/docs/system/hexago= n/operating-systems.rst new file mode 100644 index 00000000000..f367fc6387f --- /dev/null +++ b/docs/system/hexagon/operating-systems.rst @@ -0,0 +1,50 @@ +.. SPDX-License-Identifier: GPL-2.0-or-later + +Booting guest operating systems +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D + +Hexagon VM guests require a Hexagon VM host. QEMU ships board-specific +host firmware in ``pc-bios``. Guest operating systems boot with the +``hexagon_loadlinux_*`` images; the ``hexagon_booter_*`` images run H2 +user programs instead (see :doc:`cdsp`). Select a matching machine, +firmware, and guest memory layout from :doc:`cdsp`. + +Linux +----- + +The kernel must be built for the Hexagon VM interface and include the +PL011 console and required virtio-mmio device drivers. + +For a preloaded kernel and separate initramfs: + +.. code-block:: sh + + qemu-system-hexagon -M qcs6490-cdsp -display none -serial stdio \ + -bios hexagon_loadlinux_qcs6490_cdsp \ + -kernel ./vmlinux -initrd ./initramfs.cpio.gz \ + -append "console=3DttyAMA0 rdinit=3D/init" + +``ttyAMA0`` selects the PL011 console. ``-append`` sets the boot arguments +in QEMU's DTB; the guest and its VM host determine how those arguments +are consumed. Add any platform-specific memory or delay-calibration +parameters required by the kernel image. + +Guest operating systems on virt +------------------------------- + +The ``virt`` machine boots a guest operating system through the same +firmware, using a ``hexagon_loadlinux_*`` image whose kernel address in +:doc:`cdsp` is ``0xa0000000``: + +.. code-block:: sh + + qemu-system-hexagon -M virt -display none -serial stdio \ + -bios hexagon_loadlinux_sa8775p_cdsp \ + -kernel ./guest.elf -append "console=3DttyAMA0" + +The guest ELF's physical load addresses are relative to the start of the +kernel window at ``0xa0000000``, so a guest linked at physical address zero +is loaded there. QEMU enters the firmware with the DTB address in +``r1:r0`` (see :ref:`hexagon-vm-boot`). The guest must use the Hexagon VM +interface for interrupts and timers, the PL011 at ``0x10000000``, and the +virtio-mmio transports listed in :doc:`machines`. diff --git a/docs/system/target-hexagon.rst b/docs/system/target-hexagon.rst index dac8b9b3483..3b63a94eb56 100644 --- a/docs/system/target-hexagon.rst +++ b/docs/system/target-hexagon.rst @@ -105,11 +105,23 @@ guest software can access the host console and filesy= stem. Read the for details. Semihosting is enabled by default on hexagon-sim-compatible machines. This can be further configured through ``-semihosting-config``. =20 +Hexagon VM host +--------------- + +Guest operating systems can run under a Hexagon VM host, which provides +virtual processor, memory management, interrupt, and timer services. +The `Hexagon Virtual Machine Specification +`__ +describes the guest interface. The OS boot examples in +:doc:`hexagon/operating-systems` use H2 as the Hexagon VM host; QEMU +emulates the underlying DSP hardware. + .. toctree:: :caption: Hexagon documentation =20 hexagon/machines hexagon/sdk-programs hexagon/boot + hexagon/operating-systems hexagon/emulation hexagon/cdsp --=20 2.34.1