{
watchdog_disable();
console_start_sync();
- local_irq_enable();
- smp_call_function(__machine_halt, NULL, 0);
+
+ if ( system_state >= SYS_STATE_smp_boot )
+ {
+ local_irq_enable();
+ smp_call_function(__machine_halt, NULL, 0);
+ }
+
__machine_halt(NULL);
}
console_start_sync();
spin_debug_disable();
- local_irq_enable();
-
- /* Ensure we are the boot CPU. */
- if ( get_apic_id() != boot_cpu_physical_apicid )
- {
- /* Send IPI to the boot CPU (logical cpu 0). */
- on_selected_cpus(cpumask_of(0), __machine_restart,
- &delay_millisecs, 0);
- for ( ; ; )
- halt();
- }
-
/*
* We may be called from an interrupt context, and various functions we
* may need to call (alloc_domheap_pages, map_domain_page, ...) assert that
*/
local_irq_count(0) = 0;
- smp_send_stop();
+ if ( system_state >= SYS_STATE_smp_boot )
+ {
+ local_irq_enable();
+
+ /* Ensure we are the boot CPU. */
+ if ( get_apic_id() != boot_cpu_physical_apicid )
+ {
+ /* Send IPI to the boot CPU (logical cpu 0). */
+ on_selected_cpus(cpumask_of(0), __machine_restart,
+ &delay_millisecs, 0);
+ for ( ; ; )
+ halt();
+ }
+
+ smp_send_stop();
+ }
mdelay(delay_millisecs);
enum context context;
struct vcpu *v = current;
- if ( has_hvm_container_vcpu(v) && guest_mode(regs) )
+ if ( guest_mode(regs) && has_hvm_container_vcpu(v) )
{
struct segment_register sreg;
context = CTXT_hvm_guest;
bool_t is_active_kernel_text(unsigned long addr)
{
return (is_kernel_text(addr) ||
- (system_state == SYS_STATE_boot && is_kernel_inittext(addr)));
+ (system_state < SYS_STATE_active && is_kernel_inittext(addr)));
}
const char *symbols_lookup(unsigned long addr,