staticint
arcompact_mumbojumbo(int c, struct cpuinfo_arc *info, char *buf, int len)
{ int n = 0; #ifdef CONFIG_ISA_ARCOMPACT char *cpu_nm, *isa_nm = "ARCompact"; struct bcr_fp_arcompact fpu_sp, fpu_dp; int atomic = 0, be, present; int bpu_full, bpu_cache, bpu_pred; struct bcr_bpu_arcompact bpu; struct bcr_iccm_arcompact iccm; struct bcr_dccm_arcompact dccm; struct bcr_generic isa;
READ_BCR(ARC_REG_ISA_CFG_BCR, isa);
if (!isa.ver) /* ISA BCR absent, use Kconfig info */
atomic = IS_ENABLED(CONFIG_ARC_HAS_LLSC); else { /* ARC700_BUILD only has 2 bits of isa info */
atomic = isa.info & 1;
}
n += scnprintf(buf + n, len - n, "BPU\t\t: %s%s match, cache:%d, Predict Table:%d\n",
IS_AVAIL1(bpu_full, "full"),
IS_AVAIL1(!bpu_full, "partial"),
bpu_cache, bpu_pred);
/* * Initial HS cores bumped AUX IDENTITY.ARCVER for each release until * ARCVER 0x54 which introduced AUX MICRO_ARCH_BUILD and subsequent * releases only update it.
*/
if (is_isa_arcompact()) {
n += arcompact_mumbojumbo(c, info, buf + n, len - n);
} elseif (is_isa_arcv2()){
n += arcv2_mumbojumbo(c, info, buf + n, len - n);
}
n += arc_mmu_mumbojumbo(c, buf + n, len - n);
n += arc_cache_mumbojumbo(c, buf + n, len - n);
if (ap.ver | smart | rtt) {
n += scnprintf(buf + n, len - n, "DEBUG\t\t: %s%s",
IS_AVAIL1(smart, "smaRT "),
IS_AVAIL1(rtt, "RTT ")); if (ap.ver) {
n += scnprintf(buf + n, len - n, "ActionPoint %d/%s",
ap_num,
ap_full ? "full":"min");
}
n += scnprintf(buf + n, len - n, "\n");
}
if (info->dccm.sz || info->iccm.sz)
n += scnprintf(buf + n, len - n, "Extn [CCM]\t: DCCM @ %lx, %d KB / ICCM: @ %lx, %d KB\n",
info->dccm.base, TO_KB(info->dccm.sz),
info->iccm.base, TO_KB(info->iccm.sz));
return buf;
}
void chk_opt_strict(char *opt_name, bool hw_exists, bool opt_ena)
{ if (hw_exists && !opt_ena)
pr_warn(" ! Enable %s for working apps\n", opt_name); elseif (!hw_exists && opt_ena)
panic("Disable %s, hardware NOT present\n", opt_name);
}
void chk_opt_weak(char *opt_name, bool hw_exists, bool opt_ena)
{ if (!hw_exists && opt_ena)
panic("Disable %s, hardware NOT present\n", opt_name);
}
/* * ISA agnostic sanity checks
*/ staticvoid arc_chk_core_config(struct cpuinfo_arc *info)
{ if (!info->t0)
panic("Timer0 is not present!\n");
if (!info->t1)
panic("Timer1 is not present!\n");
#ifdef CONFIG_ARC_HAS_DCCM /* * DCCM can be arbit placed in hardware. * Make sure its placement/sz matches what Linux is built with
*/ if ((unsignedint)__arc_dccm_base != info->dccm.base)
panic("Linux built with incorrect DCCM Base address\n");
if (CONFIG_ARC_DCCM_SZ * SZ_1K != info->dccm.sz)
panic("Linux built with incorrect DCCM Size\n"); #endif
#ifdef CONFIG_ARC_HAS_ICCM if (CONFIG_ARC_ICCM_SZ * SZ_1K != info->iccm.sz)
panic("Linux built with incorrect ICCM Size\n"); #endif
}
/* * Initialize and setup the processor core * This is called by all the CPUs thus should not do special case stuff * such as only for boot CPU etc
*/
void setup_processor(void)
{ struct cpuinfo_arc info; int c = smp_processor_id(); char str[512];
staticinlinebool uboot_arg_invalid(unsignedlong addr)
{ /* * Check that it is a untranslated address (although MMU is not enabled * yet, it being a high address ensures this is not by fluke)
*/ if (addr < PAGE_OFFSET) returntrue;
/* see if U-boot passed an external Device Tree blob */ if (uboot_tag == UBOOT_TAG_DTB) {
machine_desc = setup_machine_fdt((void *)uboot_arg);
/* external Device Tree blob is invalid - use embedded one */
use_embedded_dtb = !machine_desc;
}
if (uboot_tag == UBOOT_TAG_CMDLINE)
append_cmdline = true;
ignore_uboot_args:
if (use_embedded_dtb) {
machine_desc = setup_machine_fdt(__dtb_start); if (!machine_desc)
panic("Embedded DT invalid\n");
}
/* * NOTE: @boot_command_line is populated by setup_machine_fdt() so this * append processing can only happen after.
*/ if (append_cmdline) { /* Ensure a whitespace between the 2 cmdlines */
strlcat(boot_command_line, " ", COMMAND_LINE_SIZE);
strlcat(boot_command_line, uboot_arg, COMMAND_LINE_SIZE);
}
}
staticvoid *c_start(struct seq_file *m, loff_t *pos)
{ /* * Callback returns cpu-id to iterator for show routine, NULL to stop. * However since NULL is also a valid cpu-id (0), we use a round-about * way to pass it w/o having to kmalloc/free a 2 byte string. * Encode cpu-id as 0xFFcccc, which is decoded by show routine.
*/ return *pos < nr_cpu_ids ? cpu_to_ptr(*pos) : NULL;
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.