]> Zhao Yanbai Git Server - minix.git/commitdiff
Made phys_fill fill its 4-byte pattern any number of bytes (instead of
authorBen Gras <ben@minix3.org>
Tue, 19 Jul 2005 16:00:25 +0000 (16:00 +0000)
committerBen Gras <ben@minix3.org>
Tue, 19 Jul 2005 16:00:25 +0000 (16:00 +0000)
rounded down to a 4-byte multiple)

Fixed dependency omission

kernel/Makefile
kernel/klib386.s

index 20ccab4bf50d7eb204d169b7cb1bd32e76f89528..dd6d214735f5e53eaa2ce4dccedff65dd174b603 100755 (executable)
@@ -35,8 +35,10 @@ clean:
 
 depend: 
        cd system && $(MAKE) -$(MAKEFLAGS) $@
-       /usr/bin/mkdep "$(CC) -E $(CPPFLAGS)" *.c > .depend
+       /usr/bin/mkdep "$(CC) -E $(CPPFLAGS)" *.c *.s > .depend
 
 # Include generated dependencies.
+klib.o:        klib386.s klib88.s
+mpx.o: mpx386.s mpx88.s
 include .depend
 
index dd551575b2918365e113c14d94da69fd1096759a..8439aff8eb6df6e511c10e07ea3a4772691688f7 100755 (executable)
@@ -442,8 +442,9 @@ pc_small:
 !*===========================================================================*
 !*                             phys_fill                                    *
 !*===========================================================================*
-! PUBLIC void phys_fill(phys_bytes source, phys_bytes bytecount, char char);
-! Zero a block of physical memory.
+! PUBLIC void phys_fill(phys_bytes source, phys_bytes bytecount,
+!      unsigned long pattern);
+! Fill a block of physical memory with pattern.
 
        .align  16
 
@@ -464,6 +465,19 @@ fill_start:
        add     esi, 4
        dec     eax
        jnz     fill_start
+       ! Any remaining bytes?
+       mov     eax, 12(ebp)
+       and     eax, 3
+remain_fill:
+       cmp     eax, 0
+       jz      fill_done
+       movb    bl, 16(ebp)
+       movb    (esi), bl
+       add     esi, 1
+       inc     ebp
+       dec     eax
+       jmp     remain_fill
+fill_done:
        pop     ds
        pop     ebx
        pop     esi