From mboxrd@z Thu Jan 1 00:00:00 1970 From: Darren Hart Subject: Re: [PATCH] Remove warning in efi_enter_virtual_mode Date: Thu, 18 Apr 2013 17:18:05 -0700 Message-ID: <51708D3D.9010707@intel.com> References: <1366127886-31460-1-git-send-email-bryan.odonoghue.lkml@nexus-software.ie> <516EAC4A.6040202@console-pimps.org> <516F1B90.9040508@nexus-software.ie> <516FD24A.3070502@console-pimps.org> <51700876.1000305@intel.com> <51701D2E.6060903@console-pimps.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <51701D2E.6060903@console-pimps.org> Sender: linux-kernel-owner@vger.kernel.org To: Matt Fleming Cc: Bryan O'Donoghue , matthew.garrett@nebula.com, linux-efi@vger.kernel.org, x86@kernel.org, linux-kernel@vger.kernel.org, Josh Triplett , "H. Peter Anvin" , Ingo Molnar , Thomas Gleixner , Josh Boyer List-Id: linux-efi@vger.kernel.org On 04/18/2013 09:19 AM, Matt Fleming wrote: > On 18/04/13 15:51, Darren Hart wrote: >> I don't believe I have seen a 32-bit EFI system with a BGRT, but then >> again, I had to look it up today! That said, I suspect the MinnowBoard >> would benefit from such a thing, so we should have an example of it >> there in the near future. > > That's fine and things will work as-is provided that the BGRT image is > not in highmem. > >> Is this in anyway related to the following patch from Josh Boyer? We're >> carrying this in the Yocto Project trees currently. >> >> commit 6f3e186bc7721c5b24ad90d4a751cccfccd445e6 >> Author: Josh Boyer >> Date: Fri Aug 5 08:47:23 2011 -0400 >> >> Add patch to fix 32bit EFI service mapping (rhbz 726701) >> >> Signed-off-by: Tom Zanussi >> Signed-off-by: Darren Hart > > Yep, it's basically the same fix. My patch just avoids the #ifdef and > prints an error message if we have EFI Boot services regions we can't > access directly. The error message will at least be useful if we do > start seeing BGRT pointers in highmem. > > Could you give it a spin on your MinnowBoard? I've removed the patch I reference above and applied your patch to my 3.8.4 MinnowBoard dev tree. It panics with: ------------[ cut here ]------------ WARNING: at arch/x86/mm/ioremap.c:102 __ioremap_caller+0x2cb/0x2f0() Hardware name: Minnow Modules linked in: Pid: 0, comm: swapper/0 Not tainted 3.8.4-yocto-standard+ #111 Call Trace: [] warn_slowpath_common+0x73/0xa0 [] ? __ioremap_caller+0x2cb/0x2f0 [] ? __ioremap_caller+0x2cb/0x2f0 [] warn_slowpath_null+0x23/0x30 [] __ioremap_caller+0x2cb/0x2f0 [] ? kmem_cache_alloc_trace+0x58/0x120 [] ? sysfs_slab_alias+0x2f/0x80 [] ? add_preempt_count+0x8/0x80 [] ? sub_preempt_count+0x8/0x80 [] ? walk_system_ram_range+0xfa/0x110 [] ioremap_cache+0x19/0x20 [] ? efi_ioremap+0x1b/0x23 [] efi_ioremap+0x1b/0x23 [] efi_enter_virtual_mode+0x195/0x346 [] start_kernel+0x288/0x30b [] ? repair_env_string+0x51/0x51 [] i386_start_kernel+0x78/0x7d ---[ end trace f74542647d553317 ]--- efi: ioremap of 0x3DE3F000 failed! efi: ioremap of 0x3E601000 failed! efi: ioremap of 0x3E602000 failed! efi: ioremap of 0x3E609000 failed! efi: ioremap of 0x3E60C000 failed! efi: ioremap of 0x3E614000 failed! efi: ioremap of 0x3E617000 failed! efi: ioremap of 0x3E621000 failed! efi: ioremap of 0x3E622000 failed! efi: ioremap of 0x3E627000 failed! efi: ioremap of 0x3E628000 failed! efi: ioremap of 0x3E62D000 failed! efi: ioremap of 0x3E62E000 failed! efi: ioremap of 0x3E631000 failed! efi: ioremap of 0x3E632000 failed! efi: ioremap of 0x3E63E000 failed! efi: ioremap of 0x3EA0E000 failed! efi: ioremap of 0x3EA0F000 failed! efi: ioremap of 0x3EA11000 failed! efi: ioremap of 0x3EA1A000 failed! efi: ioremap of 0x3EA1B000 failed! efi: ioremap of 0x3EA1D000 failed! efi: ioremap of 0x3EC0B000 failed! efi: ioremap of 0x3EC0F000 failed! efi: ioremap of 0x3F33F000 failed! efi: ioremap of 0xFED1C000 failed! ------------[ cut here ]------------ kernel BUG at arch/x86/platform/efi/efi.c:933! invalid opcode: 0000 [#1] PREEMPT SMP Modules linked in: Pid: 0, comm: swapper/0 Tainted: G W 3.8.4-yocto-standard+ #111 Circuitco Minnow/Minnow Board EIP: 0060:[] EFLAGS: 00010246 CPU: 0 EIP is at efi_enter_virtual_mode+0x244/0x346 EAX: ee012930 EBX: 00000030 ECX: 00000000 EDX: 000000d0 ESI: ffe190b0 EDI: ee012960 EBP: c18adfc4 ESP: c18adf7c DS: 007b ES: 007b FS: 00d8 GS: 0000 SS: 0068 CR0: 8005003b CR2: ffe17000 CR3: 019b4000 CR4: 00000690 DR0: 00000000 DR1: 00000000 DR2: 00000000 DR3: 00000000 DR6: ffff0ff0 DR7: 00000400 Process swapper/0 (pid: 0, ti=c18ac000 task=c18b70e0 task.ti=c18ac000) Stack: 00000000 80000000 00000000 00040000 00040000 80000000 0000a000 00000000 0002effe 00000000 00000032 ee012000 fffaa000 00000000 ffe190b0 c195b3c0 0008a800 c18ae800 c18adfe4 c19208b8 00000113 ffffffff ffffffff c1920462 Call Trace: [] start_kernel+0x288/0x30b [] ? repair_env_string+0x51/0x51 [] i386_start_kernel+0x78/0x7d Code: 03 45 e4 89 c7 f3 a4 89 5d e0 8b 1d fc d7 9b c1 01 5d f0 8b 75 f0 39 35 f0 d7 9b c1 0f 87 82 fe ff ff 83 3d a0 be 91 c1 00 75 02 <0f> 0b 8b 1d fc d7 9b c1 8b 75 e0 0f af f3 8b 3d f8 d7 9b c1 e8 EIP: [] efi_enter_virtual_mode+0x244/0x346 SS:ESP 0068:c18adf7c ---[ end trace f74542647d553318 ]--- Kernel panic - not syncing: Attempted to kill the idle task! -- Darren Hart Intel Open Source Technology Center Yocto Project - Linux Kernel