This patch aligns tegra132 to the new SoC header include scheme. Also alphabetized headers in affected files since we touch them anyway. BUG=None TEST=Tested with whole series. Compiled Rush_Ryu. Change-Id: I5cdf4008a65db84f15c937ef53aab5e4d3ef24c4 Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Original-Commit-Id: d5c5c63d7b6399d3eb8a211b15d47829fe93a591 Original-Change-Id: Ifafd4d42d4fb04a1c37e8a5f23877c2b550cf44c Original-Signed-off-by: Julius Werner <jwerner@chromium.org> Original-Reviewed-on: https://chromium-review.googlesource.com/224505 Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-on: http://review.coreboot.org/9369 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
51 lines
1.3 KiB
C
51 lines
1.3 KiB
C
/*
|
|
* This file is part of the coreboot project.
|
|
*
|
|
* Copyright 2014 Google Inc.
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation; version 2 of the License.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with this program; if not, write to the Free Software
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
*/
|
|
|
|
#include <arch/secmon.h>
|
|
#include <console/console.h>
|
|
#include <soc/addressmap.h>
|
|
#include <soc/mmu_operations.h>
|
|
|
|
static void soc_get_secure_mem(uint64_t *base, size_t *size)
|
|
{
|
|
uintptr_t tz_base_mib;
|
|
size_t tz_size_mib;
|
|
|
|
carveout_range(CARVEOUT_TZ, &tz_base_mib, &tz_size_mib);
|
|
|
|
tz_base_mib *= MiB;
|
|
tz_size_mib *= MiB;
|
|
|
|
*base = tz_base_mib;
|
|
*size = tz_size_mib;
|
|
}
|
|
|
|
void soc_get_secmon_base_size(uint64_t *base, size_t *size)
|
|
{
|
|
uintptr_t tz_base;
|
|
size_t ttb_size, tz_size;
|
|
|
|
soc_get_secure_mem(&tz_base, &tz_size);
|
|
|
|
ttb_size = TTB_SIZE * MiB;
|
|
|
|
*base = tz_base + ttb_size;
|
|
*size = tz_size - ttb_size;
|
|
}
|