1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

xscaleの道

Last updated at Posted at 2022-11-27

Planexの昔のルーター(BRC-14VG)でxscaleのixp422を使ったものがあります。

xscaleとはIntelが作っていたarmチップです。

今の人にしてみるとなんのこっちゃですが、そういう時期もありました。

xscaleシリーズはi80xxx -> pax2x0 -> ipx4xxのように製品化されていてipxは最後の世代になります。

ipx4xxシリーズはixp425が最初の製品でその後ixp422やixp420が作られたようです。ipx45x,ipx46xという製品もあったようです。

ターゲットはixp422でixpシリーズでも後期の製品で使用されてる部品から2005年くらいの製造のようです。

xscaleはarmでは珍しくビッグエンディアンで使われることが多かったようです。

/*
 * 
 * IXP425 Memory map:
 *
 * Phy          Phy Size        Map Size        Virt            Description
 * =========================================================================
 *
 * 0x00000000   0x10000000                                      SDRAM 1 
 *
 * 0x10000000   0x10000000                                      SDRAM 2
 *
 * 0x20000000   0x10000000                                      SDRAM 3
 *
 * 0x30000000   0x10000000                                      SDRAM 4 
 *
 * The above four are aliases to the same memory location  (0x00000000)
 *
 * 0x48000000    0x4000000                                      PCI Memory
 *
 * 0x50000000   0x10000000                      Not Mapped      EXP BUS
 *
 * 0x6000000    0x00004000          0x4000      0xFFFEB000      QMgr
 *
 * 0xC0000000        0x100          0x1000      0xFFFDD000      PCI CFG 
 *
 * 0xC4000000        0x100          0x1000      0xFFFDE000      EXP CFG 
 *
 * 0xC8000000       0xC000          0xC000      0xFFFDF000      PERIPHERAL
 *
 * 0xCC000000        0x100          0x1000      Not Mapped      SDRAM CFG 
 */

flashは0x50000000にあって、起動時にはここが0x00000000として見えて、起動後に以下のようにして切り替えているようです。

hal_platform_setup.h
                
        // value to load into pc to jump to real runtime address
        ldr     r0, =1f

        // Setup EXP_CNFG0 value to switch EXP bus out of low memory
        ldr     r2, =IXP425_EXP_CFG_BASE
        ldr     r1, [r2, #IXP425_EXP_CNFG0]
        bic     r1, r1, #EXP_CNFG0_MEM_MAP

        b       icache_boundary
        .p2align 5
icache_boundary:
        // Here is where we switch from boot address (0x000000000) to the
        // actual flash runtime address. We align to cache boundary so we
        // execute from cache during the switchover. Cachelines are 8 words.
        str     r1, [r2, #IXP425_EXP_CNFG0]    // make the EXP bus switch
        nop
        nop
        nop
        nop
        mov     pc, r0
        nop
                            // display FFFF and loop forever.
    0:  b       0b
    1:

5年ほど前にハードオフで324円で手に入れたターゲットがあるのですが、POWER SWが壊れたので直結にしました。ネットで同じように壊れている方をみかけたので、ひどく粗悪な部品だったようです。

LinksysのWRV54GやGemtekのGTW5715やNETGEARのWG302もIXP425を使っているようです。LinksysのNSLU2というNASもIXP420だったようです。

シリアルは115200で端子はV,T,R,Gです。

image.png

パーツ 機能
TE28F128 Flash 16MByte
W982516CH-75x2 SDRAM 32MBytex2
VT6202(裏) PIC USB 2.0
AC101LKQT Ethernet PHY
KS8995? Ethernet Switch
93C66 EEPROM(Switch config?)
93C46(裏) ?
? IR-DAモジュール
HSDL-7001 赤外線デコーダー
CY2305 クロックバッファ

いっぱい発信器がついています。

周波数 パーツ 用途
24.000 USB(PCI)
3.686 OSC3 IR-DA
33.000 OSC1 PCI
33.333 OSC2 SOC
25.000 OSC4 Ether Switch

ファームはブートローダーも含めてOpenRGというものが使われています。

Uncompressing Linux......................................... done, booting the kernel.
Press ESC to enter BOOT MENU mode.
RGLoader 2.6.14
Booting an active image in 3 seconds
Boot aborted
OpenRG boot>

NetBSDにはevbarm/conf/IXDP425というipx422の前のモデルのixp425のターゲットがあるので動かせないか調べてみたいと思っています。

bootはOpenRDのブートが使えればそのままにしたいと思っています。

u-bootにもixpのサポートがありますが、flashが古そうなので、焼けないとかあるかもなので、u-boot焼き直しは考えないほうが良いきがします。

と思ったのですが、u-bootにはixpのビルド設定がありますが、製品では使われていなく、製品で使われていたのはOpenRGのbootかRedbootのようです。

OpenRG boot> help
ps:  Print main-task tasks
rg_conf_print:  rg_conf_print <root> - Print OpenRG configuration
     starting from <root> - use / for the whole configuration
rg_conf_set:    rg_conf_set <path> <value> - Set rg_conf path to a value
rg_conf_set_obscure:    rg_conf_set_obscure <path> <value> - Set rg_conf path to an obscured value
rg_conf_del:    rg_conf_del <path> - Del subtree path from rg_conf
reconf: reconf <flash_delay 1(=NOW) to 4> - Reconfigure the 
     system according to the current rg_conf
entity_close:   entity_close <entity ptr> - Close an entity
host:   host <name> - Resolve host by name
flash_commit:   Save configuration to flash
restore_default:        restore_defaults [-d] - Restore default configuration
     (use -d to avoid rebooting after)
reboot: Reboot the system
log_lev_on:     log_lev_on <severity> - redirect rg_error output from severity
     equal or higher to <sevrerity> to the current cli
log_lev_off:    Stop rg_error redirection to the current cli
cat: Print file contents on console
shell:  Spawn busybox shell in foreground
flash_layout:   Prints the flash layout and content
flash_erase:    flash_erase [-d] <section> - erases a given section in the flash
flash_dump:     flash_dump [-s <section> | -r <address>] [-l <length>] [-1|2|4] - dumps the flash content
bset:   Configure bootloader
ifconfig:       Configure network interface
ping:   Test network connectivity
boot:   boot -g {-s <section> | -r <address>} - Boot the system (-g boot with kgdb)
load:   load -u <url> {-s <section> | -r <address>} - Load and burn image
help:   Print this menu
vlan_add:       Add VLAN interface
etask_list_dump:        Dump back trace of all etasks
Returned 0
OpenRG boot> flash_layout
Flash layout:

Section 00 Type BOOT       Range 0x00000000-0x00100000 MaxSize 0x00100000
     No more information.

Section 01 Type IMAGE      Range 0x00100000-0x00F80000 MaxSize 0x00E7FF6C
     Size 0x00746880 Name 'Image downloaded from: tftp://192.168.1.10/openrg.img'
     Checksum 0x3C146897 Counter 0x00000019 Start Offset 0x00000000

Section 02 Type FLASH_SECT_BOOTCONF Range 0x00F80000-0x00FA0000 MaxSize 0x0001FF6C
     Size 0x00000318 Name 'rg_conf'
     Checksum 0x0001833C Counter 0x0000C69B Start Offset 0x00000000

Section 03 Type FLASH_SECT_CONF Range 0x00FA0000-0x00FC0000 MaxSize 0x0001FF6C
     Size 0x0000234B Name 'rg_conf'
     Checksum 0x0011F971 Counter 0x0000C697 Start Offset 0x00000000

Section 04 Type FLASH_SECT_CONF Range 0x00FC0000-0x00FE0000 MaxSize 0x0001FF6C
     Size 0x000021C0 Name 'rg_conf'
     Checksum 0x0010CB45 Counter 0x0000C470 Start Offset 0x00000000

Section 05 Type FACTORY    Range 0x00FE0000-0x01000000 MaxSize 0x0001FF6C
     Size 0x000000D9 Name 'Image downloaded from: tftp://192.168.3.110/rg_factory'
     Checksum 0x00004A87 Counter 0x00000022 Start Offset 0x00000000

Total 6 sections found.
Returned 0
OpenRG boot> flash_dump -s 1 -l 0x200 
00100000: fe ed ba be 00 74 68 80  3c 14 68 97 00 00 00 19  |.....th.<.h.....|
00100010: 00 00 00 00 49 6d 61 67  65 20 64 6f 77 6e 6c 6f  |....Image downlo|
00100020: 61 64 65 64 20 66 72 6f  6d 3a 20 74 66 74 70 3a  |aded from: tftp:|
00100030: 2f 2f 31 39 32 2e 31 36  38 2e 31 2e 31 30 2f 6f  |//192.168.1.10/o|
00100040: 70 65 6e 72 67 2e 69 6d  67 00 00 00 00 00 00 00  |penrg.img.......|
00100050: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00100060: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00100070: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00100080: 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00100090: 00 00 00 00 e2 8f a0 08  e5 9f b0 04 e0 4a b0 0b  |.............J..|
001000a0: ea 1d 1a 0b 00 00 00 10  e1 a0 00 00 e1 a0 00 00  |................|
001000b0: e1 a0 00 00 e1 a0 00 00  e1 a0 00 00 e1 a0 00 00  |................|
001000c0: e1 a0 00 00 e1 a0 00 00  ea 00 00 02 01 6f 28 18  |.............o(.|
001000d0: 00 a0 00 00 01 14 68 18  e1 a0 70 01 e3 a0 80 00  |......h...p.....|
001000e0: e1 0f 20 00 e3 12 00 03  1a 00 00 01 e3 a0 00 17  |.. .............|
001000f0: ef 12 34 56 e1 0f 20 00  e3 82 20 c0 e1 21 f0 02  |..4V.. ... ..!..|
00100100: e3 cf 20 1f e2 82 38 01  e4 92 00 20 e1 32 00 03  |.. ...8.... .2..|
00100110: 1a ff ff fc ee 07 0f 9a  ee 07 0f 17 ee 11 0f 10  |................|
00100120: e3 c0 00 05 e3 c0 0a 01  ee 01 0f 10 ee 11 0f 10  |................|
00100130: e3 80 00 80 ee 01 0f 10  00 00 00 00 00 00 00 00  |................|
00100140: 00 00 00 00 00 00 00 00  e2 8f 00 cc e8 90 30 7e  |..............0~|
00100150: e0 50 00 01 e3 30 00 00  0a 00 00 0a e0 85 50 00  |.P...0........P.|
00100160: e0 86 60 00 e0 8c c0 00  e0 82 20 00 e0 83 30 00  |..`....... ...0.|
00100170: e0 8d d0 00 e5 96 10 00  e0 81 10 00 e4 86 10 04  |................|
00100180: e1 56 00 0c 3a ff ff fa  e3 a0 00 00 e4 82 00 04  |.V..:...........|
00100190: e4 82 00 04 e4 82 00 04  e4 82 00 04 e1 52 00 03  |.............R..|
001001a0: 3a ff ff f9 eb 00 00 27  e1 a0 10 0d e2 8d 28 01  |:......'......(.|
001001b0: e1 54 00 02 2a 00 00 14  e2 84 05 01 e1 50 00 05  |.T..*........P..|
001001c0: 9a 00 00 11 e1 a0 50 02  e1 a0 00 05 e1 a0 30 07  |......P.......0.|
001001d0: eb 00 09 9b e2 80 00 7f  e3 c0 00 7f e0 85 10 00  |................|
001001e0: e2 8f 2d 05 e5 9f 30 50  e0 82 30 03 e8 b2 3f 00  |..-...0P..0...?.|
001001f0: e8 a1 3f 00 e8 b2 3f 00  e8 a1 3f 00 e1 52 00 03  |..?...?...?..R..|
Returned 0

いろいろなサイトが無くなっていますが、以下は現在でも見れます。

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?