2014-07-09 12:03:17 +02:00
|
|
|
/*
|
|
|
|
* \brief Programmable interrupt controller for core
|
|
|
|
* \author Stefan Kalkowski
|
|
|
|
* \date 2012-10-24
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
2017-02-20 13:23:52 +01:00
|
|
|
* Copyright (C) 2012-2017 Genode Labs GmbH
|
2014-07-09 12:03:17 +02:00
|
|
|
*
|
|
|
|
* This file is part of the Genode OS framework, which is distributed
|
2017-02-20 13:23:52 +01:00
|
|
|
* under the terms of the GNU Affero General Public License version 3.
|
2014-07-09 12:03:17 +02:00
|
|
|
*/
|
|
|
|
|
2017-04-12 10:06:29 +02:00
|
|
|
#ifndef _CORE__SPEC__IMX53__PIC_H_
|
|
|
|
#define _CORE__SPEC__IMX53__PIC_H_
|
2014-07-09 12:03:17 +02:00
|
|
|
|
2017-02-21 13:46:59 +01:00
|
|
|
#include <hw/spec/arm/imx_tzic.h>
|
2014-07-09 12:03:17 +02:00
|
|
|
|
2016-11-07 18:00:24 +01:00
|
|
|
namespace Genode { class Pic; }
|
|
|
|
|
2014-07-09 12:03:17 +02:00
|
|
|
|
2017-02-21 13:46:59 +01:00
|
|
|
class Genode::Pic : public Hw::Pic
|
2014-07-09 12:03:17 +02:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
2015-02-18 14:23:54 +01:00
|
|
|
enum {
|
|
|
|
/*
|
|
|
|
* FIXME: dummy ipi value on non-SMP platform, should be removed
|
|
|
|
* when SMP is an aspect of CPUs only compiled where necessary
|
|
|
|
*/
|
2017-02-21 13:46:59 +01:00
|
|
|
IPI = 0,
|
2015-02-18 14:23:54 +01:00
|
|
|
};
|
2014-07-09 12:03:17 +02:00
|
|
|
|
2015-11-02 14:36:01 +01:00
|
|
|
/*
|
|
|
|
* Trigger interrupt 'i' from software if possible
|
|
|
|
*/
|
|
|
|
void trigger(unsigned const i) {
|
|
|
|
write<Swint>(Swint::Intid::bits(i)); }
|
|
|
|
|
2017-02-21 13:46:59 +01:00
|
|
|
bool secure(unsigned i) {
|
|
|
|
return !read<Intsec::Nonsecure>(i); }
|
2017-10-06 12:02:36 +02:00
|
|
|
|
|
|
|
static constexpr bool fast_interrupts() { return true; }
|
2014-07-09 12:03:17 +02:00
|
|
|
};
|
|
|
|
|
2016-11-07 18:00:24 +01:00
|
|
|
namespace Kernel { using Pic = Genode::Pic; }
|
2014-07-09 12:03:17 +02:00
|
|
|
|
2017-04-12 10:06:29 +02:00
|
|
|
#endif /* _CORE__SPEC__IMX53__PIC_H_ */
|