blob: cf6b9288d41b04d9e9699487b744e31fced90153 [file] [log] [blame]
Raghu Krishnamurthydd9d6c42021-05-02 01:11:26 -07001/*
2 * Copyright 2021 The Hafnium Authors.
3 *
4 * Use of this source code is governed by a BSD-style
5 * license that can be found in the LICENSE file or at
6 * https://opensource.org/licenses/BSD-3-Clause.
7 */
8
Raghu Krishnamurthydd9d6c42021-05-02 01:11:26 -07009#include <stdint.h>
10
11#include "hf/ffa.h"
12#include "hf/mm.h"
13#include "hf/std.h"
14
15#include "vmapi/hf/call.h"
16
J-Alves10e19662022-09-16 11:25:36 +010017#include "test/abort.h"
Raghu Krishnamurthydd9d6c42021-05-02 01:11:26 -070018#include "test/hftest.h"
Federico Recanati69c554b2022-03-14 15:48:28 +010019#include "test/vmapi/ffa.h"
Raghu Krishnamurthydd9d6c42021-05-02 01:11:26 -070020
21alignas(4096) uint8_t kstack[4096];
22
J-Alves10e19662022-09-16 11:25:36 +010023static struct ffa_boot_info_header* boot_info_header;
24
25struct ffa_boot_info_header* get_boot_info_header(void)
26{
27 return boot_info_header;
28}
29
Raghu Krishnamurthy50af6602021-12-12 15:23:09 -080030void test_main_sp(bool);
Raghu Krishnamurthydd9d6c42021-05-02 01:11:26 -070031
Madhukar Pappireddy538b6882024-08-20 16:50:52 -050032void run_service_set_up(struct hftest_context* ctx, struct fdt* fdt)
33{
34 hftest_service_set_up(ctx, fdt);
35}
36
Karl Meakin1923faf2025-03-19 14:54:52 +000037[[noreturn]] void kmain(struct ffa_boot_info_header* boot_info_blob)
Raghu Krishnamurthydd9d6c42021-05-02 01:11:26 -070038{
J-Alves10e19662022-09-16 11:25:36 +010039 boot_info_header = boot_info_blob;
Raghu Krishnamurthydd9d6c42021-05-02 01:11:26 -070040
Raghu Krishnamurthy50af6602021-12-12 15:23:09 -080041 test_main_sp(true);
Raghu Krishnamurthydd9d6c42021-05-02 01:11:26 -070042
43 /* Do not expect to get to this point, so abort. */
44 abort();
45}