From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf0-x22b.google.com (mail-lf0-x22b.google.com [IPv6:2a00:1450:4010:c07::22b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id B65131A1E0B for ; Mon, 26 Sep 2016 13:25:15 -0700 (PDT) Received: by mail-lf0-x22b.google.com with SMTP id y6so157277393lff.1 for ; Mon, 26 Sep 2016 13:25:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=kVmYdhCD1DEmVHLW7F1e1xwMnCAxFOIZjuOIR5YAYgI=; b=HEe16bSvTJTh+pOmAH6kraCqWdl8RE9MzT41VWAKMXNhYsELtZHg7Y4OlJeIyfQ9le 9CuBhHEfdB6DUvC0mpvDbA/9AOuB56RIZ3B8TS/5w+McS/xsQeQo9qr5/j2M3Omz+/GZ iByf+xZIBtbDO9z+qmBVL8fapS8bxbPcC2zZCheewTqb50Ri5dHEAmlmHOfd7J6b59Cp 29aQjhLw/hxjIhyiKNqPqYUKgIG1FqL0sC9bIeJanTwu6OFZZvjsoNuHRUxIAnX+PxxR a0o0DFbWvYq0rdv7wCh4uNU2tyYCppP3ampRQ8mUAuq8Lk2oLzEHTu25WJlgBbU0Pg7b D4rw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=kVmYdhCD1DEmVHLW7F1e1xwMnCAxFOIZjuOIR5YAYgI=; b=GMomMEz83Gz0AUak98wjYAvb2noVR0E+xO8ZxXq0xWcoeQkBTs3MreniqaaAgzrJPS Es5uANraHypr6ObypbBnyqx3cR+oz5zFiShMn8rYlLAdn2qZcLpLdC/XkTbz+WjjvzuX tVgZDdrPy6GvJLku0lLOl+2rZU1fGbqQ0gQsysv/J+ZQR8rs1ncMBTL12JuaUMLM9t6x R27MJV59/kHD9r//FwloeL3QWiPEQ6ditWhKSIMoPPTDCu3tfWhxh+y/+kULcGr4ePOE LAGYoRi9HtwHreM4mA1ygU6VqmViGM7//svBPqjjzZOJQdM3Q7LnyYlJHSbDFNXuvqbG RXTQ== X-Gm-Message-State: AA6/9RlUOjSAlSB7krbYBVnRee2JNdyfN0JRkHKncqWU5HA3aRYCkwF3CJ7lzJo9rwJpaYTY1r2kq162HztVig== X-Received: by 10.28.8.84 with SMTP id 81mr17573054wmi.22.1474921513503; Mon, 26 Sep 2016 13:25:13 -0700 (PDT) MIME-Version: 1.0 Received: by 10.28.36.212 with HTTP; Mon, 26 Sep 2016 13:25:12 -0700 (PDT) In-Reply-To: References: From: Michael Zimmermann Date: Mon, 26 Sep 2016 22:25:12 +0200 Message-ID: To: Ard Biesheuvel Cc: "edk2-devel@lists.01.org" , Leif Lindholm X-Content-Filtered-By: Mailman/MimeDel 2.1.21 Subject: Re: System hang when using SetMemoryAttributes X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Sep 2016 20:25:16 -0000 Content-Type: text/plain; charset=UTF-8 while this would help on other devices(I've already done that in the past with edk2 and other environments), in this case it has no effect, there are always glitches at the bottom of the screen and randomly a few artifact all over the screen. That obviously hints at some caching issue. Apparently the cache cleaning has no effect for the framebuffer of this device. And it still confuses me that the UC/WC case - even with Blt stubbed - can cause the system to just hang. On Mon, Sep 26, 2016 at 7:00 PM, Ard Biesheuvel wrote: > On 26 September 2016 at 05:52, Michael Zimmermann > wrote: > >> Are you saying your framebuffer does work with cached attributes? That > >> would mean the graphics device is DMA coherent, which is actually a > >> good thing. What hardware are we talking about here? > > yes it does but ofc, it causes glitches since the writes aren't always > > synced correctly. > > My edk2 port is cross platorm by using PrePi and a function table > provided > > by another bootloader for hardware communication. > > > > The device that's broken is 'Asus Zenfone 2 Laser ZE550KL' which uses a > > 'Qualcomm MSM8939 Snapdragon 615' chipset. > > > > I couldn't find the exact info on this particular SoC, but in some > cases, devices are DMA coherent at L2 but not L1. > > Does it help if you clean (not invalidate) the cache by virtual > address after each BLT operation? Note that the 'by virtual address' > bit is important in coherent systems, simply cleaning the whole L1 is > *not* guaranteed to work. [use WriteBackDataCacheRange()] >