grub-devel.gnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] MIPS: Fix get dma physical address for Loongson
@ 2015-06-12 12:28 Heiher
  2015-06-12 12:30 ` Andrei Borzenkov
  0 siblings, 1 reply; 2+ messages in thread
From: Heiher @ 2015-06-12 12:28 UTC (permalink / raw)
  To: The development of GNU GRUB


[-- Attachment #1.1: Type: text/plain, Size: 241 bytes --]

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

[-- Attachment #1.2: Type: text/html, Size: 409 bytes --]

[-- Attachment #2: 0001-Fix-get-dma-physical-address-for-Loongson.diff --]
[-- Type: text/plain, Size: 678 bytes --]

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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] MIPS: Fix get dma physical address for Loongson
  2015-06-12 12:28 [PATCH] MIPS: Fix get dma physical address for Loongson Heiher
@ 2015-06-12 12:30 ` Andrei Borzenkov
  0 siblings, 0 replies; 2+ messages in thread
From: Andrei Borzenkov @ 2015-06-12 12:30 UTC (permalink / raw)
  To: Heiher; +Cc: The development of GNU GRUB

В Fri, 12 Jun 2015 20:28:16 +0800
Heiher <r@hev.cc> пишет:

> 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.
> 

Please in future put commit text in your patch, so it can be applied
using git am. Thank you.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-06-12 12:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-12 12:28 [PATCH] MIPS: Fix get dma physical address for Loongson Heiher
2015-06-12 12:30 ` Andrei Borzenkov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).