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