blob: a5913a07d35212e69304abbc23c6fa2ff89cf61c [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
Federico Recanati632fa142022-04-27 13:14:58 +020024bool sel1_secure_service = false;
25
J-Alves10e19662022-09-16 11:25:36 +010026static struct ffa_boot_info_header* boot_info_header;
27
28struct ffa_boot_info_header* get_boot_info_header(void)
29{
30 return boot_info_header;
31}
32
Raghu Krishnamurthy50af6602021-12-12 15:23:09 -080033void test_main_sp(bool);
Raghu Krishnamurthydd9d6c42021-05-02 01:11:26 -070034
J-Alves10e19662022-09-16 11:25:36 +010035noreturn void kmain(struct ffa_boot_info_header* boot_info_blob)
Raghu Krishnamurthydd9d6c42021-05-02 01:11:26 -070036{
J-Alves10e19662022-09-16 11:25:36 +010037 boot_info_header = boot_info_blob;
Raghu Krishnamurthydd9d6c42021-05-02 01:11:26 -070038
Federico Recanati69c554b2022-03-14 15:48:28 +010039 /* Register RX/TX buffers via FFA_RXTX_MAP */
40 set_up_mailbox();
41
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}