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

machine_check.c (411B)


      1// SPDX-License-Identifier: GPL-2.0-or-later
      2/*
      3 */
      4
      5#include <linux/kernel.h>
      6#include <linux/printk.h>
      7#include <linux/ptrace.h>
      8
      9#include <asm/reg.h>
     10
     11int machine_check_4xx(struct pt_regs *regs)
     12{
     13	unsigned long reason = regs->esr;
     14
     15	if (reason & ESR_IMCP) {
     16		printk("Instruction");
     17		mtspr(SPRN_ESR, reason & ~ESR_IMCP);
     18	} else
     19		printk("Data");
     20	printk(" machine check in kernel mode.\n");
     21
     22	return 0;
     23}