Change WFI behavior : halt simulation
This commit is contained in:
		@@ -525,7 +525,8 @@ static void cpu_execute(rv32_cpu_t* cpu, instruction_t* instruction)
 | 
				
			|||||||
									fprintf(stderr, "SFENCE.VMA: Guest kernel must think we have an MMU. We have none.\n");
 | 
														fprintf(stderr, "SFENCE.VMA: Guest kernel must think we have an MMU. We have none.\n");
 | 
				
			||||||
									break;
 | 
														break;
 | 
				
			||||||
								case FUNC7_WFI:
 | 
													case FUNC7_WFI:
 | 
				
			||||||
									fprintf(stderr, "WFI: Guest kernel must think we have interrupts. We have none.\n");
 | 
														fprintf(stderr, "WFI: Guest kernel must think we have interrupts. We have none. Halting simulation.\n");
 | 
				
			||||||
 | 
														cpu->sim_ticks_left = 1;
 | 
				
			||||||
									break;
 | 
														break;
 | 
				
			||||||
								default:
 | 
													default:
 | 
				
			||||||
									fprintf(stderr, "FATAL: Unknown IMM for ECALL/EBREAK instruction while executing (IMM=0x%x)\n", instruction->immediate);
 | 
														fprintf(stderr, "FATAL: Unknown IMM for ECALL/EBREAK instruction while executing (IMM=0x%x)\n", instruction->immediate);
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user