~ubuntu-branches/ubuntu/trusty/grub2/trusty-updates

« back to all changes in this revision

Viewing changes to grub-core/commands/efi/fixvideo.c

  • Committer: Package Import Robot
  • Author(s): Colin Watson
  • Date: 2012-09-13 18:02:04 UTC
  • mfrom: (1.17.15 upstream)
  • mto: (17.6.27 experimental)
  • mto: This revision was merged to the branch mainline in revision 145.
  • Revision ID: package-import@ubuntu.com-20120913180204-mojnmocbimlom4im
Tags: upstream-2.00
ImportĀ upstreamĀ versionĀ 2.00

Show diffs side-by-side

added added

removed removed

Lines of Context:
54
54
        {
55
55
          if (p->pci_id == pciid)
56
56
            {
57
 
              grub_target_addr_t base;
 
57
              grub_addr_t base;
58
58
 
59
 
              grub_printf ("Found graphic card: %s\n", p->name);
 
59
              grub_dprintf ("fixvideo", "Found graphic card: %s\n", p->name);
60
60
              addr += 8 + p->mmio_bar * 4;
61
61
              base = grub_pci_read (addr);
62
62
              if ((! base) || (base & GRUB_PCI_ADDR_SPACE_IO) ||
63
63
                  (base & GRUB_PCI_ADDR_MEM_PREFETCH))
64
 
                grub_printf ("Invalid MMIO bar %d\n", p->mmio_bar);
 
64
                grub_dprintf ("fixvideo", "Invalid MMIO bar %d\n", p->mmio_bar);
65
65
              else
66
66
                {
67
67
                  base &= GRUB_PCI_ADDR_MEM_MASK;
68
68
                  base += p->mmio_reg;
69
69
 
70
70
                  if (*((volatile grub_uint32_t *) base) != p->mmio_old)
71
 
                    grub_printf ("Old value don't match\n");
 
71
                    grub_dprintf ("fixvideo", "Old value doesn't match\n");
72
72
                  else
73
73
                    {
74
74
                      *((volatile grub_uint32_t *) base) = 0;
75
75
                      if (*((volatile grub_uint32_t *) base))
76
 
                        grub_printf ("Set MMIO fails\n");
 
76
                        grub_dprintf ("fixvideo", "Setting MMIO fails\n");
77
77
                    }
78
78
                }
79
79
 
82
82
          p++;
83
83
        }
84
84
 
85
 
      grub_printf ("Unknown graphic card: %x\n", pciid);
 
85
      grub_dprintf ("fixvideo", "Unknown graphic card: %x\n", pciid);
86
86
    }
87
87
 
88
88
  return 0;