From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 36595C48BDF for ; Fri, 18 Jun 2021 15:04:10 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id BB41561351 for ; Fri, 18 Jun 2021 15:04:09 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BB41561351 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:55284 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1luG2S-0007Fw-OA for qemu-devel@archiver.kernel.org; Fri, 18 Jun 2021 11:04:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:32774) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1luG0l-0005Wn-4g for qemu-devel@nongnu.org; Fri, 18 Jun 2021 11:02:23 -0400 Received: from mail-ed1-x52d.google.com ([2a00:1450:4864:20::52d]:41578) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1luG0b-0008JM-EZ for qemu-devel@nongnu.org; Fri, 18 Jun 2021 11:02:22 -0400 Received: by mail-ed1-x52d.google.com with SMTP id n20so9064421edv.8 for ; Fri, 18 Jun 2021 08:02:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=bxMjk+2+cPzGxh72Db4vUGtuWMXV+M2dXsGgEwXfBAM=; b=rrYsh2XhGDdwMY2TXuPSIA/a05AQAmeWDDYoU5rQhf45reRw4+ukMboFn837xkvyHQ uS8zgFbfHvCifHOnlxHpHz9gU9SO2fbe5rVHhzLjkOTIaQJweXzQeUCdKEN278JHil7L haO7UoOmROzO46vD0sQ3QepgXxUWYjmwJuz4NbLHsOyy0lKzzCFNpd3CYbQR5/cA3KD1 3Sv1wO/fE+Ig/jCnVJk11pXYHSBAaqrY3GdAgwHs2SWa1V5LT2teL/eJDEVMISqU7iUb kEi2yXyt6FOHcAB4kINke4Q9DPl24FYmmj2A9uI6g0hi4S82DL0xmLzo3T65belP14jw qX8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=bxMjk+2+cPzGxh72Db4vUGtuWMXV+M2dXsGgEwXfBAM=; b=oSIl0ZAADQkU7txjeSBVEp4QnR9NbfFJnYVWt+3lLpukFxmec/IBeOIrU81bDV7wTX F7hup2tQOjM14sESRk8pWYCzGRSnk1yUPeg6tCHJAGvA1M7ng7jlcecsZUbaEfAGXp5X /O94t189VclBNMv0O1MNnf6RGNZnYAoeiP3N/u6CDIrYETLHb9/Cbx4FikdaKAzUTzUV Ebk8+LLkjyJrvHxOUzGxGLjH2qks3UKYR+LO0sjSbONPCpswkBRQhHnDfICzxdBi+rAU hkGUEfUVgCMCh/u+Ep52OZ/HdfxNAivJjhLCBgfwm9gw25ESCYCm/qNwrbueSFIzOH62 Eu/A== X-Gm-Message-State: AOAM5322lMeDvYnnDGk8nZB7WizDJRyGDg914VwF+sDmrd1962XEauZi EjPGA+8itwxOcV4t7OrywbyidYWVXGd2x6WyhD5NaQ== X-Google-Smtp-Source: ABdhPJxB3dX9S//I2PkxMJPIOPzHDkLvRZEUPzeEkYfrkBb+y81RzxRvBsiR4BLYooK4U79SlHQqmxe0FX1/Vm4I9Lc= X-Received: by 2002:a05:6402:220d:: with SMTP id cq13mr5510073edb.52.1624028531492; Fri, 18 Jun 2021 08:02:11 -0700 (PDT) MIME-Version: 1.0 References: <20210615165800.23265-1-alex.bennee@linaro.org> <20210615165800.23265-2-alex.bennee@linaro.org> In-Reply-To: From: Peter Maydell Date: Fri, 18 Jun 2021 16:01:35 +0100 Message-ID: Subject: Re: [PATCH v3 1/2] semihosting/arm-compat: replace heuristic for softmmu SYS_HEAPINFO To: =?UTF-8?B?QWxleCBCZW5uw6ll?= Content-Type: text/plain; charset="UTF-8" Received-SPF: pass client-ip=2a00:1450:4864:20::52d; envelope-from=peter.maydell@linaro.org; helo=mail-ed1-x52d.google.com 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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no 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: Andrew Strauss , QEMU Developers , qemu-arm Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" On Fri, 18 Jun 2021 at 11:09, Peter Maydell wrote: > > On Thu, 17 Jun 2021 at 20:22, Peter Maydell wrote: > > This will pick the first MR it finds that happens to be RAM (which > > could be some tiny thing). You don't want that, you want specifically > > whatever the board decided was the system RAM, which is the MemoryRegion > > MachineState::ram. > > As a concrete example, on the mps3-an547 machine this code finds > the 512KB ITCM at 0x0 rather than the much more useful 2GB DRAM > at 0x6000_0000... Turns out that "look for MachineState::ram" won't find you the 2GB DRAM, though, because it's lurking behind a Memory Protection Controller so it doesn't appear directly in the flatview. Not sure what to do about that -- maybe we should forget about MachineState::ram and just go for "largest RAM we can see" ? Trying to get this code to be able to 'look through' IOMMUs sounds like it would be massively painful. -- PMM