blob: 563b14799a0e31dc8a8b31a3c86a67255620de8d [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
J-Alves10e19662022-09-16 11:25:36 +010033noreturn void kmain(struct ffa_boot_info_header* boot_info_blob)
Raghu Krishnamurthydd9d6c42021-05-02 01:11:26 -070034{
J-Alves10e19662022-09-16 11:25:36 +010035 boot_info_header = boot_info_blob;
Raghu Krishnamurthydd9d6c42021-05-02 01:11:26 -070036
Raghu Krishnamurthy50af6602021-12-12 15:23:09 -080037 test_main_sp(true);
Raghu Krishnamurthydd9d6c42021-05-02 01:11:26 -070038
39 /* Do not expect to get to this point, so abort. */
40 abort();
41}