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: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-Google-Smtp-Source: AH8x226eiKL1EeDScKaCCH4YrAtu8eCJIyWBbX+fXR2B2OKgAaovNJ8bscSSf0tF6TjXDwN672EHaA== 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 Cc: Heyi Guo , Ruiyu Ni , Ard Biesheuvel , Star Zeng , Eric Dong , Laszlo Ersek , Michael D Kinney 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: [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: , X-List-Received-Date: Thu, 22 Feb 2018 06:48:56 -0000 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