1*40fef049SGabe Black /* 2*40fef049SGabe Black * Copyright (c) 2012 The Chromium OS Authors. All rights reserved. 3*40fef049SGabe Black * Use of this source code is governed by a BSD-style license that can be 4*40fef049SGabe Black * found in the LICENSE file. 5*40fef049SGabe Black * 6*40fef049SGabe Black * Alternatively, this software may be distributed under the terms of the 7*40fef049SGabe Black * GNU General Public License ("GPL") version 2 as published by the Free 8*40fef049SGabe Black * Software Foundation. 9*40fef049SGabe Black */ 10*40fef049SGabe Black 11*40fef049SGabe Black #include <common.h> 12*40fef049SGabe Black #include <physmem.h> 13*40fef049SGabe Black 14*40fef049SGabe Black static phys_addr_t __arch_phys_memset(phys_addr_t s, int c, phys_size_t n) 15*40fef049SGabe Black { 16*40fef049SGabe Black void *s_ptr = (void *)(uintptr_t)s; 17*40fef049SGabe Black 18*40fef049SGabe Black assert(((phys_addr_t)(uintptr_t)s) == s); 19*40fef049SGabe Black assert(((phys_addr_t)(uintptr_t)(s + n)) == s + n); 20*40fef049SGabe Black return (phys_addr_t)(uintptr_t)memset(s_ptr, c, n); 21*40fef049SGabe Black } 22*40fef049SGabe Black 23*40fef049SGabe Black phys_addr_t arch_phys_memset(phys_addr_t s, int c, phys_size_t n) 24*40fef049SGabe Black __attribute__((weak, alias("__arch_phys_memset"))); 25