wok-current rev 22019
linld: ipxe support (again)
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sat Oct 19 21:09:13 2019 +0200 (2019-10-19) |
parents | 6aff6b383295 |
children | fbe9e0e1400d |
files | linld/stuff/src/JUMP.ASM |
line diff
1.1 --- a/linld/stuff/src/JUMP.ASM Sat Oct 19 17:56:32 2019 +0100 1.2 +++ b/linld/stuff/src/JUMP.ASM Sat Oct 19 21:09:13 2019 +0200 1.3 @@ -98,49 +98,56 @@ 1.4 mov sp,0A000h 1.5 extrn _rm_size:word 1.6 ifdef NO386 1.7 - mov si,offset _rm_size-2 ; _rm_size, _pm_high, _rm_buf 1.8 + mov si,offset _rm_size-4 ; _rm_size, _pm_high, _rm_buf 1.9 + lodsw 1.10 + xchg ax,bx 1.11 lodsw 1.12 push ax ; _csip high 1.13 - push [word si-4] ; _csip low 1.14 - lodsw 1.15 + push bx ; _csip low 1.16 + lodsw ; skip _rm_size 1.17 else 1.18 mov si,offset _rm_size+2 ; _rm_size, _pm_high, _rm_buf 1.19 push [dword si-6] ; _csip 1.20 endif 1.21 lodsb ; _pm_high 1.22 + 1.23 + ifdef NO386 1.24 + mov cx,ss 1.25 + add ch,9 1.26 + push cx ; topseg()+0x0900 1.27 + else 1.28 + push 9800h+(4096/16) ; 4096 bytes for cmdline 1.29 + endif 1.30 + 1.31 extrn _cmdline:word 1.32 mov si,[_cmdline] 1.33 mov di,8000h 1.34 mov ch,10h ; 4k 1.35 rep 1.36 movsb 1.37 - ifdef NO386 1.38 - mov bx,ss 1.39 - add bh,9 1.40 - push bx ; topseg()+0x0900 1.41 - else 1.42 - push 9800h+(4096/16) ; 4096 bytes for cmdline 1.43 - endif 1.44 - cmp al,cl ; load high ? 1.45 - pushf 1.46 - ; finish loading 1.47 - extrn @last_ditch$qv:near 1.48 - mov ax,[ss:024Ch] 1.49 - jne @@notzimage 1.50 -@@isipxe: 1.51 + 1.52 + or cl,al ; load high ? 1.53 + inc cx 1.54 + push cx 1.55 + mov ax,[word ss:024Ch] 1.56 + xor ax,2b30h ; ipxe ? 1.57 + loopne @@notipxe 1.58 + 1.59 dos_shutdown ; clear si; ds=0 1.60 push cs 1.61 pop ds 1.62 + ; finish loading 1.63 + extrn @last_ditch$qv:near 1.64 push cs 1.65 call @last_ditch$qv 1.66 -@@notzimage: 1.67 - xor ax,2b30h 1.68 - je @@isipxe 1.69 - popf 1.70 + 1.71 +@@notipxe: 1.72 + pop cx 1.73 + pop es ; min 2048 bytes for stack 1.74 + loop @@isbzimage 1.75 + 1.76 ; self move 1.77 ;cld 1.78 - pop es ; min 2048 bytes for stack 1.79 - jne @@isbzimage 1.80 extrn gdt_data 1.81 mov cx,offset gdt_data+8 1.82 xor di,di ; A000 -9000 -0800(>movedend)