From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2607:f8b0:400e:c05::22b; helo=mail-pg0-x22b.google.com; envelope-from=heyi.guo@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-pg0-x22b.google.com (mail-pg0-x22b.google.com [IPv6:2607:f8b0:400e:c05::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 0115B2034CF7F for ; Sun, 29 Oct 2017 20:49:08 -0700 (PDT) Received: by mail-pg0-x22b.google.com with SMTP id b192so10378383pga.2 for ; Sun, 29 Oct 2017 20:52:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=to:from:subject:message-id:date:user-agent:mime-version :content-transfer-encoding:content-language; bh=vEV8VUeRGvkQdtOgpgyON+Vy2woJFyHMPEfbObNZHBo=; b=h1QkonS0qtDgXGG+HTtH7292vuS9KIb0hyjhr1dUTKLqc5AVLpRbwhZg7Q6HJC8dVb JBUgqejPPfkiNkcxdsOIp1FmBL89Fx5y9swnZemAT0zWRZdmtFrCWViABc4TV188orsX VP+nrMkVHvlDEsC8jR7pmdqArntH6X/1uBr+U= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:from:subject:message-id:date:user-agent :mime-version:content-transfer-encoding:content-language; bh=vEV8VUeRGvkQdtOgpgyON+Vy2woJFyHMPEfbObNZHBo=; b=nSSRJnVWneDqvQ05owQty/48ow/NC3haV+nISZ39rpd/0Qve37smys3KaNUApuLhYf BurqPmfuwuo2UioJt4sl28qMzNxECNMg8j96tjgMWWrco9YnMrutK6UjRcIashLlriz5 c04YHvoqIvKeHYczxQsdn943QKH9tD/MVFjQmadjb6CKYNm6DvqOKLRPmc0gdaAis7fV GqMSBkuAsjAJmrBUng2m9F9RG7yXjmzIixQ5O45VDk/H5cCMnNGtYL8DBJfAIHdEF8M7 AOyVHnoVjPjK7OoozA2dfx90Vsut5oJBMj6nrD0FhvyLY36CrTAU91ekTUy2kNNzy6y1 3n5g== X-Gm-Message-State: AMCzsaWlLJ+d6jPJC/IBm2GWvxDHpTdIxiHO7UZ9rYEikoI8M/s9BBpN 3ioRGWLg4kN3g28/fHT/aubhtQ== X-Google-Smtp-Source: ABhQp+R/wGY86PYvSX3R6/Z6RFmQbpXluDZMdR7Cpz5+4fKvj3+CMBcINakF32ai4dAvsi6+A92QlQ== X-Received: by 10.99.158.10 with SMTP id s10mr6523968pgd.250.1509335578701; Sun, 29 Oct 2017 20:52:58 -0700 (PDT) Received: from [10.74.168.226] ([89.47.15.174]) by smtp.gmail.com with ESMTPSA id v76sm9161991pfk.78.2017.10.29.20.52.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 29 Oct 2017 20:52:58 -0700 (PDT) To: "edk2-devel@lists.01.org" , Linaro UEFI Mailman List , Ard Biesheuvel , Leif Lindholm , "Ni, Ruiyu" From: Heyi Guo Message-ID: Date: Mon, 30 Oct 2017 11:52:29 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 Subject: [RFC] MdeModulePkg/NonDiscoverablePciDeviceDxe: NonCoherentPciIoAllocateBuffer issue with AArch64 X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Oct 2017 03:49:09 -0000 Content-Type: text/plain; charset=gbk; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Hi folks, In NonDiscoverablePciDeviceDxe driver, NonCoherentPciIoAllocateBuffer may allocate EFI_MEMORY_UC buffer depending on input Attributes and GCD capabilities. If it does, it actually allocates memory of "device" type in AArch64, but not "normal uncacheable" memory. For "device" memory type, it requires restrict access alignment and it may trigger alignment fault exception with BaseMemoryLibOptDxe in which read/write alignment is not guaranteed. Is EFI_MOMORY_WC enough for AArch64 platforms? How about other platforms, like X86? Thanks and regards, Heyi Guo