2 * bootsect.S Copyright (C) 1991, 1992 Linus Torvalds
4 * modified by Drew Eckhardt
5 * modified by Bruce Evans (bde)
6 * modified by Chris Noe (May 1999) (as86 -> gas)
7 * gutted by H. Peter Anvin (Jan 2003)
9 * BIG FAT NOTE: We're in real mode using 64k segments. Therefore segment
10 * addresses must be multiplied by 16 to obtain their respective linear
11 * addresses. To avoid confusion, linear addresses are written using leading
12 * hex while segment addresses are written as segment:offset.
16 /* Don't touch these, unless you really know what you're doing. */
17 #define DEF_INITSEG 0x9000
18 #define DEF_SYSSEG 0x1000
19 #define DEF_SETUPSEG 0x9020
20 #define DEF_SYSSIZE 0x7F00
22 /* Internal svga startup constants */
23 #define NORMAL_VGA 0xffff /* 80x25 mode */
24 #define EXTENDED_VGA 0xfffe /* 80x50 mode */
25 #define ASK_VGA 0xfffd /* ask for it at bootup */
28 SETUPSECTS = 6 /* default nr of setup-sectors */
29 BOOTSEG = 0x07C0 /* original address of boot-sector */
30 INITSEG = DEF_INITSEG /* we move boot here - out of the way */
31 SETUPSEG = DEF_SETUPSEG /* setup starts here */
32 SYSSEG = DEF_SYSSEG /* system loaded at 0x10000 (65536) */
33 SYSSIZE = DEF_SYSSIZE /* system size: # of 16-byte clicks */
35 ROOT_DEV = 0 /* ROOT_DEV is now written by "build" */
36 SWAP_DEV = 0 /* SWAP_DEV is now written by "build" */
39 #define SVGA_MODE ASK_VGA
56 # Normalize the start address
57 jmpl $BOOTSEG, $start2
68 movw $bugger_off_msg, %si
80 # Allow the user to press a key, then reboot
85 # int 0x19 should never return. In case it does anyway,
86 # invoke the BIOS reset code...
91 .ascii "Direct booting from floppy is no longer supported.\r\n"
92 .ascii "Please use a boot loader program instead.\r\n"
94 .ascii "Remove disk and press any key to reboot . . .\r\n"
98 # Kernel attributes; used by setup
101 setup_sects: .byte SETUPSECTS
102 root_flags: .word ROOT_RDONLY
103 syssize: .word SYSSIZE
104 swap_dev: .word SWAP_DEV
105 ram_size: .word RAMDISK
106 vid_mode: .word SVGA_MODE
107 root_dev: .word ROOT_DEV
108 boot_flag: .word 0xAA55