mirror of
https://github.com/riscv-software-src/opensbi.git
synced 2026-05-23 14:21:32 +01:00
6767861c48
Add the Tenstorrent Atlantis as a generic-platform. This initial support enables the single_fw_region option, and verifies and prints HART PMA CSR configuration. Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Reviewed-by: Anup Patel <anup@brainfault.org> Link: https://lore.kernel.org/r/20260424062520.238403-1-npiggin@gmail.com Signed-off-by: Anup Patel <anup@brainfault.org>
51 lines
1.2 KiB
C
51 lines
1.2 KiB
C
/*
|
|
* SPDX-FileCopyrightText: (c) 2025-2026 Tenstorrent USA, Inc.
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#include <platform_override.h>
|
|
#include <libfdt.h>
|
|
#include <sbi/sbi_error.h>
|
|
#include <sbi/sbi_hart.h>
|
|
#include <sbi/sbi_system.h>
|
|
#include <sbi/sbi_console.h>
|
|
|
|
#include <tenstorrent/ascalon.h>
|
|
#include <tenstorrent/pma.h>
|
|
|
|
static int tt_atlantis_final_init(bool cold_boot)
|
|
{
|
|
if (cold_boot) {
|
|
/* Boot firmware sets HART PMAs. Read and verify them. */
|
|
tt_ascalon_discover_pmas_from_boot_hart();
|
|
} else {
|
|
/* Verify nonboot HARTs have PMAs matching boot HART */
|
|
tt_ascalon_verify_pmas_nonboot_hart();
|
|
}
|
|
|
|
return generic_final_init(cold_boot);
|
|
}
|
|
|
|
static bool tt_atlantis_single_fw_region(void)
|
|
{
|
|
return true;
|
|
}
|
|
|
|
static int tt_atlantis_platform_init(const void *fdt, int nodeoff, const struct fdt_match *match)
|
|
{
|
|
generic_platform_ops.final_init = tt_atlantis_final_init;
|
|
generic_platform_ops.single_fw_region = tt_atlantis_single_fw_region;
|
|
|
|
return 0;
|
|
}
|
|
|
|
static const struct fdt_match tt_atlantis_match[] = {
|
|
{ .compatible = "tenstorrent,atlantis" },
|
|
{ },
|
|
};
|
|
|
|
const struct fdt_driver tenstorrent_atlantis = {
|
|
.match_table = tt_atlantis_match,
|
|
.init = tt_atlantis_platform_init,
|
|
};
|