2018-05-06 21:58:06 +00:00
|
|
|
// SPDX-License-Identifier: GPL-2.0+
|
2004-04-18 21:13:41 +00:00
|
|
|
/*
|
2007-03-11 12:48:24 +00:00
|
|
|
* (C) Copyright 2007 Michal Simek
|
2004-04-18 21:13:41 +00:00
|
|
|
* (C) Copyright 2004 Atmark Techno, Inc.
|
|
|
|
*
|
2007-03-11 12:48:24 +00:00
|
|
|
* Michal SIMEK <monstr@monstr.eu>
|
2004-04-18 21:13:41 +00:00
|
|
|
* Yasushi SHOJI <yashi@atmark-techno.com>
|
|
|
|
*/
|
|
|
|
|
2023-10-12 23:03:57 +00:00
|
|
|
#include <log.h>
|
|
|
|
#include <vsprintf.h>
|
2007-05-07 15:22:25 +00:00
|
|
|
#include <asm/asm.h>
|
2007-03-11 12:48:24 +00:00
|
|
|
|
2012-06-29 11:27:28 +00:00
|
|
|
void enable_interrupts(void)
|
2004-04-18 21:13:41 +00:00
|
|
|
{
|
2015-01-26 14:25:32 +00:00
|
|
|
debug("Enable interrupts for the whole CPU\n");
|
2007-05-07 21:58:31 +00:00
|
|
|
MSRSET(0x2);
|
2004-04-18 21:13:41 +00:00
|
|
|
}
|
|
|
|
|
2012-06-29 11:27:28 +00:00
|
|
|
int disable_interrupts(void)
|
2004-04-18 21:13:41 +00:00
|
|
|
{
|
2010-12-21 07:30:39 +00:00
|
|
|
unsigned int msr;
|
|
|
|
|
|
|
|
MFS(msr, rmsr);
|
2007-05-07 21:58:31 +00:00
|
|
|
MSRCLR(0x2);
|
2010-12-21 07:30:39 +00:00
|
|
|
return (msr & 0x2) != 0;
|
2004-04-18 21:13:41 +00:00
|
|
|
}
|
2007-03-11 12:48:24 +00:00
|
|
|
|
2015-01-27 11:44:12 +00:00
|
|
|
int interrupt_init(void)
|
2007-03-11 12:48:24 +00:00
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2012-06-29 11:27:28 +00:00
|
|
|
void interrupt_handler(void)
|
2007-03-11 12:48:24 +00:00
|
|
|
{
|
2022-06-24 12:16:32 +00:00
|
|
|
panic("Interrupt occurred\n");
|
2007-03-11 12:48:24 +00:00
|
|
|
}
|