14e9a89cba
fix #710
32 lines
719 B
C++
32 lines
719 B
C++
/*
|
|
* \brief Programmable interrupt controller for core
|
|
* \author Stefan Kalkowski
|
|
* \date 2012-10-24
|
|
*/
|
|
|
|
/*
|
|
* Copyright (C) 2012-2013 Genode Labs GmbH
|
|
*
|
|
* This file is part of the Genode OS framework, which is distributed
|
|
* under the terms of the GNU General Public License version 2.
|
|
*/
|
|
|
|
/* core includes */
|
|
#include <pic.h>
|
|
|
|
using namespace Genode;
|
|
|
|
void Arm_gic::_init()
|
|
{
|
|
/* disable device */
|
|
_distr.write<Distr::Ctlr::Enable>(0);
|
|
|
|
/* configure every shared peripheral interrupt */
|
|
for (unsigned i = min_spi; i <= _max_irq; i++) {
|
|
_distr.write<Distr::Icfgr::Edge_triggered>(0, i);
|
|
_distr.write<Distr::Ipriorityr::Priority>(0, i);
|
|
}
|
|
/* enable device */
|
|
_distr.write<Distr::Ctlr::Enable>(1);
|
|
}
|