wok-next diff linux/stuff/linux-header.u @ rev 16917
Replace Qt-jpeg&gif from libQtPlugins to libQtGui
author | Xander Ziiryanoff <psychomaniak@xakep.ru> |
---|---|
date | Thu Jul 17 03:53:32 2014 +0200 (2014-07-17) |
parents | ead8572c67e9 |
children | e0cfbb41587f |
line diff
1.1 --- a/linux/stuff/linux-header.u Tue Mar 04 20:34:28 2014 +0000 1.2 +++ b/linux/stuff/linux-header.u Thu Jul 17 03:53:32 2014 +0200 1.3 @@ -4,7 +4,7 @@ 1.4 * modified by more people than can be counted 1.5 * 1.6 * Rewritten as a common file by H. Peter Anvin (Apr 2007) 1.7 -+ * Rewritten Pascal Bellard (Nov 2009) 1.8 ++ * Rewritten by Pascal Bellard (Nov 2009) 1.9 * 1.10 * BIG FAT NOTE: We're in real mode using 64k segments. Therefore segment 1.11 * addresses must be multiplied by 16 to obtain their respective linear 1.12 @@ -24,7 +24,7 @@ 1.13 1.14 #ifndef SVGA_MODE 1.15 #define SVGA_MODE ASK_VGA 1.16 -@@ -40,53 +44,480 @@ 1.17 +@@ -40,53 +44,505 @@ 1.18 #define ROOT_RDONLY 1 1.19 #endif 1.20 1.21 @@ -33,16 +33,15 @@ 1.22 +cmd_line_ptr = 0x228 1.23 + 1.24 +/* some extra features */ 1.25 -+#define EXE_SUPPORT real mode dos .exe file support (no himem.sys) 1.26 ++#define EXE_SUPPORT real mode dos .exe file support 1.27 +#define CMDLINE kernel >= 2.4 1.28 +#define OLDCMDLINE kernel < 2.4 1.29 +#define HELP display version for ? argument 1.30 +#define MORETHAN16M up to 4Gb RAM, not 16Mb 1.31 +#define KEYBOARDLESS_SUPPORT scan floppy swap each 5 seconds 1.32 -+#define FULL_ZIMAGE Up to 512K system zImage 1.33 + 1.34 -+/* some limitations to reduce code size */ 1.35 -+//#define FLOPPY_1440K_ONLY 1.44M floppies support only 1.36 ++/* some limitations to reduce the code size */ 1.37 ++#define FLOPPY_1440K_ONLY 1.44M floppies support only (no 1.72M, 1.96M...) 1.38 + 1.39 .code16 1.40 .section ".bstext", "ax" 1.41 @@ -90,15 +89,16 @@ 1.42 - xorw %sp, %sp 1.43 - sti 1.44 - cld 1.45 -+#ifdef FULL_ZIMAGE 1.46 -+#define LOADSEG 0x8800 // Up to 512K zImage 1.47 -+#else 1.48 -+#define LOADSEG 0x8000 // 0x1000 multiple, up to 480K zImage 1.49 ++LOADSEG = 0x8000 # 0x1000 multiple, up to 512K zImage 1.50 ++LOADSZ = 0x10000 1.51 ++#ifdef EXE_SUPPORT 1.52 ++#A20BUFFER = 0x60000 # a20 gate / himem.sys support 1.53 ++A20BUFFER = 0x68000 # a20 gate / himem.sys support 1.54 ++#define USEA20BUFFER 1.55 +#endif 1.56 -+#define LOADSZ 0x8000 1.57 1.58 - movw $bugger_off_msg, %si 1.59 -+oldstart: 1.60 ++# bootsect_start: 1.61 + cld # assume nothing 1.62 +stacktop = 0x9E00 # in 0x8000 .. 0xA000 1.63 +zeroed = 48+12 # gdt + zeroed registers 1.64 @@ -109,7 +109,15 @@ 1.65 + pushw $INITSEG 1.66 + popw %ss # %ss contain INITSEG 1.67 + movw %di, %sp # put stack at INITSEG:stacktop-... 1.68 -+ 1.69 + 1.70 +-msg_loop: 1.71 +- lodsb 1.72 +- andb %al, %al 1.73 +- jz bs_die 1.74 +- movb $0xe, %ah 1.75 +- movw $7, %bx 1.76 +- int $0x10 1.77 +- jmp msg_loop 1.78 +# Many BIOS's default disk parameter tables will not recognize 1.79 +# multi-sector reads beyond the maximum sector number specified 1.80 +# in the default diskette parameter tables - this may mean 7 1.81 @@ -121,7 +129,10 @@ 1.82 +# count to 36 - the most we will encounter on an ED 2.88. 1.83 +# 1.84 +# High doesn't hurt. Low does. Let's use the max: 63 1.85 -+ 1.86 + 1.87 +-bs_die: 1.88 +- # Allow the user to press a key, then reboot 1.89 +- xorw %ax, %ax 1.90 + pushw %ss 1.91 + popw %es # %es = %ss = INITSEG 1.92 + xorw %ax, %ax # %ax = 0 1.93 @@ -178,27 +189,37 @@ 1.94 + movw %sp, %si # for bootsect_gdt 1.95 +init_gdt: 1.96 + decw bootsect_src_limit(%bx,%si) # max 64Kb 1.97 -+#if LOADSEG % 0x1000 == 0 1.98 + movw $0x9300+(LOADSEG/0x1000), bootsect_src_base+2(%bx,%si) 1.99 -+#else 1.100 -+ movl $0x93000000+(LOADSEG*0x10), bootsect_src_base(%bx,%si) 1.101 -+#endif 1.102 + xorb $bootsect_dst_limit-bootsect_src_limit, %bl 1.103 + jne init_gdt 1.104 +code32_start = 0x214 1.105 -+#ifdef MORETHAN16M 1.106 -+ movb code32_start+3, %al # destination = 0x00100000 or 0x00010000 1.107 -+ movb %al, bootsect_dst_base_hi(%si) # load high (> 16M) ? 1.108 -+#endif 1.109 + movw code32_start+1, %ax # destination = 0x00100000 or 0x00010000 1.110 + movl syssize, %ebx 1.111 + decl %ebx 1.112 + shrl $5, %ebx 1.113 ++#ifdef MORETHAN16M 1.114 + incl %ebx 1.115 ++#else 1.116 ++ incw %bx 1.117 ++#endif 1.118 ++#ifdef USEA20BUFFER 1.119 ++ movw $0x00100000>>8, %di 1.120 ++#endif 1.121 +syslp: 1.122 ++#ifdef USEA20BUFFER 1.123 ++ cmpw %ax, %di 1.124 ++ jne nota20 1.125 ++ xorw $(0x00100000+A20BUFFER)>>8, %ax 1.126 ++nota20: 1.127 ++#endif 1.128 + movw %ax, bootsect_dst_base+1(%si) 1.129 ++#ifdef MORETHAN16M 1.130 ++ movl $LOADSZ/512, %edi # size in sectors 1.131 ++ subl %edi, %ebx 1.132 ++#else 1.133 + movw $LOADSZ/512, %di # size in sectors 1.134 -+ subl $LOADSZ/512, %ebx 1.135 ++ subw %di, %bx 1.136 ++#endif 1.137 + pushf 1.138 + jnc not_last 1.139 + addw %bx, %di 1.140 @@ -219,25 +240,25 @@ 1.141 + popw %es # restore es 1.142 + int $0x15 # max 16M, maybe more... 1.143 + popw %ax 1.144 -+ addw $LOADSZ/256, %ax # next dest 1.145 ++ incb %ah # next dest (ax+=LOADSZ/256) 1.146 +#ifdef MORETHAN16M 1.147 + adcb %cl, bootsect_dst_base_hi(%si) # breaks 16M limit ? 1.148 +#endif 1.149 ++#ifdef USEA20BUFFER 1.150 ++ movw $(LOADSZ+A20BUFFER)>>8, %di 1.151 ++#endif 1.152 + popf 1.153 + ja syslp 1.154 - 1.155 --msg_loop: 1.156 -- lodsb 1.157 -- andb %al, %al 1.158 -- jz bs_die 1.159 -- movb $0xe, %ah 1.160 -- movw $7, %bx 1.161 -- int $0x10 1.162 -- jmp msg_loop 1.163 -- 1.164 --bs_die: 1.165 -- # Allow the user to press a key, then reboot 1.166 -- xorw %ax, %ax 1.167 ++#ifdef USEA20BUFFER 1.168 ++#ifdef MORETHAN16M 1.169 ++ movb %cl, bootsect_dst_base_hi(%si) 1.170 ++#endif 1.171 ++ movb $0x10, bootsect_dst_base+2(%si) 1.172 ++ movw $A20BUFFER/0x100, bootsect_src_base+1(%si) 1.173 ++ movb $0x87, %ah 1.174 ++ int $0x15 1.175 ++#endif 1.176 ++ 1.177 +# This procedure turns off the floppy drive motor, so 1.178 +# that we enter the kernel in a known state, and 1.179 +# don't have to worry about it later. 1.180 @@ -395,25 +416,27 @@ 1.181 - int $0x19 1.182 +#endif 1.183 + jmp read_sectorslp 1.184 -+ 1.185 + 1.186 +- # int 0x19 should never return. In case it does anyway, 1.187 +- # invoke the BIOS reset code... 1.188 +- ljmp $0xf000,$0xfff0 1.189 +#ifdef EXE_SUPPORT 1.190 +read_sectors_dos: 1.191 ++ xorw %dx, %dx // write to %ds:%dx, not %es:%bx 1.192 ++ call read_sectors_dosz 1.193 ++read_sectors_dosz: 1.194 + pushw %es 1.195 + popw %ds 1.196 + movb $0x3F, %ah // read 1.197 -+ cwd // write to %ds:%dx, not %es:%bx 1.198 + movw %di, %cx 1.199 -+ shlw $9, %cx // byte count 1.200 ++ shlw $8, %cx // byte count / 2 1.201 + movw %bp, %bx 1.202 + int $0x21 1.203 ++ xchgw %ax, %dx 1.204 + pushw %ss 1.205 + popw %ds 1.206 +#endif 1.207 1.208 -- # int 0x19 should never return. In case it does anyway, 1.209 -- # invoke the BIOS reset code... 1.210 -- ljmp $0xf000,$0xfff0 1.211 -- 1.212 - .section ".bsdata", "a" 1.213 -bugger_off_msg: 1.214 - .ascii "Direct booting from floppy is no longer supported.\r\n" 1.215 @@ -432,7 +455,7 @@ 1.216 + cmp $0xd, %al # CR ? 1.217 + je putclf 1.218 + ret 1.219 -+ 1.220 + 1.221 +#ifdef KEYBOARDLESS_SUPPORT 1.222 +clock = 0x46C 1.223 +wait: 1.224 @@ -453,7 +476,7 @@ 1.225 +waitdone: 1.226 + ret 1.227 +#endif 1.228 - 1.229 ++ 1.230 +#ifdef EXE_SUPPORT 1.231 +comstart: 1.232 + cld # assume nothing