diff --git a/src/kernel/include/memory.h b/src/kernel/include/memory.h index 8a679d7..36d00dd 100644 --- a/src/kernel/include/memory.h +++ b/src/kernel/include/memory.h @@ -37,8 +37,6 @@ extern void setupMemory(); extern void reservePagesUntilPhysical(uint32_t endPageId); -extern void memset(void *target, uint8_t byte, uint32_t size); - extern void *findTarFile(void *fileStart, uint32_t fileSize, char *filename); extern void *kernelMapPhysical(void *address); diff --git a/src/kernel/include/memory.h b/src/kernel/include/memory.h index 8a679d7..36d00dd 100644 --- a/src/kernel/include/memory.h +++ b/src/kernel/include/memory.h @@ -37,8 +37,6 @@ extern void setupMemory(); extern void reservePagesUntilPhysical(uint32_t endPageId); -extern void memset(void *target, uint8_t byte, uint32_t size); - extern void *findTarFile(void *fileStart, uint32_t fileSize, char *filename); extern void *kernelMapPhysical(void *address); diff --git a/src/kernel/include/util.h b/src/kernel/include/util.h index 44ed622..2fc4417 100644 --- a/src/kernel/include/util.h +++ b/src/kernel/include/util.h @@ -19,6 +19,7 @@ extern uint32_t strlen(char *string); extern void memcpy(void *source, void *destination, uint32_t size); +extern void memset(void *target, uint8_t byte, uint32_t size); typedef struct ListElement { struct ListElement *next; diff --git a/src/kernel/include/memory.h b/src/kernel/include/memory.h index 8a679d7..36d00dd 100644 --- a/src/kernel/include/memory.h +++ b/src/kernel/include/memory.h @@ -37,8 +37,6 @@ extern void setupMemory(); extern void reservePagesUntilPhysical(uint32_t endPageId); -extern void memset(void *target, uint8_t byte, uint32_t size); - extern void *findTarFile(void *fileStart, uint32_t fileSize, char *filename); extern void *kernelMapPhysical(void *address); diff --git a/src/kernel/include/util.h b/src/kernel/include/util.h index 44ed622..2fc4417 100644 --- a/src/kernel/include/util.h +++ b/src/kernel/include/util.h @@ -19,6 +19,7 @@ extern uint32_t strlen(char *string); extern void memcpy(void *source, void *destination, uint32_t size); +extern void memset(void *target, uint8_t byte, uint32_t size); typedef struct ListElement { struct ListElement *next; diff --git a/src/kernel/memory/memset.c b/src/kernel/memory/memset.c deleted file mode 100644 index 874cacc..0000000 --- a/src/kernel/memory/memset.c +++ /dev/null @@ -1,9 +0,0 @@ -#include - -void memset(void *_target, uint8_t byte, uint32_t size) { - uint8_t *target = _target; - for (uint32_t i = 0; i < size; i++) { - *target = byte; - target++; - } -} diff --git a/src/kernel/include/memory.h b/src/kernel/include/memory.h index 8a679d7..36d00dd 100644 --- a/src/kernel/include/memory.h +++ b/src/kernel/include/memory.h @@ -37,8 +37,6 @@ extern void setupMemory(); extern void reservePagesUntilPhysical(uint32_t endPageId); -extern void memset(void *target, uint8_t byte, uint32_t size); - extern void *findTarFile(void *fileStart, uint32_t fileSize, char *filename); extern void *kernelMapPhysical(void *address); diff --git a/src/kernel/include/util.h b/src/kernel/include/util.h index 44ed622..2fc4417 100644 --- a/src/kernel/include/util.h +++ b/src/kernel/include/util.h @@ -19,6 +19,7 @@ extern uint32_t strlen(char *string); extern void memcpy(void *source, void *destination, uint32_t size); +extern void memset(void *target, uint8_t byte, uint32_t size); typedef struct ListElement { struct ListElement *next; diff --git a/src/kernel/memory/memset.c b/src/kernel/memory/memset.c deleted file mode 100644 index 874cacc..0000000 --- a/src/kernel/memory/memset.c +++ /dev/null @@ -1,9 +0,0 @@ -#include - -void memset(void *_target, uint8_t byte, uint32_t size) { - uint8_t *target = _target; - for (uint32_t i = 0; i < size; i++) { - *target = byte; - target++; - } -} diff --git a/src/kernel/util/memutil.c b/src/kernel/util/memutil.c index bfa1bc6..8a9ba81 100644 --- a/src/kernel/util/memutil.c +++ b/src/kernel/util/memutil.c @@ -6,3 +6,11 @@ dest[i] = src[i]; } } + +void memset(void *_target, uint8_t byte, uint32_t size) { + uint8_t *target = _target; + for (uint32_t i = 0; i < size; i++) { + *target = byte; + target++; + } +}