Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide more details about mips64_microcode/ppc32_microcode #75

Open
omadjoudj opened this issue Sep 10, 2016 · 4 comments
Open

Provide more details about mips64_microcode/ppc32_microcode #75

omadjoudj opened this issue Sep 10, 2016 · 4 comments

Comments

@omadjoudj
Copy link

omadjoudj commented Sep 10, 2016

Hi,

In order to package dynamips in Fedora, I'd like to know:

  • License of mips64_microcode/ppc32_microcode
  • Is there a way to built mips64_microcode/ppc32_microcode from source
@omadjoudj omadjoudj changed the title Provide more details about mips64_microcode Provide more details about mips64_microcode/ppc32_microcode Sep 10, 2016
@neozeed
Copy link

neozeed commented Nov 29, 2016

There was an effort to decompile, and recompile it here:

https://github.com/flaviojs/dynamips-microcode

I'll have to check, but I recall being able to re-build both with a cross assembler/linker. I was able to build the CILO (loader for Linux) on dyanmips and get it running on both PowerPC and MIPS.

The dynamips package was released GPL, but the microcode was always provided as a binary blob for some reason. The original dyanmips team seems to have simply evaporated.

@grossmj
Copy link
Member

grossmj commented Dec 7, 2016 via email

@neozeed
Copy link

neozeed commented Dec 15, 2016

Well this is far from extensive testing but I booted a PowerPC & MIPS 7200 IOS using the decompiled images on flaviojs's project.

mips64_microcode_dump.inc: rom2c$(BIN_EXT) mips64_microcode
	@./rom2c ..\microcode\mips64_test mips64_microcode_dump.inc 0xbfc00000

ppc32_microcode_dump.inc: rom2c$(BIN_EXT) ppc32_microcode
	@./rom2c ..\microcode\ppc32_test ppc32_microcode_dump.inc 0xfff00000

PowerPC:

D:\proj\dynamips-newest\dynamips-mingw-build1-github-0.2.16\merge\x>..\dynamips.exe -X -t npe-g2 ..\IOS\c7200p-a3jk91s-mz.122-31.SB13.bin
Cisco Router Simulation Platform (version 0.2.16-experimental(merge uppc smips)Build-1-x86/MinGW stable)
Copyright (c) 2005-2011 Christophe Fillot.
Build date: Dec 15 2016 02:48:13

Failed to load wpcap.dll
Its HIGHLY recommended you have a working WinPcap!

IOS image file: ..\IOS\c7200p-a3jk91s-mz.122-31.SB13.bin

vtty_term_init
CPU0: carved JIT exec zone of 64 Mb into 2048 pages of 32 Kb.
NVRAM is empty, setting config register to 0x2142
C7200 instance 'default' (id 0):
  VM Status  : 0
  RAM size   : 256 Mb
  IOMEM size : 0 Mb
  NVRAM size : 2048 Kb
  NPE model  : npe-g2
  Midplane   : vxr
  IOS image  : ..\IOS\c7200p-a3jk91s-mz.122-31.SB13.bin

Loading ELF file '..\IOS\c7200p-a3jk91s-mz.122-31.SB13.bin'...
ELF entry point: 0xa000

C7200P 'default': starting simulation (CPU0 IA=0xfff00100), JIT enabled.
ROMMON emulation microcode.

Launching IOS image at 0x0000a000...
Self decompressing the image : ######################################################################################################################################################################################################################################################################################################################## [OK]

              Restricted Rights Legend

Use, duplication, or disclosure by the Government is
subject to restrictions as set forth in subparagraph
(c) of the Commercial Computer Software - Restricted
Rights clause at FAR sec. 52.227-19 and subparagraph
(c) (1) (ii) of the Rights in Technical Data and Computer
Software clause at DFARS sec. 252.227-7013.

           cisco Systems, Inc.
           170 West Tasman Drive
           San Jose, California 95134-1706



Cisco IOS Software, 7200 Software (C7200P-A3JK91S-M), Version 12.2(31)SB13, RELEASE SOFTWARE (fc1)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2008 by Cisco Systems, Inc.
Compiled Thu 21-Aug-08 12:27 by pwade
Image text-base: 0x0000A3B0, data-base: 0x02822000


This product contains cryptographic features and is subject to United
States and local country laws governing import, export, transfer and
use. Delivery of Cisco cryptographic products does not imply
third-party authority to import, export, distribute or use encryption.
Importers, exporters, distributors and users are responsible for
compliance with U.S. and local country laws. By using this product you
agree to comply with applicable laws and regulations. If you are unable
to comply with U.S. and local laws, return this product immediately.

A summary of U.S. laws governing Cisco cryptographic products may be found at:
http://www.cisco.com/wwl/export/crypto/tool/stqrg.html

If you require further assistance please contact us by sending email to
export@cisco.com.

Cisco 7206VXR (NPE-G2) processor (revision B) with 229376K/16384K bytes of memory.
Processor board ID 4279256517
MPC7448 CPU at 1916Mhz, Implementation 0, Rev 2.1
6 slot VXR midplane, Version 2.1

Last reset from power-on

PCI bus mb1 (Slots 1, 3 and 5) has a capacity of 600 bandwidth points.
Current configuration on bus mb1 has a total of 0 bandwidth points.
This configuration is within the PCI bus capacity and is supported.

PCI bus mb2 (Slots 2, 4 and 6) has a capacity of 600 bandwidth points.
Current configuration on bus mb2 has a total of 0 bandwidth points.
This configuration is within the PCI bus capacity and is supported.

Please refer to the following document "Cisco 7200 Series Port Adaptor
Hardware Configuration Guidelines" on Cisco.com <http://www.cisco.com>
for c7200 bandwidth points oversubscription and usage guidelines.


3 Gigabit Ethernet interfaces
2045K bytes of NVRAM.

65536K bytes of Flash internal SIMM (Sector size 256K).

         --- System Configuration Dialog ---

Would you like to enter the initial configuration dialog? [yes/no]:

MIPS64

D:\proj\dynamips-newest\dynamips-mingw-build1-github-0.2.16\merge\x>..\dynamips.exe -X -t npe-400 c:\Users\jason\Downloads\e9c82-c7200-adventerprisek9-mz.152-4.s7.bin
Cisco Router Simulation Platform (version 0.2.16-experimental(merge uppc smips)Build-1-x86/MinGW stable)
Copyright (c) 2005-2011 Christophe Fillot.
Build date: Dec 15 2016 02:48:13

Failed to load wpcap.dll
Its HIGHLY recommended you have a working WinPcap!

IOS image file: c:\Users\jason\Downloads\e9c82-c7200-adventerprisek9-mz.152-4.s7.bin

vtty_term_init
CPU0: carved JIT exec zone of 64 Mb into 2048 pages of 32 Kb.
NVRAM is empty, setting config register to 0x2142
C7200 instance 'default' (id 0):
  VM Status  : 0
  RAM size   : 256 Mb
  IOMEM size : 0 Mb
  NVRAM size : 128 Kb
  NPE model  : npe-400
  Midplane   : vxr
  IOS image  : c:\Users\jason\Downloads\e9c82-c7200-adventerprisek9-mz.152-4.s7.bin

Loading ELF file 'c:\Users\jason\Downloads\e9c82-c7200-adventerprisek9-mz.152-4.s7.bin'...
ELF entry point: 0x80008000

C7200 'default': starting simulation (CPU0 PC=0xffffffffbfc00000), JIT enabled.
ROMMON emulation microcode.

Launching IOS image at 0x80008000...
Self decompressing the image : ############################################################################################################################################################################################################################################################################################################################################################################################################################################# [OK]

              Restricted Rights Legend

Use, duplication, or disclosure by the Government is
subject to restrictions as set forth in subparagraph
(c) of the Commercial Computer Software - Restricted
Rights clause at FAR sec. 52.227-19 and subparagraph
(c) (1) (ii) of the Rights in Technical Data and Computer
Software clause at DFARS sec. 252.227-7013.

           cisco Systems, Inc.
           170 West Tasman Drive
           San Jose, California 95134-1706



Cisco IOS Software, 7200 Software (C7200-ADVENTERPRISEK9-M), Version 15.2(4)S7, RELEASE SOFTWARE (fc4)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2015 by Cisco Systems, Inc.
Compiled Wed 01-Apr-15 20:30 by prod_rel_team


This product contains cryptographic features and is subject to United
States and local country laws governing import, export, transfer and
use. Delivery of Cisco cryptographic products does not imply
third-party authority to import, export, distribute or use encryption.
Importers, exporters, distributors and users are responsible for
compliance with U.S. and local country laws. By using this product you
agree to comply with applicable laws and regulations. If you are unable
to comply with U.S. and local laws, return this product immediately.

A summary of U.S. laws governing Cisco cryptographic products may be found at:
http://www.cisco.com/wwl/export/crypto/tool/stqrg.html

If you require further assistance please contact us by sending email to
export@cisco.com.

Cisco 7206VXR (NPE400) processor (revision A) with 245760K/16384K bytes of memory.
Processor board ID 4279256517
R7000 CPU at 150MHz, Implementation 39, Rev 2.1, 256KB L2, 512KB L3 Cache
6 slot VXR midplane, Version 2.1

Last reset from power-on

PCI bus mb0_mb1 (Slots 0, 1, 3 and 5) has a capacity of 600 bandwidth points.
Current configuration on bus mb0_mb1 has a total of 200 bandwidth points.
This configuration is within the PCI bus capacity and is supported.

PCI bus mb2 (Slots 2, 4, 6) has a capacity of 600 bandwidth points.
Current configuration on bus mb2 has a total of 0 bandwidth points
This configuration is within the PCI bus capacity and is supported.

Please refer to the following document "Cisco 7200 Series Port Adaptor
Hardware Configuration Guidelines" on Cisco.com <http://www.cisco.com>
for c7200 bandwidth points oversubscription and usage guidelines.


1 FastEthernet interface
125K bytes of NVRAM.

65536K bytes of ATA PCMCIA card at slot 0 (Sector size 512 bytes).
8192K bytes of Flash internal SIMM (Sector size 256K).

         --- System Configuration Dialog ---

Would you like to enter the initial configuration dialog? [yes/no]:

And the versions of what cross assemblers I'm using is:

D:\proj\dynamips-newest\dynamips-mingw-build1-github-0.2.16\microcode>mips64-elf-as.exe -v
GNU assembler version 2.18 (mips64-elf) using BFD version (GNU Binutils) 2.18
D:\proj\dynamips-newest\dynamips-mingw-build1-github-0.2.16\microcode>ppc-elf-as.exe -v
GNU assembler version 2.18 (ppc-elf) using BFD version (GNU Binutils) 2.18

I pretty much did nothing, just point the dynamips makefile's rom2c to point to the flaviojs stuff.

@neozeed
Copy link

neozeed commented Dec 15, 2016

Oh yeah, for my binutils I had to alter the ppc32_test.lds to look like this:

D:\proj\dynamips-newest\dynamips-mingw-build1-github-0.2.16\microcode>type ppc32_test.lds
SECTIONS {
        .text 0xfff00000 : { *(.text) }
        .rodata : { *(.rodata) }
        .data 0xfff043b8 : { *(.data) }
        .bss 0x00004000 : { *(.bss)  *(COMMON) }
}

As my LD didn't like the format it was in, although I had no issues with the MIPS code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants