1 /* 2 * Copyright 2019 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 "hf/arch/vm/interrupts_gicv3.h" 10 11 #include "hf/dlog.h" 12 13 #include "vmapi/hf/call.h" 14 15 #include "common.h" 16 #include "test/hftest.h" 17 18 /* 19 * Secondary VM that loops forever after receiving a message. 20 */ 21 TEST_SERVICE(busy)22TEST_SERVICE(busy) 23 { 24 dlog("Secondary waiting for message...\n"); 25 mailbox_receive_retry(); 26 EXPECT_EQ(ffa_rx_release().func, FFA_SUCCESS_32); 27 dlog("Secondary received message, looping forever.\n"); 28 for (;;) { 29 } 30 } 31 TEST_SERVICE(busy_secondary_direct_message)32TEST_SERVICE(busy_secondary_direct_message) 33 { 34 struct ffa_value received; 35 36 dlog("Secondary waiting for message...\n"); 37 received = ffa_msg_wait(); 38 EXPECT_EQ(received.func, FFA_MSG_SEND_DIRECT_REQ_32); 39 40 dlog("Secondary received message, looping forever.\n"); 41 for (;;) { 42 } 43 } 44