~ubuntu-branches/ubuntu/wily/grub2/wily

« back to all changes in this revision

Viewing changes to grub-core/kern/efi/mm.c

  • Committer: Bazaar Package Importer
  • Author(s): Colin Watson
  • Date: 2011-01-11 17:11:44 UTC
  • mto: (17.3.26 experimental)
  • mto: This revision was merged to the branch mainline in revision 60.
  • Revision ID: james.westby@ubuntu.com-20110111171144-o2h6luxzei5fivmf
Tags: upstream-1.99~20110111
ImportĀ upstreamĀ versionĀ 1.99~20110111

Show diffs side-by-side

added added

removed removed

Lines of Context:
52
52
  grub_efi_status_t status;
53
53
  grub_efi_boot_services_t *b;
54
54
 
55
 
#if GRUB_TARGET_SIZEOF_VOID_P < 8
 
55
#if 1
56
56
  /* Limit the memory access to less than 4GB for 32-bit platforms.  */
57
57
  if (address > 0xffffffff)
58
58
    return 0;
59
59
#endif
60
60
 
61
 
#if GRUB_TARGET_SIZEOF_VOID_P < 8 || defined (MCMODEL_SMALL)
 
61
#if 1
62
62
  if (address == 0)
63
63
    {
64
64
      type = GRUB_EFI_ALLOCATE_MAX_ADDRESS;
251
251
       desc = NEXT_MEMORY_DESCRIPTOR (desc, desc_size))
252
252
    {
253
253
      if (desc->type == GRUB_EFI_CONVENTIONAL_MEMORY
254
 
#if GRUB_TARGET_SIZEOF_VOID_P < 8 || defined (MCMODEL_SMALL)
 
254
#if 1
255
255
          && desc->physical_start <= 0xffffffff
256
256
#endif
257
257
          && desc->physical_start + PAGES_TO_BYTES (desc->num_pages) > 0x100000
267
267
              desc->physical_start = 0x100000;
268
268
            }
269
269
 
270
 
#if GRUB_TARGET_SIZEOF_VOID_P < 8 || defined (MCMODEL_SMALL)
 
270
#if 1
271
271
          if (BYTES_TO_PAGES (filtered_desc->physical_start)
272
272
              + filtered_desc->num_pages
273
273
              > BYTES_TO_PAGES (0x100000000LL))