1f6f0c436SMarc Zyngier // SPDX-License-Identifier: GPL-2.0 2f6f0c436SMarc Zyngier 3f6f0c436SMarc Zyngier #ifndef __ARM64_ASM_SETUP_H 4f6f0c436SMarc Zyngier #define __ARM64_ASM_SETUP_H 5f6f0c436SMarc Zyngier 62e8cff0aSMark Rutland #include <linux/string.h> 72e8cff0aSMark Rutland 8f6f0c436SMarc Zyngier #include <uapi/asm/setup.h> 9f6f0c436SMarc Zyngier 101dfde089SAnders Roxell /* 111dfde089SAnders Roxell * These two variables are used in the head.S file. 121dfde089SAnders Roxell */ 131dfde089SAnders Roxell extern phys_addr_t __fdt_pointer __initdata; 141dfde089SAnders Roxell extern u64 __cacheline_aligned boot_args[4]; 151dfde089SAnders Roxell arch_parse_debug_rodata(char * arg)162e8cff0aSMark Rutlandstatic inline bool arch_parse_debug_rodata(char *arg) 172e8cff0aSMark Rutland { 182e8cff0aSMark Rutland extern bool rodata_enabled; 192e8cff0aSMark Rutland extern bool rodata_full; 202e8cff0aSMark Rutland 21*acfa60dbSWill Deacon if (!arg) 22*acfa60dbSWill Deacon return false; 23*acfa60dbSWill Deacon 24*acfa60dbSWill Deacon if (!strcmp(arg, "full")) { 25*acfa60dbSWill Deacon rodata_enabled = rodata_full = true; 26*acfa60dbSWill Deacon return true; 27*acfa60dbSWill Deacon } 28*acfa60dbSWill Deacon 29*acfa60dbSWill Deacon if (!strcmp(arg, "off")) { 30*acfa60dbSWill Deacon rodata_enabled = rodata_full = false; 31*acfa60dbSWill Deacon return true; 32*acfa60dbSWill Deacon } 33*acfa60dbSWill Deacon 34*acfa60dbSWill Deacon if (!strcmp(arg, "on")) { 352e8cff0aSMark Rutland rodata_enabled = true; 36*acfa60dbSWill Deacon rodata_full = false; 372e8cff0aSMark Rutland return true; 382e8cff0aSMark Rutland } 392e8cff0aSMark Rutland 402e8cff0aSMark Rutland return false; 412e8cff0aSMark Rutland } 422e8cff0aSMark Rutland #define arch_parse_debug_rodata arch_parse_debug_rodata 432e8cff0aSMark Rutland 44f6f0c436SMarc Zyngier #endif 45