blob: bd7840d69080cb53a2f43b82cc5a8b9bb3712cd1 [file] [log] [blame]
J-Alves35e61922021-05-06 10:01:05 +01001/*
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/mm.h"
13#include "hf/std.h"
14
15#include "test/hftest.h"
16#include "test/hftest_impl.h"
17
18HFTEST_ENABLE();
19
20static struct hftest_context global_context;
21
22struct hftest_context *hftest_get_context(void)
23{
24 return &global_context;
25}
26
27noreturn void abort(void)
28{
29 HFTEST_LOG("Service contained failures.");
30 /* Cause a fault, as a secondary/SP can't power down the machine. */
31 *((volatile uint8_t *)1) = 1;
32
33 /* This should never be reached, but to make the compiler happy... */
34 for (;;) {
35 }
36}