mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-06 23:51:28 +00:00
1. To enable INT_PRI (hardware interrupt priority level 0~3) register, bit0@INT_CTRL = 0. 2. GIE need to be enabled before UART is initialized. [symptom] To define CONFIG_RWSIG / CONFIG_RSA / CONFIG_SHA256, then power on: after RW image is verified, firmware stuck in uart_flush_output(). Signed-off-by: Dino Li <dino.li@ite.com.tw> BRANCH=none BUG=none TEST=1. bit0@INT_CTRL = 0. 2. The RW image is verified and jump to image RW. Change-Id: I393a3d5f87ea257885b872c91bfce43aecbaea8b Reviewed-on: https://chromium-review.googlesource.com/309400 Commit-Ready: Dino Li <dino.li@ite.com.tw> Tested-by: Dino Li <dino.li@ite.com.tw> Reviewed-by: Randall Spangler <rspangler@chromium.org>
25 lines
627 B
C
25 lines
627 B
C
/* Copyright (c) 2013 The Chromium OS Authors. All rights reserved.
|
|
* Use of this source code is governed by a BSD-style license that can be
|
|
* found in the LICENSE file.
|
|
*
|
|
* Set up the N8 core
|
|
*/
|
|
|
|
#include "cpu.h"
|
|
#include "registers.h"
|
|
|
|
void cpu_init(void)
|
|
{
|
|
/* DLM initialization is done in init.S */
|
|
|
|
uint32_t image_type = (uint32_t)cpu_init;
|
|
|
|
/* To change interrupt vector base if at RW image */
|
|
if (image_type > CONFIG_RW_MEM_OFF)
|
|
/* Interrupt Vector Table Base Address, in 64k Byte unit */
|
|
IT83XX_GCTRL_IVTBAR = (CONFIG_RW_MEM_OFF >> 16) & 0xFF;
|
|
|
|
/* Global interrupt enable */
|
|
asm volatile ("setgie.e");
|
|
}
|