X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=lib%2Fphysmem.c;h=84b191dae3eeb005cb81d62a443d0d5a1e6cec2c;hb=aa3c609e2be5a837e7b81e308d47f55b67666bd6;hp=0f035edcbe5025c833bcdd318edecc401b6186c1;hpb=fd4d564b3c80b111f18c93adb14233a6a7ddb0e9;p=oweals%2Fu-boot.git diff --git a/lib/physmem.c b/lib/physmem.c index 0f035edcbe..84b191dae3 100644 --- a/lib/physmem.c +++ b/lib/physmem.c @@ -9,16 +9,16 @@ */ #include +#include #include +#include -static phys_addr_t __arch_phys_memset(phys_addr_t s, int c, phys_size_t n) +phys_addr_t __weak arch_phys_memset(phys_addr_t s, int c, phys_size_t n) { - void *s_ptr = (void *)(uintptr_t)s; + void *s_ptr = map_sysmem(s, n); assert(((phys_addr_t)(uintptr_t)s) == s); assert(((phys_addr_t)(uintptr_t)(s + n)) == s + n); + return (phys_addr_t)(uintptr_t)memset(s_ptr, c, n); } - -phys_addr_t arch_phys_memset(phys_addr_t s, int c, phys_size_t n) - __attribute__((weak, alias("__arch_phys_memset")));