From: Ben Gras Date: Tue, 19 Jul 2005 16:00:25 +0000 (+0000) Subject: Made phys_fill fill its 4-byte pattern any number of bytes (instead of X-Git-Tag: v3.1.0~592 X-Git-Url: http://zhaoyanbai.com/repos/doc/tz-art.htm?a=commitdiff_plain;h=c24f72d433de2701a4b34d4b8e553febdc968ba5;p=minix.git Made phys_fill fill its 4-byte pattern any number of bytes (instead of rounded down to a 4-byte multiple) Fixed dependency omission --- diff --git a/kernel/Makefile b/kernel/Makefile index 20ccab4bf..dd6d21473 100755 --- a/kernel/Makefile +++ b/kernel/Makefile @@ -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 diff --git a/kernel/klib386.s b/kernel/klib386.s index dd551575b..8439aff8e 100755 --- a/kernel/klib386.s +++ b/kernel/klib386.s @@ -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