From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-it0-x22c.google.com (mail-it0-x22c.google.com [IPv6:2607:f8b0:4001:c0b::22c]) (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 829771A1E03 for ; Sun, 25 Sep 2016 23:35:56 -0700 (PDT) Received: by mail-it0-x22c.google.com with SMTP id r192so65156722ita.0 for ; Sun, 25 Sep 2016 23:35:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=wbu7RLcAKtLeZEwY4g3kYjlLQzI+j+OAhnODJAowDZk=; b=hJM8PgvxXjjqnAZ3Ipgx6JR7T/r1YVyz7J43gb8k/Y0ziM9+J9wzJuZ+a/qt7m76Il 2MecMhRODqJ6RjEljJ2rxN4kS8aCp+F7t3rZeWWbj8ZAJUYtNyDgCBhviSpGy1xR067o pDHy6fIsfs973UbUjjFCEHbyyaK7xgeh1L1ck= 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=wbu7RLcAKtLeZEwY4g3kYjlLQzI+j+OAhnODJAowDZk=; b=D2SwTvM66uf6peBx3K6OY25usa5D0U0I7nfoqEYi2SAEUA91dUtGGNgvLLscCO5Jjm K1D7LjbqHoV4vibUogdSppO6AwRJGRLbeNkoMbOUxKSMLKYNA3LsDYNtesPRtHVSOR/D Ltkg0cexs9VRRnHUO7Vm3i3pQ+sMpCNzXwuVsJn5+07LF/B8UavsGuN2PAfuUTsEdGUP gWHP+koYGlqrbSGJbylFqsopdvNWOclk+reC0JlaqCpIfRQUVRvnCj+hHJzHC+Lkr60y Xy6tmOKz2fFOrVqUU9D2bmkF/64i3b9zNt1KYiMAdcHwq0er5qjqEcThZ2tPXcf8c4To z6qQ== X-Gm-Message-State: AA6/9RmdqZBJrYwOAVhvWnSNQts7dM6mOAdaKkIJO44LCgibBOeIsOHsK226003hCeBr4OczRMaWCKBWzi1+mnrS X-Received: by 10.36.76.13 with SMTP id a13mr4745676itb.47.1474871755891; Sun, 25 Sep 2016 23:35:55 -0700 (PDT) MIME-Version: 1.0 Received: by 10.36.204.195 with HTTP; Sun, 25 Sep 2016 23:35:55 -0700 (PDT) In-Reply-To: References: From: Ard Biesheuvel Date: Sun, 25 Sep 2016 23:35:55 -0700 Message-ID: To: Michael Zimmermann Cc: "edk2-devel@lists.01.org" , Leif Lindholm 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 06:35:56 -0000 Content-Type: text/plain; charset=UTF-8 On 25 September 2016 at 20:01, Michael Zimmermann wrote: > Hi, > > which side effects can SetMemoryAttributes have? > I have a device where setting the framebuffer(which is part of DRAM) to > EFI_MEMORY_UC makes UEFI hang later on(when already outside the lcd driver). > > If I do the same on a memory range allocated with AllocateAnyPages instead > of AllocateAddress UEFI boots just fine(but ofc, the screen doesn't work). > > Unfortunately I don't have UART on that device but I'm sure there's no > assert because I configured DebugLib to reboot the device in that case - > which never happens, it's just stuck when the console drivers(TerminalDxe > etc) initialize later on. > Hello Michael, EFI_MEMORY_WC is more suitable for a framebuffer than EFI_MEMORY_UC, since the latter does not allow unaligned accesses, so any unaligned store will crash the system. Since the framebuffer is in DRAM, I assume the reason for setting the memory attributes is that the device is not DMA coherent? Could you perhaps describe the hardware in more detail? -- Ard.