Re: AMD Geode i686

From: Matteo Croce
Date: Thu Apr 15 2010 - 13:20:53 EST


On Thu, Apr 15, 2010 at 7:11 PM, Lennart Sorensen
<lsorense@xxxxxxxxxxxxxxxxxxx> wrote:
> On Mon, Mar 01, 2010 at 11:03:09PM +0100, Matteo Croce wrote:
>> Hi,
>> I have refreshed my AMD Geode i686 patch with NOPL and I have added a
>> new nice feature.
>> When a NOPL is found the parser looks for any NOPL after the current
>> one, so they are emulated in bulk.
>> Tested ok on a Pcengines Alix.
>>
>> Signed-off-by: Matteo Croce <technoboy85@xxxxxxxxx>
>>
>> --- a/arch/x86/kernel/Makefile    Â2010-03-01 01:18:51.697166322 +0100
>> +++ b/arch/x86/kernel/Makefile    Â2010-03-01 01:19:45.727095700 +0100
>> @@ -89,6 +89,8 @@
>> Âobj-$(CONFIG_HPET_TIMER) Â Â += hpet.o
>>
>> Âobj-$(CONFIG_K8_NB) Â Â Â Â Â+= k8.o
>> +obj-$(CONFIG_MGEODEGX1) Â Â Â Â Â Â Â+= nopl_emu.o
>> +obj-$(CONFIG_MGEODE_LX) Â Â Â Â Â Â Â+= nopl_emu.o
>> Âobj-$(CONFIG_DEBUG_RODATA_TEST) Â Â Â+= test_rodata.o
>> Âobj-$(CONFIG_DEBUG_NX_TEST) Â+= test_nx.o
>>
>> --- a/arch/x86/kernel/cpu/amd.c    2010-03-01 01:18:51.737097341 +0100
>> +++ b/arch/x86/kernel/cpu/amd.c    2010-03-01 01:19:27.867865836 +0100
>> @@ -138,8 +138,10 @@
>> Â Â Â }
>>
>> Â Â Â if (c->x86_model == 10) {
>> - Â Â Â Â Â Â /Index: linux-2.6.33/arch/x86/kernel/Makefile
>> ===================================================================
>> * AMD Geode LX is model 10 */
>> - Â Â Â Â Â Â /* placeholder for any needed mods */
>> + Â Â Â Â Â Â /* Geode only lacks the NOPL instruction to be i686,
>> + Â Â Â Â Â Â Â Âbut we can emulate it in the exception handler
>> + Â Â Â Â Â Â Â Âand promote it to a class 6 cpu */
>> + Â Â Â Â Â Â boot_cpu_data.x86 = 6;
>> Â Â Â Â Â Â Â return;
>> Â Â Â }
>> Â}
>> --- a/arch/x86/kernel/entry_32.S Â Â Â2010-03-01 01:18:51.717096708 +0100
>> +++ b/arch/x86/kernel/entry_32.S Â Â Â2010-03-01 01:19:27.867865836 +0100
>> @@ -960,7 +960,11 @@
>> Â Â Â RING0_INT_FRAME
>> Â Â Â pushl $0
>> Â Â Â CFI_ADJUST_CFA_OFFSET 4
>> +#ifdef CONFIG_MGEODE_LX
>> + Â Â pushl $do_nopl_emu
>> +#else
>> Â Â Â pushl $do_invalid_op
>> +#endif
>
> How does this work for MGEODEGX1 when it looks for MGEODE_LX? ÂIt seems
> you made both link against the code above after all. ÂIs this wrong or
> the above?
>
> Can it not work if you want to run a generic kernel on your Geode rather
> than one built explicitly for the LX? ÂI build one kernel to run on
> Geode SC1200 and Geode LX.
>
> --
> Len Sorensen
>

This code should work for Geode GX too.
Try it and report success please

--
Matteo Croce
OpenWrt developer
_______ ________ __
| |.-----.-----.-----.| | | |.----.| |_
| - || _ | -__| || | | || _|| _|
|_______|| __|_____|__|__||________||__| |____|
|__| W I R E L E S S F R E E D O M
KAMIKAZE (bleeding edge) ------------------
* 10 oz Vodka Shake well with ice and strain
* 10 oz Triple sec mixture into 10 shot glasses.
* 10 oz lime juice Salute!
---------------------------------------------------
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/