Raghu Krishnamurthy | dd9d6c4 | 2021-05-02 01:11:26 -0700 | [diff] [blame] | 1 | /* |
| 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-Alves | 10e1966 | 2022-09-16 11:25:36 +0100 | [diff] [blame] | 18 | #include "test/abort.h" |
Raghu Krishnamurthy | dd9d6c4 | 2021-05-02 01:11:26 -0700 | [diff] [blame] | 19 | #include "test/hftest.h" |
Federico Recanati | 69c554b | 2022-03-14 15:48:28 +0100 | [diff] [blame] | 20 | #include "test/vmapi/ffa.h" |
Raghu Krishnamurthy | dd9d6c4 | 2021-05-02 01:11:26 -0700 | [diff] [blame] | 21 | |
| 22 | alignas(4096) uint8_t kstack[4096]; |
| 23 | |
J-Alves | 10e1966 | 2022-09-16 11:25:36 +0100 | [diff] [blame] | 24 | static struct ffa_boot_info_header* boot_info_header; |
| 25 | |
| 26 | struct ffa_boot_info_header* get_boot_info_header(void) |
| 27 | { |
| 28 | return boot_info_header; |
| 29 | } |
| 30 | |
Raghu Krishnamurthy | 50af660 | 2021-12-12 15:23:09 -0800 | [diff] [blame] | 31 | void test_main_sp(bool); |
Raghu Krishnamurthy | dd9d6c4 | 2021-05-02 01:11:26 -0700 | [diff] [blame] | 32 | |
Madhukar Pappireddy | 538b688 | 2024-08-20 16:50:52 -0500 | [diff] [blame^] | 33 | void run_service_set_up(struct hftest_context* ctx, struct fdt* fdt) |
| 34 | { |
| 35 | hftest_service_set_up(ctx, fdt); |
| 36 | } |
| 37 | |
J-Alves | 10e1966 | 2022-09-16 11:25:36 +0100 | [diff] [blame] | 38 | noreturn void kmain(struct ffa_boot_info_header* boot_info_blob) |
Raghu Krishnamurthy | dd9d6c4 | 2021-05-02 01:11:26 -0700 | [diff] [blame] | 39 | { |
J-Alves | 10e1966 | 2022-09-16 11:25:36 +0100 | [diff] [blame] | 40 | boot_info_header = boot_info_blob; |
Raghu Krishnamurthy | dd9d6c4 | 2021-05-02 01:11:26 -0700 | [diff] [blame] | 41 | |
Raghu Krishnamurthy | 50af660 | 2021-12-12 15:23:09 -0800 | [diff] [blame] | 42 | test_main_sp(true); |
Raghu Krishnamurthy | dd9d6c4 | 2021-05-02 01:11:26 -0700 | [diff] [blame] | 43 | |
| 44 | /* Do not expect to get to this point, so abort. */ |
| 45 | abort(); |
| 46 | } |