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

reset.c (594B)


      1// SPDX-License-Identifier: GPL-2.0-only
      2/*
      3 * Copyright (C) 2011-2012 Synopsys, Inc. (www.synopsys.com)
      4 */
      5
      6#include <linux/kernel.h>
      7#include <linux/printk.h>
      8#include <linux/reboot.h>
      9#include <linux/pm.h>
     10
     11void machine_halt(void)
     12{
     13	/* Halt the processor */
     14	__asm__ __volatile__("flag  1\n");
     15}
     16
     17void machine_restart(char *__unused)
     18{
     19	/* Soft reset : jump to reset vector */
     20	pr_info("Put your restart handler here\n");
     21	machine_halt();
     22}
     23
     24void machine_power_off(void)
     25{
     26	/* FIXME ::  power off ??? */
     27	machine_halt();
     28}
     29
     30void (*pm_power_off) (void) = NULL;
     31EXPORT_SYMBOL(pm_power_off);