!fixup "target/avr: Add defintions of AVR core types"
diff mbox series

Message ID 20200207112338.27754-1-philmd@redhat.com
State New
Headers show
Series
  • !fixup "target/avr: Add defintions of AVR core types"
Related show

Commit Message

Philippe Mathieu-Daudé Feb. 7, 2020, 11:23 a.m. UTC
These cores have unresolved review comment:
https://www.mail-archive.com/qemu-devel@nongnu.org/msg674105.html
https://www.mail-archive.com/qemu-devel@nongnu.org/msg674259.html
and:
https://www.mail-archive.com/qemu-devel@nongnu.org/msg676046.html

As we don't want a bad start with this architecture, remove them.

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
Based-on: <1581040680-308-1-git-send-email-aleksandar.markovic@rt-rk.com>

Side note: typo in the subject "definitions"
---
 target/avr/cpu.c | 96 ------------------------------------------------
 1 file changed, 96 deletions(-)

Comments

Aleksandar Markovic Feb. 8, 2020, 7:10 a.m. UTC | #1
On Friday, February 7, 2020, Philippe Mathieu-Daudé <philmd@redhat.com>
wrote:

> These cores have unresolved review comment:
> https://www.mail-archive.com/qemu-devel@nongnu.org/msg674105.html
> https://www.mail-archive.com/qemu-devel@nongnu.org/msg674259.html
> and:
> https://www.mail-archive.com/qemu-devel@nongnu.org/msg676046.html
>
> As we don't want a bad start with this architecture, remove them.
>
>
I agree with underlying motivation of your fixup.

Still, the division of AVR cores into avr1, avr2, ... , xmega7 is here to
stay. The reason is that because such coding is a part of ELF header, and
this means they will stay forever (as they are approved by some kind of ELF
comitee, and are meant not to be ever changed in future).

Rather than deleting definitions and references of core types we know we
don't support (or, at least, don't fully support), let's think of some less
intrusive way - for example, checking core type of executable given via
CLI, and refusing to emulate, if we know we still have some issues with the
core type in question.

For example, "avrtiny" type is missing handling the fact that it has 16
register instead of 32 registers, like otger AVR core types. But, other
AVRFeatures of "avrtiny" are correctly identified, and it would be a shame
to delete them now and force someone in future to reinvent the wheel. Just
refusing to emulate "avrtiny" seems a better approach to me.

Aleksandar



> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
> Based-on: <1581040680-308-1-git-send-email-aleksandar.markovic@rt-rk.com>
>
> Side note: typo in the subject "definitions"
> ---
>  target/avr/cpu.c | 96 ------------------------------------------------
>  1 file changed, 96 deletions(-)
>
> diff --git a/target/avr/cpu.c b/target/avr/cpu.c
> index 8a084c750f..b3d661142d 100644
> --- a/target/avr/cpu.c
> +++ b/target/avr/cpu.c
> @@ -216,77 +216,6 @@ static void avr_cpu_class_init(ObjectClass *oc, void
> *data)
>      cc->gdb_core_xml_file = "avr-cpu.xml";
>  }
>
> -/*
> - * Setting features of AVR core type avr1
> - * --------------------------------------
> - *
> - * This type of AVR core is present in the following AVR MCUs:
> - *
> - * at90s1200, attiny11, attiny12, attiny15, attiny28
> - */
> -static void avr_avr1_initfn(Object *obj)
> -{
> -    AVRCPU *cpu = AVR_CPU(obj);
> -    CPUAVRState *env = &cpu->env;
> -
> -    set_avr_feature(env, AVR_FEATURE_LPM);
> -    set_avr_feature(env, AVR_FEATURE_2_BYTE_SP);
> -    set_avr_feature(env, AVR_FEATURE_2_BYTE_PC);
> -}
> -
> -/*
> - * Setting features of AVR core type avr2
> - * --------------------------------------
> - *
> - * This type of AVR core is present in the following AVR MCUs:
> - *
> - * at90s2313, at90s2323, at90s2333, at90s2343, attiny22, attiny26,
> at90s4414,
> - * at90s4433, at90s4434, at90s8515, at90c8534, at90s8535
> - */
> -static void avr_avr2_initfn(Object *obj)
> -{
> -    AVRCPU *cpu = AVR_CPU(obj);
> -    CPUAVRState *env = &cpu->env;
> -
> -    set_avr_feature(env, AVR_FEATURE_LPM);
> -    set_avr_feature(env, AVR_FEATURE_IJMP_ICALL);
> -    set_avr_feature(env, AVR_FEATURE_ADIW_SBIW);
> -    set_avr_feature(env, AVR_FEATURE_SRAM);
> -    set_avr_feature(env, AVR_FEATURE_BREAK);
> -
> -    set_avr_feature(env, AVR_FEATURE_2_BYTE_PC);
> -    set_avr_feature(env, AVR_FEATURE_2_BYTE_SP);
> -}
> -
> -/*
> - * Setting features of AVR core type avr25
> - * --------------------------------------
> - *
> - * This type of AVR core is present in the following AVR MCUs:
> - *
> - * ata5272, ata6616c, attiny13, attiny13a, attiny2313, attiny2313a,
> attiny24,
> - * attiny24a, attiny4313, attiny44, attiny44a, attiny441, attiny84,
> attiny84a,
> - * attiny25, attiny45, attiny85, attiny261, attiny261a, attiny461,
> attiny461a,
> - * attiny861, attiny861a, attiny43u, attiny87, attiny48, attiny88,
> attiny828,
> - * attiny841, at86rf401
> - */
> -static void avr_avr25_initfn(Object *obj)
> -{
> -    AVRCPU *cpu = AVR_CPU(obj);
> -    CPUAVRState *env = &cpu->env;
> -
> -    set_avr_feature(env, AVR_FEATURE_LPM);
> -    set_avr_feature(env, AVR_FEATURE_IJMP_ICALL);
> -    set_avr_feature(env, AVR_FEATURE_ADIW_SBIW);
> -    set_avr_feature(env, AVR_FEATURE_SRAM);
> -    set_avr_feature(env, AVR_FEATURE_BREAK);
> -
> -    set_avr_feature(env, AVR_FEATURE_2_BYTE_PC);
> -    set_avr_feature(env, AVR_FEATURE_2_BYTE_SP);
> -    set_avr_feature(env, AVR_FEATURE_LPMX);
> -    set_avr_feature(env, AVR_FEATURE_MOVW);
> -}
> -
>  /*
>   * Setting features of AVR core type avr3
>   * --------------------------------------
> @@ -499,27 +428,6 @@ static void avr_avr6_initfn(Object *obj)
>      set_avr_feature(env, AVR_FEATURE_MUL);
>  }
>
> -/*
> - * Setting features of AVR core type avrtiny
> - * --------------------------------------
> - *
> - * This type of AVR core is present in the following AVR MCUs:
> - *
> - * attiny4, attiny5, attiny9, attiny10, attiny20, attiny40
> - */
> -static void avr_avrtiny_initfn(Object *obj)
> -{
> -    AVRCPU *cpu = AVR_CPU(obj);
> -    CPUAVRState *env = &cpu->env;
> -
> -    set_avr_feature(env, AVR_FEATURE_LPM);
> -    set_avr_feature(env, AVR_FEATURE_IJMP_ICALL);
> -    set_avr_feature(env, AVR_FEATURE_BREAK);
> -
> -    set_avr_feature(env, AVR_FEATURE_2_BYTE_PC);
> -    set_avr_feature(env, AVR_FEATURE_1_BYTE_SP);
> -}
> -
>  /*
>   * Setting features of AVR core type xmega2
>   * --------------------------------------
> @@ -754,10 +662,6 @@ static const TypeInfo avr_cpu_type_info[] = {
>          .class_init = avr_cpu_class_init,
>          .abstract = true,
>      },
> -    DEFINE_AVR_CPU_TYPE("avrtiny", avr_avrtiny_initfn),
> -    DEFINE_AVR_CPU_TYPE("avr1", avr_avr1_initfn),
> -    DEFINE_AVR_CPU_TYPE("avr2", avr_avr2_initfn),
> -    DEFINE_AVR_CPU_TYPE("avr25", avr_avr25_initfn),
>      DEFINE_AVR_CPU_TYPE("avr3", avr_avr3_initfn),
>      DEFINE_AVR_CPU_TYPE("avr31", avr_avr31_initfn),
>      DEFINE_AVR_CPU_TYPE("avr35", avr_avr35_initfn),
> --
> 2.21.1
>
>
Philippe Mathieu-Daudé Feb. 8, 2020, 2:06 p.m. UTC | #2
Hi Aleksandar,

On 2/8/20 8:10 AM, Aleksandar Markovic wrote:
> On Friday, February 7, 2020, Philippe Mathieu-Daudé <philmd@redhat.com
> <mailto:philmd@redhat.com>> wrote:
> 
>     These cores have unresolved review comment:
>     https://www.mail-archive.com/qemu-devel@nongnu.org/msg674105.html
>     <https://www.mail-archive.com/qemu-devel@nongnu.org/msg674105.html>
>     https://www.mail-archive.com/qemu-devel@nongnu.org/msg674259.html
>     <https://www.mail-archive.com/qemu-devel@nongnu.org/msg674259.html>
>     and:
>     https://www.mail-archive.com/qemu-devel@nongnu.org/msg676046.html
>     <https://www.mail-archive.com/qemu-devel@nongnu.org/msg676046.html>
> 
>     As we don't want a bad start with this architecture, remove them.
> 
> 
> I agree with underlying motivation of your fixup.
> 
> Still, the division of AVR cores into avr1, avr2, ... , xmega7 is here
> to stay. The reason is that because such coding is a part of ELF header,
> and this means they will stay forever (as they are approved by some kind
> of ELF comitee, and are meant not to be ever changed in future).

I am not removing anything ELF related. We don't have any machine using
CPU avrtiny/avr1/avr2/avr25 so AFAIK I'm simply removing unreviewed dead
code.


> Rather than deleting definitions and references of core types we know we
> don't support (or, at least, don't fully support), let's think of some
> less intrusive way - for example, checking core type of executable given
> via CLI, and refusing to emulate, if we know we still have some issues
> with the core type in question.
> 
> For example, "avrtiny" type is missing handling the fact that it has 16
> register instead of 32 registers, like otger AVR core types. But, other
> AVRFeatures of "avrtiny" are correctly identified, and it would be a
> shame to delete them now and force someone in future to reinvent the
> wheel. Just refusing to emulate "avrtiny" seems a better approach to me.

It is hard to follow you, this port is contributed by hobbyist and you
appeared lately in the review process and asked to raised the quality to
a professional level. Now professionals are taking extra care to review
little details as the CPU features implemented by each core, and you are
saying we shouldn't delete incorrect code?

I am not saying we will never accept these cores, I'm proposing to start
with reviewed cores, so we don't delay the merge if this port. There are
already a lot of cores to use:

    DEFINE_AVR_CPU_TYPE("avr3", avr_avr3_initfn),
    DEFINE_AVR_CPU_TYPE("avr31", avr_avr31_initfn),
    DEFINE_AVR_CPU_TYPE("avr35", avr_avr35_initfn),
    DEFINE_AVR_CPU_TYPE("avr4", avr_avr4_initfn),
    DEFINE_AVR_CPU_TYPE("avr5", avr_avr5_initfn),
    DEFINE_AVR_CPU_TYPE("avr51", avr_avr51_initfn),
    DEFINE_AVR_CPU_TYPE("avr6", avr_avr6_initfn),
    DEFINE_AVR_CPU_TYPE("xmega2", avr_xmega2_initfn),
    DEFINE_AVR_CPU_TYPE("xmega3", avr_xmega3_initfn),
    DEFINE_AVR_CPU_TYPE("xmega4", avr_xmega4_initfn),
    DEFINE_AVR_CPU_TYPE("xmega5", avr_xmega5_initfn),
    DEFINE_AVR_CPU_TYPE("xmega6", avr_xmega6_initfn),
    DEFINE_AVR_CPU_TYPE("xmega7", avr_xmega7_initfn),

Then it will be less stressful to correct/review/add the avr1/2/tiny
cores. This seems simpler than keep respining 30 patches during the next
6 months. I don't want the community to get tired and loose interest in
this port, we already spent a fair amount of time to get it merged.

Regards,

Phil.

> 
>     Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com
>     <mailto:philmd@redhat.com>>
>     ---
>     Based-on:
>     <1581040680-308-1-git-send-email-aleksandar.markovic@rt-rk.com
>     <mailto:1581040680-308-1-git-send-email-aleksandar.markovic@rt-rk.com>>
> 
>     Side note: typo in the subject "definitions"
>     ---
>      target/avr/cpu.c | 96 ------------------------------------------------
>      1 file changed, 96 deletions(-)
> 
>     diff --git a/target/avr/cpu.c b/target/avr/cpu.c
>     index 8a084c750f..b3d661142d 100644
>     --- a/target/avr/cpu.c
>     +++ b/target/avr/cpu.c
>     @@ -216,77 +216,6 @@ static void avr_cpu_class_init(ObjectClass *oc,
>     void *data)
>          cc->gdb_core_xml_file = "avr-cpu.xml";
>      }
> 
>     -/*
>     - * Setting features of AVR core type avr1
>     - * --------------------------------------
>     - *
>     - * This type of AVR core is present in the following AVR MCUs:
>     - *
>     - * at90s1200, attiny11, attiny12, attiny15, attiny28
>     - */
>     -static void avr_avr1_initfn(Object *obj)
>     -{
>     -    AVRCPU *cpu = AVR_CPU(obj);
>     -    CPUAVRState *env = &cpu->env;
>     -
>     -    set_avr_feature(env, AVR_FEATURE_LPM);
>     -    set_avr_feature(env, AVR_FEATURE_2_BYTE_SP);
>     -    set_avr_feature(env, AVR_FEATURE_2_BYTE_PC);
>     -}
>     -
>     -/*
>     - * Setting features of AVR core type avr2
>     - * --------------------------------------
>     - *
>     - * This type of AVR core is present in the following AVR MCUs:
>     - *
>     - * at90s2313, at90s2323, at90s2333, at90s2343, attiny22, attiny26,
>     at90s4414,
>     - * at90s4433, at90s4434, at90s8515, at90c8534, at90s8535
>     - */
>     -static void avr_avr2_initfn(Object *obj)
>     -{
>     -    AVRCPU *cpu = AVR_CPU(obj);
>     -    CPUAVRState *env = &cpu->env;
>     -
>     -    set_avr_feature(env, AVR_FEATURE_LPM);
>     -    set_avr_feature(env, AVR_FEATURE_IJMP_ICALL);
>     -    set_avr_feature(env, AVR_FEATURE_ADIW_SBIW);
>     -    set_avr_feature(env, AVR_FEATURE_SRAM);
>     -    set_avr_feature(env, AVR_FEATURE_BREAK);
>     -
>     -    set_avr_feature(env, AVR_FEATURE_2_BYTE_PC);
>     -    set_avr_feature(env, AVR_FEATURE_2_BYTE_SP);
>     -}
>     -
>     -/*
>     - * Setting features of AVR core type avr25
>     - * --------------------------------------
>     - *
>     - * This type of AVR core is present in the following AVR MCUs:
>     - *
>     - * ata5272, ata6616c, attiny13, attiny13a, attiny2313, attiny2313a,
>     attiny24,
>     - * attiny24a, attiny4313, attiny44, attiny44a, attiny441, attiny84,
>     attiny84a,
>     - * attiny25, attiny45, attiny85, attiny261, attiny261a, attiny461,
>     attiny461a,
>     - * attiny861, attiny861a, attiny43u, attiny87, attiny48, attiny88,
>     attiny828,
>     - * attiny841, at86rf401
>     - */
>     -static void avr_avr25_initfn(Object *obj)
>     -{
>     -    AVRCPU *cpu = AVR_CPU(obj);
>     -    CPUAVRState *env = &cpu->env;
>     -
>     -    set_avr_feature(env, AVR_FEATURE_LPM);
>     -    set_avr_feature(env, AVR_FEATURE_IJMP_ICALL);
>     -    set_avr_feature(env, AVR_FEATURE_ADIW_SBIW);
>     -    set_avr_feature(env, AVR_FEATURE_SRAM);
>     -    set_avr_feature(env, AVR_FEATURE_BREAK);
>     -
>     -    set_avr_feature(env, AVR_FEATURE_2_BYTE_PC);
>     -    set_avr_feature(env, AVR_FEATURE_2_BYTE_SP);
>     -    set_avr_feature(env, AVR_FEATURE_LPMX);
>     -    set_avr_feature(env, AVR_FEATURE_MOVW);
>     -}
>     -
>      /*
>       * Setting features of AVR core type avr3
>       * --------------------------------------
>     @@ -499,27 +428,6 @@ static void avr_avr6_initfn(Object *obj)
>          set_avr_feature(env, AVR_FEATURE_MUL);
>      }
> 
>     -/*
>     - * Setting features of AVR core type avrtiny
>     - * --------------------------------------
>     - *
>     - * This type of AVR core is present in the following AVR MCUs:
>     - *
>     - * attiny4, attiny5, attiny9, attiny10, attiny20, attiny40
>     - */
>     -static void avr_avrtiny_initfn(Object *obj)
>     -{
>     -    AVRCPU *cpu = AVR_CPU(obj);
>     -    CPUAVRState *env = &cpu->env;
>     -
>     -    set_avr_feature(env, AVR_FEATURE_LPM);
>     -    set_avr_feature(env, AVR_FEATURE_IJMP_ICALL);
>     -    set_avr_feature(env, AVR_FEATURE_BREAK);
>     -
>     -    set_avr_feature(env, AVR_FEATURE_2_BYTE_PC);
>     -    set_avr_feature(env, AVR_FEATURE_1_BYTE_SP);
>     -}
>     -
>      /*
>       * Setting features of AVR core type xmega2
>       * --------------------------------------
>     @@ -754,10 +662,6 @@ static const TypeInfo avr_cpu_type_info[] = {
>              .class_init = avr_cpu_class_init,
>              .abstract = true,
>          },
>     -    DEFINE_AVR_CPU_TYPE("avrtiny", avr_avrtiny_initfn),
>     -    DEFINE_AVR_CPU_TYPE("avr1", avr_avr1_initfn),
>     -    DEFINE_AVR_CPU_TYPE("avr2", avr_avr2_initfn),
>     -    DEFINE_AVR_CPU_TYPE("avr25", avr_avr25_initfn),
>          DEFINE_AVR_CPU_TYPE("avr3", avr_avr3_initfn),
>          DEFINE_AVR_CPU_TYPE("avr31", avr_avr31_initfn),
>          DEFINE_AVR_CPU_TYPE("avr35", avr_avr35_initfn),
>     -- 
>     2.21.1
>
Aleksandar Markovic Feb. 8, 2020, 4:01 p.m. UTC | #3
On Sat, Feb 8, 2020 at 3:06 PM Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:
>
> Hi Aleksandar,
>
> On 2/8/20 8:10 AM, Aleksandar Markovic wrote:
> > On Friday, February 7, 2020, Philippe Mathieu-Daudé <philmd@redhat.com
> > <mailto:philmd@redhat.com>> wrote:
> >
> >     These cores have unresolved review comment:
> >     https://www.mail-archive.com/qemu-devel@nongnu.org/msg674105.html
> >     <https://www.mail-archive.com/qemu-devel@nongnu.org/msg674105.html>
> >     https://www.mail-archive.com/qemu-devel@nongnu.org/msg674259.html
> >     <https://www.mail-archive.com/qemu-devel@nongnu.org/msg674259.html>
> >     and:
> >     https://www.mail-archive.com/qemu-devel@nongnu.org/msg676046.html
> >     <https://www.mail-archive.com/qemu-devel@nongnu.org/msg676046.html>
> >
> >     As we don't want a bad start with this architecture, remove them.
> >
> >
> > I agree with underlying motivation of your fixup.
> >
> > Still, the division of AVR cores into avr1, avr2, ... , xmega7 is here
> > to stay. The reason is that because such coding is a part of ELF header,
> > and this means they will stay forever (as they are approved by some kind
> > of ELF comitee, and are meant not to be ever changed in future).
>
> I am not removing anything ELF related. We don't have any machine using
> CPU avrtiny/avr1/avr2/avr25 so AFAIK I'm simply removing unreviewed dead
> code.
>

The portion of the code that classifies AVR cores is and should remain
as independent as possible of the machine-related code. In other
words, my point is that your fixup  is inadequate. We should not touch
the portion of the code that enumarates AVR core types, except to add
some TODO notes as noted during review. If one wants to remove "dead"
code as defined by you, one should leave just two AVR core types and
also eliminate at least half of "AVRFeatures", which is absurd.

There is much less intrusive solution to this, that will also provide
guarantee that we never emulate the code that we know has some issues,
or support for it is not completed yet.

You should read more carefully previous reviews, and you'll see that
Michael and I agreed that support for "avrtiny" cores will be provided
in some point in future, but this doesn't mean we should delete that
AVR type from the current code.

I hope I am clear enough to you now. :)

Regards,
Aleksandar

Patch
diff mbox series

diff --git a/target/avr/cpu.c b/target/avr/cpu.c
index 8a084c750f..b3d661142d 100644
--- a/target/avr/cpu.c
+++ b/target/avr/cpu.c
@@ -216,77 +216,6 @@  static void avr_cpu_class_init(ObjectClass *oc, void *data)
     cc->gdb_core_xml_file = "avr-cpu.xml";
 }
 
-/*
- * Setting features of AVR core type avr1
- * --------------------------------------
- *
- * This type of AVR core is present in the following AVR MCUs:
- *
- * at90s1200, attiny11, attiny12, attiny15, attiny28
- */
-static void avr_avr1_initfn(Object *obj)
-{
-    AVRCPU *cpu = AVR_CPU(obj);
-    CPUAVRState *env = &cpu->env;
-
-    set_avr_feature(env, AVR_FEATURE_LPM);
-    set_avr_feature(env, AVR_FEATURE_2_BYTE_SP);
-    set_avr_feature(env, AVR_FEATURE_2_BYTE_PC);
-}
-
-/*
- * Setting features of AVR core type avr2
- * --------------------------------------
- *
- * This type of AVR core is present in the following AVR MCUs:
- *
- * at90s2313, at90s2323, at90s2333, at90s2343, attiny22, attiny26, at90s4414,
- * at90s4433, at90s4434, at90s8515, at90c8534, at90s8535
- */
-static void avr_avr2_initfn(Object *obj)
-{
-    AVRCPU *cpu = AVR_CPU(obj);
-    CPUAVRState *env = &cpu->env;
-
-    set_avr_feature(env, AVR_FEATURE_LPM);
-    set_avr_feature(env, AVR_FEATURE_IJMP_ICALL);
-    set_avr_feature(env, AVR_FEATURE_ADIW_SBIW);
-    set_avr_feature(env, AVR_FEATURE_SRAM);
-    set_avr_feature(env, AVR_FEATURE_BREAK);
-
-    set_avr_feature(env, AVR_FEATURE_2_BYTE_PC);
-    set_avr_feature(env, AVR_FEATURE_2_BYTE_SP);
-}
-
-/*
- * Setting features of AVR core type avr25
- * --------------------------------------
- *
- * This type of AVR core is present in the following AVR MCUs:
- *
- * ata5272, ata6616c, attiny13, attiny13a, attiny2313, attiny2313a, attiny24,
- * attiny24a, attiny4313, attiny44, attiny44a, attiny441, attiny84, attiny84a,
- * attiny25, attiny45, attiny85, attiny261, attiny261a, attiny461, attiny461a,
- * attiny861, attiny861a, attiny43u, attiny87, attiny48, attiny88, attiny828,
- * attiny841, at86rf401
- */
-static void avr_avr25_initfn(Object *obj)
-{
-    AVRCPU *cpu = AVR_CPU(obj);
-    CPUAVRState *env = &cpu->env;
-
-    set_avr_feature(env, AVR_FEATURE_LPM);
-    set_avr_feature(env, AVR_FEATURE_IJMP_ICALL);
-    set_avr_feature(env, AVR_FEATURE_ADIW_SBIW);
-    set_avr_feature(env, AVR_FEATURE_SRAM);
-    set_avr_feature(env, AVR_FEATURE_BREAK);
-
-    set_avr_feature(env, AVR_FEATURE_2_BYTE_PC);
-    set_avr_feature(env, AVR_FEATURE_2_BYTE_SP);
-    set_avr_feature(env, AVR_FEATURE_LPMX);
-    set_avr_feature(env, AVR_FEATURE_MOVW);
-}
-
 /*
  * Setting features of AVR core type avr3
  * --------------------------------------
@@ -499,27 +428,6 @@  static void avr_avr6_initfn(Object *obj)
     set_avr_feature(env, AVR_FEATURE_MUL);
 }
 
-/*
- * Setting features of AVR core type avrtiny
- * --------------------------------------
- *
- * This type of AVR core is present in the following AVR MCUs:
- *
- * attiny4, attiny5, attiny9, attiny10, attiny20, attiny40
- */
-static void avr_avrtiny_initfn(Object *obj)
-{
-    AVRCPU *cpu = AVR_CPU(obj);
-    CPUAVRState *env = &cpu->env;
-
-    set_avr_feature(env, AVR_FEATURE_LPM);
-    set_avr_feature(env, AVR_FEATURE_IJMP_ICALL);
-    set_avr_feature(env, AVR_FEATURE_BREAK);
-
-    set_avr_feature(env, AVR_FEATURE_2_BYTE_PC);
-    set_avr_feature(env, AVR_FEATURE_1_BYTE_SP);
-}
-
 /*
  * Setting features of AVR core type xmega2
  * --------------------------------------
@@ -754,10 +662,6 @@  static const TypeInfo avr_cpu_type_info[] = {
         .class_init = avr_cpu_class_init,
         .abstract = true,
     },
-    DEFINE_AVR_CPU_TYPE("avrtiny", avr_avrtiny_initfn),
-    DEFINE_AVR_CPU_TYPE("avr1", avr_avr1_initfn),
-    DEFINE_AVR_CPU_TYPE("avr2", avr_avr2_initfn),
-    DEFINE_AVR_CPU_TYPE("avr25", avr_avr25_initfn),
     DEFINE_AVR_CPU_TYPE("avr3", avr_avr3_initfn),
     DEFINE_AVR_CPU_TYPE("avr31", avr_avr31_initfn),
     DEFINE_AVR_CPU_TYPE("avr35", avr_avr35_initfn),