dynamips icon indicating copy to clipboard operation
dynamips copied to clipboard

source of the microcode is unknown/missing

Open flaviojs opened this issue 12 years ago • 10 comments

I don't know the source of the microcode. The oldest dynamips source code I could find already has it in binary form.

flaviojs avatar Jun 25 '13 13:06 flaviojs

Looking at a random video about the show versioncommand, it is clear from the ROM: line that our microcode didn't come from a real router.

It also suggests that we don't have ROMmon, since it has the capability of changing the router image and therefore should be part of the microcode in real routers.

Our microcode appears to simply load&run the image.

flaviojs avatar Jun 26 '13 09:06 flaviojs

As far as I know, I've always seen Dynamips with a binary microcode.

grossmj avatar Jun 26 '13 17:06 grossmj

I don't know how any of the microcodes should be compiled, so this is the general plan:

  1. Choose possible cross compiler tuples and build the cross compilers (with crosstools-ng or similar)
  2. Make test "Hello World!" microcodes to test and compare them (back to 1 if they are not appropriate)
  3. Disassemble the current microcodes into compilable .s files
  4. Try to make .c files that generate compatible microcode

flaviojs avatar Oct 11 '13 15:10 flaviojs

Disassembled ppc32_microcode. There is circumstantial evidence that the original was not an assembly file: (at least not totally)

  • consistent stack handling
  • variable args in the fprintf-like function
  • how the switch statement was implemented in the syscall function
  • optimizations that reuse code of other sections of the switch
  • it seems to focus on compact representations instead of human-readable ones

flaviojs avatar Oct 13 '13 12:10 flaviojs

@flaviojs I don't know if this is of any use to you, but I found it a while back whilst digging around for the microcode. http://7200emu.hacki.at/viewtopic.php?t=4502&sid=e1fa8a4a98204d0f6eaee90275c29088

TwoWheelDev avatar Oct 17 '13 22:10 TwoWheelDev

Thanks, I also found that one. :wink: Unfortunately it's a dump of a disassembly effort and not compilable source code, so it just helped me confirm the microcode isn't copied and gave me a general idea of what it does.

Recently I made a few advances in the dev/microcode branch (third attempt), and was able to compile a ppc32_microcode replacement. :+1: Now I'm trying to migrate some of the assembly code to C.

flaviojs avatar Oct 17 '13 23:10 flaviojs

Work on this issue will be placed in this repository: https://github.com/flaviojs/dynamips-microcode

flaviojs avatar Mar 12 '14 16:03 flaviojs

Do you think it's based on (oddly written around the same time) as CILO, the linux loader for Cisco 3600/7200/1700 platforms?

All I can find left is this: http://git.bocc.de/git/gitweb.cgi?p=cilo.git;a=summary

neozeed avatar Sep 17 '15 17:09 neozeed

@flaviojs, have you had any progress on this since 2014?

andrewshadura avatar Mar 03 '19 13:03 andrewshadura

@andrewshadura unfortunately we haven't had any contact with @flaviojs for many years now.

grossmj avatar Mar 04 '19 07:03 grossmj