/*
 * Adapted from Hafnium.
 * TODO: Figure out the right way of specifying the license header.
 */

#pragma once

#include <libcflat.h>

#include "call.h"
#include "ffa.h"
#include "ffa_mailbox.h"

#define memcpy_s(dest, destmax, src, count) memcpy(dest, src, count)

#define TEST_ASSERT(a, b, op) \
do { \
	if (!((a) op (b))) { \
		report_info("%s:%d: Assertion failed: %s %s %s", \
		       __FILE__, __LINE__, #a, #op, #b); \
		dump_stack(); \
                assert(0); \
	} \
} while (0)

#define EXPECT(a) TEST_ASSERT(a, true, ==)
#define EXPECT_EQ(a, b) TEST_ASSERT(a, b, ==)
#define EXPECT_NE(a, b) TEST_ASSERT(a, b, !=)
#define EXPECT_GT(a, b) TEST_ASSERT(a, b, >)
#define EXPECT_GE(a, b) TEST_ASSERT(a, b, >=)
#define EXPECT_LE(a, b) TEST_ASSERT(a, b, <=)
#define ASSERT_LE(a, b) TEST_ASSERT(a, b, <=)
#define ASSERT_EQ(a, b) TEST_ASSERT(a, b, ==)
#define ASSERT_NE(a, b) TEST_ASSERT(a, b, !=)
#define ASSERT_GE(a, b) TEST_ASSERT(a, b, >=)

#define EXPECT_FFA_ERROR(value, ffa_error)       \
	do {                                     \
		struct ffa_value v = (value);    \
		EXPECT_EQ(v.func, FFA_ERROR_32); \
		EXPECT_EQ(v.arg2, (ffa_error));  \
	} while (0)


/* SMCCC reserves ID 0 for the hypervisor itself. */
#define HYPERVISOR_ID 0

/* For now, assume the primary VM has an ID of 1, same as hafnium */
#define PRIMARY_VM_ID 1

#define SERVICE_VM1 (PRIMARY_VM_ID + 1)

#define SERVICE_VM2 (PRIMARY_VM_ID + 2)

ffa_vm_id_t get_vm_id(void);

bool is_primary_vm(void);