Riscyforth: the work goes on


So after my last post somebody give me a “very poor” vote – I am consoling myself with the idea that was because they are really very keen for an assembly-based Forth to run on their RISC-V SBC and not because they thought it was an incoherent ramble.

In any case I have continued to work on Riscyforth – adding to its functionality and edging closer all the time to matching the Forth standard – getting close enough now to describe it as “Forth” and not just “Forth-like”.

Eight months ago, when I started, reading an online copy of “Threaded Interpretive Languages” which promised you could write your own TIL in a few weeks, I never considered using anything other than assembly to write it – just because I’m so old I thought that’s was the whole point of Forth – an interpreted language but written in machine code for speed.

I’ve learnt a lot on the way: including not to believe you can get from scratch to writing a working language in a few weeks – especially not in the world of virtual memory. Though I dare say, in the extremely unlikely event of someone commissioning me to write them a Forth from the ground up, I wouldn’t take eight months to get this far either next time.

One thing I have definitely learnt is the power and importance of unit testing – it matters quite a lot when you are putting together something on your own and can often make one assumption too many – a decent unit test soon clears you of that misapprehension.

What I haven’t got includes any users (never mind co-developers) or any useful or interesting programs.

On the former, RISC-V single board computers (SBCs) were promised to be widely available just about now, but the cancelling of the Beagle V project means that the more expensive Nezha is all that’s out there for now (I have one and it’s what is running in the image above). Compared to the ultra-cheap ARM boards (or even the high-end examples like some of the Raspberry Pi SBC kits) it’s fair to say RISC-V is not yet at the races, and the only users are likely to be people like me – hoping and waiting for the revolution to get here.

I picked Forth because the hope was it would give the first generation of RISC-V SBC hackers an easy way to get at their hardware and that is still the case, but there has to be some hardware to get at.

So I still have the sense I am working away on something that nobody else might ever want to use (the fact that it’s written in assembly also makes it fundamentally non-portable – I just cannot say ‘oh well let’s switch to the Raspberry Pi’!).

But if you are interested, current features of Riscyforth include:

  • Support for deeply nested loops and conditionals
  • Write your own words using : and ; (ie it is easy to extend the language by writing secondary words out of the existing primary words)
  • A custom memory allocator for arbitrary blocks of memory
  • Support for VARIABLE and CONSTANT
  • All (or almost all?) the stack operations you would expect
  • Hex, octal, decimal and binary support

The main thing currently missing is support for CREATE and a data space, but now I’ve grappled with the memory allocator (for general memory allocation) I will move on that. The listing of the test file might give you some ideas of what’s there, but even that is now behind where the code base is (yes, I know this isn’t how test-based development is meant to work!)

\ Unit tests


\ Stack operations tests

: testOVER2
." Testing OVER2 " 5 SPACES
10 30 50 90 70 OVER2
50 = SWAP 30 = AND IF ." OVER2 passed " else ." OVER2 FAILED " then cr
;

: testDrop2
." Testing DROP2 " 5 spaces
99 2 3 4
drop2
2 = if ." DROP2 passed " else ." DROP2 FAILED " then cr
;

: testSquare
." Testing SQUARE " 5 spaces
7 square
49 = if ." SQUARE passed " else ." SQUARE FAILED " then cr
;

: testCube
." Testing CUBE " 5 spaces
5 cube
125 = if ." CUBE passed " else ." CUBE FAILED " then 5 spaces
3 cube
28 = if ." CUBE FAILED " else ." CUBE passed " then cr
;

: testNIP2
." Testing NIP2 " 5 spaces
10 20 30 40 50 NIP2
50 = SWAP 40 = AND SWAP 10 = AND if ." NIP2 passed " else ." NIP2 FAILED " then cr 
;

: testDUP2
." Testing DUP2 " 5 SPACES
900 800 700 DUP2
700 = SWAP 800 = AND SWAP 700 = AND SWAP 800 = AND if ." DUP2 passed" else ." DUP2 FAILED " then cr
;

: testtuck2
." Testing TUCK2 " 5 spaces
1 2 3 4 5 6 TUCK2
6 = swap 5 = and swap 4 = and swap 3 = and swap 6 = and swap 5 = and if ." TUCK2 passed" else ." TUCK2 FAILED " then cr
;

: testswap2
." Testing SWAP2 " 5 spaces
1 2 3 4 5 6 7 8 SWAP2
6 = swap 5 = and swap 8 = and if ." SWAP2 passed " else ." SWAP2 FAILED " then cr
;

: testrot2
." Testing ROT2 " 5 spaces
99 2 3 4 5 6 ROT2
2 = swap 99 = and swap 6 = and if ." ROT2 passed " else ." ROT2 FAILED " then cr
;

: TESTDUP
." Testing DUP " 5 spaces
34 45 DUP
45 = SWAP 45 = AND swap 34 = AND IF ." DUP passed " else ." DUP FAILED " then cr ;

: TESTBL
." Testing BL" 5 spaces BL 32 = if ." BL passed " else ." BL FAILED " then cr ;

: TESTDEPTH
." Testing DEPTH" 5 spaces
depth dup 0 < IF ." WARNING: Stack in negative territory " THEN 10 20 rot depth swap - 3 = IF ." DEPTH passed " ELSE ." DEPTH FAILED " then cr ;

: TESTINVERT
." Testing INVERT " 5 spaces
-1 INVERT IF ." INVERT FAILED " ELSE hex 0xF0F0F0F00F0F0F35 INVERT 0xF0F0F0FF0F0F0CA = IF ." INVERT passed " ELSE ." INVERT FAILED " then then decimal cr ;

\ Basic tests

: VERIFYTYPEPROMPT
." Verifying TYPEPROMPT " cr
TYPEPROMPT cr
;

: VERIFYGETNEXTLINE_IMM
." Verifying GETNEXTLINE_IMM - please press RETURN only " cr
GETNEXTLINE_IMM cr
;

: VERIFYOK
." Verifying OK " cr
OK cr
;

: VERIFYTOKENIZE_IMM
." Verifying TOKENIZE_IMM " cr
TOKENIZE_IMM
;

: VERIFYSEARCH
." Verifying SEARCH " cr
SEARCH
;

: TESTHEX
." Testing HEX " 5 SPACES
HEX 0x10 0xFF + DUP
0x10F = IF ." HEX passed with output 0x10F = " . ELSE ." HEX FAILED with output 0x10F =  " . then cr
\ ensure other tests keep testdup2
DECIMAL
;

: TESTDECIMAL
." Testing DECIMAL " 5 SPACES
DECIMAL 20 DUP
20 = IF ." DECIMAL passed wth output 20 = " DUP . ." = " HEX . DECIMAL ELSE ." DECIMAL FAILED with output 20 = " DUP . ." = " HEX . DECIMAL THEN CR
;

: TESTOCTAL 
." Testing OCTAL " 5 SPACES OCTAL 20 DUP DECIMAL 16 = IF ." OCTAL passed with output 20o = " DUP OCTAL . ." = " DECIMAL .
ELSE ." OCTAL FAILED with 20o = " DUP OCTAL . ." = " DECIMAL . THEN CR ;

: VERIFYBINARY 
." Verifying BINARY  - " 1 2 4 8 16 32 64 128 256 512
BINARY ." powers of 2 from 9 to 0 in binary... " cr
. cr . cr . cr . cr . cr . cr . cr . cr . cr . cr DECIMAL ;

: VERIFYDOT
." Verifying DOT " 5 spaces 0 1 2 3 4 5
." ... should see countdown from 5 to 0: " . . . . . . CR ;

: TESTADD
." Testing ADD " 5 SPACES 900 -899 +
IF ." ADD passed " ELSE ." ADD FAILED " THEN CR ;

: testMUL
." Testing MUL " 5 spaces
5 5 5 * *
5 cube
= if ." MUL passed " else ." MUL FAILED " then cr
;

: TESTDIV
." Testing DIV " 5 SPACES 99 11 / 101 11 / * 81 =
IF ." DIV passed " else ." DIV FAILED " then cr ;

: TESTSUB
." Testing SUB " 5 spaces 
75 22 - 53 = IF ." SUB passed " else ." SUB FAILED " then cr ;

: TESTPLUS1
." Testing 1+ " 5 SPACES
10 1+ 11 = IF ." 1+ passed " ELSE ." 1+ FAILED " THEN CR ;

: TESTPLUS2
." Testing 2+ " 5 SPACES
10 2+ 12 = IF ." 2+ passed " ELSE ." 2+ FAILED " THEN CR ;

: TESTMINUS1
." Testing 1- " 5 spaces
-1 1- -2 = IF ." 1- passed " ELSE ." 1- FAILED " THEN CR ;

: TESTMINUS2
." Testing 2- " 5 SPACES
10 2- 8 = IF ." 2- passed " ELSE ." 2- FAILED " THEN CR ;

: TESTUNDERPLUS
." Testing UNDERPLUS" 5 spaces
10 15 20 underplus 30 = if ." UNDERPLUS passed" else ." UNDERPLUS FAILED" then cr ;

: TESTMOD
." Testing MOD" 5 spaces
13 7 mod 6 = if ." MOD passed" else ." MOD FAILED" then cr ;

: TESTSLMOD
." Testing /MOD" 5 spaces
13 7 /mod 1 = swap 6 = and if ." /MOD passed " else ." /MOD FAILED" then cr ;

: TESTNEGATE
." Testing NEGATE" 5 spaces 13 negate -13 =
if ." NEGATE passed" else ." NEGATE FAILED" then cr ;

: TESTABS
." Testing ABS" 5 spaces -13 abs 13 =
if ." ABS passed" else ." ABS FAILED" then cr ;

: TESTMINMAX
." Testing MAX and MIN" 5 spaces
20 10 dup2 MAX 20 = if ." MAX passed and " else ." MAX FAILED and " then min 10 = if ." MIN passed." else ." MIN FAILED." then cr ;

: TESTSHIFTS
." Testing LSHIFT and RSHIFT" 5 spaces
10 4 lshift 160 = IF ." LSHIFT passed " ELSE ." LSHIFT FAILED " then 48 2 rshift 12 = if ." RSHIFT passed " ELSE ." RSHIFT FAILED " THEN cr ;


: VERIFYWORDLIST 
." Verifying WORDS .... " WORDS CR ;

: TESTLITERALNUMB 
." Testing LITERALNUMB .... " 213 213 = IF ." LITERALNUMB passed " ELSE ." LITERALNUMB FAILED " THEN CR ;

: TESTVARIABLE 
." Testing VARIABLE and VARIN (and @ and !)" 5 SPACES
VARIABLE OLDGEEZER 901 OLDGEEZER ! OLDGEEZER DUP @ 1+ SWAP ! OLDGEEZER @ 902 =
IF ." VARIABLE, VARIN, @ and ! passed " ELSE ." VARIABLE, VARIN, @ and ! FAILED " THEN CR ;

: TESTCONSTANT
." Testing CONSTANT " 5 SPACES
365 CONSTANT DAYS 7 CONSTANT WEEK DAYS WEEK / 52 = IF -3 CONSTANT NEGNUMB NEGNUMB WEEK + 4 = IF ." CONSTANT passed " ELSE ." CONSTANT FAILED " THEN CR ELSE ." CONSTANT has FAILED " THEN CR ;

: TESTTYPE 
." Verifying GETLINE, TYPE and TIB " CR ." Please enter some text to be echoed back. " CR
GETLINE CR ." Echoing... " TIB SWAP TYPE CR ;

: TESTCHAR
." Testing CHAR" 5 spaces
char Z 90 = IF char z 122 = IF ." CHAR passed " else ." CHAR FAILED " then else ." CHAR FAILED " THEN cr ;

: VERIFYSOURCE 
." Verifying SOURCE" 5 spaces
source type cr ;

\ Test if else then
: TESTCONDITIONALS 
." Testing IF ... ELSE ... THEN conditionals. " CR
1 if ." Simple IF passed " else ." Simple IF FAILED " then cr
0 1 if ." Testing nested IF... " if ." Nested IF FAILED " else ." Nested IF passed " then 5 5 * . then ." = 25 " cr
1 0 if ." Failed a final test of IF " else ." A final test of IF ... " if ." is passed " else ." is FAILED " then then cr ;

\ Stuff to test EXIT
: EXITTEST1
EXIT ." If you see this EXIT FAILED " CR ;
: EXITTEST2
VARIABLE EXITVAR 200 EXITVAR ! ;
: EXITTEST3
EXITVAR DUP @ 1+ SWAP ! EXITVAR DUP @ 1+ SWAP ! EXIT EXITVAR DUP @ 1+ SWAP ! ;

: TESTEXIT
." Testing EXIT " 5 SPACES EXITTEST1
EXITTEST2 EXITTEST3 EXITVAR @ 202 = IF ." EXIT passed " ELSE ." EXIT FAILED " THEN CR ;

\ Test return stack words

: TESTRSTACKBASICS
." Testing >R, R@ and R> along with RDROP" cr
34 35 36 >R >R >R R@ 34 = RDROP R@ 35 = AND RDROP R@ 36 = AND RDROP if ." >R, R@ and RDROP passed " else ." >R, R@ and RDROP FAILED" then cr
99 >R R> 99 = if ." R> passed " else ." R> FAILED " then cr ;

\ loop
: TESTBEGINEND
." Testing BEGIN ... END loop " 5 SPACES
32 BEGIN DUP EMIT 1+ DUP 127 > END ."  BEGIN ... END passed " CR ;

: TESTBEGINWHILE
." Testing BEGIN ... WHILE " 5 spaces
32 BEGIN DUP space hex . space decimal DUP 100 < IF DUP EMIT 1+ ELSE DUP 32 - EMIT 1+ WHILE DUP 110 = END ."  BEGIN ... WHILE passed " cr ;

: TESTDOLOOP
." Testing DO ... LOOP " 5 spaces
1 10 1 DO DUP 1+ LOOP 10 = IF ." DO ... LOOP passed" ELSE ." DO ... LOOP FAILED" THEN CR ;

: TESTPLUSLOOP
." Testing DO .... +LOOP" 5 SPACES
1 100  1 DO DUP 1+ 101 +LOOP 2 = IF ." DO ... +LOOP passed" ELSE ." DO .... +LOOP FAILED" THEN CR ;

: VERIFYIJ
." Verifying I and J in nested loops" CR
10 0 DO 10 0 DO ." ( "  J . ." , " I . ." ) " LOOP CR LOOP
." I and J verified" CR ; 

: VERIFYLEAVE
." Verifying LEAVE and UNLOOP " CR
10 0 DO 10 0 DO J I > J I = OR IF ." ( "  J . ." , " I . ." ) " ELSE UNLOOP LEAVE 3 0 DO LOOP 3 0 DO LOOP 3 0 DO LOOP THEN LOOP CR LOOP
." LEAVE and UNLOOP verified" CR ;


\ Testing memory functions
: ZZ ." ', EXECUTE and C! passed " ;

: TESTINGTICK 
." Testing ', EXECUTE and C! " 5 spaces
hex 0x58 decimal ' ZZ 24 + C! ' XZ execute cr
\ Change back or else subsequent tests will break
." Testing one more time " 5 spaces
hex 0x5A decimal ' xz 24 + C! ' zZ exeCUTE  cr ;

: testcfetch 
." Testing C@" 5 spaces
' XOR 24 + c@ 88 = if ." C@ passed " else ." C@ FAILED " then cr ;

\ Dummy words to use in MOVE test
: ZM * ;
: ZD / ;
: reup decimal 68 ' ZM 25 + C! ;

: TESTINGMOVE
." Testing MOVE " 5 spaces
10 10 ZM 100 = IF ' ZM 24 + ' ZD 24 + 24 move 100 2 ' ZM execute 50 = IF ." MOVE passed " else ." MOVE FAILED " then cr else ." Test failure " then reup ;

: TESTFETCH
." Testing @ (and BASE)" 5 spaces
octal base @ 10 = hex base @ 0x10 = AND decimal base @ 10 = AND if ." @ and BASE passed" ELSE ." @ and BASE FAILED" then cr ;

: TESTPLUSSTORE
." Testing +! " 5 SPACES ' ZM 24 + -1  SWAP +! 5 5 ' YM EXECUTE 25 = IF ." +! passed " ELSE ." +! FAILED " THEN 2 SPACES
' YM 24 + 1 SWAP ' +! execute 5 5 ' ZM EXECUTE 25 = INVERT IF ." +! address find FAILED " THEN  CR ;

: TESTPADFILLERASE
." Testing PAD, FILL and ERASE " 5 SPACES
PAD 10 35 FILL PAD 3 + 1 ERASE PAD 2 + C@ 35 = PAD 3 + C@ 0 = AND PAD 4 + C@ 35 = AND IF ." PAD, FILL and ERASE passed" ELSE ." PAD, FILL and ERASE FAILED" THEN CR ;

\ Test groupings

\ Memory tests
: TESTMEMORY
." Testing memory manipulation words" cr
TESTINGTICK testcfetch testingmove testchar testfetch testplusstore TESTPADFILLERASE
." Testing of memory code complete" cr ;

\ Test loops
: TESTLOOPS
." Running tests of looping " cr
TESTBEGINEND testbeginwhile TESTDOLOOP TESTPLUSLOOP VERIFYIJ VERIFYLEAVE
." Testing of loops complete" CR ;

\ Test Rstack
: RSTACKTESTS
." Testing return stack" cr
testrstackbasics 
." Testing return stack complete" cr ;

\ Test listwords
: LISTWORDSTESTS
." Running 'listwords' group of tests " CR
VERIFYWORDLIST TESTLITERALNUMB TESTVARIABLE TESTTYPE
VERIFYSOURCE TESTCONSTANT
." 'listwords' group of tests complete " CR ;

\ Test integer
: INTEGERTESTS
." Running integer tests " cr
TESTADD TESTMUL TESTDIV TESTSUB TESTPLUS1 TESTMINUS1
TESTminus2 testplus2 testunderplus testminmax testmod testslmod testabs testnegate testshifts
." Integer tests complete " CR
;

\ Group of stack operations tests
: STACKOPTESTS
." Running stackop tests " cr
TESTOVER2
testDrop2 testSquare
testCube
testNIP2 testDUP2
testtuck2 testswap2 testrot2 testdup testbl testdepth
testinvert
." stackop tests over " cr
;

\ Group of Basics tests
: BASICSTESTS
." Running basics tests and verifications " cr
VERIFYTYPEPROMPT
VERIFYGETNEXTLINE_IMM
VERIFYOK
VERIFYTOKENIZE_IMM 
VERIFYSEARCH OK
." ***Any error message above can almost certainly be ignored*** " CR
TESTHEX TESTDECIMAL TESTOCTAL VERIFYBINARY TESTEXIT
." Verifying ENCSQ with this output " cr
." Verifying COMMENT " cr \ ." COMMENT verification FAILED " 
VERIFYDOT
." Basics tests and verifications over " cr
;


\ Run all the tests
: UTS
DECIMAL
." Running unit tests " cr
STACKOPTESTS
." Press enter to continue " GETLINE CR
BASICSTESTS
." Press enter to continue " GETLINE CR
INTEGERTESTS
." Press enter to continue " GETLINE CR
LISTWORDSTESTS
." Press enter to continue " GETLINE CR
TESTCONDITIONALS
." Press enter to continue " GETLINE CR
RSTACKTESTS
." Press enter to continue " GETLINE CR
TESTLOOPS
." Press enter to continue " GETLINE CR
TESTMEMORY
." Press enter to continue " GETLINE CR
 ABORT" Verifying ABORTCOMM and leaving tests with this message "  ." ABORTCOMM has FAILED"
;

A RISC-V single board computer


I finally have a RISC-V based single board computer (SBC) – the Nezha from RV Boards shipped to me directly from China.

It’s tiny (about the same form-factor as a Raspberry Pi though) and relatively expensive (it cost me just over £100 to order and get it shipped here) but whilst I was slightly concerned I was being a bit naïve in buying it (as it was either a scam or it wouldn’t work), it boots (slowly) into Linux (see image) and works (slowly).

Can RISC-V cores (which are ‘open source hardware’ and free from licensing fees) break ARM’s grip on SBCs and similar devices? A year ago the answer looked like a very clear negative as, despite years of hype, RISC-V designs just weren’t moving off the page and into silicon. Now it looks much more uncertain as the Nezha is actually the second RISC-V SBC to ship (the other, the Beagle-V, has only been distributed to a select group of developers so far – and this didn’t include me despite my application – but is expected to be available globally in the autumn).

The plans are for RISC-V SBCs retailing for less than $20 inside a year and – crucially – for the RISC-V cores to feature vector extensions which could mean some interesting use-cases being opened up.

(If you want to know more about RISC-V or if you are thinking of starting a RISC-V assembly project I cannot recommend The RISC-V Reader highly enough.)

Right now I am trying to get Riscyforth to run on my machine.

Coming soon: RISCYFORTH


When I was much younger FORTH fascinated me as an alternative interpreted language for the Z80 eight-bit processor machines I was typically using.

Compared to BASIC – the language that the Sinclair ZX80, ZX81 and Spectrum came with – FORTH was reputedly lightening fast and very powerful.

My brother and I even obtained a tape copy of somebody’s FORTH for the ZX80 and we ran it – and it certainly was fast. But it also lacked the simplicity of BASIC and the tape was soon handed back.

But I’m back on the case again, inspired by this (long out of print but widely available on the web) book – Threaded Interpretive Languages – and by the prospect of a single board RISC-V computer – the BeagleV – coming out this year.

Currently I am targeting the PK proxy kernel on the Spike Risc-V emulator for RISCYFORTH but if and when I get a real BeagleV I’ll immediately switch to that (I applied to be an early user but have heard nothing so while the signs are that the project itself is making good progress it looks like I’ll have to wait to get my hands on one.)

I struggled with getting the mechanics of RISCYFORTH right for a long time but in the last week I’ve finally started to make serious progress and it actually does things (only in immediate mode for now). The picture shows my very first success with a multi-token command line from a couple of evenings ago and it’s come on a fair bit since then.

It’s nowhere near a releasable state but it’s rapidly improving.

Why bother? Well I think it’s important that RISC-V succeeds as a disruptor of what is starting to look like an ARM monopoly and so contributing to the ecosystem of the first single board seriously affordable RISC-V device matters. And, of course, because it’s there.

Always yield to the hands-on imperative (from this classic).

Update: My brother actually thinks we borrowed somebody’s Jupiter Ace which was a Z80-based FORTH computer of a very similar size to a ZX81 – and I think he might be right.

Running BASIC on the Raspberry Pi


Actually, I ran BINSIC, my very own dialect of BASIC on the Raspberry Pi – it is very slow (a bit slower even than a ZX81 back in the day) but it does work.Raspberry Pi running

Haven’t had a chance to investigate what happens if I tweak the settings on the thing – possibly I might be able to speed execution up. Could be that Java and Groovy is just too much bloat, could be that BINSIC just demands a lot of computation (I refuse to consider that it might be poorly designed and executed).

Dmesg from Raspberry Pi


Sadly could not get it to work with the video cable I had, so work colleagues will have to wait to see this thing put through its paces, but it boots headless.

[ 0.000000] Initializing cgroup subsys cpu
[ 0.000000] Linux version 3.1.9+ (dc4@dc4-arm-01) (gcc version 4.5.1 (Broadcom-2708) ) #168 PREEMPT Sat Jul 14 18:56:31 BST 2012
[ 0.000000] CPU: ARMv6-compatible processor [410fb767] revision 7 (ARMv7), cr=00c5387d
[ 0.000000] CPU: VIPT nonaliasing data cache, VIPT nonaliasing instruction cache
[ 0.000000] Machine: BCM2708
[ 0.000000] Memory policy: ECC disabled, Data cache writeback
[ 0.000000] On node 0 totalpages: 49152
[ 0.000000] free_area_init_node: node 0, pgdat c05f7c4c, node_mem_map c06c8000
[ 0.000000] Normal zone: 384 pages used for memmap
[ 0.000000] Normal zone: 0 pages reserved
[ 0.000000] Normal zone: 48768 pages, LIFO batch:15
[ 0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[ 0.000000] pcpu-alloc: [0] 0
[ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 48768
[ 0.000000] Kernel command line: dma.dmachans=0x3c bcm2708_fb.fbwidth=656 bcm2708_fb.fbheight=416 bcm2708.boardrev=0x2 bcm2708.serial=0x5321aa64 smsc95xx.macaddr=B8:27:EB:21:AA:64 dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait
[ 0.000000] PID hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.000000] Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
[ 0.000000] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
[ 0.000000] Memory: 192MB = 192MB total
[ 0.000000] Memory: 187880k/187880k available, 8728k reserved, 0K highmem
[ 0.000000] Virtual kernel memory layout:
[ 0.000000] vector : 0xffff0000 – 0xffff1000 ( 4 kB)
[ 0.000000] fixmap : 0xfff00000 – 0xfffe0000 ( 896 kB)
[ 0.000000] DMA : 0xffc00000 – 0xffe00000 ( 2 MB)
[ 0.000000] vmalloc : 0xcc800000 – 0xd8000000 ( 184 MB)
[ 0.000000] lowmem : 0xc0000000 – 0xcc000000 ( 192 MB)
[ 0.000000] modules : 0xbf000000 – 0xc0000000 ( 16 MB)
[ 0.000000] .text : 0xc0008000 – 0xc05943d0 (5681 kB)
[ 0.000000] .init : 0xc0595000 – 0xc05c7000 ( 200 kB)
[ 0.000000] .data : 0xc05c8000 – 0xc05f93b8 ( 197 kB)
[ 0.000000] .bss : 0xc05f93dc – 0xc06c7504 ( 825 kB)
[ 0.000000] NR_IRQS:245
[ 0.000000] timer_set_mode: unhandled mode:1
[ 0.000000] timer_set_mode: unhandled mode:3
[ 0.000000] Console: colour dummy device 80×30
[ 0.000000] console [tty1] enabled
[ 3.008944] Calibrating delay loop… 697.95 BogoMIPS (lpj=3489792)
[ 3.067898] pid_max: default: 32768 minimum: 301
[ 3.068528] Mount-cache hash table entries: 512
[ 3.069184] Initializing cgroup subsys cpuacct
[ 3.069298] Initializing cgroup subsys devices
[ 3.069349] Initializing cgroup subsys freezer
[ 3.069394] Initializing cgroup subsys blkio
[ 3.069512] CPU: Testing write buffer coherency: ok
[ 3.069646] ftrace: allocating 14801 entries in 44 pages
[ 3.142643] hw perfevents: enabled with v6 PMU driver, 3 counters available
[ 3.144629] devtmpfs: initialized
[ 3.152379] NET: Registered protocol family 16
[ 3.154308] vc-mem: mm_vc_mem_phys_addr = 0x00000000
[ 3.154373] vc-mem: mm_vc_mem_size = 0x10000000 (256 MiB)
[ 3.154891] hw-breakpoint: found 6 breakpoint and 1 watchpoint registers.
[ 3.154964] hw-breakpoint: maximum watchpoint size is 4 bytes.
[ 3.155013] mailbox: Broadcom VideoCore Mailbox driver
[ 3.155125] bcm2708_vcio: mailbox at f200b880
[ 3.155233] bcm_power: Broadcom power driver
[ 3.155281] bcm_power_open() -> 0
[ 3.155314] bcm_power_request(0, 8)
[ 3.656009] bcm_mailbox_read -> 00000080, 0
[ 3.656055] bcm_power_request -> 0
[ 3.656088] Serial: AMBA PL011 UART driver
[ 3.656281] dev:f1: ttyAMA0 at MMIO 0x20201000 (irq = 83) is a PL011 rev3
[ 3.961991] console [ttyAMA0] enabled
[ 3.987793] bio: create slab at 0
[ 3.993362] SCSI subsystem initialized
[ 3.997412] usbcore: registered new interface driver usbfs
[ 4.003206] usbcore: registered new interface driver hub
[ 4.008839] usbcore: registered new device driver usb
[ 4.014995] Switching to clocksource stc
[ 4.024054] Switched to NOHz mode on CPU #0
[ 4.037751] FS-Cache: Loaded
[ 4.041143] CacheFiles: Loaded
[ 4.062678] NET: Registered protocol family 2
[ 4.067628] IP route cache hash table entries: 2048 (order: 1, 8192 bytes)
[ 4.076225] TCP established hash table entries: 8192 (order: 4, 65536 bytes)
[ 4.083753] TCP bind hash table entries: 8192 (order: 3, 32768 bytes)
[ 4.090454] TCP: Hash tables configured (established 8192 bind 8192)
[ 4.096838] TCP reno registered
[ 4.100049] UDP hash table entries: 256 (order: 0, 4096 bytes)
[ 4.105942] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[ 4.112808] NET: Registered protocol family 1
[ 4.118168] RPC: Registered named UNIX socket transport module.
[ 4.124352] RPC: Registered udp transport module.
[ 4.129129] RPC: Registered tcp transport module.
[ 4.133858] RPC: Registered tcp NFSv4.1 backchannel transport module.
[ 4.140699] bcm2708_dma: DMA manager at cc808000
[ 4.145463] bcm2708_gpio: bcm2708_gpio_probe c05d00e0
[ 4.151132] vc-mem: Videocore memory driver
[ 4.156232] audit: initializing netlink socket (disabled)
[ 4.161794] type=2000 audit(0.780:1): initialized
[ 4.273943] VFS: Disk quotas dquot_6.5.2
[ 4.278154] Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[ 4.286181] FS-Cache: Netfs ‘nfs’ registered for caching
[ 4.292889] msgmni has been set to 366
[ 4.299441] io scheduler noop registered
[ 4.303417] io scheduler deadline registered (default)
[ 4.308775] io scheduler cfq registered
[ 4.313091] BCM2708FB: registering framebuffer (656×416@16)
[ 4.319455] bcm2708_fb_set_par info(cb8ec400) 656×416 (656×416), 0, 16
[ 4.324300] BCM2708FB: start = cc900000,4d385000 width=656, height=416, bpp=16, pitch=1312 size=545792 success=0
[ 4.328226] Console: switching to colour frame buffer device 82×26
[ 4.363081] BCM2708FB: register framebuffer (0)
[ 4.370756] kgdb: Registered I/O driver kgdboc.
[ 4.389840] brd: module loaded
[ 4.401655] loop: module loaded
[ 4.408070] vcos: [1]: vchiq_init_state: slot_zero = 0xffd80000, is_master = 0
[ 4.417984] vcos: [1]: vchiq_init_state: called
[ 4.425920] vcos: [1]: vchiq: initialised – version 2 (min 2), device 253.0
[ 4.436157] usbcore: registered new interface driver smsc95xx
[ 4.444401] cdc_ncm: 04-Aug-2011
[ 4.450190] usbcore: registered new interface driver cdc_ncm
[ 4.458183] dwc_otg: version 2.90b 6-MAY-2010 (platform bus)
[ 4.466607] Core Release: 2.80a
[ 4.472190] Setting default values for core params
[ 4.479410] Finished setting default values for core params
[ 4.487660] cc840008 -> 1
[ 4.692730] Using Buffer DMA mode
[ 4.698348] Periodic Transfer Interrupt Enhancement – disabled
[ 4.706568] Multiprocessor Interrupt Enhancement – disabled
[ 4.714606] dwc_otg bcm2708_usb: DWC OTG Controller
[ 4.722035] dwc_otg bcm2708_usb: new USB bus registered, assigned bus number 1
[ 4.731718] dwc_otg bcm2708_usb: irq 75, io mem 0x00000000
[ 4.739565] Init: Port Power? op_state=1
[ 4.745661] Init: Power Port (0)
[ 4.751275] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[ 4.760478] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 4.770048] usb usb1: Product: DWC OTG Controller
[ 4.776999] usb usb1: Manufacturer: Linux 3.1.9+ dwc_otg_hcd
[ 4.784974] usb usb1: SerialNumber: bcm2708_usb
[ 4.792912] hub 1-0:1.0: USB hub found
[ 4.798875] hub 1-0:1.0: 1 port detected
[ 4.805829] Module dwc_common_port init
[ 4.806233] usbcore: registered new interface driver uas
[ 4.813839] Initializing USB Mass Storage driver…
[ 4.821204] usbcore: registered new interface driver usb-storage
[ 4.829462] USB Mass Storage support registered.
[ 4.836535] usbcore: registered new interface driver libusual
[ 4.845075] mousedev: PS/2 mouse device common for all mice
[ 4.853041] cpuidle: using governor ladder
[ 4.859428] cpuidle: using governor menu
[ 4.865595] sdhci: Secure Digital Host Controller Interface driver
[ 4.874016] sdhci: Copyright(c) Pierre Ossman
[ 4.880758] bcm_power_open() -> 1
[ 4.886491] Registered led device: mmc0::
[ 4.887001] mmc0: SDHCI controller on BCM2708_Arasan [platform] using platform’s DMA
[ 4.899412] mmc0: BCM2708 SDHC host at 0x20300000 DMA 2 IRQ 77
[ 4.907624] sdhci-pltfm: SDHCI platform and OF driver helper
[ 4.915932] Registered led device: led0
[ 4.916420] usbcore: registered new interface driver usbhid
[ 4.925516] usbhid: USB HID core driver
[ 4.933397] TCP cubic registered
[ 4.938859] Initializing XFRM netlink socket
[ 4.945587] NET: Registered protocol family 17
[ 4.954648] Registering the dns_resolver key type
[ 4.967050] VFP support v0.3: implementor 41 architecture 1 part 20 variant b rev 5
[ 4.989569] Waiting for root device /dev/mmcblk0p2…
[ 5.022690] mmc0: problem reading SD Status register.
[ 5.047824] mmc0: new high speed SDHC card at address 0215
[ 5.069785] mmcblk0: mmc0:0215 APPSD 30.6 GiB
[ 5.078236] mmcblk0: p1 p2
[ 5.209561] usb 1-1: new high speed USB device number 2 using dwc_otg
[ 5.439438] usb 1-1: New USB device found, idVendor=0424, idProduct=9512
[ 5.448581] usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[ 5.459482] hub 1-1:1.0: USB hub found
[ 5.465852] hub 1-1:1.0: 3 ports detected
[ 5.749161] usb 1-1.1: new high speed USB device number 3 using dwc_otg
[ 5.869564] usb 1-1.1: New USB device found, idVendor=0424, idProduct=ec00
[ 5.879263] usb 1-1.1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[ 5.892256] smsc95xx v1.0.4
[ 5.954590] smsc95xx 1-1.1:1.0: eth0: register ‘smsc95xx’ at usb-bcm2708_usb-1.1, smsc95xx USB 2.0 Ethernet, b8:27:eb:21:aa:64
[ 10.705547] EXT4-fs (mmcblk0p2): recovery complete
[ 10.715781] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[ 10.729063] VFS: Mounted root (ext4 filesystem) on device 179:2.
[ 10.738931] Freeing init memory: 200K
[ 24.983111] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
[ 25.326722] ### snd_bcm2835_alsa_probe c05d07a0 ############### PROBING FOR bcm2835 ALSA device (0):(1) ###############
[ 25.349304] Creating card…
[ 25.354678] Creating device/chip ..
[ 25.369822] Adding controls ..
[ 25.375202] Registering card ….
[ 25.396456] bcm2835 ALSA CARD CREATED!
[ 25.408425] ### BCM2835 ALSA driver init OK ###
[ 32.799926] smsc95xx 1-1.1:1.0: eth0: link up, 100Mbps, full-duplex, lpa 0x45E1
[ 38.998740] Adding 102396k swap on /var/swap. Priority:-1 extents:1 across:102396k SS