From f4ffbc6072b79d134aad99f5edf0e16c344430b5 Mon Sep 17 00:00:00 2001 From: Antoine Leca Date: Sun, 12 Feb 2012 00:19:00 +0100 Subject: [PATCH] Make ELF kernel boot faster --- kernel/arch/i386/pre_init.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) 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;