Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 11 Dec 2009 21:27:26 +0700
From:      Yohanes Nugroho <yohanes@gmail.com>
To:        freebsd-arm@freebsd.org
Subject:   CNS11XX FreeBSD port completed
Message-ID:  <260bb65e0912110627o6b67b399vabaae57477b91023@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
--0016e64c388a474465047a74ba3d
Content-Type: text/plain; charset=UTF-8

Hi,

Today I have "completed" the CNS11XX (Cavium Econa ARM formerly known
as StarSemi STR9104) FreeBSD ARM Port. By "complete" I mean I have
written all the drivers (usb, network, and flash). I haven't checked
the correctness of the implementation. The device is a network
attached storage, Emprex NSD-100, sent to me by Bruce Simpson.

This is my first FreeBSD port, so I think there will be mistakes on my
code. So I am requesting anyone who have time to have a look at the
code, or if you have the same device, may be you can try it. You will
need to solder a serial port to the device to try it.

>From the usability point of view, the port is usable. I can put the
FreeBSD kernel to the flash, and boot it from there with the root
filesystem on a USB disk (the boot loader also supports booting from
tftp, and during the development I boot using tftp). The device can
enter multi user mode, and I can ssh/ftp to the device, and compile
some things on the device itself.

The only problem left (at least what is visible from user space) is
the slow network speed (2 megabyte per second, while the linux version
is around 3.8 megabyte per second). Pyun YongHyeon have helped me a
lot with the network driver (I am currently asking him to have a final
look at the driver). I have tried following all of his suggestions to
make a better (more correct driver), and I suspect the problem is not
on the network driver itself.

I am suspecting that the problem is in pmap. There has been several
pmap related problems lately (see
http://lists.freebsd.org/pipermail/freebsd-arm/2009-October/002030.html).
It is also possible that the pmap code is now fine, and I have made
errors when porting the NetBSD CPU code for FA526 to FreeBSD.

If I compile my current code with the latest code from HEAD, and
activated WITNESS and DIAGNOSTIC i will get the error at err-1.txt,
and  If I activated WITNESS, DIAGNOSTIC and INVARIANT i got this the
message in err-2.txt. With the same options I didn't get this error
several months ago .

My code is available at

http://p4db.freebsd.org/depotTreeBrowser.cgi?FSPC=//depot/projects/str91xx/src/sys/arm/econa&HIDEDEL=NO

plus additional code from to support FA526 CPU adapted from NetBSD:

http://p4db.freebsd.org/fileLogView.cgi?FSPC=//depot/projects/str91xx/src/sys/arm/arm/cpufunc_asm_fa526.S
http://p4db.freebsd.org/fileViewer.cgi?FSPC=//depot/projects/str91xx/src/sys/arm/arm/cpufunc.c

Instruction to compile, and write to flash using dd to cfi0 is available at:

http://tinyhack.com/2009/09/28/cnx11xxstr91xx-freebsd-progress/
http://tinyhack.com/2009/12/11/cns11xx-freebsd-port-completed/

-- 
Regards
Yohanes
http://yohan.es/

--0016e64c388a474465047a74ba3d
Content-Type: text/plain; charset=US-ASCII; name="err-1.txt"
Content-Disposition: attachment; filename="err-1.txt"
Content-Transfer-Encoding: base64
X-Attachment-Id: f_g331t0pq0

LS0tLS0tCnN0YXJ0X2luaXQ6IHRyeWluZyAvc2Jpbi9pbml0CmxvY2sgb3JkZXIgcmV2ZXJzYWw6
CiAxc3QgMHhjMTllMDBiMCBwbWFwIChwbWFwKSBAIGFybS9hcm0vcG1hcC5jOjkyOQogMm5kIDB4
YzE0MGE2YzAgdm0gcGFnZSBxdWV1ZSBtdXRleCAodm0gcGFnZSBxdWV1ZSBtdXRleCkgQCBhcm0v
YXJtL3BtYXAuYzoxNjU2CktEQjogc3RhY2sgYmFja3RyYWNlOgpfZW5kKCkgYXQgMHhlM2UwMTAw
MApzY3A9MHhlM2UwMTAwMCBybHY9MHhlNTliMDAwMCAoMHhlNTliMDAwMCkKCXJzcD0weGUyNGNi
MDA0IHJmcD0weGU5MmRkODAwbG9jayBvcmRlciByZXZlcnNhbDoKIDFzdCAweGMxOWUwMGIwIHBt
YXAgKHBtYXApIEAgYXJtL2FybS9wbWFwLmM6MTkxNgogMm5kIDB4YzE0YTQwNWMgc3lzdGVtIG1h
cCAoc3lzdGVtIG1hcCkgQCB2bS92bV9tYXAuYzozNTMyCktEQjogc3RhY2sgYmFja3RyYWNlOgpf
ZW5kKCkgYXQgMHhlM2UwMTAwMApzY3A9MHhlM2UwMTAwMCBybHY9MHhlNTliMDAwMCAoMHhlNTli
MDAwMCkKCXJzcD0weGUyNGNiMDA0IHJmcD0weGU5MmRkODAwCnZtX2ZhdWx0KDB4YzE0YTQwMDAs
IGUzZTAwMDAwLCAxLCAwKSAtPiAxCkZhdGFsIGtlcm5lbCBtb2RlIGRhdGEgYWJvcnQ6ICdUcmFu
c2xhdGlvbiBGYXVsdCAoUyknCnRyYXBmcmFtZTogMHhjNjc5MzJkNApGU1I9MDAwMDAwMDUsIEZB
Uj1lM2UwMGZmNCwgc3Bzcj02MDAwMDAxMwpyMCA9MDAwMDAwMWUsIHIxID0wMDAwMDAwMCwgcjIg
PTAwMDAwMDAwLCByMyA9MDAwMDAwMDAKcjQgPWUzZTAxMDAwLCByNSA9YzExZjIxZjAsIHI2ID1m
ZmZmZmZmZiwgcjcgPWMxOTljMTEwCnI4ID1mZmZmZmZmZSwgcjkgPWZmZmZmZmY0LCByMTA9YzEx
ZjIxZTQsIHIxMT1jNjc5MzM1OApyMTI9MDAwMDAwMDAsIHNzcD1jNjc5MzMyMCwgc2xyPWMxMjAx
NjU4LCBwYyA9YzExZjIwYzgKClt0aHJlYWQgcGlkIDEgdGlkIDEwMDAwMSBdClN0b3BwZWQgYXQg
ICAgICBkYl9tZF9zZXRfd2F0Y2hwb2ludCsweGI4OiAgICAgIGxkciAgICAgcjcsIFtyOSwgcjRd
CmRiPiAKLS0tLS0tCgo=
--0016e64c388a474465047a74ba3d
Content-Type: text/plain; charset=US-ASCII; name="err-2.txt"
Content-Disposition: attachment; filename="err-2.txt"
Content-Transfer-Encoding: base64
X-Attachment-Id: f_g331t4n11

dWdlbjAuMTogPENhdml1bT4gYXQgdXNidXMwCnVodWIwOiA8Q2F2aXVtIE9IQ0kgcm9vdCBIVUIs
IGNsYXNzIDkvMCwgcmV2IDEuMDAvMS4wMCwgYWRkciAxPiBvbiB1c2J1czAKdWdlbjEuMTogPENh
dml1bT4gYXQgdXNidXMxCnVodWIxOiA8Q2F2aXVtIEVIQ0kgcm9vdCBIVUIsIGNsYXNzIDkvMCwg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wMWUsIHIxID0wMDAw
MDAwMCwgcjIgPTAwMDAwMDAwLCByMyA9MDAwMDAwMDAKcjQgPWUzZTAxMDAwLCByNSA9YzEyMWE5
MmMsIHI2ID1jMTlkMzExMCwgcjcgPWZmZmZmZmZmCnI4ID1mZmZmZmZmZSwgcjkgPWZmZmZmZmY0
LCByMTA9YzEyMWE5MjAsIHIxMT1jNmMxOTJmNApyMTI9MDAwMDAwMDAsIHNzcD1jNmMxOTJiYywg
c2xyPWMxMjJhODMwLCBwYyA9YzEyMWE4MDQKClt0aHJlYWQgcGlkIDEzIHRpZCAxMDAwMjcgXQpT
dG9wcGVkIGF0ICAgICAgZGJfbWRfc2V0X3dhdGNocG9pbnQrMHhiODpwYW5pYzogX210eF9sb2Nr
X3NsZWVwOiByZWN1cnNlZCBvbiBub24tcmVjdXJzaXZlIG11dGV4IHBtYXAgQCAuLi8uLi8uLi9h
cm0vYXJtL3BtYXAuYzozNzE5CgpVcHRpbWU6IDNzCkNhbm5vdCBkdW1wLiBEZXZpY2Ugbm90IGRl
ZmluZWQgb3IgdW5hdmFpbGFibGUuCkF1dG9tYXRpYyByZWJvb3QgaW4gMTUgc2Vjb25kcyAtIHBy
ZXNzIGEga2V5IG9uIHRoZSBjb25zb2xlIHRvIGFib3J0Cgo=
--0016e64c388a474465047a74ba3d--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?260bb65e0912110627o6b67b399vabaae57477b91023>