Home | History | Annotate | Download | only in x86_64
      1 // SPDX-License-Identifier: GPL-2.0+
      2 /*
      3  * (C) Copyright 2016 Google, Inc
      4  * Written by Simon Glass <sjg (at) chromium.org>
      5  */
      6 
      7 #include <common.h>
      8 #include <asm/processor-flags.h>
      9 
     10 void enable_interrupts(void)
     11 {
     12 	asm("sti\n");
     13 }
     14 
     15 int disable_interrupts(void)
     16 {
     17 	long flags;
     18 
     19 	asm volatile ("pushfq ; popq %0 ; cli\n" : "=g" (flags) : );
     20 
     21 	return flags & X86_EFLAGS_IF;
     22 }
     23 
     24 int interrupt_init(void)
     25 {
     26 	/* Nothing to do - this was already done in SPL */
     27 	return 0;
     28 }
     29