~darkmuggle-deactivatedaccount/ubuntu/quantal/grub2/fix-872244

« back to all changes in this revision

Viewing changes to kern/i386/pc/startup.S

  • Committer: Bazaar Package Importer
  • Author(s): Colin Watson
  • Date: 2010-01-11 11:12:55 UTC
  • mfrom: (17.3.7 squeeze)
  • Revision ID: james.westby@ubuntu.com-20100111111255-lr8ebkqw5x41gq6j
Tags: 1.98~20100101-1ubuntu1
* Resynchronise with Debian. Remaining changes:
  - Adjust for default Ubuntu boot options ("quiet splash").
  - Default to hiding the menu; holding down Shift at boot will show it.
  - Set a monochromatic theme for Ubuntu.
  - Apply Ubuntu GRUB Legacy changes to legacy update-grub script: title,
    recovery mode, quiet option, tweak how memtest86+ is displayed, and
    use UUIDs where appropriate.
  - Conflict with grub (<< 0.97-54) as well as grub-legacy.
  - Fix backslash-escaping in merge_debconf_into_conf.
  - Remove "GNU/Linux" from default distributor string.
  - Add crashkernel= options if kdump and makedumpfile are available.
  - If other operating systems are installed, then automatically unhide
    the menu. Otherwise, if GRUB_HIDDEN_TIMEOUT is 0, then use keystatus
    if available to check whether Shift is pressed. If it is, show the
    menu, otherwise boot immediately. If keystatus is not available, then
    fall back to a short delay interruptible with Escape.
  - Allow Shift to interrupt 'sleep --interruptible'.
  - Don't display introductory message about line editing unless we're
    actually offering a shell prompt. Don't clear the screen just before
    booting if we never drew the menu in the first place.
  - Remove some verbose messages printed before reading the configuration
    file.
  - If the environment variable "quiet" is set to something other than 0,
    suppress progress messages as the kernel and initrd load. Set this for
    non-recovery kernel menu entries.
  - Add GRUB_DEFAULT=saved, as well as grub-set-default and grub-reboot
    utilities. Provides functionality essentially equivalent to GRUB
    Legacy's savedefault.
  - Keep the loopback file open so that subsequent changes to the "root"
    environment variable don't affect it.
  - Change prepare_grub_to_access_device to handle filesystems
    loop-mounted on file images.
  - Ignore devices loop-mounted from files in 10_linux.
  - Show the boot menu if the previous boot failed, that is if it failed
    to get to the end of one of the normal runlevels.
  - Handle RAID devices containing virtio components.
* Update savedefault patch from current Bazaar branch, fixing grub-reboot
  to have distinct behaviour from grub-set-default (LP: #497326).
* Fix grub-mkisofs compilation error with FORTIFY_SOURCE.
* Convert recordfail boilerplate in each menu entry to use a function.

Show diffs side-by-side

added added

removed removed

Lines of Context:
146
146
        /* obtain the boot device */
147
147
        movl    12(%ebx), %edx
148
148
 
 
149
        movl    $GRUB_MEMORY_MACHINE_PROT_STACK, %ebp
 
150
        movl    %ebp, %esp
 
151
 
149
152
        /* relocate the code */
150
153
        movl    $(GRUB_KERNEL_MACHINE_RAW_SIZE + 0x200), %ecx
151
154
        addl    EXT_C(grub_compressed_size) - _start + 0x100000 + 0x200, %ecx
485
488
        .code32
486
489
 
487
490
/*
488
 
 * grub_reboot()
489
 
 *
490
 
 * Reboot the system. At the moment, rely on BIOS.
491
 
 */
492
 
FUNCTION(grub_reboot)
493
 
        call    prot_to_real
494
 
        .code16
495
 
cold_reboot:
496
 
        /* cold boot */
497
 
        movw    $0x0472, %di
498
 
        movw    %ax, (%di)
499
 
        ljmp    $0xFFFF, $0x0000
500
 
        .code32
501
 
 
502
 
/*
503
491
 * grub_halt(int no_apm)
504
492
 *
505
493
 * Halt the system, using APM if possible. If NO_APM is true, don't use
776
764
        movw    %cx, %ax
777
765
        movw    %bx, %ds
778
766
        int     $0x13           /* do the operation */
 
767
        jc      noclean
 
768
        /* Clean return value if carry isn't set to workaround
 
769
        some buggy BIOSes.  */
 
770
        xor     %ax, %ax
 
771
noclean:
779
772
        movb    %ah, %bl        /* save return value in %bl */
780
773
        /* back to protected mode */
781
774
        DATA32  call    real_to_prot
819
812
        .code16
820
813
        movb    $0x8, %ah
821
814
        int     $0x13           /* do the operation */
 
815
        jc      noclean2
 
816
        /* Clean return value if carry isn't set to workaround
 
817
        some buggy BIOSes.  */
 
818
        xor     %ax, %ax
 
819
noclean2:
822
820
        /* check if successful */
823
821
        testb   %ah, %ah
824
822
        jnz     1f