~hamo/ubuntu/precise/grub2/grub2.hi_res

« back to all changes in this revision

Viewing changes to grub-core/tests/boot/kfreebsd.init-i386.S

  • Committer: Bazaar Package Importer
  • Author(s): Colin Watson, Colin Watson, Robert Millan, Updated translations
  • Date: 2010-11-22 12:24:56 UTC
  • mfrom: (1.26.4 upstream) (17.3.36 sid)
  • mto: (17.3.43 sid)
  • mto: This revision was merged to the branch mainline in revision 89.
  • Revision ID: james.westby@ubuntu.com-20101122122456-y82z3sfb7k4zfdcc
Tags: 1.99~20101122-1
[ Colin Watson ]
* New Bazaar snapshot.  Too many changes to list in full, but some of the
  more user-visible ones are as follows:
  - GRUB script:
    + Function parameters, "break", "continue", "shift", "setparams",
      "return", and "!".
    + "export" command supports multiple variable names.
    + Multi-line quoted strings support.
    + Wildcard expansion.
  - sendkey support.
  - USB hotunplugging and USB serial support.
  - Rename CD-ROM to cd on BIOS.
  - Add new --boot-directory option to grub-install, grub-reboot, and
    grub-set-default; the old --root-directory option is still accepted
    but was often confusing.
  - Basic btrfs detection/UUID support (but no file reading yet).
  - bash-completion for utilities.
  - If a device is listed in device.map, always assume that it is
    BIOS-visible rather than using extra layers such as LVM or RAID.
  - Add grub-mknetdir script (closes: #550658).
  - Remove deprecated "root" command.
  - Handle RAID devices containing virtio components.
  - GRUB Legacy configuration file support (via grub-menulst2cfg).
  - Keyboard layout support (via grub-mklayout and grub-kbdcomp).
  - Check generated grub.cfg for syntax errors before saving.
  - Pause execution for at most ten seconds if any errors are displayed,
    so that the user has a chance to see them.
  - Support submenus.
  - Write embedding zone using Reed-Solomon, so that it's robust against
    being partially overwritten (closes: #550702, #591416, #593347).
  - GRUB_DISABLE_LINUX_RECOVERY and GRUB_DISABLE_NETBSD_RECOVERY merged
    into a single GRUB_DISABLE_RECOVERY variable.
  - Fix loader memory allocation failure (closes: #551627).
  - Don't call savedefault on recovery entries (closes: #589325).
  - Support triple-indirect blocks on ext2 (closes: #543924).
  - Recognise DDF1 fake RAID (closes: #603354).

[ Robert Millan ]
* Use dpkg architecture wildcards.

[ Updated translations ]
* Slovenian (Vanja Cvelbar).  Closes: #604003
* Dzongkha (dawa pemo via Tenzin Dendup).  Closes: #604102

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 *  GRUB  --  GRand Unified Bootloader
 
3
 *  Copyright (C) 2010  Free Software Foundation, Inc.
 
4
 *
 
5
 *  GRUB is free software: you can redistribute it and/or modify
 
6
 *  it under the terms of the GNU General Public License as published by
 
7
 *  the Free Software Foundation, either version 3 of the License, or
 
8
 *  (at your option) any later version.
 
9
 *
 
10
 *  GRUB is distributed in the hope that it will be useful,
 
11
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 
12
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
13
 *  GNU General Public License for more details.
 
14
 *
 
15
 *  You should have received a copy of the GNU General Public License
 
16
 *  along with GRUB.  If not, see <http://www.gnu.org/licenses/>.
 
17
 */
 
18
 
 
19
#define MODE_RDRW 2
 
20
#define FLAGS_NONE 0
 
21
#define SYSCALL_OPEN 5
 
22
#define SYSCALL_WRITE 4
 
23
#define SYSCALL_RESET 55
 
24
#define SYSCALL_FSYNC 95
 
25
#define SYSCALL_ARCH 165
 
26
#define SYSCALL_EXIT 1
 
27
#define SYSCALL_ARCH_IOPL       4
 
28
#define SYSCALL_INT 0x80
 
29
 
 
30
#define RESET_NOSYNC 0x4
 
31
#define RESET_HALT 0x8
 
32
#define RESET_POWEROFF 0x4000
 
33
#define SHUTDOWN_PORT 0x8900
 
34
 
 
35
        .section ".init", "ax"
 
36
        .global start,_start
 
37
start:
 
38
_start:
 
39
        /* open.  */
 
40
        movl $SYSCALL_OPEN, %eax
 
41
        pushl $FLAGS_NONE
 
42
        pushl $MODE_RDRW
 
43
        leal device, %ebx
 
44
        pushl %ebx
 
45
        pushl $0
 
46
        int $SYSCALL_INT
 
47
        addl $16, %esp
 
48
        movl %eax, %ecx
 
49
 
 
50
        /* write.  */
 
51
        movl $SYSCALL_WRITE, %eax
 
52
        pushl $(messageend-message)
 
53
        leal message, %ebx
 
54
        pushl %ebx
 
55
        pushl %ecx
 
56
        pushl $0
 
57
        int $SYSCALL_INT
 
58
        addl $16, %esp
 
59
 
 
60
        /* fsync.  */
 
61
        movl $SYSCALL_FSYNC, %eax
 
62
        pushl %ecx
 
63
        pushl $0
 
64
        int $SYSCALL_INT
 
65
        addl $8, %esp
 
66
 
 
67
        /* IOPL.  */
 
68
        movl $SYSCALL_ARCH, %eax
 
69
        pushl $iopl_arg
 
70
        pushl $SYSCALL_ARCH_IOPL
 
71
        pushl $0
 
72
        int $SYSCALL_INT
 
73
        addl $12, %esp
 
74
        
 
75
        movw $SHUTDOWN_PORT, %dx
 
76
        movb $'S', %al
 
77
        outb %al, %dx
 
78
        movb $'h', %al
 
79
        outb %al, %dx
 
80
        movb $'u', %al
 
81
        outb %al, %dx
 
82
        movb $'t', %al
 
83
        outb %al, %dx
 
84
        movb $'d', %al
 
85
        outb %al, %dx
 
86
        movb $'o', %al
 
87
        outb %al, %dx
 
88
        movb $'w', %al
 
89
        outb %al, %dx
 
90
        movb $'n', %al
 
91
        outb %al, %dx
 
92
        
 
93
        /* shutdown.  */
 
94
        movl $SYSCALL_RESET, %eax
 
95
        pushl $(RESET_POWEROFF|RESET_HALT|RESET_NOSYNC)
 
96
        pushl $0
 
97
        int $SYSCALL_INT
 
98
        addl $8, %esp
 
99
 
 
100
        /* exit (1). Shouldn't be reached.  */
 
101
        movl $SYSCALL_EXIT, %eax
 
102
        pushl $1
 
103
        pushl $0
 
104
        int $SYSCALL_INT
 
105
device:
 
106
        .ascii "/dev/console"
 
107
        .byte 0
 
108
message:
 
109
        .ascii "Boot Test Passed Successfully\n" SUCCESSFUL_BOOT_STRING "\n"
 
110
messageend:
 
111
iopl_arg:
 
112
        .long SHUTDOWN_PORT
 
113
        .long 1
 
114
        .long 1