From patchwork Fri Dec 7 09:07:53 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hongbo Zhang X-Patchwork-Id: 153097 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp269198ljp; Fri, 7 Dec 2018 01:15:10 -0800 (PST) X-Google-Smtp-Source: AFSGD/UTbOinX7yqDIQojeMe1Wtlv8gXDbEsX9vAb5MIWJjaUCv0VMajY1l66vrVwv3pNtSlc+z2 X-Received: by 2002:ac8:7094:: with SMTP id y20mr1210815qto.380.1544174110113; Fri, 07 Dec 2018 01:15:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544174110; cv=none; d=google.com; s=arc-20160816; b=eGhs3Yr/ZxzvXObyilbx/ZqW4SXd+wURbjsSEC7BE817cD+/S7V3dr5kuTyYXLoQyP GF53XC3N7Icmlb1AcwJ6k2cwdvQ+yYuYrDC0LcIQIZlR/SWBvVAK8wH+gZPD3WEuojMe VgJt8Sii01qJjaCzMVovOThrmgWS1aVu46B36qeXSicOpukjkbeM28GywS/dP6BD50fv st/4jVkZ/yJWOmBUYlM4HQGPYOHmwya5s6kQi5XknPjyl9YpopfKBB0xAWtdAvkhEtQb 8ZYypw2e2o5aaU09RqD3OoVCDBTkdF/dpqFldSJxDRziOchD7xBRps9kSnxxn3jDPCrW vVOA== 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:subject:message-id:date:to:from :dkim-signature; bh=JRopU4J8VRu3UC7V4fJLRxQW4QXYNmOy8Bc1wmIb1ME=; b=fGnZWbDYzDPP3eNYMzp/HKN5l1AG28BUFbOx1IPH8ns/FNA3Af+J0AiFJlynMwvDCr jXeH3f06L0iBOF7te3K3kt/wsDEQoGBvju++b26M9kaEQDW+YxNRYHE315pCOGGKPxzg F+PRd42myuDTDuzuSEsoZMt/hXOe2PdRsN/g4IJK1R7V5FhTn76sTGJJNvGXWpzwAPVQ sXD+7sbsQTJi+CFZ1HbbPHXFKkHugnLdCCDwaEfk9z2TIXQyrKOgGJbnoVHdbDFj/f/h Nibn5QV1HlOGxrUihTwcyeUGfTBFy/2vKbUMaBek+ybGf3robQDZ4IDDqbgKb+bvg3pc wUUw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=krgT9rRm; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id q4si34039qtb.265.2018.12.07.01.15.09 for (version=TLS1 cipher=AES128-SHA bits=128/128); Fri, 07 Dec 2018 01:15:10 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=krgT9rRm; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:44919 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gVCE0-00035r-QO for patch@linaro.org; Fri, 07 Dec 2018 04:15:08 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33370) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gVC7G-0005wU-4c for qemu-devel@nongnu.org; Fri, 07 Dec 2018 04:08:11 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gVC7C-0001LE-Pl for qemu-devel@nongnu.org; Fri, 07 Dec 2018 04:08:10 -0500 Received: from mail-pl1-x644.google.com ([2607:f8b0:4864:20::644]:37148) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gVC7C-00018O-Fy for qemu-devel@nongnu.org; Fri, 07 Dec 2018 04:08:06 -0500 Received: by mail-pl1-x644.google.com with SMTP id b5so1556197plr.4 for ; Fri, 07 Dec 2018 01:08:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=JRopU4J8VRu3UC7V4fJLRxQW4QXYNmOy8Bc1wmIb1ME=; b=krgT9rRmdBAyQefB7HN8hJX+lfEKEjQWJeJWbL0Yfg1RCNWLbNAI6diAYJYymToqWc iQHJrnFp3908PRLKAUnyAY/h8eJqSfXeQA1Cl36xtrhLDLKJ4uJWefxUEJViCPaqMTwf ka7GpfxuHLgnXzq/H18mTgq+tH58bo0h36cOQ= 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; bh=JRopU4J8VRu3UC7V4fJLRxQW4QXYNmOy8Bc1wmIb1ME=; b=QcwtLh8A40obrhlUA7c8u35lResZksCTJs1nIQrwL2XQSLJxCNadTAdbrPMVGPGVp/ cGoQl4NRN9gV9YaxwP2UhPHMPhTBNc3rykD0djjWjdS5Grand0Ot0toWERrHSyFEB9om zkEIYeUENtW9rXYuRsu+g1txcNfQ3k/7FZMtOWxThPGUZIFZ//afzq7g/0+f3zS9yxNm H005hygQ6+XJAVwOVwLN9kcGGEAlMFeZjDHj7w5tT95KiwUAJ3lj2c8a1d5e1qT/eJkR 3FVs6S4JjwUJE09/cglU72a75xL2L596q8tJ+3tJZxXtdrKk2hSxyFZgvTqs+bO8xs6T jMsQ== X-Gm-Message-State: AA+aEWZA9hp4BR97ZovCB/g6P96wop0+6MkkmVBEENV60Cz+R5x25lVf HuxL8x2q8Za4HCmWZtnvZ1bmAQ== X-Received: by 2002:a17:902:2c03:: with SMTP id m3mr1325357plb.6.1544173684764; Fri, 07 Dec 2018 01:08:04 -0800 (PST) Received: from localhost.localdomain ([45.56.155.222]) by smtp.gmail.com with ESMTPSA id k38sm3058432pgb.33.2018.12.07.01.08.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 07 Dec 2018 01:08:03 -0800 (PST) From: Hongbo Zhang To: peter.maydell@linaro.org, alex.bennee@linaro.org, qemu-devel@nongnu.org, qemu-arm@nongnu.org Date: Fri, 7 Dec 2018 17:07:53 +0800 Message-Id: <1544173675-14217-1-git-send-email-hongbo.zhang@linaro.org> X-Mailer: git-send-email 2.7.4 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::644 Subject: [Qemu-devel] [PATCH v5 0/2] [PATCH v4] Add arm SBSA reference machine X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Hongbo Zhang , radoslaw.biernacki@linaro.org, leif.lindholm@linaro.org, ard.biesheuvel@linaro.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" For the Aarch64, there is one machine 'virt', it is primarily meant to run on KVM and execute virtualization workloads, but we need an environment as faithful as possible to physical hardware, to support firmware and OS development for pysical Aarch64 machines. This machine comes with: - Re-designed memory map. - CPU cortex-a57. - EL2 and EL3 enabled. - GIC version 3. - System bus AHCI controller. - System bus XHCI controller(TBD). - CDROM and hard disc on AHCI bus. - E1000E ethernet card on PCIE bus. - VGA display adaptor on PCIE bus. - Only minimal device tree nodes. And without: - virtio deivces. - fw_cfg device. - ACPI tables. Arm Trusted Firmware and UEFI porting to this are done accordingly, and it should supply ACPI tables to load OS, the minimal device tree nodes supplied from this platform are only to pass the dynamic info reflecting command line input to firmware, not for loading OS. v5 changes: - removed more lines derived from virt.c - designed a new memory map - splitted former one patch into two for easier review - cancled previous EHCI and new HXCI coming later separately V4 changes: - rebased to v3.0.0 - removed timer, uart, rtc, *hci device tree nodes (others were removerd in v3) - other minore codes clean up, mainly unsed header files, comments etc. V3 changes: - rename the platform 'sbsa-ref' - move all the codes to a separate file sbsa-ref.c - remove paravirtualized fw_cfg device - do not supply ACPI tables, since firmware will do it - supply only necessary DT nodes - and other minor code clean up In the previous v4 cover letter, https://lists.gnu.org/archive/html/qemu-devel/2018-10/msg04282.html I mentioned I had to revert two commits temperarily to run: Revert "target/arm: Implement new do_transaction_failed hook" Revert "device_tree: Increase FDT_MAX_SIZE to 1 MiB" Now the 1st one is fixed by Ard Biesheuvel in the edk2 side, and for the 2nd one, a simple change in firmware side can fix it, so I won't mention these issues in details in the cover letter any more. I also put a branch here: http://git.linaro.org/people/hongbo.zhang/qemu-enterprise.git/log/?h=sbsa-upstream-v5 with the last 3 workaroud we can test using legacy firmware but gicv3 needs to be enabled in ATF: http://git.linaro.org/people/hongbo.zhang/atf-sbsa.git/log/?h=sbsa_gicv3 Hongbo Zhang (2): hw/arm: Add arm SBSA reference machine, skeleton part hw/arm: add Arm SBSA reference machine, devices part hw/arm/Makefile.objs | 2 +- hw/arm/sbsa-ref.c | 698 ++++++++++++++++++++++++++++++++++++++++++++++++++ include/hw/arm/virt.h | 1 + 3 files changed, 700 insertions(+), 1 deletion(-) create mode 100644 hw/arm/sbsa-ref.c -- 2.7.4