; If len == 0: this marks the end of the list; dst indicates
; the entry point and src the mode (0 = pm, 1 = rm)
;
+; (*) dst, src, and len are four bytes each
+;
shuffle_and_boot_raw:
mov bx,pm_shuffle
jmp enter_pm
; If len == 0: this marks the end of the list; dst indicates
; the entry point and src the mode (0 = pm, 1 = rm)
;
+; (*) dst, src, and len are four bytes each
+;
pm_shuffle:
cli ; End interrupt service (for good)
mov ebx,edi ; EBX <- descriptor list
mov [es:di+8],ax ; New DI
mov [es:di+4],bx ; New ES
%endif
- pop ax ; List length
+ pop ax ; descriptor list entries count
push di
push es
mov ebx,trackbuf
imul di,ax,12
+ push di ; length of list
add di,bx ; DI <- end of list
- push di
; Terminating entry...
lea eax,[replace_stub] ; Entrypoint
mov cx,__replacestub_dwords
rep movsd
+ ; ECX <- final list length
xor ecx,ecx
- pop cx ; ECX <- length of list
+ pop cx ; original length in bytes
+ add cx, 12 ; + termination entry size
pop word [replace_stub.ss]
pop word [replace_stub.esp]
.no_initrd:
push dword run_linux_kernel
- push cx ; Length of descriptor list
+ push cx ; descriptor list entries count
; BX points to the final real mode segment, and will be loaded
; into DS.