[Skiboot] [PATCH] phb4: Fix TVE encoding for start address
Frederic Barrat
fbarrat at linux.vnet.ibm.com
Wed Jan 4 04:38:22 AEDT 2017
>From the phb4 spec, when encoding the TVE, the pci start address bits
49:24 are encoded in bits TVE[52:53]||[0:23].
The mask to select bits 47:24 is incorrectly set. It should be
0xffffff000000, shifted left by 16, i.e. 0xffffff << 40
Signed-off-by: Frederic Barrat <fbarrat at linux.vnet.ibm.com>
---
Already discussed with Benh
hw/phb4.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/phb4.c b/hw/phb4.c
index b2723ca..c2c7cc7 100644
--- a/hw/phb4.c
+++ b/hw/phb4.c
@@ -1345,7 +1345,7 @@ static int64_t phb4_map_pe_dma_window_real(struct phb *phb,
* and end address bits 49:24 into TVE[54:55]||[24:47]
* and set TVE[51]
*/
- tve = (pci_start_addr << 16) & (0xffffffull << 48);
+ tve = (pci_start_addr << 16) & (0xffffffull << 40);
tve |= (pci_start_addr >> 38) & (3ull << 10);
tve |= (end >> 8) & (0xfffffful << 16);
tve |= (end >> 40) & (3ull << 8);
--
2.9.3
More information about the Skiboot
mailing list