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

« back to all changes in this revision

Viewing changes to grub-core/kern/ieee1275/cmain.c

  • Committer: Package Import Robot
  • Author(s): Colin Watson
  • Date: 2014-01-16 15:18:04 UTC
  • mfrom: (17.6.38 experimental)
  • Revision ID: package-import@ubuntu.com-20140116151804-3foouk7fpqcq3sxx
Tags: 2.02~beta2-2
* Convert patch handling to git-dpm.
* Add bi-endian support to ELF parser (Tomohiro B Berry).
* Adjust restore_mkdevicemap.patch to mark get_kfreebsd_version as static,
  to appease "gcc -Werror=missing-prototypes".
* Cherry-pick from upstream:
  - Change grub-macbless' manual page section to 8.
* Install grub-glue-efi, grub-macbless, grub-render-label, and
  grub-syslinux2cfg.
* grub-shell: Pass -no-pad to xorriso when building floppy images.

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
#include <grub/types.h>
23
23
#include <grub/ieee1275/ieee1275.h>
24
24
 
25
 
int (*grub_ieee1275_entry_fn) (void *);
 
25
int (*grub_ieee1275_entry_fn) (void *) GRUB_IEEE1275_ENTRY_FN_ATTRIBUTE;
26
26
 
27
27
grub_ieee1275_phandle_t grub_ieee1275_chosen;
28
28
grub_ieee1275_ihandle_t grub_ieee1275_mmu;
43
43
  grub_ieee1275_flags |= (1 << flag);
44
44
}
45
45
 
46
 
#define SF "SmartFirmware(tm)"
47
 
#define OHW "PPC Open Hack'Ware"
48
 
 
49
46
static void
50
47
grub_ieee1275_find_options (void)
51
48
{
76
73
 
77
74
  rc = grub_ieee1275_get_property (openprom, "CodeGen-copyright",
78
75
                                   tmp, sizeof (tmp), 0);
79
 
  if (rc >= 0 && !grub_strncmp (tmp, SF, sizeof (SF) - 1))
 
76
  if (rc >= 0 && !grub_strncmp (tmp, "SmartFirmware(tm)",
 
77
                                sizeof ("SmartFirmware(tm)") - 1))
80
78
    is_smartfirmware = 1;
81
79
 
82
80
  rc = grub_ieee1275_get_property (root, "architecture",
117
115
              grub_ieee1275_set_flag (GRUB_IEEE1275_FLAG_BROKEN_ADDRESS_CELLS);
118
116
              grub_ieee1275_set_flag (GRUB_IEEE1275_FLAG_NO_OFNET_SUFFIX);
119
117
              grub_ieee1275_set_flag (GRUB_IEEE1275_FLAG_VIRT_TO_REAL_BROKEN);
 
118
              grub_ieee1275_set_flag (GRUB_IEEE1275_FLAG_CURSORONOFF_ANSI_BROKEN);
120
119
              break;
121
120
            }
122
121
        }
187
186
      grub_ieee1275_set_flag (GRUB_IEEE1275_FLAG_HAS_CURSORONOFF);
188
187
    }
189
188
 
190
 
  if (! grub_ieee1275_finddevice ("/rom/boot-rom", &bootrom))
 
189
  if (! grub_ieee1275_finddevice ("/rom/boot-rom", &bootrom)
 
190
      || ! grub_ieee1275_finddevice ("/boot-rom", &bootrom))
191
191
    {
192
192
      rc = grub_ieee1275_get_property (bootrom, "model", tmp, sizeof (tmp), 0);
193
 
      if (rc >= 0 && !grub_strncmp (tmp, OHW, sizeof (OHW) - 1))
 
193
      if (rc >= 0 && !grub_strncmp (tmp, "PPC Open Hack'Ware",
 
194
                                    sizeof ("PPC Open Hack'Ware") - 1))
194
195
        {
195
196
          grub_ieee1275_set_flag (GRUB_IEEE1275_FLAG_BROKEN_OUTPUT);
196
197
          grub_ieee1275_set_flag (GRUB_IEEE1275_FLAG_CANNOT_SET_COLORS);
201
202
    }
202
203
}
203
204
 
204
 
#undef SF
205
 
#undef OHW
206
 
 
207
205
void
208
206
grub_ieee1275_init (void)
209
207
{