cachepc-linux

Fork of AMDESE/linux with modifications for CachePC side-channel attack
git clone https://git.sinitax.com/sinitax/cachepc-linux
Log | Files | Refs | README | LICENSE | sfeed.txt

armksyms.c (4208B)


      1// SPDX-License-Identifier: GPL-2.0-only
      2/*
      3 *  linux/arch/arm/kernel/armksyms.c
      4 *
      5 *  Copyright (C) 2000 Russell King
      6 */
      7#include <linux/export.h>
      8#include <linux/sched.h>
      9#include <linux/string.h>
     10#include <linux/delay.h>
     11#include <linux/in6.h>
     12#include <linux/syscalls.h>
     13#include <linux/uaccess.h>
     14#include <linux/io.h>
     15#include <linux/arm-smccc.h>
     16
     17#include <asm/checksum.h>
     18#include <asm/ftrace.h>
     19
     20/*
     21 * libgcc functions - functions that are used internally by the
     22 * compiler...  (prototypes are not correct though, but that
     23 * doesn't really matter since they're not versioned).
     24 */
     25extern void __ashldi3(void);
     26extern void __ashrdi3(void);
     27extern void __divsi3(void);
     28extern void __lshrdi3(void);
     29extern void __modsi3(void);
     30extern void __muldi3(void);
     31extern void __ucmpdi2(void);
     32extern void __udivsi3(void);
     33extern void __umodsi3(void);
     34extern void __do_div64(void);
     35extern void __bswapsi2(void);
     36extern void __bswapdi2(void);
     37
     38extern void __aeabi_idiv(void);
     39extern void __aeabi_idivmod(void);
     40extern void __aeabi_lasr(void);
     41extern void __aeabi_llsl(void);
     42extern void __aeabi_llsr(void);
     43extern void __aeabi_lmul(void);
     44extern void __aeabi_uidiv(void);
     45extern void __aeabi_uidivmod(void);
     46extern void __aeabi_ulcmp(void);
     47
     48extern void fpundefinstr(void);
     49
     50void mmioset(void *, unsigned int, size_t);
     51void mmiocpy(void *, const void *, size_t);
     52
     53	/* platform dependent support */
     54EXPORT_SYMBOL(arm_delay_ops);
     55
     56	/* networking */
     57EXPORT_SYMBOL(csum_partial);
     58EXPORT_SYMBOL(csum_partial_copy_from_user);
     59EXPORT_SYMBOL(csum_partial_copy_nocheck);
     60EXPORT_SYMBOL(__csum_ipv6_magic);
     61
     62	/* io */
     63#ifndef __raw_readsb
     64EXPORT_SYMBOL(__raw_readsb);
     65#endif
     66#ifndef __raw_readsw
     67EXPORT_SYMBOL(__raw_readsw);
     68#endif
     69#ifndef __raw_readsl
     70EXPORT_SYMBOL(__raw_readsl);
     71#endif
     72#ifndef __raw_writesb
     73EXPORT_SYMBOL(__raw_writesb);
     74#endif
     75#ifndef __raw_writesw
     76EXPORT_SYMBOL(__raw_writesw);
     77#endif
     78#ifndef __raw_writesl
     79EXPORT_SYMBOL(__raw_writesl);
     80#endif
     81
     82	/* string / mem functions */
     83EXPORT_SYMBOL(strchr);
     84EXPORT_SYMBOL(strrchr);
     85EXPORT_SYMBOL(memset);
     86EXPORT_SYMBOL(__memset32);
     87EXPORT_SYMBOL(__memset64);
     88EXPORT_SYMBOL(memcpy);
     89EXPORT_SYMBOL(memmove);
     90EXPORT_SYMBOL(memchr);
     91
     92EXPORT_SYMBOL(mmioset);
     93EXPORT_SYMBOL(mmiocpy);
     94
     95#ifdef CONFIG_MMU
     96EXPORT_SYMBOL(copy_page);
     97
     98EXPORT_SYMBOL(arm_copy_from_user);
     99EXPORT_SYMBOL(arm_copy_to_user);
    100EXPORT_SYMBOL(arm_clear_user);
    101
    102EXPORT_SYMBOL(__get_user_1);
    103EXPORT_SYMBOL(__get_user_2);
    104EXPORT_SYMBOL(__get_user_4);
    105EXPORT_SYMBOL(__get_user_8);
    106
    107#ifdef __ARMEB__
    108EXPORT_SYMBOL(__get_user_64t_1);
    109EXPORT_SYMBOL(__get_user_64t_2);
    110EXPORT_SYMBOL(__get_user_64t_4);
    111EXPORT_SYMBOL(__get_user_32t_8);
    112#endif
    113
    114EXPORT_SYMBOL(__put_user_1);
    115EXPORT_SYMBOL(__put_user_2);
    116EXPORT_SYMBOL(__put_user_4);
    117EXPORT_SYMBOL(__put_user_8);
    118#endif
    119
    120	/* gcc lib functions */
    121EXPORT_SYMBOL(__ashldi3);
    122EXPORT_SYMBOL(__ashrdi3);
    123EXPORT_SYMBOL(__divsi3);
    124EXPORT_SYMBOL(__lshrdi3);
    125EXPORT_SYMBOL(__modsi3);
    126EXPORT_SYMBOL(__muldi3);
    127EXPORT_SYMBOL(__ucmpdi2);
    128EXPORT_SYMBOL(__udivsi3);
    129EXPORT_SYMBOL(__umodsi3);
    130EXPORT_SYMBOL(__do_div64);
    131EXPORT_SYMBOL(__bswapsi2);
    132EXPORT_SYMBOL(__bswapdi2);
    133
    134#ifdef CONFIG_AEABI
    135EXPORT_SYMBOL(__aeabi_idiv);
    136EXPORT_SYMBOL(__aeabi_idivmod);
    137EXPORT_SYMBOL(__aeabi_lasr);
    138EXPORT_SYMBOL(__aeabi_llsl);
    139EXPORT_SYMBOL(__aeabi_llsr);
    140EXPORT_SYMBOL(__aeabi_lmul);
    141EXPORT_SYMBOL(__aeabi_uidiv);
    142EXPORT_SYMBOL(__aeabi_uidivmod);
    143EXPORT_SYMBOL(__aeabi_ulcmp);
    144#endif
    145
    146	/* bitops */
    147EXPORT_SYMBOL(_set_bit);
    148EXPORT_SYMBOL(_test_and_set_bit);
    149EXPORT_SYMBOL(_clear_bit);
    150EXPORT_SYMBOL(_test_and_clear_bit);
    151EXPORT_SYMBOL(_change_bit);
    152EXPORT_SYMBOL(_test_and_change_bit);
    153EXPORT_SYMBOL(_find_first_zero_bit_le);
    154EXPORT_SYMBOL(_find_next_zero_bit_le);
    155EXPORT_SYMBOL(_find_first_bit_le);
    156EXPORT_SYMBOL(_find_next_bit_le);
    157
    158#ifdef __ARMEB__
    159EXPORT_SYMBOL(_find_first_zero_bit_be);
    160EXPORT_SYMBOL(_find_next_zero_bit_be);
    161EXPORT_SYMBOL(_find_first_bit_be);
    162EXPORT_SYMBOL(_find_next_bit_be);
    163#endif
    164
    165#ifdef CONFIG_FUNCTION_TRACER
    166EXPORT_SYMBOL(__gnu_mcount_nc);
    167#endif
    168
    169#ifdef CONFIG_ARM_PATCH_PHYS_VIRT
    170EXPORT_SYMBOL(__pv_phys_pfn_offset);
    171EXPORT_SYMBOL(__pv_offset);
    172#endif
    173
    174#ifdef CONFIG_HAVE_ARM_SMCCC
    175EXPORT_SYMBOL(__arm_smccc_smc);
    176EXPORT_SYMBOL(__arm_smccc_hvc);
    177#endif