blob: e735fd9e125bac6c5e90ca94443381114ce8632f [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
9#include <stdalign.h>
10#include <stdint.h>
11
12#include "hf/ffa.h"
13#include "hf/mm.h"
14#include "hf/std.h"
15
16#include "vmapi/hf/call.h"
17
J-Alves10e19662022-09-16 11:25:36 +010018#include "test/abort.h"
Raghu Krishnamurthydd9d6c42021-05-02 01:11:26 -070019#include "test/hftest.h"
Federico Recanati69c554b2022-03-14 15:48:28 +010020#include "test/vmapi/ffa.h"
Raghu Krishnamurthydd9d6c42021-05-02 01:11:26 -070021
22alignas(4096) uint8_t kstack[4096];
23
J-Alves10e19662022-09-16 11:25:36 +010024static struct ffa_boot_info_header* boot_info_header;
25
26struct ffa_boot_info_header* get_boot_info_header(void)
27{
28 return boot_info_header;
29}
30
Raghu Krishnamurthy50af6602021-12-12 15:23:09 -080031void test_main_sp(bool);
Raghu Krishnamurthydd9d6c42021-05-02 01:11:26 -070032
Madhukar Pappireddy538b6882024-08-20 16:50:52 -050033void run_service_set_up(struct hftest_context* ctx, struct fdt* fdt)
34{
35 hftest_service_set_up(ctx, fdt);
36}
37
J-Alves10e19662022-09-16 11:25:36 +010038noreturn void kmain(struct ffa_boot_info_header* boot_info_blob)
Raghu Krishnamurthydd9d6c42021-05-02 01:11:26 -070039{
J-Alves10e19662022-09-16 11:25:36 +010040 boot_info_header = boot_info_blob;
Raghu Krishnamurthydd9d6c42021-05-02 01:11:26 -070041
Raghu Krishnamurthy50af6602021-12-12 15:23:09 -080042 test_main_sp(true);
Raghu Krishnamurthydd9d6c42021-05-02 01:11:26 -070043
44 /* Do not expect to get to this point, so abort. */
45 abort();
46}