Fix getvirt function on yeeloong

This commit is contained in:
Vladimir 'phcoder' Serbinenko 2010-05-23 00:11:47 +02:00
parent 5667f2656d
commit ae87524ea6
2 changed files with 3 additions and 3 deletions

View file

@ -36,7 +36,7 @@ grub_dma_free (struct grub_pci_dma_chunk *ch)
#endif
#ifdef GRUB_MACHINE_MIPS_YEELOONG
void *
volatile void *
grub_dma_get_virt (struct grub_pci_dma_chunk *ch)
{
return (void *) ((((grub_uint32_t) ch) & 0x1fffffff) | 0xa0000000);
@ -45,7 +45,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;
return (((grub_uint32_t) ch) & 0x1fffffff) | 0x80000000;
}
#else

View file

@ -115,7 +115,7 @@ struct grub_pci_dma_chunk;
struct grub_pci_dma_chunk *EXPORT_FUNC(grub_memalign_dma32) (grub_size_t align,
grub_size_t size);
void EXPORT_FUNC(grub_dma_free) (struct grub_pci_dma_chunk *ch);
void *EXPORT_FUNC(grub_dma_get_virt) (struct grub_pci_dma_chunk *ch);
volatile void *EXPORT_FUNC(grub_dma_get_virt) (struct grub_pci_dma_chunk *ch);
grub_uint32_t EXPORT_FUNC(grub_dma_get_phys) (struct grub_pci_dma_chunk *ch);
#endif