From mboxrd@z Thu Jan 1 00:00:00 1970 From: Simon Glass Date: Sun, 20 Oct 2019 21:37:53 -0600 Subject: [U-Boot] [PATCH v3 028/108] x86: Drop unnecessary interrupt code for TPL In-Reply-To: <20191021033913.220758-22-sjg@chromium.org> References: <20191021033913.220758-22-sjg@chromium.org> Message-ID: <20191021033913.220758-28-sjg@chromium.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de We don't expect an exception in TPL and don't need to print out full details if one happens. Add a reduced version of the code for TPL. Signed-off-by: Simon Glass --- Changes in v3: None Changes in v2: None arch/x86/cpu/i386/interrupt.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/arch/x86/cpu/i386/interrupt.c b/arch/x86/cpu/i386/interrupt.c index 1445204878c..611aab72dc7 100644 --- a/arch/x86/cpu/i386/interrupt.c +++ b/arch/x86/cpu/i386/interrupt.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include @@ -22,6 +23,10 @@ DECLARE_GLOBAL_DATA_PTR; +#ifndef CONFIG_TPL_BUILD +#define FULL_EXCEPTIONS +#endif + #define DECLARE_INTERRUPT(x) \ ".globl irq_"#x"\n" \ ".hidden irq_"#x"\n" \ @@ -30,6 +35,7 @@ DECLARE_GLOBAL_DATA_PTR; "pushl $"#x"\n" \ "jmp.d32 irq_common_entry\n" +#ifdef FULL_EXCEPTIONS static char *exceptions[] = { "Divide Error", "Debug", @@ -64,7 +70,9 @@ static char *exceptions[] = { "Reserved", "Reserved" }; +#endif +#ifdef FULL_EXCEPTIONS /** * show_efi_loaded_images() - show loaded UEFI images * @@ -159,11 +167,16 @@ static void dump_regs(struct irq_regs *regs) } show_efi_loaded_images(eip); } +#endif static void do_exception(struct irq_regs *regs) { +#ifdef FULL_EXCEPTIONS printf("%s\n", exceptions[regs->irq_id]); dump_regs(regs); +#else + printf("Exception %d\n", (int)regs->irq_id); +#endif hang(); } -- 2.23.0.866.gb869b98d4c-goog