Hi,

I think this is a old mistake. It caused Loongson 3 pci devices are broken.
The lowest 29-bit address of dma chunk is physical address. It or
0x80000000 will be convert to cached virtual address.

-- 
Best regards!
Heiher
http://hev.cc
From 423bf07f4b79a5aa10f380f39b1c483d55d70a3a Mon Sep 17 00:00:00 2001
From: Heiher <r...@hev.cc>
Date: Sat, 13 Jun 2015 04:09:38 +0800
Subject: [PATCH] Fix get dma physical address for Loongson.

---
 grub-core/bus/pci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/grub-core/bus/pci.c b/grub-core/bus/pci.c
index b388ce5..82d7870 100644
--- a/grub-core/bus/pci.c
+++ b/grub-core/bus/pci.c
@@ -72,7 +72,7 @@ grub_dma_get_virt (struct grub_pci_dma_chunk *ch)
 grub_uint32_t
 grub_dma_get_phys (struct grub_pci_dma_chunk *ch)
 {
-  return (((grub_uint32_t) ch) & 0x1fffffff) | 0x80000000;
+  return (((grub_uint32_t) ch) & 0x1fffffff);
 }
 #else
 
-- 
2.4.3

_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel

Reply via email to