[SeaBIOS] [PATCH] Add config option to disable MTRR initialization.
Some versions of Bochs don't like the MTRR initialization, so add CONFIG_MTRR_INIT to control whether SeaBIOS will touch the MTRRs. --- src/Kconfig |6 ++ src/mtrr.c |2 +- 2 files changed, 7 insertions(+), 1 deletions(-) diff --git a/src/Kconfig b/src/Kconfig index fca73e4..f064b27 100644 --- a/src/Kconfig +++ b/src/Kconfig @@ -194,6 +194,12 @@ menu "Hardware support" default y help Support System Management Mode (on emulators). +config MTRR_INIT +depends on !COREBOOT +bool "Initialize MTRRs" +default y +help +Initialize the Memory Type Range Registers (on emulators). endmenu menu "BIOS interfaces" diff --git a/src/mtrr.c b/src/mtrr.c index ed239c8..0502c18 100644 --- a/src/mtrr.c +++ b/src/mtrr.c @@ -32,7 +32,7 @@ void mtrr_setup(void) { -if (CONFIG_COREBOOT) +if (!CONFIG_MTRR_INIT || CONFIG_COREBOOT) return; u32 eax, ebx, ecx, edx, cpuid_features; -- 1.7.4 ___ SeaBIOS mailing list SeaBIOS@seabios.org http://www.seabios.org/mailman/listinfo/seabios
Re: [SeaBIOS] [PATCH] Add config option to disable MTRR initialization.
Kevin O'Connor wrote: Some versions of Bochs don't like the MTRR initialization, so add Which versions don't? Sebastian ___ SeaBIOS mailing list SeaBIOS@seabios.org http://www.seabios.org/mailman/listinfo/seabios
Re: [SeaBIOS] [PATCH] Add config option to disable MTRR initialization.
On Mon, Mar 07, 2011 at 09:37:59PM +0100, Sebastian Herbszt wrote: > Kevin O'Connor wrote: > >Some versions of Bochs don't like the MTRR initialization, so add > > Which versions don't? I ran into it with the version fc14 has - Bochs v2.4.5. I get: 00034041578i[CPU0 ] 0x01fe28e9>> wrmsr : 0F30 00034041578e[CPU0 ] exception(): 3rd (13) exception with no resolution, shutdown status is 00h, resetting 00034041578i[SYS ] bx_pc_system_c::Reset(HARDWARE) called 00034041578i[CPU0 ] cpu hardware reset and then the boot restarts. The issue goes away if I disable the MTRR init. -Kevin ___ SeaBIOS mailing list SeaBIOS@seabios.org http://www.seabios.org/mailman/listinfo/seabios
Re: [SeaBIOS] [PATCH] Add config option to disable MTRR initialization.
Kevin O'Connor wrote: On Mon, Mar 07, 2011 at 09:37:59PM +0100, Sebastian Herbszt wrote: Kevin O'Connor wrote: >Some versions of Bochs don't like the MTRR initialization, so add Which versions don't? I ran into it with the version fc14 has - Bochs v2.4.5. I get: 00034041578i[CPU0 ] 0x01fe28e9>> wrmsr : 0F30 00034041578e[CPU0 ] exception(): 3rd (13) exception with no resolution, shutdown status is 00h, resetting 00034041578i[SYS ] bx_pc_system_c::Reset(HARDWARE) called 00034041578i[CPU0 ] cpu hardware reset and then the boot restarts. The issue goes away if I disable the MTRR init. -Kevin Can you please post your "cpuid" lines from your bochsrc file and the CPU configuration related lines from the top of the bochsout.txt file? Sebastian ___ SeaBIOS mailing list SeaBIOS@seabios.org http://www.seabios.org/mailman/listinfo/seabios
Re: [SeaBIOS] [PATCH] Add config option to disable MTRR initialization.
On Thu, Mar 10, 2011 at 10:50:30PM +0100, Sebastian Herbszt wrote: > Kevin O'Connor wrote: > >On Mon, Mar 07, 2011 at 09:37:59PM +0100, Sebastian Herbszt wrote: > >>Kevin O'Connor wrote: > >>>Some versions of Bochs don't like the MTRR initialization, so add > >I ran into it with the version fc14 has - Bochs v2.4.5. I get: > > > >00034041578i[CPU0 ] 0x01fe28e9>> wrmsr : 0F30 > >00034041578e[CPU0 ] exception(): 3rd (13) exception with no resolution, > >shutdown status is 00h, resetting > >00034041578i[SYS ] bx_pc_system_c::Reset(HARDWARE) called > >00034041578i[CPU0 ] cpu hardware reset > > > >and then the boot restarts. The issue goes away if I disable the MTRR > >init. > Can you please post your "cpuid" lines from your bochsrc file and > the CPU configuration related lines from the top of the bochsout.txt > file? I don't have a bochsrc - I just run: bochs -q 'floppya: 1_44=odin1440.img, status=inserted' 'romimage: file=../seabios/out/bios.bin' and then select option '6'. Below is the system config output: 000i[ ] Bochs x86 Emulator 2.4.5.cvs 000i[ ] Build from CVS snapshot, after release 2.4.5 000i[ ] System configuration 000i[ ] processors: 1 (cores=1, HT threads=1) 000i[ ] A20 line support: yes 000i[ ] CPU configuration 000i[ ] level: 6 000i[ ] SMP support: no 000i[ ] APIC support: yes 000i[ ] FPU support: yes 000i[ ] MMX support: yes 000i[ ] 3dnow! support: yes 000i[ ] SEP support: yes 000i[ ] SSE support: sse2 000i[ ] XSAVE support: no 000i[ ] AES support: no 000i[ ] MOVBE support: no 000i[ ] x86-64 support: no 000i[ ] MWAIT support: no 000i[ ] VMX support: no -Kevin ___ SeaBIOS mailing list SeaBIOS@seabios.org http://www.seabios.org/mailman/listinfo/seabios
Re: [SeaBIOS] [PATCH] Add config option to disable MTRR initialization.
Kevin O'Connor wrote: On Thu, Mar 10, 2011 at 10:50:30PM +0100, Sebastian Herbszt wrote: Kevin O'Connor wrote: >On Mon, Mar 07, 2011 at 09:37:59PM +0100, Sebastian Herbszt wrote: >>Kevin O'Connor wrote: >>>Some versions of Bochs don't like the MTRR initialization, so add >I ran into it with the version fc14 has - Bochs v2.4.5. I get: > >00034041578i[CPU0 ] 0x01fe28e9>> wrmsr : 0F30 >00034041578e[CPU0 ] exception(): 3rd (13) exception with no resolution, shutdown status is 00h, resetting >00034041578i[SYS ] bx_pc_system_c::Reset(HARDWARE) called >00034041578i[CPU0 ] cpu hardware reset > >and then the boot restarts. The issue goes away if I disable the MTRR >init. Can you please post your "cpuid" lines from your bochsrc file and the CPU configuration related lines from the top of the bochsout.txt file? I don't have a bochsrc - I just run: bochs -q 'floppya: 1_44=odin1440.img, status=inserted' 'romimage: file=../seabios/out/bios.bin' and then select option '6'. Below is the system config output: 000i[ ] Bochs x86 Emulator 2.4.5.cvs 000i[ ] Build from CVS snapshot, after release 2.4.5 000i[ ] System configuration 000i[ ] processors: 1 (cores=1, HT threads=1) 000i[ ] A20 line support: yes 000i[ ] CPU configuration 000i[ ] level: 6 000i[ ] SMP support: no 000i[ ] APIC support: yes 000i[ ] FPU support: yes 000i[ ] MMX support: yes 000i[ ] 3dnow! support: yes 000i[ ] SEP support: yes 000i[ ] SSE support: sse2 000i[ ] XSAVE support: no 000i[ ] AES support: no 000i[ ] MOVBE support: no 000i[ ] x86-64 support: no 000i[ ] MWAIT support: no 000i[ ] VMX support: no -Kevin Stanislav, you happen to know why WRMSR is not recognized here? Sebastian ___ SeaBIOS mailing list SeaBIOS@seabios.org http://www.seabios.org/mailman/listinfo/seabios