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

cpu_setup_pa6t.S (609B)


      1/* SPDX-License-Identifier: GPL-2.0-only */
      2/*
      3 * Copyright (C) 2006-2007 PA Semi, Inc
      4 *
      5 * Maintained by: Olof Johansson <olof@lixom.net>
      6 */
      7
      8#include <asm/processor.h>
      9#include <asm/page.h>
     10#include <asm/cputable.h>
     11#include <asm/ppc_asm.h>
     12#include <asm/asm-offsets.h>
     13#include <asm/cache.h>
     14
     15/* Right now, restore and setup are the same thing */
     16_GLOBAL(__restore_cpu_pa6t)
     17_GLOBAL(__setup_cpu_pa6t)
     18	/* Do nothing if not running in HV mode */
     19	mfmsr	r0
     20	rldicl.	r0,r0,4,63
     21	beqlr
     22
     23	mfspr	r0,SPRN_HID5
     24	ori	r0,r0,0x38
     25	mtspr	SPRN_HID5,r0
     26
     27	mfspr	r0,SPRN_LPCR
     28	ori	r0,r0,0x7000
     29	mtspr	SPRN_LPCR,r0
     30
     31	blr