From: Antoine Leca Date: Sat, 11 Feb 2012 23:19:00 +0000 (+0100) Subject: Make ELF kernel boot faster X-Git-Tag: v3.2.0~37 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/index.css?a=commitdiff_plain;h=f4ffbc6072b79d134aad99f5edf0e16c344430b5;p=minix.git Make ELF kernel boot faster --- diff --git a/kernel/arch/i386/pre_init.c b/kernel/arch/i386/pre_init.c index eef6d4cf3..d49a2f69e 100644 --- a/kernel/arch/i386/pre_init.c +++ b/kernel/arch/i386/pre_init.c @@ -40,6 +40,9 @@ #define mb_save_phymem(buf, phy, len) \ phys_copy((u32_t)(buf), (phy), (len)) +#define mb_clear_memrange(start, end) \ + phys_memset((start), 0, (end)-(start)) + PRIVATE void mb_itoa(u32_t val, char * out) { char ret[ITOA_BUFFER_SIZE]; @@ -351,18 +354,6 @@ PRIVATE void get_parameters(multiboot_info_t *mbi) } } -PRIVATE int mb_clear_memrange(phys_bytes start, phys_bytes end) -{ - int empty = 0; - int i; - - /* FIXME: use faster function */ - for (i = start; i < end; i++) - phys_copy((phys_bytes)&empty, i, 1); - - return 0; -} - PRIVATE void mb_extract_image(multiboot_info_t mbi) { multiboot_module_t *mb_module_info;