]> Zhao Yanbai Git Server - minix.git/commitdiff
Changed phys_zero to phys_fill, which accepts a 4-byte argument saying what
authorBen Gras <ben@minix3.org>
Mon, 18 Jul 2005 12:18:16 +0000 (12:18 +0000)
committerBen Gras <ben@minix3.org>
Mon, 18 Jul 2005 12:18:16 +0000 (12:18 +0000)
to fill with. Changed prototype and call to match.

kernel/klib386.s
kernel/proto.h
kernel/system/do_memset.c

index d2308891101e1a049c9390fbaae239ea653c3bc4..dd551575b2918365e113c14d94da69fd1096759a 100755 (executable)
@@ -26,7 +26,7 @@
 .define        _enable_irq     ! enable an irq at the 8259 controller
 .define        _disable_irq    ! disable an irq
 .define        _phys_copy      ! copy data from anywhere to anywhere in memory
-.define        _phys_zero      ! zero data anywhere in memory
+.define        _phys_fill      ! zero data anywhere in memory
 .define        _mem_rdw        ! copy one word from [segment:offset]
 .define        _reset          ! reset the system
 .define        _idle_task      ! task executed when there is no work
@@ -440,14 +440,14 @@ pc_small:
        ret
 
 !*===========================================================================*
-!*                             phys_zero                                    *
+!*                             phys_fill                                    *
 !*===========================================================================*
-! PUBLIC void phys_zero(phys_bytes source, phys_bytes bytecount);
+! PUBLIC void phys_fill(phys_bytes source, phys_bytes bytecount, char char);
 ! Zero a block of physical memory.
 
        .align  16
 
-_phys_zero:
+_phys_fill:
        push    ebp
        mov     ebp, esp
        push    esi
@@ -457,13 +457,13 @@ _phys_zero:
        mov     eax, 12(ebp)
        mov     ebx, FLAT_DS_SELECTOR
        mov     ds, bx
+       mov     ebx, 16(ebp)
        shr     eax, 2
-zero_start:
-       mov     (esi), 0
+fill_start:
+       mov     (esi), ebx
        add     esi, 4
        dec     eax
-       jnz     zero_start
-zero_done:
+       jnz     fill_start
        pop     ds
        pop     ebx
        pop     esi
index ef25c46c0feefdd605eb89c545c35464b32cd1bc..3e2678e0874debe1c4819e720e1a148038d2e9e8 100755 (executable)
@@ -88,7 +88,7 @@ _PROTOTYPE( int disable_irq, (irq_hook_t *hook)                               );
 _PROTOTYPE( u16_t mem_rdw, (U16_t segm, vir_bytes offset)              );
 _PROTOTYPE( void phys_copy, (phys_bytes source, phys_bytes dest,
                phys_bytes count)                                       );
-_PROTOTYPE( void phys_zero, (phys_bytes source, phys_bytes count)      );
+_PROTOTYPE( void phys_fill, (phys_bytes source, phys_bytes count, unsigned long pattern)       );
 _PROTOTYPE( void phys_insb, (U16_t port, phys_bytes buf, size_t count) );
 _PROTOTYPE( void phys_insw, (U16_t port, phys_bytes buf, size_t count) );
 _PROTOTYPE( void phys_outsb, (U16_t port, phys_bytes buf, size_t count));
index 68efcf9e8c198112c17dd95d83595056db4b3dde..b746abfcf922903ffda913d5966977099f67a2ae 100644 (file)
@@ -18,7 +18,7 @@ PUBLIC int do_memset(m_ptr)
 register message *m_ptr;
 {
 /* Handle sys_memset(). */
-  phys_zero((phys_bytes) m_ptr->MEM_PTR, (phys_bytes) m_ptr->MEM_COUNT);
+  phys_fill((phys_bytes) m_ptr->MEM_PTR, (phys_bytes) m_ptr->MEM_COUNT, 0);
   return(OK);
 }