From patchwork Thu Feb 22 06:54:32 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: gary guo X-Patchwork-Id: 129159 Delivered-To: patch@linaro.org Received: by 10.46.66.2 with SMTP id p2csp280432lja; Wed, 21 Feb 2018 22:54:58 -0800 (PST) X-Google-Smtp-Source: AH8x226JI/YQn7IKQdnlX1E1tBAmNbUtxd5pOo27Y99k9hP5tUiuFsl5KXy0jBqHVsd3FBQkjvYy X-Received: by 2002:a17:902:12d:: with SMTP id 42-v6mr5702754plb.141.1519282498712; Wed, 21 Feb 2018 22:54:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519282498; cv=none; d=google.com; s=arc-20160816; b=W6yFnEUGCvzibwra9oxrzQiDWoj/w2rmfQQ1oxCEHqzZjJANlrdBBe4KpPTu9C6EVz /auGwEm++FGruo0FKu0S9AMYozKAsqOxQRm0Dl80QUj1EOSM/OkVrTDy/02M5/iybNrj zA7pg5kA+5iRnX5PjFU/WHUU7Jm9mlsA9O/Yy87xJoSfRw8Ooh49G5VqaR0p4oRNkVt/ 9tHS+3pn47qDm2o3MTSQ8paZB9k7rs3tRWOQ7fHCeTJMMVnxY2x5syquF86onlL3GNJg 8jv4d7h58/s5jNUBUX6nzjHkMNzPwmQrkHf8fPHjTOJTE8RuPmylDLgDARDaQiNHKyfX qNEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:message-id:date:to:from:dkim-signature :delivered-to:arc-authentication-results; bh=HDHR121JWjmHWog8ocUBOFkqtwH2EyJYxBExuaCcUE4=; b=uIirVFTp76R/fSniy8tchtkd3SkeRBPkV/WzKiAh9eXBjI4/Ck+W9z7efE+fmfuE/6 ebPcKOuclSxkLGqiO5lkXh2qILfMPelatLGTEBDq8NHRxnv3hh0aBZBcipyrmrUXiCa5 mDXFcnE3SWNXEMswDusQVxgdfusUcsY3Wo0UgqgtES4R+gYPFW64XsfSUSNw1dELMN/g kguH00lcS9CYyM7Is++KDG0slYO+wHFVnyjAXPkXDFp6CqZ3/bwozgIZbl7NSXxCGLt1 I9yho3XeEUz55OlOlfiNDGjXJgWlNca5niAfukYcO3O0AzvfWkHwv8FlJvO0ZdGTklH+ Pqlg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=axv9u/+B; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from ml01.01.org (ml01.01.org. [198.145.21.10]) by mx.google.com with ESMTPS id q1-v6si2676986plb.764.2018.02.21.22.54.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 21 Feb 2018 22:54:58 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 as permitted sender) client-ip=198.145.21.10; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=axv9u/+B; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 198.145.21.10 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 62F0421FD73D4; Wed, 21 Feb 2018 22:48:57 -0800 (PST) X-Original-To: edk2-devel@lists.01.org Delivered-To: edk2-devel@lists.01.org Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2607:f8b0:400e:c01::241; helo=mail-pl0-x241.google.com; envelope-from=heyi.guo@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-pl0-x241.google.com (mail-pl0-x241.google.com [IPv6:2607:f8b0:400e:c01::241]) (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 580822034D8C2 for ; Wed, 21 Feb 2018 22:48:55 -0800 (PST) Received: by mail-pl0-x241.google.com with SMTP id 31so2405253ple.9 for ; Wed, 21 Feb 2018 22:54:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=WGkvTxEYyTue0v6t0ZVp2D0lD6jDACpzTKnn7znpTG8=; b=axv9u/+BkV7+arRM8OmaKbEHxeILdc+CIg3pQXuOWQlaW7eioZcQ3vdJW0Y9/AnzUZ RBL97rZzKHcWPsj3UyFyg7MRpZRzzj47acxuMKPRpaZXEnVCGwO20VeGjEIMoSMUSD9d Hc0s0+4mbmWpiT1H1XKq4R+mZAy52THmBBoBc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=WGkvTxEYyTue0v6t0ZVp2D0lD6jDACpzTKnn7znpTG8=; b=Wz743bmVUksTkEL9YVArtzz0MDFVMjfdqI/LY9pk8uZHz4pE6guoFogTrLxBIPuCQG VVYD2crNN5BG8o1QBABgOSd+HGfWkN7n3JyPslQ6mLvTUWg8+vaa+HKrU/GRu8zIQPOd kqdTMlRw4I9Os0EsQDjCX+rcJyuC2OBnIV+8zTC2O8A5vgFvc9wZBUhzdCmlPYVaxEj5 oTU4D4g1MhyU9bs/mJQDQdLvi92HgTyidMu6emUAD+2edDQaWsQ4AhA8yRAWpUrGoFuc AfXPiYf/5KRe1NBRdM7SLCt9kI+Ge5XKSIuSQVk5em8MCFMR0Uia/yfQmE/7ZJ+KX9Y8 SVIw== X-Gm-Message-State: APf1xPAwHO46j5rKdwFD9RoRXp36MdX6QGjpbm6BqeohfLtGCImxvFta RLo+zlnR6z0rxC0BuT6U+oS5zs6P1YM= X-Received: by 2002:a17:902:b28b:: with SMTP id u11-v6mr5607627plr.146.1519282495372; Wed, 21 Feb 2018 22:54:55 -0800 (PST) Received: from localhost.localdomain ([45.56.152.187]) by smtp.gmail.com with ESMTPSA id v88sm35677342pfd.68.2018.02.21.22.54.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 21 Feb 2018 22:54:54 -0800 (PST) From: Heyi Guo To: edk2-devel@lists.01.org Date: Thu, 22 Feb 2018 14:54:32 +0800 Message-Id: <1519282474-94811-1-git-send-email-heyi.guo@linaro.org> X-Mailer: git-send-email 2.7.4 Subject: [edk2] [RFC v2 0/2] Add translation support to generic PCIHostBridge X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ruiyu Ni , Eric Dong , Ard Biesheuvel , Heyi Guo , Michael D Kinney , Laszlo Ersek , Star Zeng MIME-Version: 1.0 Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" v2: Changs are made according to the discussion on the mailing list, including: 1. PciRootBridgeIo->Configuration should return CPU view address, as well as PciIo->GetBarAttributes, and Translation Offset should be equal to PCI view address - CPU view address. 2. Add translation offset to PCI_ROOT_BRIDGE_APERTURE structure definition. 3. PciHostBridge driver internally used Base Address is still based on PCI view address, and translation offset = CPU view - PCI view, which follows the definition in ACPI, and not the same as that in UEFI spec. This is still RFC version, so we have not gone thru all the code in EDK2 for applying the change of PciSegmentLib definition. Cc: Ruiyu Ni Cc: Ard Biesheuvel Cc: Star Zeng Cc: Eric Dong Cc: Laszlo Ersek Cc: Michael D Kinney Heyi Guo (2): MdeModulePkg/PciHostBridgeDxe: Add support for address translation MdeModulePkg/PciBus: return CPU address for GetBarAttributes MdeModulePkg/Bus/Pci/PciBusDxe/PciIo.c | 9 +- .../Bus/Pci/PciHostBridgeDxe/PciHostBridge.c | 57 ++++++++---- .../Bus/Pci/PciHostBridgeDxe/PciRootBridgeIo.c | 101 ++++++++++++++++++--- MdeModulePkg/Include/Library/PciHostBridgeLib.h | 1 + 4 files changed, 138 insertions(+), 30 deletions(-) -- 2.7.4 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel