From patchwork Sun Nov 4 07:42:38 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Seth K X-Patchwork-Id: 10681975 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2599E109C for ; Wed, 14 Nov 2018 07:25:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 106E82999C for ; Wed, 14 Nov 2018 07:25:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 043D529CEF; Wed, 14 Nov 2018 07:25:44 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.3 required=2.0 tests=BAYES_00,DATE_IN_PAST_96_XX, DKIM_ADSP_CUSTOM_MED,DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 9A0F72999C for ; Wed, 14 Nov 2018 07:25:43 +0000 (UTC) Received: from localhost ([::1]:58643 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gMpYU-0004ss-Dr for patchwork-qemu-devel@patchwork.kernel.org; Wed, 14 Nov 2018 02:25:42 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45920) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gMmyh-0005u1-PW for qemu-devel@nongnu.org; Tue, 13 Nov 2018 23:40:37 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gMmyg-0007Iy-Ef for qemu-devel@nongnu.org; Tue, 13 Nov 2018 23:40:35 -0500 Received: from mail-oi1-x242.google.com ([2607:f8b0:4864:20::242]:37781) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gMmyg-00079T-6w for qemu-devel@nongnu.org; Tue, 13 Nov 2018 23:40:34 -0500 Received: by mail-oi1-x242.google.com with SMTP id y23so3381458oia.4 for ; Tue, 13 Nov 2018 20:40:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to:cc; bh=j2KRHg4wJv/KnfVuhrTdjmJ4nROHalfMgQOtcUlJJoY=; b=C6g6wJdBWePELWHomyCMv6h8ciaW4kCF8yQj//ZGPwW+sg89tO5VW/W5cFja8e2i75 jMHoaCKAFH4nNMiSzYBF32iK3oQjbri/gNhtJun0A/SiR6Wli2u6GUMuhHkkbaHpanAZ Mt9bEQu5TglfBNoQHg4qfTjZYR3iIEDEpbD/F4SkGozllc++NFkMOUVYgYGg5PaIvfOa LtOZ0uFbQAE9S82D0KWoIsQaqw5VdBuS40T6HfBEgFPe2YBFlCUZXpXNF425BZXa2i9t DBogt9M+UmTy91PBbBjJJA8imNUQRCaahWucKBLWLPe/CxYc0tZdqY2xUIjeNVBDg4qH qmsg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to:cc; bh=j2KRHg4wJv/KnfVuhrTdjmJ4nROHalfMgQOtcUlJJoY=; b=iqqELfEa568mFgUe8hZ9rBupdlbKG9aKF/+6wdiHnRZWqcxXEvvpaa0uo3jJpB2QkA 2xwMiZDMTFIrdSzKOPX2UuSSTOmU86lXkekNc9/DeItV24C5CVbF7bhBEbALZA+DFa2B g5WfKpJ9w0q63pC4lWxSMfeQmo9dbAqLh3U/2K0eghbidH7NrzAuO5gv3etIIkAwF4ld X4CVw/bweJiK7JPkb9xaLuoKZv5WcFLxfroTGGPuup4UDYfFIvU7VUt3r4J32KTwNoZk brMvZNaZR3XiMQ1H45eKKEhtxsNekCK2lnwrca8qIMbg1q7iXFdb9T5n3TRSHtwshUq1 4RBg== X-Gm-Message-State: AGRZ1gKBL+h2E73pMFEJ6GTJWemobR2zlt32SCGOuKFQTFR4senSKYP+ 4xSuFcASqGmeTuYzrfG67+mxY1amL8JazCZbSRU= X-Google-Smtp-Source: AJdET5edT+4vrVWvjoy87KL9OxslLTomQ6j8lNjMmKrhEdBk6/qTIfapvbVhYjBMecbs2bOYXksiyBBH1BP7XehezM4= X-Received: by 2002:aca:b183:: with SMTP id a125-v6mr231148oif.44.1542170417773; Tue, 13 Nov 2018 20:40:17 -0800 (PST) MIME-Version: 1.0 From: Seth K Date: Sun, 4 Nov 2018 02:42:38 -0500 Message-ID: To: Alistair Francis , =?utf-8?q?Marc-Andr=C3=A9_Lur?= =?utf-8?q?eau?= , Paolo Bonzini X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::242 X-Mailman-Approved-At: Wed, 14 Nov 2018 02:24:36 -0500 X-Content-Filtered-By: Mailman/MimeDel 2.1.21 Subject: [Qemu-devel] [PATCH] Corrected memory regions 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: "qemu-devel@nongnu.org Developers" Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP I corrected these 2 memory regions based on specifications from the chip manufacturer. The existing ranges seem to overlap and and cause odd behavior and/or crashes when trying to set up multiple UARTs, I also played with changing MAX_SERIAL_PORTS to 8 to match the hardware, but I did not include that in this patch as I never fully tested its effects. This is my first patch, I hope I did it correctly, Seth Kintigh --- hw/char/stm32f2xx_usart.c | 2 +- hw/timer/stm32f2xx_timer.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) s); diff --git a/hw/char/stm32f2xx_usart.c b/hw/char/stm32f2xx_usart.c index 032b5fda13..f3363a2952 100644 --- a/hw/char/stm32f2xx_usart.c +++ b/hw/char/stm32f2xx_usart.c @@ -202,7 +202,7 @@ static void stm32f2xx_usart_init(Object *obj) sysbus_init_irq(SYS_BUS_DEVICE(obj), &s->irq); memory_region_init_io(&s->mmio, obj, &stm32f2xx_usart_ops, s, - TYPE_STM32F2XX_USART, 0x2000); + TYPE_STM32F2XX_USART, 0x400); sysbus_init_mmio(SYS_BUS_DEVICE(obj), &s->mmio); } diff --git a/hw/timer/stm32f2xx_timer.c b/hw/timer/stm32f2xx_timer.c index 58fc7b1188..ae744d1642 100644 --- a/hw/timer/stm32f2xx_timer.c +++ b/hw/timer/stm32f2xx_timer.c @@ -308,7 +308,7 @@ static void stm32f2xx_timer_init(Object *obj) sysbus_init_irq(SYS_BUS_DEVICE(obj), &s->irq); memory_region_init_io(&s->iomem, obj, &stm32f2xx_timer_ops, s, - "stm32f2xx_timer", 0x4000); + "stm32f2xx_timer", 0x400); sysbus_init_mmio(SYS_BUS_DEVICE(obj), &s->iomem); s->timer = timer_new_ns(QEMU_CLOCK_VIRTUAL, stm32f2xx_timer_interrupt,