wok-current diff linld/stuff/src/VCPI.ASM @ rev 20534
Add util-linux-losetup
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Mon Nov 26 09:46:23 2018 +0100 (2018-11-26) |
parents | 049ced0bd387 |
children | cbcb33ee9044 |
line diff
1.1 --- a/linld/stuff/src/VCPI.ASM Fri Oct 26 10:09:53 2018 +0200 1.2 +++ b/linld/stuff/src/VCPI.ASM Mon Nov 26 09:46:23 2018 +0100 1.3 @@ -72,10 +72,16 @@ 1.4 endm 1.5 1.6 1.7 - group DGROUP _TEXT,_DATA,_BSS 1.8 + group DGROUP _TEXT,_BSS 1.9 assume cs:DGROUP,ds:DGROUP 1.10 1.11 - segment _DATA byte public use16 'DATA' 1.12 + segment _BSS byte public use16 'BSS' 1.13 + 1.14 +tss dd ?,? ;enough, we'll never use it anyway 1.15 + 1.16 + ends _BSS 1.17 + 1.18 + segment _TEXT byte public use16 'CODE' 1.19 1.20 label gdt byte 1.21 gdt_null descr <?> ;0000 1.22 @@ -86,6 +92,7 @@ 1.23 ;Note: code/data segs must be flagged use16 (i.e. use ip/sp, not eip/esp) 1.24 ;Note: base addrs will be fixed up in prepare_vcpi() 1.25 descriptor gdt_code,(code_seg+readable),priv0,is_present,0fffffh,(gran_page+use_16),0 1.26 + global gdt_data 1.27 descriptor gdt_data,(data_seg+writable),priv0,is_present,0fffffh,(gran_page+use_16),0 1.28 descriptor gdt_tss ,tss386_avail ,priv0,is_present,0ffh ,gran_byte ,<offset tss> 1.29 SEL_VCPI = (gdt_vcpi - gdt_null) 1.30 @@ -117,15 +124,6 @@ 1.31 idt_lim dw 03ffh ;we won't enable ints, 1.32 idt_base dd 0 ; so let's leave it the same as for rm 1.33 1.34 - ends _DATA 1.35 - 1.36 - segment _BSS byte public use16 'BSS' 1.37 - 1.38 -tss dd ?,? ;enough, we'll never use it anyway 1.39 - 1.40 - ends _BSS 1.41 - 1.42 - segment _TEXT byte public use16 'CODE' 1.43 1.44 ;*************************************************************** 1.45 ;char* prepare_vcpi(void *pagebuf); 1.46 @@ -229,8 +227,8 @@ 1.47 ;****** Copies PAGE_SIZE bytes 1.48 ;****** Uses: Flags 1.49 ;*************************************************************** 1.50 - global call_pm_routine:near 1.51 - proc call_pm_routine near 1.52 + global vcpi_pm_copy_routine:near 1.53 + proc vcpi_pm_copy_routine near 1.54 1.55 arg dstofs :dword, \ 1.56 srcseg :word, \ 1.57 @@ -238,7 +236,6 @@ 1.58 1.59 struc pm_regs 1.60 $$retaddr dw ? 1.61 -$$f dw ? 1.62 $$edi dd ? 1.63 $$esi dd ? 1.64 $$ebp dd ? 1.65 @@ -284,16 +281,15 @@ 1.66 lea sp,[bp-9*4] ;else we can do this trick with bp 1.67 1.68 ; Call the routine (bp points to params on stack if any) 1.69 - mov ax,[(pm_regs bp).$$f] ; ss:bp => struct pm_regs 1.70 mov bp,[word (pm_regs bp).$$ebp] ;ss:bp => params 1.71 - call ax 1.72 + call do_memcpy_vcpi 1.73 1.74 ; Ok, let's return to vm 1.75 mov ax,0DE0Ch ; maybe we need whole eax? 1.76 cli ; to be safe 1.77 clts ; 1.78 - push SEL_ABS ; vcpi wants ds=all_addrspace 1.79 - pop ds ; 1.80 + ;;push SEL_ABS ; vcpi wants ds=all_addrspace 1.81 + ;;pop ds ; 1.82 call [pword cs:vcpi_pm_entry] 1.83 @@vm_ret: 1.84 ; Now we are in vm86 mode. Sregs, esp, eflags (IF) restored from IRET stack 1.85 @@ -320,7 +316,7 @@ 1.86 1.87 ; Note: ss:bp => params 1.88 ; Move data 1.89 - mov ax,SEL_ABS 1.90 + mov al,SEL_ABS 1.91 mov ds,ax 1.92 mov es,ax 1.93 assume nothing 1.94 @@ -365,8 +361,8 @@ 1.95 vcpi_ret: 1.96 ret 1.97 1.98 - endp call_pm_routine 1.99 - assume cs:DGROUP,ds:DGROUP 1.100 + endp vcpi_pm_copy_routine 1.101 + assume cs:DGROUP,ds:DGROUP 1.102 1.103 1.104 ;***************************************************************