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

« back to all changes in this revision

Viewing changes to grub-core/loader/i386/linux.c

  • Committer: Package Import Robot
  • Author(s): Colin Watson
  • Date: 2013-12-26 00:52:47 UTC
  • mto: (17.6.37 experimental)
  • mto: This revision was merged to the branch mainline in revision 184.
  • Revision ID: package-import@ubuntu.com-20131226005247-dalaa9te0g0d49kd
Tags: upstream-2.02~beta2
ImportĀ upstreamĀ versionĀ 2.02~beta2

Show diffs side-by-side

added added

removed removed

Lines of Context:
87
87
{
88
88
  grub_uint16_t limit;
89
89
  void *base;
90
 
} __attribute__ ((packed));
 
90
} GRUB_PACKED;
91
91
 
92
92
static struct idt_descriptor idt_desc =
93
93
  {
249
249
    prot_mode_target = get_physical_target_address (ch);
250
250
  }
251
251
 
252
 
  grub_dprintf ("linux", "prot_mode_mem = %lx, prot_mode_target = %lx, prot_size = %x\n",
253
 
                (unsigned long) prot_mode_mem, (unsigned long) prot_mode_target,
 
252
  grub_dprintf ("linux", "prot_mode_mem = %p, prot_mode_target = %lx, prot_size = %x\n",
 
253
                prot_mode_mem, (unsigned long) prot_mode_target,
254
254
                (unsigned) prot_size);
255
255
  return GRUB_ERR_NONE;
256
256
 
341
341
        case GRUB_VIDEO_DRIVER_CIRRUS:
342
342
        case GRUB_VIDEO_DRIVER_BOCHS:
343
343
        case GRUB_VIDEO_DRIVER_RADEON_FULOONG2E:
 
344
        case GRUB_VIDEO_DRIVER_RADEON_YEELOONG3A:
344
345
        case GRUB_VIDEO_DRIVER_IEEE1275:
345
346
        case GRUB_VIDEO_DRIVER_COREBOOT:
346
347
          /* Make gcc happy. */
 
348
        case GRUB_VIDEO_DRIVER_XEN:
347
349
        case GRUB_VIDEO_DRIVER_SDL:
348
350
        case GRUB_VIDEO_DRIVER_NONE:
349
351
        case GRUB_VIDEO_ADAPTER_CAPTURE:
593
595
  }
594
596
  efi_mmap_buf = (grub_uint8_t *) real_mode_mem + ctx.real_size;
595
597
 
596
 
  grub_dprintf ("linux", "real_mode_mem = %lx\n",
597
 
                (unsigned long) real_mode_mem);
 
598
  grub_dprintf ("linux", "real_mode_mem = %p\n",
 
599
                real_mode_mem);
598
600
 
599
601
  ctx.params = real_mode_mem;
600
602
 
706
708
      goto fail;
707
709
    }
708
710
 
709
 
  if (lh.boot_flag != grub_cpu_to_le16 (0xaa55))
 
711
  if (lh.boot_flag != grub_cpu_to_le16_compile_time (0xaa55))
710
712
    {
711
713
      grub_error (GRUB_ERR_BAD_OS, "invalid magic number");
712
714
      goto fail;
851
853
  if (grub_le_to_cpu16 (linux_params.version) >= 0x0208)
852
854
    {
853
855
      linux_params.v0208.efi_signature = GRUB_LINUX_EFI_SIGNATURE;
854
 
      linux_params.v0208.efi_system_table = (grub_uint32_t) (unsigned long) grub_efi_system_table;
 
856
      linux_params.v0208.efi_system_table = (grub_uint32_t) (grub_addr_t) grub_efi_system_table;
855
857
#ifdef __x86_64__
856
858
      linux_params.v0208.efi_system_table_hi = (grub_uint32_t) ((grub_uint64_t) grub_efi_system_table >> 32);
857
859
#endif
859
861
  else if (grub_le_to_cpu16 (linux_params.version) >= 0x0206)
860
862
    {
861
863
      linux_params.v0206.efi_signature = GRUB_LINUX_EFI_SIGNATURE;
862
 
      linux_params.v0206.efi_system_table = (grub_uint32_t) (unsigned long) grub_efi_system_table;
 
864
      linux_params.v0206.efi_system_table = (grub_uint32_t) (grub_addr_t) grub_efi_system_table;
863
865
    }
864
866
  else if (grub_le_to_cpu16 (linux_params.version) >= 0x0204)
865
867
    {
866
868
      linux_params.v0204.efi_signature = GRUB_LINUX_EFI_SIGNATURE_0204;
867
 
      linux_params.v0204.efi_system_table = (grub_uint32_t) (unsigned long) grub_efi_system_table;
 
869
      linux_params.v0204.efi_system_table = (grub_uint32_t) (grub_addr_t) grub_efi_system_table;
868
870
    }
869
871
#endif
870
872