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.
18 SETUPSECTS = 4 /* default nr of setup-sectors */
19 BOOTSEG = 0x07C0 /* original address of boot-sector */
20 INITSEG = DEF_INITSEG /* we move boot here - out of the way */
21 SETUPSEG = DEF_SETUPSEG /* setup starts here */
22 SYSSEG = DEF_SYSSEG /* system loaded at 0x10000 (65536) */
23 SYSSIZE = DEF_SYSSIZE /* system size: # of 16-byte clicks */
25 ROOT_DEV = 0 /* ROOT_DEV is now written by "build" */
26 SWAP_DEV = 0 /* SWAP_DEV is now written by "build" */
29 #define SVGA_MODE ASK_VGA
46 # Normalize the start address
47 jmpl $BOOTSEG, $start2
58 movw $bugger_off_msg, %si
70 # Allow the user to press a key, then reboot
75 # int 0x19 should never return. In case it does anyway,
76 # invoke the BIOS reset code...
81 .ascii "Direct booting from floppy is no longer supported.\r\n"
82 .ascii "Please use a boot loader program instead.\r\n"
84 .ascii "Remove disk and press any key to reboot . . .\r\n"
88 # Kernel attributes; used by setup
91 setup_sects: .byte SETUPSECTS
92 root_flags: .word ROOT_RDONLY
93 syssize: .word SYSSIZE
94 swap_dev: .word SWAP_DEV
95 ram_size: .word RAMDISK
96 vid_mode: .word SVGA_MODE
97 root_dev: .word ROOT_DEV
98 boot_flag: .word 0xAA55