├── clients ├── .gitignore ├── emacs │ ├── .gitignore │ ├── x86 │ │ └── emacs.lds │ ├── arm │ │ └── emacs.lds │ └── epath.h ├── memtest86 │ ├── olpc.h │ ├── .gitignore │ ├── precomp.bin │ ├── stddef.h │ ├── memtest.lds │ ├── controller.h │ ├── memtest.bin.lds │ ├── lfbgeometry.h │ ├── olpc.c │ ├── olpcvia.c │ ├── screen_buffer.h │ ├── ega.h │ ├── extra.h │ └── makeiso.sh ├── lib │ ├── main.c │ ├── types.h │ ├── powerpc │ │ └── makefile │ ├── mem.c │ └── string.h └── hello │ └── hello.c ├── cpu ├── x86 │ ├── Linux │ │ ├── .gitignore │ │ ├── inflate.ld │ │ ├── make_with_tcc │ │ └── armforth.qemu │ ├── pc │ │ ├── biosload │ │ │ ├── build │ │ │ │ ├── .gitignore │ │ │ │ └── Makefile │ │ │ ├── config.fth │ │ │ ├── sd8686.bth │ │ │ ├── paging.bth │ │ │ ├── syslinux.cfg │ │ │ ├── preofhdr.fth │ │ │ └── i945.fth │ │ ├── neptune │ │ │ ├── build │ │ │ │ ├── .gitignore │ │ │ │ └── atomrom.bth │ │ │ ├── versions.fth │ │ │ ├── paging.bth │ │ │ └── rmstart.bth │ │ ├── alex │ │ │ ├── build │ │ │ │ ├── .gitignore │ │ │ │ └── Makefile │ │ │ ├── testicons.tgz │ │ │ └── testicons.bth │ │ ├── newton │ │ │ ├── build │ │ │ │ ├── .gitignore │ │ │ │ └── Makefile │ │ │ ├── testicons.tgz │ │ │ └── testicons.bth │ │ ├── olpc │ │ │ ├── sstools │ │ │ │ └── README │ │ │ ├── sdtools │ │ │ │ ├── sd │ │ │ │ ├── maketar │ │ │ │ └── ecdump.fth │ │ │ ├── images │ │ │ │ ├── x.565 │ │ │ │ ├── x.bmp │ │ │ │ ├── bigx.di │ │ │ │ ├── cd.565 │ │ │ │ ├── cd.bmp │ │ │ │ ├── leds.di │ │ │ │ ├── sad.565 │ │ │ │ ├── sad.bmp │ │ │ │ ├── sd.565 │ │ │ │ ├── sd.bmp │ │ │ │ ├── spi.565 │ │ │ │ ├── tux.565 │ │ │ │ ├── tux.bmp │ │ │ │ ├── xo.565 │ │ │ │ ├── xo.bmp │ │ │ │ ├── xos.565 │ │ │ │ ├── bigdot.565 │ │ │ │ ├── bigdot.bmp │ │ │ │ ├── check.565 │ │ │ │ ├── check.bmp │ │ │ │ ├── ebook.di │ │ │ │ ├── laptop.565 │ │ │ │ ├── laptop.bmp │ │ │ │ ├── lock.565 │ │ │ │ ├── lock.bmp │ │ │ │ ├── minus.565 │ │ │ │ ├── minus.bmp │ │ │ │ ├── olpc.565 │ │ │ │ ├── olpc.bmp │ │ │ │ ├── olpc16.wav │ │ │ │ ├── olpcbw.565 │ │ │ │ ├── olpcbw.bmp │ │ │ │ ├── plus.565 │ │ │ │ ├── plus.bmp │ │ │ │ ├── topkey.565 │ │ │ │ ├── topkey.bmp │ │ │ │ ├── unlock.565 │ │ │ │ ├── unlock.bmp │ │ │ │ ├── usbkey.565 │ │ │ │ ├── usbkey.bmp │ │ │ │ ├── xogray.565 │ │ │ │ ├── xogray.bmp │ │ │ │ ├── android.565 │ │ │ │ ├── bigcheck.di │ │ │ │ ├── darkdot.565 │ │ │ │ ├── darkdot.bmp │ │ │ │ ├── develkey.565 │ │ │ │ ├── develkey.bmp │ │ │ │ ├── ethernet.565 │ │ │ │ ├── ethernet.bmp │ │ │ │ ├── lightdot.565 │ │ │ │ ├── lightdot.bmp │ │ │ │ ├── network.565 │ │ │ │ ├── network.bmp │ │ │ │ ├── olpc-t0.wav │ │ │ │ ├── olpc16EQ.wav │ │ │ │ ├── olpclogo.565 │ │ │ │ ├── olpclogo.bmp │ │ │ │ ├── settings.565 │ │ │ │ ├── settings.bmp │ │ │ │ ├── warnings.565 │ │ │ │ ├── winlogo.565 │ │ │ │ ├── winlogo.bmp │ │ │ │ ├── wireless.565 │ │ │ │ ├── wireless.bmp │ │ │ │ ├── harddrive.565 │ │ │ │ ├── harddrive.bmp │ │ │ │ ├── olpc16EQima.wav │ │ │ │ ├── warnings.bmp.gz │ │ │ │ ├── yellowdot.565 │ │ │ │ ├── yellowdot.bmp │ │ │ │ ├── Beep-Beep-800Hz-8k.wav │ │ │ │ ├── Edge1-8k-EQ-Comp-Amp-Short.wav │ │ │ │ └── LICENSE │ │ │ ├── build │ │ │ │ └── .gitignore │ │ │ ├── DisplayEDID.raw │ │ │ ├── via │ │ │ │ ├── testicons.tgz │ │ │ │ ├── build │ │ │ │ │ └── .gitignore │ │ │ │ ├── crypto-version.fth │ │ │ │ ├── startusdelay.fth │ │ │ │ ├── Notes │ │ │ │ │ ├── flashphoenix.txt │ │ │ │ │ ├── RAMinterleave.txt │ │ │ │ │ ├── MemoryLines.txt │ │ │ │ │ ├── fix-ec-175-a1.fth │ │ │ │ │ ├── test-ideas.txt │ │ │ │ │ └── CableScramble.txt │ │ │ │ ├── rmstart.bth │ │ │ │ ├── testicons.bth │ │ │ │ ├── sourceurl.fth │ │ │ │ ├── fw-version.fth │ │ │ │ ├── versions.fth │ │ │ │ ├── ec-version.fth │ │ │ │ ├── startcpuspeed.fth │ │ │ │ ├── Makefile-565 │ │ │ │ ├── sound.fth │ │ │ │ ├── mcnand-version.fth │ │ │ │ ├── dsdt.bth │ │ │ │ ├── initsmt.fth │ │ │ │ ├── wlan-version.fth │ │ │ │ ├── ec.bth │ │ │ │ ├── startclkgen.fth │ │ │ │ └── startmemtop.fth │ │ │ ├── paging.bth │ │ │ ├── vsa.bth │ │ │ ├── makeiso │ │ │ ├── testicons.bth │ │ │ ├── getmfgdata.fth │ │ │ ├── sourceurl.fth │ │ │ ├── rmstart.bth │ │ │ ├── dsdt.bth │ │ │ ├── ec.bth │ │ │ ├── gamekeynames.fth │ │ │ ├── wlantest.fth │ │ │ ├── port80.fth │ │ │ ├── whichcsum.fth │ │ │ ├── usb8388.bth │ │ │ └── usbpwr.fth │ │ ├── port80.fth │ │ ├── lxdevel │ │ │ ├── versions.fth │ │ │ ├── paging.bth │ │ │ ├── rmstart.bth │ │ │ └── build │ │ │ │ └── Makefile │ │ ├── segments.fth │ │ ├── emu │ │ │ ├── makefs.sh │ │ │ └── build │ │ │ │ └── Makefile │ │ ├── egareport.fth │ │ └── rmtools.fth │ ├── build │ │ ├── .gitignore │ │ ├── builder.dic │ │ └── Makefile │ ├── kernelrel.bth │ ├── builderrel.bth │ ├── basefwrel.bth │ ├── toolsrel.bth │ ├── ftrace.fth │ └── builder.bth ├── arm │ ├── build │ │ ├── .gitignore │ │ ├── builder.dic │ │ ├── inflate.bin │ │ └── Makefile │ ├── mmp2 │ │ ├── sdkit.sh │ │ ├── virtaddr.fth │ │ ├── config.fth │ │ ├── physaddr.fth │ │ ├── dma.fth │ │ ├── soc-config.fth │ │ ├── make-sdkit.sh │ │ ├── sdkit.fth │ │ ├── ntim_mmp2_nand_cforth_ddr_elpida_512m.fth │ │ ├── lcdcfg.fth │ │ ├── uart.fth │ │ ├── ntim_mmp2_nand_ofwonly_ddr_elpida_512m.fth │ │ ├── probemem.fth │ │ ├── sdregs.fth │ │ ├── ntim_mmp2_nand_ofw_ddr_elpida_512m.fth │ │ ├── ntim_mmp2_nand_uboot_ddr_elpida_512m.fth │ │ ├── sdhcimmp2.fth │ │ ├── rawboot.fth │ │ ├── galcore.fth │ │ └── hwaddrs.fth │ ├── olpc │ │ ├── 1.75 │ │ │ ├── sdkit │ │ │ │ ├── sdkit.sh │ │ │ │ ├── sdkit.fth │ │ │ │ └── Makefile │ │ │ ├── .gitignore │ │ │ ├── crypto-version.fth │ │ │ ├── resetvec.bth │ │ │ ├── verify.bth │ │ │ ├── ec.bth │ │ │ ├── cforth.bth │ │ │ ├── mcastnand.bth │ │ │ ├── sd8686.bth │ │ │ ├── attic │ │ │ │ └── draminit.bth │ │ │ ├── fw-version.fth │ │ │ ├── gamekey-a1.fth │ │ │ ├── ec-version.fth │ │ │ ├── prefw.bth │ │ │ ├── mcnand-version.fth │ │ │ ├── uart.fth │ │ │ ├── usb.fth │ │ │ ├── wlan-version.fth │ │ │ └── cforth-version.fth │ │ ├── 4.0 │ │ │ ├── nn-version.fth │ │ │ ├── crypto-version.fth │ │ │ ├── nn.bth │ │ │ ├── resetvec.bth │ │ │ ├── verify.bth │ │ │ ├── ec.bth │ │ │ ├── cforth.bth │ │ │ ├── mcastnand.bth │ │ │ ├── sd8686.bth │ │ │ ├── mv8787.bth │ │ │ ├── fw-version.fth │ │ │ ├── ec-version.fth │ │ │ ├── prefw.bth │ │ │ ├── mcnand-version.fth │ │ │ ├── cforth-version.fth │ │ │ └── fw.bth │ │ ├── dummy.img │ │ ├── .gitignore │ │ ├── 3.0 │ │ │ ├── sdhci.fth │ │ │ ├── crypto-version.fth │ │ │ ├── resetvec.bth │ │ │ ├── verify.bth │ │ │ ├── ec.bth │ │ │ ├── cforth.bth │ │ │ ├── mcastnand.bth │ │ │ ├── sd8686.bth │ │ │ ├── fw-version.fth │ │ │ ├── ec-version.fth │ │ │ ├── prefw.bth │ │ │ ├── mcnand-version.fth │ │ │ ├── uart.fth │ │ │ ├── wlan-version.fth │ │ │ ├── fw.bth │ │ │ └── cforth-version.fth │ │ ├── cl4 │ │ │ ├── crypto-version.fth │ │ │ ├── resetvec.bth │ │ │ ├── verify.bth │ │ │ ├── ec.bth │ │ │ ├── cforth.bth │ │ │ ├── mcastnand.bth │ │ │ ├── sd8686.bth │ │ │ ├── fw-version.fth │ │ │ ├── ec-version.fth │ │ │ ├── prefw.bth │ │ │ ├── mcnand-version.fth │ │ │ ├── uart.fth │ │ │ ├── usb.fth │ │ │ ├── wlan-version.fth │ │ │ ├── cforth-version.fth │ │ │ └── fw.bth │ │ ├── save-fw.fth │ │ ├── testicons.bth │ │ ├── chooseos.fth │ │ ├── sourceurl.fth │ │ ├── fetch-ec.fth │ │ ├── fetch-nn.fth │ │ ├── getmfgdata.fth │ │ ├── sdregs.fth │ │ ├── build-mv8787.fth │ │ ├── test-tweaks.fth │ │ ├── gpio-gamekeys.fth │ │ └── build-mcnand.fth │ ├── inflate │ ├── testmmu.fth │ ├── mmp3 │ │ ├── numdot.fth │ │ ├── thunderstone │ │ │ ├── fw-version.fth │ │ │ ├── resetvec.bth │ │ │ ├── config.fth │ │ │ ├── prefw.bth │ │ │ └── sdhci.fth │ │ ├── soc-config.fth │ │ └── galcore.fth │ ├── Linux │ │ ├── armforth.static │ │ └── inflate.ld │ ├── version.fth │ ├── mmuparams.fth │ ├── native.bth │ ├── builder.bth │ ├── mmap.fth │ └── Darwin │ │ └── Makefile ├── mips │ ├── Linux │ │ └── build │ ├── build │ │ ├── build │ │ └── builder.dic │ ├── QEMU │ │ ├── forth │ │ └── mipsfth │ ├── broadcom │ │ └── avx │ │ │ ├── devalias.fth │ │ │ ├── broadcom.fth │ │ │ ├── virtaddr.fth │ │ │ ├── 68kio.fth │ │ │ ├── intr.fth │ │ │ ├── rom.bth │ │ │ ├── initcom1.fth │ │ │ ├── bcuart.fth │ │ │ ├── test.bth │ │ │ └── pcicfg.fth │ ├── atlas │ │ ├── build │ │ │ └── makerom │ │ ├── virtaddr.fth │ │ └── isaio.fth │ ├── cobalt │ │ └── devalias.fth │ ├── bonito │ │ ├── devalias.fth │ │ ├── isaio.fth │ │ ├── virtaddr.fth │ │ ├── initsio.fth │ │ ├── flash.fth │ │ ├── intr.fth │ │ └── initcom1.fth │ └── makeinflater.notes ├── ppc │ ├── build │ │ ├── builder.dic │ │ ├── Makefile │ │ └── Makefile.cross │ ├── inflate.bth │ ├── olpc │ │ └── resetvec.bth │ ├── Linux │ │ └── Makefile │ └── prep │ │ ├── build │ │ └── Makefile.cross │ │ └── qemu │ │ └── build │ │ └── Makefile.cross └── i8051 │ └── build │ └── Makefile ├── ofw ├── gui │ ├── tux.bmp │ └── flsh2flp.icx ├── linux │ ├── logos.bmp │ ├── logom16.bmp │ ├── logom16b.bmp │ ├── logom16c.bmp │ ├── logom16e.bmp │ ├── logom16f.bmp │ ├── logom16l.bmp │ ├── logom16r.bmp │ ├── logom16y.bmp │ ├── yournam2.bmp │ └── yourname.bmp ├── termemu │ ├── 15x30pc.psf │ ├── gallant.obf │ ├── cp881-16.obf │ ├── 15x30pc.license │ └── difont.fth ├── inet │ └── httpdemo │ │ ├── homelogo.gif │ │ └── free.htm ├── fs │ ├── cifs │ │ └── loadpkg.fth │ └── cdfs │ │ └── cdfs.bth ├── tokenizer │ └── readfile.fth ├── inetv6 │ └── config.fth ├── fcode │ ├── debugfc.fth │ └── extcodes.fth ├── core │ ├── bootdev.fth │ ├── silentmd.fth │ └── loadmore.fth ├── disklabel │ └── gpttools.fth ├── wifi │ └── loadpkg.fth └── help │ └── tinyhelp.fth ├── dev ├── dnet │ ├── dnet.fth │ └── dnet.bth ├── icons │ ├── flash.bmp │ ├── ethernet.bmp │ └── tokenrng.bmp ├── mmc │ └── sdhci │ │ ├── mv8686 │ │ ├── bluetooth-pkg.fth │ │ ├── quirk.fth │ │ ├── loadpkg.fth │ │ └── libertas-interface.fth │ │ ├── sdmmc.bth │ │ ├── sdhci.bth │ │ └── sdhci2.bth ├── video │ ├── build │ │ ├── video.bth │ │ ├── load │ │ └── makefile │ ├── vmsvga.bth │ ├── loadcirrus.fth │ └── video.bth ├── usb2 │ ├── device │ │ ├── vendor.fth │ │ ├── generic │ │ │ ├── generic.fth │ │ │ └── generic.bth │ │ ├── storage │ │ │ └── usbstorage.bth │ │ ├── hub │ │ │ └── hub.bth │ │ ├── mouse │ │ │ └── usbmouse.bth │ │ ├── keyboard │ │ │ └── usbkbd.bth │ │ └── serial │ │ │ └── usbserial.bth │ └── hcd │ │ ├── ehci │ │ └── ehci.bth │ │ ├── ohci │ │ ├── ohci.bth │ │ └── pci.fth │ │ └── uhci │ │ └── uhci.bth ├── pci │ └── pcibridg.bth ├── mediagx │ ├── cx55x0.fth │ ├── cx5530 │ │ ├── smi.bth │ │ ├── audio.bth │ │ ├── video.bth │ │ └── ide.bth │ └── cx5520 │ │ └── cx5520.bth ├── geode │ ├── display │ │ └── gxfb.bth │ ├── ac97 │ │ └── ac97.bth │ └── nandflash │ │ └── nandflash.bth ├── intel │ └── graphics │ │ └── poulsbo.bth ├── ne2000 │ └── ne2kpci.bth ├── via │ └── unichrome │ │ └── unichrome.bth ├── ide │ └── node.bth ├── 3c90xb │ └── 3c905b.bth ├── i8255x │ └── 82559.bth ├── ncr53810 │ └── ncr531010.bth ├── hdaudio │ ├── audio.fth │ └── hdaudio.bth ├── dec21140 │ ├── netgear.bth │ ├── dec21143.bth │ └── comet.bth ├── olpc │ ├── imagesensor.fth │ ├── cafecamera │ │ └── cafecamera.bth │ ├── spiflash │ │ └── flashec.fth │ ├── cafenand │ │ └── cafenand.bth │ └── confirm.fth └── busl948 │ └── busl948.bth ├── forth ├── kernel │ ├── nswapmap.fth │ └── metanswapmap.fth ├── wrapper │ └── nullzip.c └── lib │ ├── hostcpu.sh │ ├── struct.fth │ ├── circle.fth │ └── wrtime.fth └── .gitignore /clients/.gitignore: -------------------------------------------------------------------------------- 1 | *.o 2 | -------------------------------------------------------------------------------- /clients/emacs/.gitignore: -------------------------------------------------------------------------------- 1 | emacs 2 | -------------------------------------------------------------------------------- /cpu/x86/Linux/.gitignore: -------------------------------------------------------------------------------- 1 | *.o 2 | *forth 3 | -------------------------------------------------------------------------------- /cpu/x86/pc/biosload/build/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /cpu/x86/pc/neptune/build/.gitignore: -------------------------------------------------------------------------------- 1 | build 2 | -------------------------------------------------------------------------------- /clients/memtest86/olpc.h: -------------------------------------------------------------------------------- 1 | void warm_start(void); 2 | -------------------------------------------------------------------------------- /cpu/arm/build/.gitignore: -------------------------------------------------------------------------------- 1 | armforth 2 | forth 3 | build 4 | -------------------------------------------------------------------------------- /cpu/x86/pc/alex/build/.gitignore: -------------------------------------------------------------------------------- 1 | build 2 | testicons 3 | -------------------------------------------------------------------------------- /cpu/x86/pc/newton/build/.gitignore: -------------------------------------------------------------------------------- 1 | build 2 | testicons 3 | -------------------------------------------------------------------------------- /cpu/mips/Linux/build: -------------------------------------------------------------------------------- 1 | /home/wmb/ofwmips/cpu/mips/Linux/mipsforth -------------------------------------------------------------------------------- /cpu/x86/build/.gitignore: -------------------------------------------------------------------------------- 1 | !builder.dic 2 | build 3 | forth 4 | -------------------------------------------------------------------------------- /cpu/x86/pc/olpc/sstools/README: -------------------------------------------------------------------------------- 1 | screenshot tools for XO-1 2 | -------------------------------------------------------------------------------- /cpu/mips/build/build: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | qemu-mipsel ../Linux/build $@ 3 | -------------------------------------------------------------------------------- /clients/memtest86/.gitignore: -------------------------------------------------------------------------------- 1 | memtest 2 | memtest_shared 3 | head.s 4 | -------------------------------------------------------------------------------- /cpu/arm/mmp2/sdkit.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | ./forth prefw.dic sdkit.fth - 3 | -------------------------------------------------------------------------------- /cpu/mips/QEMU/forth: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | qemu-mipsel ../Linux/mipsforth $@ 3 | -------------------------------------------------------------------------------- /cpu/mips/QEMU/mipsfth: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | qemu-mipsel ../Linux/mipsforth $@ 3 | -------------------------------------------------------------------------------- /clients/lib/main.c: -------------------------------------------------------------------------------- 1 | #ifdef __GNUC__ 2 | void 3 | __main() 4 | { 5 | } 6 | #endif 7 | -------------------------------------------------------------------------------- /cpu/arm/olpc/1.75/sdkit/sdkit.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | ./forth prefw.dic sdkit.fth - 3 | -------------------------------------------------------------------------------- /cpu/x86/pc/olpc/sdtools/sd: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | exec ./forth ./builder.dic sd.fth - 3 | -------------------------------------------------------------------------------- /cpu/arm/inflate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openbios/openfirmware/HEAD/cpu/arm/inflate -------------------------------------------------------------------------------- /ofw/gui/tux.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openbios/openfirmware/HEAD/ofw/gui/tux.bmp -------------------------------------------------------------------------------- /dev/dnet/dnet.fth: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openbios/openfirmware/HEAD/dev/dnet/dnet.fth -------------------------------------------------------------------------------- /cpu/arm/testmmu.fth: -------------------------------------------------------------------------------- 1 | select /mmu 2 | 1000 1000 claim constant pf 3 | 40000000 pf 1000 -2 map 4 | -------------------------------------------------------------------------------- /dev/icons/flash.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openbios/openfirmware/HEAD/dev/icons/flash.bmp -------------------------------------------------------------------------------- /ofw/gui/flsh2flp.icx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openbios/openfirmware/HEAD/ofw/gui/flsh2flp.icx -------------------------------------------------------------------------------- /ofw/linux/logos.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openbios/openfirmware/HEAD/ofw/linux/logos.bmp -------------------------------------------------------------------------------- /cpu/arm/mmp3/numdot.fth: -------------------------------------------------------------------------------- 1 | label puthex ( r0: nn \ kills: r1-r3 ) 2 | mov pc,lr 3 | end-code 4 | -------------------------------------------------------------------------------- /cpu/arm/olpc/4.0/nn-version.fth: -------------------------------------------------------------------------------- 1 | \ The Neonode touchscreen firmware 2 | macro: NN_VERSION 0_0_0_10 3 | -------------------------------------------------------------------------------- /cpu/arm/olpc/dummy.img: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openbios/openfirmware/HEAD/cpu/arm/olpc/dummy.img -------------------------------------------------------------------------------- /dev/icons/ethernet.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openbios/openfirmware/HEAD/dev/icons/ethernet.bmp -------------------------------------------------------------------------------- /dev/icons/tokenrng.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openbios/openfirmware/HEAD/dev/icons/tokenrng.bmp -------------------------------------------------------------------------------- /ofw/linux/logom16.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openbios/openfirmware/HEAD/ofw/linux/logom16.bmp -------------------------------------------------------------------------------- /ofw/linux/logom16b.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openbios/openfirmware/HEAD/ofw/linux/logom16b.bmp -------------------------------------------------------------------------------- /ofw/linux/logom16c.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openbios/openfirmware/HEAD/ofw/linux/logom16c.bmp -------------------------------------------------------------------------------- /ofw/linux/logom16e.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openbios/openfirmware/HEAD/ofw/linux/logom16e.bmp -------------------------------------------------------------------------------- /ofw/linux/logom16f.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openbios/openfirmware/HEAD/ofw/linux/logom16f.bmp -------------------------------------------------------------------------------- /ofw/linux/logom16l.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openbios/openfirmware/HEAD/ofw/linux/logom16l.bmp -------------------------------------------------------------------------------- /ofw/linux/logom16r.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openbios/openfirmware/HEAD/ofw/linux/logom16r.bmp -------------------------------------------------------------------------------- /ofw/linux/logom16y.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openbios/openfirmware/HEAD/ofw/linux/logom16y.bmp -------------------------------------------------------------------------------- /ofw/linux/yournam2.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openbios/openfirmware/HEAD/ofw/linux/yournam2.bmp -------------------------------------------------------------------------------- /ofw/linux/yourname.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openbios/openfirmware/HEAD/ofw/linux/yourname.bmp -------------------------------------------------------------------------------- /ofw/termemu/15x30pc.psf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openbios/openfirmware/HEAD/ofw/termemu/15x30pc.psf -------------------------------------------------------------------------------- /ofw/termemu/gallant.obf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openbios/openfirmware/HEAD/ofw/termemu/gallant.obf -------------------------------------------------------------------------------- /cpu/arm/build/builder.dic: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openbios/openfirmware/HEAD/cpu/arm/build/builder.dic -------------------------------------------------------------------------------- /cpu/arm/build/inflate.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openbios/openfirmware/HEAD/cpu/arm/build/inflate.bin -------------------------------------------------------------------------------- /cpu/arm/mmp2/virtaddr.fth: -------------------------------------------------------------------------------- 1 | h# 10.0000 constant fw-virt-base 2 | h# 40.0000 constant fw-virt-size 3 | 4 | -------------------------------------------------------------------------------- /cpu/arm/olpc/.gitignore: -------------------------------------------------------------------------------- 1 | armforth 2 | build 3 | cforth 4 | multicast-nand 5 | sourceurl 6 | testicons 7 | -------------------------------------------------------------------------------- /cpu/ppc/build/builder.dic: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openbios/openfirmware/HEAD/cpu/ppc/build/builder.dic -------------------------------------------------------------------------------- /cpu/x86/build/builder.dic: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openbios/openfirmware/HEAD/cpu/x86/build/builder.dic -------------------------------------------------------------------------------- /cpu/x86/pc/biosload/config.fth: -------------------------------------------------------------------------------- 1 | .( !!! Copy a specific configuration file over config.fth !!!) cr 2 | bye 3 | -------------------------------------------------------------------------------- /ofw/termemu/cp881-16.obf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openbios/openfirmware/HEAD/ofw/termemu/cp881-16.obf -------------------------------------------------------------------------------- /cpu/arm/olpc/1.75/.gitignore: -------------------------------------------------------------------------------- 1 | armforth 2 | build 3 | cforth 4 | multicast-nand 5 | sourceurl 6 | testicons 7 | -------------------------------------------------------------------------------- /cpu/mips/build/builder.dic: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openbios/openfirmware/HEAD/cpu/mips/build/builder.dic -------------------------------------------------------------------------------- /cpu/x86/pc/olpc/images/x.565: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openbios/openfirmware/HEAD/cpu/x86/pc/olpc/images/x.565 -------------------------------------------------------------------------------- /cpu/x86/pc/olpc/images/x.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openbios/openfirmware/HEAD/cpu/x86/pc/olpc/images/x.bmp -------------------------------------------------------------------------------- /clients/memtest86/precomp.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openbios/openfirmware/HEAD/clients/memtest86/precomp.bin -------------------------------------------------------------------------------- /cpu/arm/Linux/armforth.static: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openbios/openfirmware/HEAD/cpu/arm/Linux/armforth.static -------------------------------------------------------------------------------- /cpu/x86/pc/alex/testicons.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openbios/openfirmware/HEAD/cpu/x86/pc/alex/testicons.tgz -------------------------------------------------------------------------------- /cpu/x86/pc/olpc/build/.gitignore: -------------------------------------------------------------------------------- 1 | *.public 2 | multicast-nand/ 3 | build 4 | dsdt.stamp 5 | sourceurl 6 | memtest 7 | -------------------------------------------------------------------------------- /cpu/x86/pc/olpc/images/bigx.di: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openbios/openfirmware/HEAD/cpu/x86/pc/olpc/images/bigx.di -------------------------------------------------------------------------------- /cpu/x86/pc/olpc/images/cd.565: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openbios/openfirmware/HEAD/cpu/x86/pc/olpc/images/cd.565 -------------------------------------------------------------------------------- /cpu/x86/pc/olpc/images/cd.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openbios/openfirmware/HEAD/cpu/x86/pc/olpc/images/cd.bmp -------------------------------------------------------------------------------- /cpu/x86/pc/olpc/images/leds.di: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openbios/openfirmware/HEAD/cpu/x86/pc/olpc/images/leds.di -------------------------------------------------------------------------------- /cpu/x86/pc/olpc/images/sad.565: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openbios/openfirmware/HEAD/cpu/x86/pc/olpc/images/sad.565 -------------------------------------------------------------------------------- /cpu/x86/pc/olpc/images/sad.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openbios/openfirmware/HEAD/cpu/x86/pc/olpc/images/sad.bmp -------------------------------------------------------------------------------- /cpu/x86/pc/olpc/images/sd.565: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openbios/openfirmware/HEAD/cpu/x86/pc/olpc/images/sd.565 -------------------------------------------------------------------------------- /cpu/x86/pc/olpc/images/sd.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openbios/openfirmware/HEAD/cpu/x86/pc/olpc/images/sd.bmp -------------------------------------------------------------------------------- /cpu/x86/pc/olpc/images/spi.565: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openbios/openfirmware/HEAD/cpu/x86/pc/olpc/images/spi.565 -------------------------------------------------------------------------------- /cpu/x86/pc/olpc/images/tux.565: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openbios/openfirmware/HEAD/cpu/x86/pc/olpc/images/tux.565 -------------------------------------------------------------------------------- /cpu/x86/pc/olpc/images/tux.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openbios/openfirmware/HEAD/cpu/x86/pc/olpc/images/tux.bmp -------------------------------------------------------------------------------- /cpu/x86/pc/olpc/images/xo.565: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openbios/openfirmware/HEAD/cpu/x86/pc/olpc/images/xo.565 -------------------------------------------------------------------------------- /cpu/x86/pc/olpc/images/xo.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openbios/openfirmware/HEAD/cpu/x86/pc/olpc/images/xo.bmp -------------------------------------------------------------------------------- /cpu/x86/pc/olpc/images/xos.565: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openbios/openfirmware/HEAD/cpu/x86/pc/olpc/images/xos.565 -------------------------------------------------------------------------------- /ofw/inet/httpdemo/homelogo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openbios/openfirmware/HEAD/ofw/inet/httpdemo/homelogo.gif -------------------------------------------------------------------------------- /cpu/x86/pc/newton/testicons.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openbios/openfirmware/HEAD/cpu/x86/pc/newton/testicons.tgz -------------------------------------------------------------------------------- /cpu/x86/pc/olpc/DisplayEDID.raw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openbios/openfirmware/HEAD/cpu/x86/pc/olpc/DisplayEDID.raw -------------------------------------------------------------------------------- /cpu/x86/pc/olpc/images/bigdot.565: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openbios/openfirmware/HEAD/cpu/x86/pc/olpc/images/bigdot.565 -------------------------------------------------------------------------------- /cpu/x86/pc/olpc/images/bigdot.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openbios/openfirmware/HEAD/cpu/x86/pc/olpc/images/bigdot.bmp -------------------------------------------------------------------------------- /cpu/x86/pc/olpc/images/check.565: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openbios/openfirmware/HEAD/cpu/x86/pc/olpc/images/check.565 -------------------------------------------------------------------------------- /cpu/x86/pc/olpc/images/check.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openbios/openfirmware/HEAD/cpu/x86/pc/olpc/images/check.bmp -------------------------------------------------------------------------------- /cpu/x86/pc/olpc/images/ebook.di: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openbios/openfirmware/HEAD/cpu/x86/pc/olpc/images/ebook.di -------------------------------------------------------------------------------- /cpu/x86/pc/olpc/images/laptop.565: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openbios/openfirmware/HEAD/cpu/x86/pc/olpc/images/laptop.565 -------------------------------------------------------------------------------- /cpu/x86/pc/olpc/images/laptop.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openbios/openfirmware/HEAD/cpu/x86/pc/olpc/images/laptop.bmp -------------------------------------------------------------------------------- /cpu/x86/pc/olpc/images/lock.565: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openbios/openfirmware/HEAD/cpu/x86/pc/olpc/images/lock.565 -------------------------------------------------------------------------------- /cpu/x86/pc/olpc/images/lock.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openbios/openfirmware/HEAD/cpu/x86/pc/olpc/images/lock.bmp -------------------------------------------------------------------------------- /cpu/x86/pc/olpc/images/minus.565: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openbios/openfirmware/HEAD/cpu/x86/pc/olpc/images/minus.565 -------------------------------------------------------------------------------- /cpu/x86/pc/olpc/images/minus.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openbios/openfirmware/HEAD/cpu/x86/pc/olpc/images/minus.bmp -------------------------------------------------------------------------------- /cpu/x86/pc/olpc/images/olpc.565: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openbios/openfirmware/HEAD/cpu/x86/pc/olpc/images/olpc.565 -------------------------------------------------------------------------------- /cpu/x86/pc/olpc/images/olpc.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openbios/openfirmware/HEAD/cpu/x86/pc/olpc/images/olpc.bmp -------------------------------------------------------------------------------- /cpu/x86/pc/olpc/images/olpc16.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openbios/openfirmware/HEAD/cpu/x86/pc/olpc/images/olpc16.wav -------------------------------------------------------------------------------- /cpu/x86/pc/olpc/images/olpcbw.565: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openbios/openfirmware/HEAD/cpu/x86/pc/olpc/images/olpcbw.565 -------------------------------------------------------------------------------- /cpu/x86/pc/olpc/images/olpcbw.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openbios/openfirmware/HEAD/cpu/x86/pc/olpc/images/olpcbw.bmp -------------------------------------------------------------------------------- /cpu/x86/pc/olpc/images/plus.565: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openbios/openfirmware/HEAD/cpu/x86/pc/olpc/images/plus.565 -------------------------------------------------------------------------------- /cpu/x86/pc/olpc/images/plus.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openbios/openfirmware/HEAD/cpu/x86/pc/olpc/images/plus.bmp -------------------------------------------------------------------------------- /cpu/x86/pc/olpc/images/topkey.565: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openbios/openfirmware/HEAD/cpu/x86/pc/olpc/images/topkey.565 -------------------------------------------------------------------------------- /cpu/x86/pc/olpc/images/topkey.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openbios/openfirmware/HEAD/cpu/x86/pc/olpc/images/topkey.bmp -------------------------------------------------------------------------------- /cpu/x86/pc/olpc/images/unlock.565: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openbios/openfirmware/HEAD/cpu/x86/pc/olpc/images/unlock.565 -------------------------------------------------------------------------------- /cpu/x86/pc/olpc/images/unlock.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openbios/openfirmware/HEAD/cpu/x86/pc/olpc/images/unlock.bmp -------------------------------------------------------------------------------- /cpu/x86/pc/olpc/images/usbkey.565: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openbios/openfirmware/HEAD/cpu/x86/pc/olpc/images/usbkey.565 -------------------------------------------------------------------------------- /cpu/x86/pc/olpc/images/usbkey.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openbios/openfirmware/HEAD/cpu/x86/pc/olpc/images/usbkey.bmp -------------------------------------------------------------------------------- /cpu/x86/pc/olpc/images/xogray.565: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openbios/openfirmware/HEAD/cpu/x86/pc/olpc/images/xogray.565 -------------------------------------------------------------------------------- /cpu/x86/pc/olpc/images/xogray.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openbios/openfirmware/HEAD/cpu/x86/pc/olpc/images/xogray.bmp -------------------------------------------------------------------------------- /cpu/x86/pc/olpc/via/testicons.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openbios/openfirmware/HEAD/cpu/x86/pc/olpc/via/testicons.tgz -------------------------------------------------------------------------------- /clients/hello/hello.c: -------------------------------------------------------------------------------- 1 | #include "1275.h" 2 | 3 | int main() 4 | { 5 | printf("Hello, world\n"); 6 | return 0; 7 | } 8 | -------------------------------------------------------------------------------- /cpu/x86/pc/olpc/images/android.565: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openbios/openfirmware/HEAD/cpu/x86/pc/olpc/images/android.565 -------------------------------------------------------------------------------- /cpu/x86/pc/olpc/images/bigcheck.di: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openbios/openfirmware/HEAD/cpu/x86/pc/olpc/images/bigcheck.di -------------------------------------------------------------------------------- /cpu/x86/pc/olpc/images/darkdot.565: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openbios/openfirmware/HEAD/cpu/x86/pc/olpc/images/darkdot.565 -------------------------------------------------------------------------------- /cpu/x86/pc/olpc/images/darkdot.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openbios/openfirmware/HEAD/cpu/x86/pc/olpc/images/darkdot.bmp -------------------------------------------------------------------------------- /cpu/x86/pc/olpc/images/develkey.565: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openbios/openfirmware/HEAD/cpu/x86/pc/olpc/images/develkey.565 -------------------------------------------------------------------------------- /cpu/x86/pc/olpc/images/develkey.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openbios/openfirmware/HEAD/cpu/x86/pc/olpc/images/develkey.bmp -------------------------------------------------------------------------------- /cpu/x86/pc/olpc/images/ethernet.565: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openbios/openfirmware/HEAD/cpu/x86/pc/olpc/images/ethernet.565 -------------------------------------------------------------------------------- /cpu/x86/pc/olpc/images/ethernet.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openbios/openfirmware/HEAD/cpu/x86/pc/olpc/images/ethernet.bmp -------------------------------------------------------------------------------- /cpu/x86/pc/olpc/images/lightdot.565: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openbios/openfirmware/HEAD/cpu/x86/pc/olpc/images/lightdot.565 -------------------------------------------------------------------------------- /cpu/x86/pc/olpc/images/lightdot.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openbios/openfirmware/HEAD/cpu/x86/pc/olpc/images/lightdot.bmp -------------------------------------------------------------------------------- /cpu/x86/pc/olpc/images/network.565: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openbios/openfirmware/HEAD/cpu/x86/pc/olpc/images/network.565 -------------------------------------------------------------------------------- /cpu/x86/pc/olpc/images/network.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openbios/openfirmware/HEAD/cpu/x86/pc/olpc/images/network.bmp -------------------------------------------------------------------------------- /cpu/x86/pc/olpc/images/olpc-t0.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openbios/openfirmware/HEAD/cpu/x86/pc/olpc/images/olpc-t0.wav -------------------------------------------------------------------------------- /cpu/x86/pc/olpc/images/olpc16EQ.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openbios/openfirmware/HEAD/cpu/x86/pc/olpc/images/olpc16EQ.wav -------------------------------------------------------------------------------- /cpu/x86/pc/olpc/images/olpclogo.565: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openbios/openfirmware/HEAD/cpu/x86/pc/olpc/images/olpclogo.565 -------------------------------------------------------------------------------- /cpu/x86/pc/olpc/images/olpclogo.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openbios/openfirmware/HEAD/cpu/x86/pc/olpc/images/olpclogo.bmp -------------------------------------------------------------------------------- /cpu/x86/pc/olpc/images/settings.565: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openbios/openfirmware/HEAD/cpu/x86/pc/olpc/images/settings.565 -------------------------------------------------------------------------------- /cpu/x86/pc/olpc/images/settings.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openbios/openfirmware/HEAD/cpu/x86/pc/olpc/images/settings.bmp -------------------------------------------------------------------------------- /cpu/x86/pc/olpc/images/warnings.565: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openbios/openfirmware/HEAD/cpu/x86/pc/olpc/images/warnings.565 -------------------------------------------------------------------------------- /cpu/x86/pc/olpc/images/winlogo.565: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openbios/openfirmware/HEAD/cpu/x86/pc/olpc/images/winlogo.565 -------------------------------------------------------------------------------- /cpu/x86/pc/olpc/images/winlogo.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openbios/openfirmware/HEAD/cpu/x86/pc/olpc/images/winlogo.bmp -------------------------------------------------------------------------------- /cpu/x86/pc/olpc/images/wireless.565: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openbios/openfirmware/HEAD/cpu/x86/pc/olpc/images/wireless.565 -------------------------------------------------------------------------------- /cpu/x86/pc/olpc/images/wireless.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openbios/openfirmware/HEAD/cpu/x86/pc/olpc/images/wireless.bmp -------------------------------------------------------------------------------- /cpu/arm/mmp2/config.fth: -------------------------------------------------------------------------------- 1 | create debug-startup 2 | 3 | fload ${BP}/cpu/arm/mmp2/addrs.fth 4 | fload ${BP}/cpu/arm/mmp2/hwaddrs.fth 5 | -------------------------------------------------------------------------------- /cpu/x86/pc/olpc/images/harddrive.565: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openbios/openfirmware/HEAD/cpu/x86/pc/olpc/images/harddrive.565 -------------------------------------------------------------------------------- /cpu/x86/pc/olpc/images/harddrive.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openbios/openfirmware/HEAD/cpu/x86/pc/olpc/images/harddrive.bmp -------------------------------------------------------------------------------- /cpu/x86/pc/olpc/images/olpc16EQima.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openbios/openfirmware/HEAD/cpu/x86/pc/olpc/images/olpc16EQima.wav -------------------------------------------------------------------------------- /cpu/x86/pc/olpc/images/warnings.bmp.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openbios/openfirmware/HEAD/cpu/x86/pc/olpc/images/warnings.bmp.gz -------------------------------------------------------------------------------- /cpu/x86/pc/olpc/images/yellowdot.565: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openbios/openfirmware/HEAD/cpu/x86/pc/olpc/images/yellowdot.565 -------------------------------------------------------------------------------- /cpu/x86/pc/olpc/images/yellowdot.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openbios/openfirmware/HEAD/cpu/x86/pc/olpc/images/yellowdot.bmp -------------------------------------------------------------------------------- /cpu/arm/Linux/inflate.ld: -------------------------------------------------------------------------------- 1 | SECTIONS 2 | { 3 | . = 0x00000; 4 | .text : { *(.text_inflate) } 5 | .text_spare : { *(.text) } 6 | } 7 | -------------------------------------------------------------------------------- /cpu/mips/broadcom/avx/devalias.fth: -------------------------------------------------------------------------------- 1 | devalias com1 /serial@bc002000 2 | devalias com2 /serial@bc002800 3 | devalias net /ethernet 4 | 5 | -------------------------------------------------------------------------------- /cpu/x86/pc/olpc/via/build/.gitignore: -------------------------------------------------------------------------------- 1 | *.public 2 | multicast-nand/ 3 | build 4 | dsdt.stamp 5 | sourceurl 6 | testicons/ 7 | memtest 8 | -------------------------------------------------------------------------------- /cpu/arm/olpc/3.0/sdhci.fth: -------------------------------------------------------------------------------- 1 | fload ${BP}/cpu/arm/olpc/emmc.fth 2 | devalias int /sd/sdhci@d4281000/disk 3 | devalias mmc0 /sd/sdhci@d4281000 4 | -------------------------------------------------------------------------------- /cpu/arm/mmp2/physaddr.fth: -------------------------------------------------------------------------------- 1 | h# 2000.0000 constant sdram-size 2 | 3 | : (memory?) ( phys -- flag ) sdram-size u< ; 4 | ' (memory?) to memory? 5 | -------------------------------------------------------------------------------- /cpu/arm/mmp3/thunderstone/fw-version.fth: -------------------------------------------------------------------------------- 1 | \ The overall firmware revision 2 | macro: FW_PREFIX TS 3 | macro: FW_MAJOR A 4 | macro: FW_MINOR 00 5 | -------------------------------------------------------------------------------- /cpu/mips/atlas/build/makerom: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | build rom 3 | echo Converting to ELF format 4 | ./bintoelf -a 0x80200000 -p 8 -l rom.elf 5 | -------------------------------------------------------------------------------- /cpu/x86/pc/olpc/images/Beep-Beep-800Hz-8k.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openbios/openfirmware/HEAD/cpu/x86/pc/olpc/images/Beep-Beep-800Hz-8k.wav -------------------------------------------------------------------------------- /ofw/fs/cifs/loadpkg.fth: -------------------------------------------------------------------------------- 1 | fload ${BP}/ofw/fs/cifs/netbios.fth \ Netbios session layer 2 | fload ${BP}/ofw/fs/cifs/smb.fth \ SMB messages 3 | -------------------------------------------------------------------------------- /cpu/x86/pc/port80.fth: -------------------------------------------------------------------------------- 1 | 2 | also assembler definitions 3 | : port80 ( n -- ) " # al mov al h# 80 # out" evaluate ; 4 | previous definitions 5 | 6 | -------------------------------------------------------------------------------- /forth/kernel/nswapmap.fth: -------------------------------------------------------------------------------- 1 | \ Null byte swap table management 2 | 3 | : set-swap-bit ( addr -- ) drop ; 4 | : note-string ( adr len -- adr len ) ; 5 | -------------------------------------------------------------------------------- /cpu/arm/version.fth: -------------------------------------------------------------------------------- 1 | defer title 2 | : .copyright (s -- ) 3 | ." Forthmacs for ARM, Copyright (c) 1988-2008 FirmWorks" cr 4 | ; 5 | ' .copyright is title 6 | -------------------------------------------------------------------------------- /cpu/x86/pc/olpc/images/Edge1-8k-EQ-Comp-Amp-Short.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/openbios/openfirmware/HEAD/cpu/x86/pc/olpc/images/Edge1-8k-EQ-Comp-Amp-Short.wav -------------------------------------------------------------------------------- /cpu/x86/pc/olpc/via/crypto-version.fth: -------------------------------------------------------------------------------- 1 | \ The public keys 2 | macro: KEYS mpkeys 3 | \ macro: KEYS testkeys 4 | 5 | \ The bios_verify image 6 | macro: CRYPTO_VERSION 0.5 7 | -------------------------------------------------------------------------------- /cpu/arm/olpc/1.75/crypto-version.fth: -------------------------------------------------------------------------------- 1 | \ The public keys 2 | macro: KEYS mpkeys 3 | \ macro: KEYS testkeys 4 | 5 | \ The bios_verify image 6 | macro: CRYPTO_VERSION 0.6-ARM 7 | -------------------------------------------------------------------------------- /cpu/arm/olpc/3.0/crypto-version.fth: -------------------------------------------------------------------------------- 1 | \ The public keys 2 | macro: KEYS mpkeys 3 | \ macro: KEYS testkeys 4 | 5 | \ The bios_verify image 6 | macro: CRYPTO_VERSION 0.6-ARM 7 | -------------------------------------------------------------------------------- /cpu/arm/olpc/4.0/crypto-version.fth: -------------------------------------------------------------------------------- 1 | \ The public keys 2 | macro: KEYS mpkeys 3 | \ macro: KEYS testkeys 4 | 5 | \ The bios_verify image 6 | macro: CRYPTO_VERSION 0.6-ARM 7 | -------------------------------------------------------------------------------- /cpu/arm/olpc/cl4/crypto-version.fth: -------------------------------------------------------------------------------- 1 | \ The public keys 2 | macro: KEYS mpkeys 3 | \ macro: KEYS testkeys 4 | 5 | \ The bios_verify image 6 | macro: CRYPTO_VERSION 0.6-ARM 7 | -------------------------------------------------------------------------------- /forth/kernel/metanswapmap.fth: -------------------------------------------------------------------------------- 1 | \ Null byte swap table management for metacompiler 2 | 3 | : set-swap-bit-t ( addr -- ) drop ; 4 | : note-string-t ( adr len -- adr len ) ; 5 | -------------------------------------------------------------------------------- /clients/memtest86/stddef.h: -------------------------------------------------------------------------------- 1 | #ifndef I386_STDDEF_H 2 | #define I386_STDDEF_H 3 | 4 | #define NULL ((void *)0) 5 | 6 | typedef unsigned long size_t; 7 | 8 | #endif /* I386_STDDEF_H */ 9 | -------------------------------------------------------------------------------- /cpu/x86/Linux/inflate.ld: -------------------------------------------------------------------------------- 1 | OUTPUT_ARCH(i386) 2 | OUTPUT_FORMAT(elf32-i386) 3 | SECTIONS 4 | { 5 | . = 0x00000; 6 | .text : { *(.text_inflate) } 7 | .text_spare : { *(.text) } 8 | } 9 | -------------------------------------------------------------------------------- /cpu/x86/pc/lxdevel/versions.fth: -------------------------------------------------------------------------------- 1 | \ Version numbers of items included in the OLPC firmware image 2 | 3 | \ The overall firmware revision 4 | macro: FW_MAJOR C 5 | macro: FW_MINOR 02 6 | -------------------------------------------------------------------------------- /cpu/x86/pc/neptune/versions.fth: -------------------------------------------------------------------------------- 1 | \ Version numbers of items included in the OLPC firmware image 2 | 3 | \ The overall firmware revision 4 | macro: FW_MAJOR A 5 | macro: FW_MINOR 02 6 | -------------------------------------------------------------------------------- /dev/mmc/sdhci/mv8686/bluetooth-pkg.fth: -------------------------------------------------------------------------------- 1 | new-device 2 | 2 to my-space 3 | my-space 1 reg 4 | " bluetooth" name 5 | fload ${BP}/dev/bluetooth/marvell-hci.fth \ Bluetooth driver 6 | finish-device 7 | -------------------------------------------------------------------------------- /cpu/mips/cobalt/devalias.fth: -------------------------------------------------------------------------------- 1 | devalias com1 /serial:115200 2 | 3 | devalias net /ethernet 4 | 5 | devalias rom /dropins 6 | 7 | devalias scsi /scsi 8 | devalias disk /ide@0/disk@0 9 | 10 | -------------------------------------------------------------------------------- /cpu/x86/kernelrel.bth: -------------------------------------------------------------------------------- 1 | purpose: Load file for x86 Forth kernel 2 | \ See license at end of file 3 | 4 | command: &builder &this 5 | build-now 6 | 7 | create rel-t 8 | fload ${BP}/cpu/x86/kernel.bth 9 | -------------------------------------------------------------------------------- /cpu/x86/pc/biosload/sd8686.bth: -------------------------------------------------------------------------------- 1 | purpose: Fetch the firmware for the Marvell 8686 wireless LAN module 2 | 3 | command: &builder &this 4 | build-now 5 | 6 | fload ${BP}/cpu/x86/pc/olpc/via/sd8686.bth 7 | -------------------------------------------------------------------------------- /cpu/x86/pc/olpc/paging.bth: -------------------------------------------------------------------------------- 1 | purpose: Build script for paging.di 2 | 3 | command: &builder &this 4 | build-now 5 | 6 | fload ${BP}/cpu/x86/pc/olpc/config.fth 7 | fload ${BP}/cpu/x86/pc/paging.fth 8 | -------------------------------------------------------------------------------- /cpu/x86/pc/biosload/paging.bth: -------------------------------------------------------------------------------- 1 | purpose: Build script for paging.di 2 | 3 | command: &builder &this 4 | build-now 5 | 6 | fload ${BP}/cpu/x86/pc/biosload/config.fth 7 | fload ${BP}/cpu/x86/pc/paging.fth 8 | -------------------------------------------------------------------------------- /cpu/x86/pc/lxdevel/paging.bth: -------------------------------------------------------------------------------- 1 | purpose: Build script for paging.di 2 | 3 | command: &builder &this 4 | build-now 5 | 6 | fload ${BP}/cpu/x86/pc/lxdevel/config.fth 7 | fload ${BP}/cpu/x86/pc/paging.fth 8 | -------------------------------------------------------------------------------- /cpu/x86/pc/neptune/paging.bth: -------------------------------------------------------------------------------- 1 | purpose: Build script for paging.di 2 | 3 | command: &builder &this 4 | build-now 5 | 6 | fload ${BP}/cpu/x86/pc/neptune/config.fth 7 | fload ${BP}/cpu/x86/pc/paging.fth 8 | -------------------------------------------------------------------------------- /clients/lib/types.h: -------------------------------------------------------------------------------- 1 | #define STATIC static 2 | #define VOID void 3 | #define UCHAR unsigned char 4 | #define ULONG unsigned long 5 | #define LONG long 6 | #define NULL 0 7 | 8 | VOID fatal(char *fmt, ...); 9 | -------------------------------------------------------------------------------- /cpu/ppc/inflate.bth: -------------------------------------------------------------------------------- 1 | purpose: Build script for the inflater 2 | copyright: Copyright 1997 FirmWorks All Rights Reserved 3 | 4 | command: &builder &this 5 | build-now 6 | 7 | fload ${BP}/cpu/ppc/inflate.fth 8 | -------------------------------------------------------------------------------- /cpu/x86/builderrel.bth: -------------------------------------------------------------------------------- 1 | purpose: Load file for i386 builder 2 | 3 | dictionary: ${BP}/cpu/x86/build/toolsrel.dic 4 | command: &x86forth &dictionary &this 5 | build-now 6 | 7 | fload ${BP}/cpu/x86/builder.bth 8 | -------------------------------------------------------------------------------- /cpu/x86/pc/olpc/vsa.bth: -------------------------------------------------------------------------------- 1 | purpose: Fetch the VSA binary 2 | 3 | command: &builder &this 4 | build-now 5 | 6 | " wget http://dev.laptop.org/git\?p=users/jcrouse/buildrom\;a=blob_plain\;h=ec9aae9 -O vsa.bin" $sh 7 | -------------------------------------------------------------------------------- /clients/emacs/x86/emacs.lds: -------------------------------------------------------------------------------- 1 | OUTPUT_FORMAT("elf32-i386"); 2 | OUTPUT_ARCH(i386); 3 | 4 | ENTRY(_start); 5 | SECTIONS { 6 | . = 0x100000; 7 | _start = . ; 8 | .data : { 9 | *(.data) 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /clients/memtest86/memtest.lds: -------------------------------------------------------------------------------- 1 | OUTPUT_FORMAT("elf32-i386"); 2 | OUTPUT_ARCH(i386); 3 | 4 | ENTRY(_start); 5 | SECTIONS { 6 | . = 0x10000; 7 | _start = . ; 8 | .data : { 9 | *(.data) 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /cpu/arm/olpc/4.0/nn.bth: -------------------------------------------------------------------------------- 1 | purpose: Fetch the Neonode touchscreen firmware 2 | 3 | command: &builder &this 4 | build-now 5 | 6 | fload ${BP}/cpu/arm/olpc/4.0/nn-version.fth 7 | fload ${BP}/cpu/arm/olpc/fetch-nn.fth 8 | -------------------------------------------------------------------------------- /cpu/x86/pc/olpc/via/startusdelay.fth: -------------------------------------------------------------------------------- 1 | \ Delay N microseconds, N in ax 2 | label usdelay 3 | cx push 4 | 5 | ax cx mov 6 | begin h# 80 # al in loopa 7 | 8 | cx pop 9 | ret 10 | end-code 11 | -------------------------------------------------------------------------------- /ofw/tokenizer/readfile.fth: -------------------------------------------------------------------------------- 1 | 0 value buf 2 | : get-file \ name ( -- ) 3 | reading 4 | ifd @ fsize alloc-mem to buf 5 | buf ifd @ fsize ifd @ fgets ." Read " . ." bytes" cr 6 | ifd @ fclose 7 | ; 8 | -------------------------------------------------------------------------------- /cpu/arm/olpc/1.75/resetvec.bth: -------------------------------------------------------------------------------- 1 | purpose: Build script for low-level startup code 2 | 3 | command: &builder &this 4 | build-now 5 | 6 | fload ${BP}/cpu/arm/olpc/1.75/config.fth 7 | fload ${BP}/cpu/arm/olpc/resetvec.fth 8 | -------------------------------------------------------------------------------- /cpu/arm/olpc/1.75/verify.bth: -------------------------------------------------------------------------------- 1 | purpose: Fetch the Crypto code and keys 2 | 3 | command: &builder &this 4 | build-now 5 | 6 | fload ${BP}/cpu/arm/olpc/1.75/crypto-version.fth 7 | fload ${BP}/cpu/arm/olpc/build-crypto.fth 8 | -------------------------------------------------------------------------------- /cpu/arm/olpc/3.0/resetvec.bth: -------------------------------------------------------------------------------- 1 | purpose: Build script for low-level startup code 2 | 3 | command: &builder &this 4 | build-now 5 | 6 | fload ${BP}/cpu/arm/olpc/3.0/config.fth 7 | fload ${BP}/cpu/arm/olpc/resetvec.fth 8 | -------------------------------------------------------------------------------- /cpu/arm/olpc/3.0/verify.bth: -------------------------------------------------------------------------------- 1 | purpose: Fetch the Crypto code and keys 2 | 3 | command: &builder &this 4 | build-now 5 | 6 | fload ${BP}/cpu/arm/olpc/3.0/crypto-version.fth 7 | fload ${BP}/cpu/arm/olpc/build-crypto.fth 8 | -------------------------------------------------------------------------------- /cpu/arm/olpc/4.0/resetvec.bth: -------------------------------------------------------------------------------- 1 | purpose: Build script for low-level startup code 2 | 3 | command: &builder &this 4 | build-now 5 | 6 | fload ${BP}/cpu/arm/olpc/4.0/config.fth 7 | fload ${BP}/cpu/arm/olpc/resetvec.fth 8 | -------------------------------------------------------------------------------- /cpu/arm/olpc/4.0/verify.bth: -------------------------------------------------------------------------------- 1 | purpose: Fetch the Crypto code and keys 2 | 3 | command: &builder &this 4 | build-now 5 | 6 | fload ${BP}/cpu/arm/olpc/4.0/crypto-version.fth 7 | fload ${BP}/cpu/arm/olpc/build-crypto.fth 8 | -------------------------------------------------------------------------------- /cpu/arm/olpc/cl4/resetvec.bth: -------------------------------------------------------------------------------- 1 | purpose: Build script for low-level startup code 2 | 3 | command: &builder &this 4 | build-now 5 | 6 | fload ${BP}/cpu/arm/olpc/cl4/config.fth 7 | fload ${BP}/cpu/arm/olpc/resetvec.fth 8 | -------------------------------------------------------------------------------- /cpu/arm/olpc/cl4/verify.bth: -------------------------------------------------------------------------------- 1 | purpose: Fetch the Crypto code and keys 2 | 3 | command: &builder &this 4 | build-now 5 | 6 | fload ${BP}/cpu/arm/olpc/cl4/crypto-version.fth 7 | fload ${BP}/cpu/arm/olpc/build-crypto.fth 8 | -------------------------------------------------------------------------------- /cpu/arm/mmp3/thunderstone/resetvec.bth: -------------------------------------------------------------------------------- 1 | purpose: Build script for low-level startup code 2 | 3 | command: &builder &this 4 | build-now 5 | 6 | fload ${BP}/cpu/arm/mmp3/thunderstone/config.fth 7 | fload ${BP}/cpu/arm/mmp3/resetvec.fth 8 | -------------------------------------------------------------------------------- /cpu/arm/olpc/1.75/ec.bth: -------------------------------------------------------------------------------- 1 | purpose: Fetch the EC (Embedded Controller, i.e. KB3700) microcode 2 | 3 | command: &builder &this 4 | build-now 5 | 6 | fload ${BP}/cpu/arm/olpc/1.75/ec-version.fth 7 | fload ${BP}/cpu/arm/olpc/fetch-ec.fth 8 | -------------------------------------------------------------------------------- /cpu/arm/olpc/3.0/ec.bth: -------------------------------------------------------------------------------- 1 | purpose: Fetch the EC (Embedded Controller, i.e. KB3700) microcode 2 | 3 | command: &builder &this 4 | build-now 5 | 6 | fload ${BP}/cpu/arm/olpc/3.0/ec-version.fth 7 | fload ${BP}/cpu/arm/olpc/fetch-ec.fth 8 | -------------------------------------------------------------------------------- /cpu/arm/olpc/4.0/ec.bth: -------------------------------------------------------------------------------- 1 | purpose: Fetch the EC (Embedded Controller, i.e. KB3700) microcode 2 | 3 | command: &builder &this 4 | build-now 5 | 6 | fload ${BP}/cpu/arm/olpc/4.0/ec-version.fth 7 | fload ${BP}/cpu/arm/olpc/fetch-ec.fth 8 | -------------------------------------------------------------------------------- /cpu/arm/olpc/cl4/ec.bth: -------------------------------------------------------------------------------- 1 | purpose: Fetch the EC (Embedded Controller, i.e. KB3700) microcode 2 | 3 | command: &builder &this 4 | build-now 5 | 6 | fload ${BP}/cpu/arm/olpc/cl4/ec-version.fth 7 | fload ${BP}/cpu/arm/olpc/fetch-ec.fth 8 | -------------------------------------------------------------------------------- /cpu/ppc/olpc/resetvec.bth: -------------------------------------------------------------------------------- 1 | purpose: Build script for the reset vector startup code 2 | copyright: Copyright 1997 FirmWorks All Rights Reserved 3 | 4 | command: &builder &this 5 | build-now 6 | 7 | fload ${BP}/cpu/ppc/resetvec.fth 8 | -------------------------------------------------------------------------------- /cpu/x86/pc/biosload/syslinux.cfg: -------------------------------------------------------------------------------- 1 | # This syslinux.cfg is for booting Open Firmware from a conventional BIOS 2 | # See HOWTO_USB_boot.txt 3 | default ofw 4 | timeout 20 5 | say Booting Open Firmware 6 | label ofw 7 | kernel ofw.c32 8 | -------------------------------------------------------------------------------- /clients/memtest86/controller.h: -------------------------------------------------------------------------------- 1 | #ifndef MEMTEST_CONTROLLER_H 2 | #define MEMTEST_CONTROLLER_H 3 | 4 | void find_controller(void); 5 | void poll_errors(void); 6 | void set_ecc_polling(int val); 7 | 8 | #endif /* MEMTEST_CONTROLLER_H */ 9 | -------------------------------------------------------------------------------- /cpu/arm/olpc/3.0/cforth.bth: -------------------------------------------------------------------------------- 1 | purpose: Fetch and compile CForth for the Security Processor 2 | 3 | command: &builder &this 4 | build-now 5 | 6 | fload ${BP}/cpu/arm/olpc/3.0/cforth-version.fth 7 | fload ${BP}/cpu/arm/olpc/build-cforth.fth 8 | -------------------------------------------------------------------------------- /cpu/arm/olpc/4.0/cforth.bth: -------------------------------------------------------------------------------- 1 | purpose: Fetch and compile CForth for the Security Processor 2 | 3 | command: &builder &this 4 | build-now 5 | 6 | fload ${BP}/cpu/arm/olpc/4.0/cforth-version.fth 7 | fload ${BP}/cpu/arm/olpc/build-cforth.fth 8 | -------------------------------------------------------------------------------- /cpu/arm/olpc/cl4/cforth.bth: -------------------------------------------------------------------------------- 1 | purpose: Fetch and compile CForth for the Security Processor 2 | 3 | command: &builder &this 4 | build-now 5 | 6 | fload ${BP}/cpu/arm/olpc/cl4/cforth-version.fth 7 | fload ${BP}/cpu/arm/olpc/build-cforth.fth 8 | -------------------------------------------------------------------------------- /cpu/arm/olpc/1.75/cforth.bth: -------------------------------------------------------------------------------- 1 | purpose: Fetch and compile CForth for the Security Processor 2 | 3 | command: &builder &this 4 | build-now 5 | 6 | fload ${BP}/cpu/arm/olpc/1.75/cforth-version.fth 7 | fload ${BP}/cpu/arm/olpc/build-cforth.fth 8 | -------------------------------------------------------------------------------- /cpu/arm/olpc/1.75/mcastnand.bth: -------------------------------------------------------------------------------- 1 | purpose: Fetch and compile the multicast NAND reflash program 2 | 3 | command: &builder &this 4 | build-now 5 | 6 | fload ${BP}/cpu/arm/olpc/1.75/mcnand-version.fth 7 | fload ${BP}/cpu/arm/olpc/build-mcnand.fth 8 | -------------------------------------------------------------------------------- /cpu/arm/olpc/3.0/mcastnand.bth: -------------------------------------------------------------------------------- 1 | purpose: Fetch and compile the multicast NAND reflash program 2 | 3 | command: &builder &this 4 | build-now 5 | 6 | fload ${BP}/cpu/arm/olpc/3.0/mcnand-version.fth 7 | fload ${BP}/cpu/arm/olpc/build-mcnand.fth 8 | -------------------------------------------------------------------------------- /cpu/arm/olpc/4.0/mcastnand.bth: -------------------------------------------------------------------------------- 1 | purpose: Fetch and compile the multicast NAND reflash program 2 | 3 | command: &builder &this 4 | build-now 5 | 6 | fload ${BP}/cpu/arm/olpc/4.0/mcnand-version.fth 7 | fload ${BP}/cpu/arm/olpc/build-mcnand.fth 8 | -------------------------------------------------------------------------------- /cpu/arm/olpc/cl4/mcastnand.bth: -------------------------------------------------------------------------------- 1 | purpose: Fetch and compile the multicast NAND reflash program 2 | 3 | command: &builder &this 4 | build-now 5 | 6 | fload ${BP}/cpu/arm/olpc/cl4/mcnand-version.fth 7 | fload ${BP}/cpu/arm/olpc/build-mcnand.fth 8 | -------------------------------------------------------------------------------- /cpu/mips/bonito/devalias.fth: -------------------------------------------------------------------------------- 1 | devalias com1 /isa/serial@i3f8 2 | devalias com2 /isa/serial@i2f8 3 | devalias mouse /mouse 4 | devalias net /ethernet 5 | devalias disk /isa/ide/disk@0 6 | devalias c /isa/ide/disk@0 7 | devalias d /isa/ide/disk@1 8 | -------------------------------------------------------------------------------- /cpu/x86/pc/olpc/images/LICENSE: -------------------------------------------------------------------------------- 1 | The "settings" icon is from http://findicons.com/icon/86219/settings?width=256# , 2 | licensed under Creative Commons Attribution (by), from the "AEON" icon pack 3 | by "Asher": http://kyo-tux.deviantart.com/ . 4 | -------------------------------------------------------------------------------- /ofw/inetv6/config.fth: -------------------------------------------------------------------------------- 1 | purpose: Configuration file for the networking stack 2 | 3 | \ At least one of the below must be created. 4 | \ When both are created, we have a dual networking stack. 5 | create include-ipv4 6 | create include-ipv6 7 | 8 | -------------------------------------------------------------------------------- /cpu/arm/olpc/1.75/sd8686.bth: -------------------------------------------------------------------------------- 1 | purpose: Fetch the firmware for the Marvell 8686 wireless LAN module 2 | 3 | command: &builder &this 4 | build-now 5 | 6 | fload ${BP}/cpu/arm/olpc/1.75/wlan-version.fth 7 | 8 | fload ${BP}/cpu/arm/olpc/build-wlan.fth 9 | -------------------------------------------------------------------------------- /cpu/arm/olpc/3.0/sd8686.bth: -------------------------------------------------------------------------------- 1 | purpose: Fetch the firmware for the Marvell 8686 wireless LAN module 2 | 3 | command: &builder &this 4 | build-now 5 | 6 | fload ${BP}/cpu/arm/olpc/3.0/wlan-version.fth 7 | 8 | fload ${BP}/cpu/arm/olpc/build-wlan.fth 9 | -------------------------------------------------------------------------------- /cpu/arm/olpc/4.0/sd8686.bth: -------------------------------------------------------------------------------- 1 | purpose: Fetch the firmware for the Marvell 8686 wireless LAN module 2 | 3 | command: &builder &this 4 | build-now 5 | 6 | fload ${BP}/cpu/arm/olpc/4.0/wlan-version.fth 7 | 8 | fload ${BP}/cpu/arm/olpc/build-wlan.fth 9 | -------------------------------------------------------------------------------- /cpu/arm/olpc/cl4/sd8686.bth: -------------------------------------------------------------------------------- 1 | purpose: Fetch the firmware for the Marvell 8686 wireless LAN module 2 | 3 | command: &builder &this 4 | build-now 5 | 6 | fload ${BP}/cpu/arm/olpc/cl4/wlan-version.fth 7 | 8 | fload ${BP}/cpu/arm/olpc/build-wlan.fth 9 | -------------------------------------------------------------------------------- /forth/wrapper/nullzip.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Stub versions of zip_memory() and inflate() for organizations 3 | * immune to the license of the code that implementes zip_memory() 4 | */ 5 | zip_memory() 6 | { 7 | } 8 | 9 | inflate() 10 | { 11 | } 12 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.o 2 | *.log 3 | *.di 4 | *.fc 5 | *.aml 6 | *.tag 7 | *.img 8 | *.dic 9 | *.dep 10 | *.version 11 | *.a 12 | *.bin 13 | builton.fth 14 | *.rom 15 | *.elf 16 | tags 17 | *~ 18 | headers 19 | *.md5 20 | *.public 21 | *.lo 22 | TAGS 23 | -------------------------------------------------------------------------------- /cpu/arm/olpc/1.75/attic/draminit.bth: -------------------------------------------------------------------------------- 1 | purpose: Build Open Firmware for Marvell MMP2 2 | \ See license at end of file 3 | 4 | command: &builder &this 5 | build-now 6 | 7 | fload ../dram.fth 8 | fload ../dram-forth.fth 9 | fload ../xo-dram.fth 10 | -------------------------------------------------------------------------------- /cpu/arm/olpc/4.0/mv8787.bth: -------------------------------------------------------------------------------- 1 | purpose: Fetch the firmware for the Marvell MV8787 wireless LAN module 2 | 3 | command: &builder &this 4 | build-now 5 | 6 | fload ${BP}/cpu/arm/olpc/4.0/wlan-version.fth 7 | 8 | fload ${BP}/cpu/arm/olpc/build-mv8787.fth 9 | -------------------------------------------------------------------------------- /cpu/x86/pc/segments.fth: -------------------------------------------------------------------------------- 1 | \ Segment selectors: 2 | 3 | hex 4 | 08 constant pgm-code-sel \ Executable 32-bit - our CS 5 | 10 constant pgm-sel \ Writeable Data - our DS,SS - same map as 18 6 | 10 constant phys-sel \ Writeable Data - linear = physical 7 | -------------------------------------------------------------------------------- /cpu/x86/basefwrel.bth: -------------------------------------------------------------------------------- 1 | \ See license at end of file 2 | purpose: Load file for Forth toolkit, without firmware 3 | 4 | dictionary: ${BP}/cpu/x86/build/toolsrel.dic 5 | command: &x86forth &dictionary &this 6 | build-now 7 | 8 | fload ${BP}/cpu/x86/basefw.bth 9 | -------------------------------------------------------------------------------- /cpu/x86/toolsrel.bth: -------------------------------------------------------------------------------- 1 | \ See license at end of file 2 | purpose: Load file for Forth toolkit, without firmware 3 | 4 | dictionary: ${BP}/cpu/x86/build/kernelrel.dic 5 | command: &x86forth &dictionary &this 6 | build-now 7 | 8 | fload ${BP}/cpu/x86/tools.bth 9 | -------------------------------------------------------------------------------- /dev/video/build/video.bth: -------------------------------------------------------------------------------- 1 | purpose: Load file for Video "super driver" 2 | 3 | command: &tokenize &this 4 | build-now 5 | 6 | silent on 7 | 8 | begin-tokenizing video.fc 9 | 10 | fload ${BP}/dev/video/build/loadfcod.fth 11 | 12 | end-tokenizing 13 | -------------------------------------------------------------------------------- /dev/usb2/device/vendor.fth: -------------------------------------------------------------------------------- 1 | purpose: Vendor/product Tables to be used to determine if we have a fcode driver 2 | 3 | headers 4 | hex 5 | 6 | fload ${BP}/dev/usb2/device/serial/vendor.fth 7 | fload ${BP}/dev/usb2/device/net/vendor.fth 8 | 9 | headers 10 | 11 | -------------------------------------------------------------------------------- /cpu/arm/mmp3/thunderstone/config.fth: -------------------------------------------------------------------------------- 1 | create debug-startup 2 | create use-elf 3 | 4 | fload ${BP}/cpu/arm/mmp3/thunderstone/addrs.fth 5 | fload ${BP}/cpu/arm/mmp2/hwaddrs.fth 6 | 7 | create machine-signature ," TS0" 8 | 9 | fload ${BP}/cpu/arm/mmp3/soc-config.fth 10 | -------------------------------------------------------------------------------- /cpu/arm/mmuparams.fth: -------------------------------------------------------------------------------- 1 | \ Defined by CPU core 2 | [ifdef] pagesize 3 | h# 1000 to pagesize 4 | d# 12 to pageshift 5 | [else] 6 | h# 1000 constant pagesize 7 | d# 12 constant pageshift 8 | [then] 9 | 10 | h# 10.0000 constant /section 11 | h# 4000 constant /page-table 12 | -------------------------------------------------------------------------------- /clients/emacs/arm/emacs.lds: -------------------------------------------------------------------------------- 1 | OUTPUT_FORMAT("elf32-littlearm"); 2 | OUTPUT_ARCH(ARM); 3 | 4 | ENTRY(_start); 5 | SECTIONS { 6 | . = 0x100000; 7 | .text : { 8 | *(.text) 9 | } 10 | .rodata : { 11 | *(.rodata*) 12 | } 13 | .data : { 14 | *(.data) 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /cpu/x86/pc/olpc/via/Notes/flashphoenix.txt: -------------------------------------------------------------------------------- 1 | Phoenix flash recipe 2 | 3 | patch noop ?image-valid $get-file 4 | get-file http:\\10.20.0.14\phoenix.bin 5 | flash-write-enable 6 | flash-buf 10.0000 0 write-flash-range 7 | flash-buf 10.0000 0 verify-flash-range 8 | flash-write-disable 9 | -------------------------------------------------------------------------------- /dev/dnet/dnet.bth: -------------------------------------------------------------------------------- 1 | purpose: Load file for Lattice Ethernet interface (dnet) 2 | 3 | command: &tokenize &this 4 | build-now 5 | 6 | silent on 7 | 8 | begin-tokenizing dnet.fc 9 | 10 | FCode-version2 11 | fload ${BP}/dev/dnet/dnet.fth 12 | end0 13 | 14 | end-tokenizing 15 | -------------------------------------------------------------------------------- /dev/pci/pcibridg.bth: -------------------------------------------------------------------------------- 1 | purpose: Load file for PCI probe code 2 | 3 | command: &tokenize &this 4 | build-now 5 | 6 | silent on 7 | 8 | begin-tokenizing pcibridg.fc 9 | 10 | FCode-version2 11 | 12 | fload ${BP}/dev/pci/pcibridg.fth 13 | 14 | end0 15 | 16 | end-tokenizing 17 | -------------------------------------------------------------------------------- /cpu/x86/pc/olpc/makeiso: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | OLPC=/home/wmb/obp-biosload/obp/arch/pc/dos/olpc 3 | cp ${OLPC}/build/ofw.c32 ${OLPC}/bootcd/isolinux 4 | mkisofs -o ${OLPC}/build/ofw.iso -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table ${OLPC}/bootcd 5 | -------------------------------------------------------------------------------- /dev/mediagx/cx55x0.fth: -------------------------------------------------------------------------------- 1 | \ *NOTE* don't delete this line; the first line in file must be a \ comment 2 | \ "driver" for Cyrix 5530. This is used to suppress address reassignment 3 | \ on BIOS-loaded firmware versions. 4 | 5 | 0 0 " assigned-addresses" property \ Suppress address reassignment 6 | -------------------------------------------------------------------------------- /dev/mediagx/cx5530/smi.bth: -------------------------------------------------------------------------------- 1 | purpose: Load file for the Cyrix 5530 SMI function driver 2 | 3 | command: &tokenize &this 4 | build-now 5 | 6 | silent on 7 | 8 | begin-tokenizing smi.fc 9 | 10 | FCode-version2 11 | fload ${BP}/dev/mediagx/cx5530/smi.fth 12 | end0 13 | 14 | end-tokenizing 15 | -------------------------------------------------------------------------------- /ofw/termemu/15x30pc.license: -------------------------------------------------------------------------------- 1 | 15x30pc.psf was created by Albert Cahalan as a modification of the DejaVu fonts. 2 | Such modification, and incorporation of a typeface within a larger software 3 | package, is permitted by the following license: 4 | 5 | http://dejavu.sourceforge.net/wiki/index.php/License 6 | -------------------------------------------------------------------------------- /ofw/termemu/difont.fth: -------------------------------------------------------------------------------- 1 | purpose: Incorporate font into dictionary from dropin module 2 | 3 | 0 value 'di-font 4 | 5 | : di-font ( -- adr ) 6 | 'di-font ?dup if exit then 7 | " font" find-drop-in if drop to 'di-font 'di-font exit then 8 | 0 9 | ; 10 | ' di-font to romfont 11 | -------------------------------------------------------------------------------- /cpu/x86/pc/alex/testicons.bth: -------------------------------------------------------------------------------- 1 | purpose: Expand the test icons 2 | 3 | command: &builder &this 4 | build-now 5 | 6 | " tar xfz ../testicons.tgz" expand$ $sh 7 | 8 | \ This forces the creation of a .log file, so we don't re-fetch 9 | writing testicons.version 10 | " 1" ofd @ fputs 11 | ofd @ fclose 12 | -------------------------------------------------------------------------------- /cpu/x86/pc/olpc/via/rmstart.bth: -------------------------------------------------------------------------------- 1 | \ See license at end of file 2 | purpose: Build script fo x86 real mode startup code. 3 | 4 | command: &builder &this 5 | build-now 6 | 7 | \ create debug-reset 8 | 9 | fload ${BP}/cpu/x86/pc/olpc/via/config.fth 10 | fload ${BP}/cpu/x86/pc/olpc/via/rmstart.fth 11 | -------------------------------------------------------------------------------- /dev/geode/display/gxfb.bth: -------------------------------------------------------------------------------- 1 | purpose: Load file for AMD Geode GX Frame Buffer FCode driver 2 | 3 | command: &tokenize &this 4 | build-now 5 | 6 | silent on 7 | 8 | begin-tokenizing gxfb.fc 9 | 10 | FCode-version2 11 | fload ${BP}/dev/geode/display/loadpkg.fth 12 | end0 13 | 14 | end-tokenizing 15 | -------------------------------------------------------------------------------- /dev/mediagx/cx5530/audio.bth: -------------------------------------------------------------------------------- 1 | purpose: Load file for the Cyrix 5530 audio function driver 2 | 3 | command: &tokenize &this 4 | build-now 5 | 6 | silent on 7 | 8 | begin-tokenizing audio.fc 9 | 10 | FCode-version2 11 | fload ${BP}/dev/mediagx/cx5530/audio.fth 12 | end0 13 | 14 | end-tokenizing 15 | -------------------------------------------------------------------------------- /dev/mediagx/cx5530/video.bth: -------------------------------------------------------------------------------- 1 | purpose: Load file for the Cyrix 5530 video function driver 2 | 3 | command: &tokenize &this 4 | build-now 5 | 6 | silent on 7 | 8 | begin-tokenizing video.fc 9 | 10 | FCode-version2 11 | fload ${BP}/dev/mediagx/cx5530/video.fth 12 | end0 13 | 14 | end-tokenizing 15 | -------------------------------------------------------------------------------- /dev/usb2/device/generic/generic.fth: -------------------------------------------------------------------------------- 1 | purpose: Generic USB device stub driver, useful for client programs 2 | 3 | external 4 | : open ( -- flag ) set-device? if false exit then device set-target true ; 5 | : close ( -- ) ; 6 | 7 | : init ( -- ) init device set-target ; 8 | init 9 | 10 | -------------------------------------------------------------------------------- /cpu/x86/pc/newton/testicons.bth: -------------------------------------------------------------------------------- 1 | purpose: Expand the test icons 2 | 3 | command: &builder &this 4 | build-now 5 | 6 | " tar xfz ../testicons.tgz" expand$ $sh 7 | 8 | \ This forces the creation of a .log file, so we don't re-fetch 9 | writing testicons.version 10 | " 1" ofd @ fputs 11 | ofd @ fclose 12 | -------------------------------------------------------------------------------- /cpu/x86/pc/olpc/testicons.bth: -------------------------------------------------------------------------------- 1 | purpose: Expand the test icons 2 | 3 | command: &builder &this 4 | build-now 5 | 6 | " tar xfz ../via/testicons.tgz" expand$ $sh 7 | 8 | \ This forces the creation of a .log file, so we don't re-fetch 9 | writing testicons.version 10 | " 1" ofd @ fputs 11 | ofd @ fclose 12 | -------------------------------------------------------------------------------- /cpu/x86/pc/olpc/via/testicons.bth: -------------------------------------------------------------------------------- 1 | purpose: Expand the test icons 2 | 3 | command: &builder &this 4 | build-now 5 | 6 | " tar xfz ../testicons.tgz" expand$ $sh 7 | 8 | \ This forces the creation of a .log file, so we don't re-fetch 9 | writing testicons.version 10 | " 1" ofd @ fputs 11 | ofd @ fclose 12 | -------------------------------------------------------------------------------- /dev/intel/graphics/poulsbo.bth: -------------------------------------------------------------------------------- 1 | purpose: Load file for Poulsbo Frame Buffer FCode driver 2 | 3 | command: &tokenize &this 4 | build-now 5 | 6 | silent on 7 | 8 | begin-tokenizing poulsbo.fc 9 | 10 | FCode-version2 11 | fload ${BP}/dev/intel/graphics/poulsbo.fth 12 | end0 13 | 14 | end-tokenizing 15 | -------------------------------------------------------------------------------- /cpu/arm/olpc/save-fw.fth: -------------------------------------------------------------------------------- 1 | tag-file @ fclose tag-file off 2 | my-self [if] 3 | ." WARNING: my-self is not 0" cr 4 | bye 5 | [then] 6 | 7 | .( --- Saving fw.dic ...) 8 | " fw.dic" $save-forth cr 9 | 10 | fload ${BP}/cpu/arm/mmp2/rawboot.fth 11 | 12 | .( --- Saving fw.img --- ) cr " fw.img" $save-rom 13 | -------------------------------------------------------------------------------- /dev/ne2000/ne2kpci.bth: -------------------------------------------------------------------------------- 1 | \ See license at end of file 2 | purpose: Main load file for driver 3 | 4 | command: &tokenize &this 5 | build-now 6 | 7 | silent on 8 | 9 | begin-tokenizing ne2kpci.fc 10 | 11 | FCode-version2 12 | 13 | fload ${BP}/dev/ne2000/ne2kpci.fth 14 | 15 | end0 16 | 17 | end-tokenizing 18 | -------------------------------------------------------------------------------- /dev/via/unichrome/unichrome.bth: -------------------------------------------------------------------------------- 1 | purpose: Load file for Via Unichrome Frame Buffer FCode driver 2 | 3 | command: &tokenize &this 4 | build-now 5 | 6 | silent on 7 | 8 | begin-tokenizing unichrome.fc 9 | 10 | FCode-version2 11 | fload ${BP}/dev/via/unichrome/loadpkg.fth 12 | end0 13 | 14 | end-tokenizing 15 | -------------------------------------------------------------------------------- /cpu/arm/mmp2/dma.fth: -------------------------------------------------------------------------------- 1 | purpose: Device node for MMP peripheral DMA 2 | 3 | dev / 4 | new-device 5 | " dma" device-name 6 | h# d4000000 h# 400 reg 7 | " marvell,pdma-1.0" +compatible 8 | d# 48 " interrupts" integer-property 9 | d# 16 " #dma-channels" integer-property 10 | finish-device 11 | device-end 12 | -------------------------------------------------------------------------------- /cpu/arm/native.bth: -------------------------------------------------------------------------------- 1 | purpose: Build file for native.dic 2 | 3 | dictionary: ${BP}/cpu/arm/build/tools.dic 4 | command: &armforth &dictionary &this 5 | build-now 6 | 7 | fload ${BP}/ofw/tokenizer/tokenize.fth 8 | fload ${BP}/forth/lib/builder.fth 9 | 10 | .( --- Saving native.dic --- ) cr "" native.dic save-forth 11 | -------------------------------------------------------------------------------- /dev/usb2/device/storage/usbstorage.bth: -------------------------------------------------------------------------------- 1 | purpose: Load file for USB Mass Storage Driver 2 | 3 | command: &tokenize &this 4 | build-now 5 | 6 | silent on 7 | 8 | begin-tokenizing usbstorage.fc 9 | 10 | FCode-version2 11 | 12 | fload ${BP}/dev/usb2/device/storage/storage.fth 13 | 14 | end0 15 | 16 | end-tokenizing 17 | -------------------------------------------------------------------------------- /cpu/arm/mmp2/soc-config.fth: -------------------------------------------------------------------------------- 1 | create mmp2 2 | h# 10000 constant l2-#sets 3 | 4 | h# e000.0000 constant audio-sram-pa \ Base of Audio SRAM 5 | h# 1.0000 constant /audio-sram \ Size of Audio SRAM 6 | h# 0010.0000 constant /audio-sram-map \ Mapping size of Audio SRAM 7 | 8 | h# 0003.0000 constant /sram \ Size of SRAM 9 | -------------------------------------------------------------------------------- /dev/mmc/sdhci/sdmmc.bth: -------------------------------------------------------------------------------- 1 | purpose: Load file for SD MultiMedia Card driver 2 | 3 | command: &tokenize &this 4 | build-now 5 | 6 | silent on 7 | 8 | begin-tokenizing sdmmc.fc 9 | 10 | FCode-version2 11 | fload ${BP}/dev/mmc/sdhci/sdmmc.fth 12 | fload ${BP}/dev/mmc/sdhci/selftest.fth 13 | end0 14 | 15 | end-tokenizing 16 | -------------------------------------------------------------------------------- /dev/usb2/hcd/ehci/ehci.bth: -------------------------------------------------------------------------------- 1 | purpose: Load file for EHCI HCD 2 | 3 | command: &tokenize &this 4 | build-now 5 | 6 | silent on 7 | 8 | begin-tokenizing ehci.fc 9 | 10 | FCode-version2 11 | 12 | fload ${BP}/dev/usb2/hcd/ehci/pci.fth 13 | fload ${BP}/dev/usb2/hcd/ehci/loadpkg.fth 14 | 15 | end0 16 | 17 | end-tokenizing 18 | -------------------------------------------------------------------------------- /ofw/fs/cdfs/cdfs.bth: -------------------------------------------------------------------------------- 1 | purpose: Build script for demand-loaded ISO 9660 file system package 2 | 3 | command: &native &this 4 | build-now 5 | 6 | start-inclusion 7 | fload ${BP}/ofw/fs/cdfs/loadpkg.fth 8 | end-inclusion 9 | 10 | writing cdfs.di 11 | inclusion " iso9660-file-system" write-deflated-dropin 12 | ofd @ fclose 13 | -------------------------------------------------------------------------------- /clients/memtest86/memtest.bin.lds: -------------------------------------------------------------------------------- 1 | OUTPUT_FORMAT("binary") 2 | OUTPUT_ARCH("i386") 3 | 4 | ENTRY(_main); 5 | SECTIONS { 6 | . = 0; 7 | .bootsect : { *(.bootsect) } 8 | .setup : { *(.setup) } 9 | .memtest : { 10 | _start = . ; 11 | *(.data) 12 | _end = . ; 13 | } 14 | _syssize = (_end - _start + 15) >> 4; 15 | } 16 | -------------------------------------------------------------------------------- /cpu/arm/olpc/testicons.bth: -------------------------------------------------------------------------------- 1 | purpose: Expand the test icons 2 | 3 | command: &builder &this 4 | build-now 5 | 6 | " tar xfz ../../../../../cpu/x86/pc/olpc/via/testicons.tgz" expand$ $sh 7 | 8 | \ This forces the creation of a .log file, so we don't re-fetch 9 | writing testicons.version 10 | " 1" ofd @ fputs 11 | ofd @ fclose 12 | -------------------------------------------------------------------------------- /dev/ide/node.bth: -------------------------------------------------------------------------------- 1 | purpose: Load file for IDE node FCode 2 | 3 | command: &builder &this 4 | build-now 5 | 6 | silent on 7 | 8 | begin-tokenizing node.fc 9 | 10 | Fcode-version2 11 | fload ${BP}/dev/ide/idedisk.fth 12 | end0 13 | 14 | end-tokenizing 15 | 16 | fload ${BP}/dev/ide/bintostr.fth 17 | bintostr node.fc node.hex 18 | -------------------------------------------------------------------------------- /cpu/x86/pc/olpc/getmfgdata.fth: -------------------------------------------------------------------------------- 1 | \ Mfg data is in a block by itself. 2 | /flash-block buffer: mfg-data-buf 3 | 4 | \ Read mfg data from FLASH to RAM 5 | : get-mfg-data ( -- ) 6 | rom-pa mfg-data-offset + mfg-data-buf /flash-block lmove 7 | ; 8 | 9 | : mfg-data-top ( -- adr ) 10 | flash-base mfg-data-end-offset + 11 | ; 12 | -------------------------------------------------------------------------------- /cpu/x86/pc/olpc/sourceurl.fth: -------------------------------------------------------------------------------- 1 | \ Make a file containing the URL of the source code 2 | 3 | show-rebuilds? false to show-rebuilds? \ We don't need to see these commands 4 | 5 | " svn info ../../../../.. | grep URL: | cut -d ' ' -f 2 | tr \\n ' ' >sourceurl" $sh 6 | " svnversion -n ../../../../.. >>sourceurl" $sh 7 | 8 | to show-rebuilds? 9 | -------------------------------------------------------------------------------- /dev/usb2/hcd/ohci/ohci.bth: -------------------------------------------------------------------------------- 1 | purpose: Load file for OHCI HCD 2 | 3 | command: &tokenize &this 4 | build-now 5 | 6 | silent on 7 | 8 | begin-tokenizing ohci.fc 9 | 10 | FCode-version2 11 | 12 | " ohci" encode-string " device_type" property 13 | 14 | fload ${BP}/dev/usb2/hcd/ohci/loadpkg.fth 15 | 16 | end0 17 | 18 | end-tokenizing 19 | -------------------------------------------------------------------------------- /cpu/arm/builder.bth: -------------------------------------------------------------------------------- 1 | purpose: Load file for i386 builder 2 | 3 | dictionary: ${BP}/cpu/arm/build/tools.dic 4 | command: &armforth &dictionary &this 5 | build-now 6 | 7 | fload ${BP}/ofw/tokenizer/tokenize.fth \ Tokenizer 8 | fload ${BP}/forth/lib/builder.fth \ Builder 9 | 10 | .( --- Saving builder.dic --- ) " builder.dic" $save-forth cr 11 | -------------------------------------------------------------------------------- /cpu/x86/Linux/make_with_tcc: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # This script demonstrates the ability to build the wrapper with tcc 3 | # (Tiny C Compiler) 4 | 5 | BP=../../.. 6 | W=${BP}/forth/wrapper 7 | Z=${W}/zip 8 | 9 | tcc -DTARGET_X86 -o forth ${W}/wrapper.c ${W}/logger.c ${Z}/zipmem.c ${Z}/deflate.c ${Z}/trees.c ${Z}/bits.c ${Z}/util.c ${Z}/inflate.c 10 | -------------------------------------------------------------------------------- /cpu/x86/pc/emu/makefs.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | dd if=/dev/zero of=filesystem.img bs=512 seek=20K count=1 3 | /sbin/mke2fs -F filesystem.img 4 | dd if=filesystem.img of=fs.img bs=512 seek=1 5 | rm filesystem.img 6 | /sbin/sfdisk -L -uS -C 5 -H 128 -S 32 fs.img <sourceurl" $sh 6 | " svnversion -n ../../../../../.. >>sourceurl" $sh 7 | 8 | to show-rebuilds? 9 | -------------------------------------------------------------------------------- /cpu/x86/pc/egareport.fth: -------------------------------------------------------------------------------- 1 | : v-report ( char -- ) 2 | " # al mov al h# b8000 #) mov h# 1d # al mov al h# b8001 #) mov" evaluate 3 | ; 4 | : vr-report ( char -- ) \ Real mode version 5 | " ds push h# b000 # push ds pop" evaluate 6 | " # al mov al h# 8000 #) mov h# 1d # al mov al h# 8001 #) mov" evaluate 7 | " ds pop" evaluate 8 | ; 9 | -------------------------------------------------------------------------------- /cpu/x86/pc/olpc/via/fw-version.fth: -------------------------------------------------------------------------------- 1 | \ The overall firmware revision 2 | macro: FW_MAJOR C 3 | macro: FW_MINOR 17 4 | 5 | \ Create a 2-character build/fw-suffix file to personalize your test builds 6 | " fw-suffix" $file-exists? [if] 7 | " fw-suffix" $read-file 2 min " ${FW_MINOR}%s" expand$ sprintf 8 | " FW_MINOR" $set-macro 9 | [then] 10 | -------------------------------------------------------------------------------- /cpu/x86/ftrace.fth: -------------------------------------------------------------------------------- 1 | \ Display a Forth stack backtrace 2 | only forth also hidden also forth definitions 3 | : ftrace ( -- ) \ Forth stack 4 | rrp begin dup in-return-stack? 0= while >saved l@ repeat ( rp ) 5 | rrp in-return-stack? if rip >saved .traceline then 6 | >saved rssave-end swap (rstrace 7 | ; 8 | only forth also definitions 9 | -------------------------------------------------------------------------------- /cpu/x86/pc/lxdevel/rmstart.bth: -------------------------------------------------------------------------------- 1 | \ See license at end of file 2 | purpose: Build script fo x86 real mode startup code. 3 | 4 | command: &builder &this 5 | build-now 6 | 7 | \ To do this on the geode, extra init may be necessary 8 | \ create debug-reset 9 | 10 | fload ${BP}/cpu/x86/pc/lxdevel/config.fth 11 | fload ${BP}/cpu/x86/pc/lxdevel/rmstart.fth 12 | -------------------------------------------------------------------------------- /cpu/x86/pc/neptune/rmstart.bth: -------------------------------------------------------------------------------- 1 | \ See license at end of file 2 | purpose: Build script fo x86 real mode startup code. 3 | 4 | command: &builder &this 5 | build-now 6 | 7 | \ To do this on the geode, extra init may be necessary 8 | \ create debug-reset 9 | 10 | fload ${BP}/cpu/x86/pc/neptune/config.fth 11 | fload ${BP}/cpu/x86/pc/neptune/rmstart.fth 12 | -------------------------------------------------------------------------------- /cpu/x86/pc/rmtools.fth: -------------------------------------------------------------------------------- 1 | purpose: Convert between segment:offset and linear addresses 2 | 3 | : >seg:off ( linear -- offset segment ) dup h# f and swap 4 rshift ; 4 | : seg:off! ( linear adr -- ) >r >seg:off r@ wa1+ w! r> w! ; 5 | : seg:off> ( offset segment -- linear ) 4 lshift + ; 6 | : seg:off@ ( adr -- linear ) dup w@ swap wa1+ w@ seg:off> ; 7 | -------------------------------------------------------------------------------- /dev/3c90xb/3c905b.bth: -------------------------------------------------------------------------------- 1 | purpose: Load file for 3COM905B Ethernet FCode driver 2 | 3 | command: &tokenize &this 4 | build-now 5 | 6 | silent on 7 | 8 | begin-tokenizing 3c905b.fc 9 | 10 | FCode-version2 11 | " 3C905B" model 12 | " 3C905B" encode-string " compatible" property 13 | fload ${BP}/dev/3c90xb/loadpkg.fth 14 | end0 15 | 16 | end-tokenizing 17 | -------------------------------------------------------------------------------- /dev/i8255x/82559.bth: -------------------------------------------------------------------------------- 1 | purpose: Load file for Intel 82559 Ethernet FCode driver 2 | 3 | command: &tokenize &this 4 | build-now 5 | 6 | silent on 7 | 8 | begin-tokenizing 82559.fc 9 | 10 | FCode-version2 11 | " 82559" model 12 | " 82559" encode-string " compatible" property 13 | fload ${BP}/dev/i8255x/loadpkg.fth 14 | end0 15 | 16 | end-tokenizing 17 | -------------------------------------------------------------------------------- /cpu/x86/pc/olpc/via/versions.fth: -------------------------------------------------------------------------------- 1 | \ Version numbers of items included in the OLPC firmware image 2 | 3 | fload ${BP}/cpu/x86/pc/olpc/via/fw-version.fth 4 | fload ${BP}/cpu/x86/pc/olpc/via/ec-version.fth 5 | fload ${BP}/cpu/x86/pc/olpc/via/wlan-version.fth 6 | fload ${BP}/cpu/x86/pc/olpc/via/crypto-version.fth 7 | fload ${BP}/cpu/x86/pc/olpc/via/mcnand-version.fth 8 | -------------------------------------------------------------------------------- /cpu/arm/olpc/1.75/fw-version.fth: -------------------------------------------------------------------------------- 1 | \ The overall firmware revision 2 | macro: FW_PREFIX Q4 3 | macro: FW_MAJOR D 4 | macro: FW_MINOR 38 5 | 6 | \ Create a 2-character build/fw-suffix file to personalize your test builds 7 | " fw-suffix" $file-exists? [if] 8 | " fw-suffix" $read-file 2 min " ${FW_MINOR}%s" expand$ sprintf 9 | " FW_MINOR" $set-macro 10 | [then] 11 | -------------------------------------------------------------------------------- /cpu/arm/olpc/3.0/fw-version.fth: -------------------------------------------------------------------------------- 1 | \ The overall firmware revision 2 | macro: FW_PREFIX Q5 3 | macro: FW_MAJOR A 4 | macro: FW_MINOR 04 5 | 6 | \ Create a 2-character build/fw-suffix file to personalize your test builds 7 | " fw-suffix" $file-exists? [if] 8 | " fw-suffix" $read-file 2 min " ${FW_MINOR}%s" expand$ sprintf 9 | " FW_MINOR" $set-macro 10 | [then] 11 | -------------------------------------------------------------------------------- /cpu/arm/olpc/4.0/fw-version.fth: -------------------------------------------------------------------------------- 1 | \ The overall firmware revision 2 | macro: FW_PREFIX Q7 3 | macro: FW_MAJOR C 4 | macro: FW_MINOR 05 5 | 6 | \ Create a 2-character build/fw-suffix file to personalize your test builds 7 | " fw-suffix" $file-exists? [if] 8 | " fw-suffix" $read-file 2 min " ${FW_MINOR}%s" expand$ sprintf 9 | " FW_MINOR" $set-macro 10 | [then] 11 | -------------------------------------------------------------------------------- /cpu/arm/olpc/cl4/fw-version.fth: -------------------------------------------------------------------------------- 1 | \ The overall firmware revision 2 | macro: FW_PREFIX Q7 3 | macro: FW_MAJOR A 4 | macro: FW_MINOR 15 5 | 6 | \ Create a 2-character build/fw-suffix file to personalize your test builds 7 | " fw-suffix" $file-exists? [if] 8 | " fw-suffix" $read-file 2 min " ${FW_MINOR}%s" expand$ sprintf 9 | " FW_MINOR" $set-macro 10 | [then] 11 | -------------------------------------------------------------------------------- /dev/ncr53810/ncr531010.bth: -------------------------------------------------------------------------------- 1 | purpose: Load file for LSI Logic 53C1010 SCSI FCode driver 2 | 3 | command: &tokenize &this 4 | build-now 5 | 6 | hex 7 | silent on 8 | 9 | 10 | begin-tokenizing ncr531010.fc 11 | 12 | FCode-version2 13 | fload ${BP}/dev/ncr53810/loadpkg.fth 14 | 0 0 encode-bytes " assigned-addresses" property 15 | fcode-end 16 | 17 | end-tokenizing 18 | -------------------------------------------------------------------------------- /forth/lib/hostcpu.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | MACHNAME=`uname -m` 3 | case ${MACHNAME} in 4 | sun4*) CPUNAME=sparc ;; 5 | ppc) CPUNAME=powerpc ;; 6 | i*86) CPUNAME=x86 ;; 7 | x86*) CPUNAME=x86 ;; 8 | mips) CPUNAME=mips ;; 9 | arm*) CPUNAME=arm ;; 10 | sun3) CPUNAME=m68k ;; 11 | *) CPUNAME=${MACHNAME} ;; 12 | esac 13 | echo ${CPUNAME} 14 | -------------------------------------------------------------------------------- /dev/mediagx/cx5520/cx5520.bth: -------------------------------------------------------------------------------- 1 | purpose: Load file for the Cyrix 5520 I/O Companion driver 2 | 3 | command: &tokenize &this 4 | build-now 5 | 6 | silent on 7 | 8 | begin-tokenizing cx5520.fc 9 | 10 | FCode-version2 11 | " cx5520" model 12 | " cx5520" encode-string " compatible" property 13 | fload ${BP}/dev/mediagx/cx5520/loadpkg.fth 14 | end0 15 | 16 | end-tokenizing 17 | -------------------------------------------------------------------------------- /cpu/mips/broadcom/avx/broadcom.fth: -------------------------------------------------------------------------------- 1 | purpose: Access to Broadcom spaces 2 | copyright: Copyright 2001 Firmworks All Rights Reserved 3 | 4 | hex 5 | headers 6 | 7 | : bcl@ ( idx -- val ) bc-reg-base + l@ ; 8 | : bcl! ( val idx -- ) bc-reg-base + l! ; 9 | 10 | : bc-cfg@ ( idx -- value ) pci-reg-base + l@ ; 11 | : bc-cfg! ( value idx -- ) pci-reg-base + l! ; 12 | 13 | -------------------------------------------------------------------------------- /cpu/x86/pc/olpc/via/ec-version.fth: -------------------------------------------------------------------------------- 1 | \ The EC microcode 2 | macro: EC_VERSION 2_2_10 3 | 4 | \ Alternate command for getting EC microcode, for testing new versions. 5 | \ Temporarily uncomment the line and modify the path as necessary 6 | \ macro: GET_EC cp ~rsmith/olpc/ec/ec-code15/image/ecimage.bin ec.img 7 | \ macro: GET_EC wget -q http://dev.laptop.org/pub/ec/ec_test.img -O ec.img 8 | -------------------------------------------------------------------------------- /dev/usb2/device/hub/hub.bth: -------------------------------------------------------------------------------- 1 | purpose: Load file for USB Hub Driver 2 | 3 | command: &tokenize &this 4 | build-now 5 | 6 | silent on 7 | 8 | begin-tokenizing hub.fc 9 | 10 | FCode-version2 11 | 12 | fload ${BP}/dev/usb2/hcd/hcd-call.fth \ HCD interface forwarded to children 13 | fload ${BP}/dev/usb2/device/hub/hub.fth \ Hub driver 14 | 15 | end0 16 | 17 | end-tokenizing 18 | -------------------------------------------------------------------------------- /dev/video/vmsvga.bth: -------------------------------------------------------------------------------- 1 | purpose: Main load file for VMware SVGA virtual video driver 2 | 3 | command: &tokenize &this 4 | build-now 5 | 6 | silent on 7 | 8 | begin-tokenizing vmsvga.fc 9 | 10 | FCode-version2 11 | 12 | " display" device-name 13 | 14 | fload ${BP}/dev/video/controlr/vmsvga.fth \ VMware-specific words 15 | probe 16 | 17 | end0 18 | 19 | end-tokenizing 20 | 21 | -------------------------------------------------------------------------------- /cpu/arm/mmp2/make-sdkit.sh: -------------------------------------------------------------------------------- 1 | mkdir -p sdkit-arm 2 | cp ../mmap.fth sdkit-arm 3 | cp twsi.fth gpio.fth mfpr.fth sdkit.fth sdkit-arm 4 | cp ../olpc/1.75/smbus.fth ../olpc/1.75/camera-test.fth ../olpc/1.75/accelerometer.fth sdkit-arm 5 | cp ../Linux/armforth.static sdkit-arm/forth 6 | cp ../olpc/1.75/build/prefw.dic sdkit-arm/prefw.dic 7 | cp sdkit.sh sdkit-arm 8 | tar cfz sdkit-arm.tgz sdkit-arm 9 | -------------------------------------------------------------------------------- /cpu/arm/olpc/1.75/sdkit/sdkit.fth: -------------------------------------------------------------------------------- 1 | fload mmap.fth 2 | 0 constant acgr-pa \ Dummy definition 3 | fload mfpr.fth 4 | apb-pa h# 40.0000 mmap to io-va 5 | fload gpio.fth 6 | : us ( n -- ) d# 40 * 0 do loop ; 7 | : ms ( n -- ) 0 ?do d# 1000 us loop ; 8 | fload smbus.fth 9 | fload twsi.fth 10 | fload twsi-i2c.fth 11 | .( See http://wiki.laptop.org/go/Forth_Lesson_22) cr 12 | hex 13 | -------------------------------------------------------------------------------- /cpu/x86/pc/olpc/dsdt.bth: -------------------------------------------------------------------------------- 1 | purpose: Build the ACPI tables 2 | 3 | command: &builder &this 4 | build-now 5 | 6 | " iasl -p dsdt -vi -vr -vs ../dsdt.dsl" expand$ $sh 7 | \ " iasl -vi -vr -vs ../fadt.dsl" expand$ $sh 8 | \ " iasl -vi -vr -vs ../ssdt.dsl" expand$ $sh 9 | 10 | \ This forces the creation of a dsdt.log file, so we don't re-compile 11 | writing dsdt.stamp 12 | ofd @ fclose 13 | -------------------------------------------------------------------------------- /forth/lib/struct.fth: -------------------------------------------------------------------------------- 1 | purpose: structures and fields 2 | 3 | : struct ( -- initial-offset ) 0 ; 4 | 5 | : field \ name ( offset size -- offset' ) 6 | create over , + 7 | does> @ + ( base -- addr ) 8 | ; 9 | 10 | \ Create two name fields with the same offset and size 11 | : 2field \ name name ( offset size -- offset' ) 12 | 2dup field drop 13 | field 14 | ; 15 | -------------------------------------------------------------------------------- /dev/geode/ac97/ac97.bth: -------------------------------------------------------------------------------- 1 | purpose: Load file for AMD Geode AC97 Audio interface 2 | 3 | command: &tokenize &this 4 | build-now 5 | 6 | silent on 7 | 8 | begin-tokenizing ac97.fc 9 | 10 | FCode-version2 11 | fload ${BP}/dev/geode/ac97/ac97.fth 12 | fload ${BP}/forth/lib/isin.fth 13 | fload ${BP}/forth/lib/tones.fth 14 | fload ${BP}/dev/geode/ac97/selftest.fth 15 | end0 16 | 17 | end-tokenizing 18 | -------------------------------------------------------------------------------- /dev/hdaudio/audio.fth: -------------------------------------------------------------------------------- 1 | purpose: High-level glue and codec selection 2 | \ Intel HD Audio top-level 3 | hex 4 | 5 | " audio" device-name 6 | " sound" device-type 7 | 8 | : vendor-id ( -- id ) 0 to node h# f0000 cmd? ; 9 | 10 | : setup-defers ( -- ) 11 | vendor-id case 12 | h# 14f1.5066 of cx2058x-init endof 13 | endcase 14 | ; 15 | 16 | ' setup-defers to detect-codec 17 | 18 | -------------------------------------------------------------------------------- /dev/usb2/hcd/uhci/uhci.bth: -------------------------------------------------------------------------------- 1 | purpose: Load file for Universal HCI Driver code 2 | 3 | command: &tokenize &this 4 | build-now 5 | 6 | silent on 7 | 8 | begin-tokenizing uhci.fc 9 | 10 | FCode-version2 11 | 12 | " uhci" encode-string " device_type" property 13 | 14 | fload ${BP}/dev/usb2/hcd/uhci/pci.fth 15 | fload ${BP}/dev/usb2/hcd/uhci/loadpkg.fth 16 | 17 | end0 18 | 19 | end-tokenizing 20 | -------------------------------------------------------------------------------- /ofw/fcode/debugfc.fth: -------------------------------------------------------------------------------- 1 | \ User interface versions of some special FCode Functions and tokenizer macros 2 | 3 | : fcode-version1 ( -- ) ; 4 | : fcode-version2 ( -- ) ; 5 | : fcode-version3 ( -- ) ; 6 | : end0 ( -- ) [compile] \ source-id if begin refill 0= until then ; 7 | 8 | \ headers and headerless are already defined, and their action can be disabled 9 | : external ( -- ) ; 10 | -------------------------------------------------------------------------------- /dev/usb2/device/generic/generic.bth: -------------------------------------------------------------------------------- 1 | purpose: Load file for generic USB device 2 | 3 | command: &tokenize &this 4 | build-now 5 | 6 | silent on 7 | 8 | begin-tokenizing generic.fc 9 | 10 | FCode-version2 11 | 12 | fload ${BP}/dev/usb2/device/common.fth \ HCD interface forwarded to children 13 | fload ${BP}/dev/usb2/device/generic/generic.fth \ Hub driver 14 | 15 | end0 16 | 17 | end-tokenizing 18 | -------------------------------------------------------------------------------- /dev/usb2/device/mouse/usbmouse.bth: -------------------------------------------------------------------------------- 1 | purpose: Load file for USB boot mouse driver 2 | 3 | command: &tokenize &this 4 | build-now 5 | 6 | silent on 7 | 8 | begin-tokenizing usbmouse.fc 9 | 10 | FCode-version2 11 | 12 | fload ${BP}/dev/usb2/device/common.fth \ USB device driver common routines 13 | fload ${BP}/dev/usb2/device/mouse/mouse.fth \ HID requests 14 | 15 | end0 16 | 17 | end-tokenizing 18 | -------------------------------------------------------------------------------- /cpu/arm/olpc/chooseos.fth: -------------------------------------------------------------------------------- 1 | purpose: OS chooser for dual boot (Android and Linux) 2 | 3 | : choice-present? ( -- present? ) 4 | \ TODO: number of partitions > 2, or specific android files present 5 | true 6 | ; 7 | 8 | : choose-os ( n -- ) 9 | if 10 | button-o game-key-mask or to game-key-mask 11 | else 12 | button-o invert game-key-mask and to game-key-mask 13 | then 14 | ; 15 | -------------------------------------------------------------------------------- /cpu/x86/pc/olpc/via/Notes/RAMinterleave.txt: -------------------------------------------------------------------------------- 1 | Scramble plan for interleave 001 MA5 2 | 3 | RAM BA2 BA1 BA0 A14 A13 A12 A11 A10 A09 A08 A07 A06 A05 A04 A03 A02 A01 A00 4 | ROW 30 29 28 22 21 27 19 18 17 16 25 24 23 20 26 5 | COL 15 14 13 AP 12 11 10 9 8 7 6 5 4 3 6 | 7 | BIOS porting guide p 56 (77) - 59 (80) 8 | Programmers manual p 47 (56) - 48 (57) 9 | -------------------------------------------------------------------------------- /cpu/x86/pc/olpc/via/startcpuspeed.fth: -------------------------------------------------------------------------------- 1 | h# 10000 h# 1a0 bitset-msr \ Enable performance state changes 2 | h# 198 rmsr \ Get performance state info - min.max in %edx, current in %eax 3 | ax ax xor op: dx ax mov \ MSR.low for new performance state - from max field in %edx 4 | dx dx xor \ MSR.high = 0 5 | h# 199 wmsr \ We should start going faster now 6 | -------------------------------------------------------------------------------- /dev/mmc/sdhci/mv8686/quirk.fth: -------------------------------------------------------------------------------- 1 | \ This is a workaround for a reset problem with the Marvell 88W8686 2 | \ as described in Marvell AppNote AN-20017. Basically, you have to 3 | \ pulse the external reset pin after powering up the module, otherwise 4 | \ it might not reset correctly. 5 | 6 | : mv8686-reset-quirk ( -- ) 7 | 5 ms 8 | " wlan-reset" evaluate 9 | ; 10 | ' mv8686-reset-quirk to ?mv8686-quirk 11 | -------------------------------------------------------------------------------- /clients/memtest86/lfbgeometry.h: -------------------------------------------------------------------------------- 1 | /* Geometry of linear frame buffer */ 2 | 3 | #define pixel_bytes 2 // bytes per pixel 4 | #define screen_width 1200 // pixels per line (OLPC LCD) 5 | #define screen_height 900 // pixels per column (OLPC LCD) 6 | // #define screen_width 1024 // pixels per line (OLPC CRT) 7 | // #define screen_height 768 // pixels per column (OLPC CRT) 8 | -------------------------------------------------------------------------------- /cpu/mips/broadcom/avx/virtaddr.fth: -------------------------------------------------------------------------------- 1 | purpose: Virtual addresses for AVX 2 | copyright: Copyright 2001 FirmWorks All Rights Reserved 3 | 4 | headerless 5 | 6 | 0 value fw-virt-base \ Setup later after we know the memory size 7 | h# 10.0000 value fw-virt-size 8 | 9 | headers 10 | 11 | kseg0 h# 20.0000 + ' load-base set-config-int-default 12 | 0 value load-limit \ Top address of area at load-base (set later) 13 | -------------------------------------------------------------------------------- /cpu/x86/pc/olpc/via/Notes/MemoryLines.txt: -------------------------------------------------------------------------------- 1 | From william wong - address muxing for VX855 2 | 3 | interleave type 001 4 | 5 | BA2 15 6 | BA1 14 7 | BA0 13 8 | A14 30 9 | a13 29 10 | a12 28 11 | a11 22 12 | a10 21 AP 13 | a9 27 12 14 | a8 19 11 15 | a7 18 10 16 | a6 17 9 17 | a5 16 8 18 | a4 25 7 19 | a3 24 6 20 | a2 23 5 21 | a1 20 4 22 | a0 26 3 23 | -------------------------------------------------------------------------------- /cpu/x86/pc/olpc/via/Makefile-565: -------------------------------------------------------------------------------- 1 | PNG := $(wildcard *.png) 2 | C565 := $(patsubst %.png,%.565,$(PNG)) 3 | 4 | all: $(C565) 5 | 6 | %.565: %.bmp 7 | forth ../../bmp24rgb565.fth -s "bmp24rgb565 $< $@" 8 | 9 | %.bmp: %.png 10 | convert -background white -layers flatten $< tmp.png 11 | convert -type truecolor tmp.png $@ 12 | rm tmp.png 13 | 14 | clean: 15 | -rm *.565 *.log tmp.png 16 | 17 | #.TEMPORARY: tmp.png 18 | -------------------------------------------------------------------------------- /dev/dec21140/netgear.bth: -------------------------------------------------------------------------------- 1 | purpose: Load file for NetGear LC82C169 Ethernet FCode driver 2 | 3 | command: &tokenize &this 4 | build-now 5 | 6 | silent on 7 | 8 | begin-tokenizing netgear.fc 9 | 10 | FCode-version2 11 | 12 | h# 100 constant /regs \ Total size of adapter's register bank 13 | 14 | fload ${BP}/dev/dec21140/dec21x40.fth 15 | fload ${BP}/dev/dec21140/netgear.fth 16 | 17 | end0 18 | 19 | end-tokenizing 20 | -------------------------------------------------------------------------------- /cpu/arm/olpc/1.75/gamekey-a1.fth: -------------------------------------------------------------------------------- 1 | : (game-key@) ( -- n ) 2 | 0 ( n ) 3 | d# 16 gpio-pin@ 0= if h# 80 or then \ O 4 | d# 17 gpio-pin@ 0= if h# 02 or then \ Check 5 | d# 18 gpio-pin@ 0= if h# 100 or then \ X 6 | d# 19 gpio-pin@ 0= if h# 01 or then \ Square 7 | rotate-gpio# gpio-pin@ 0= if h# 40 or then \ Rotate 8 | ; 9 | ' (game-key@) to game-key@ 10 | -------------------------------------------------------------------------------- /cpu/mips/atlas/virtaddr.fth: -------------------------------------------------------------------------------- 1 | purpose: Virtual addresses for the Atlas board 2 | copyright: Copyright 2001 FirmWorks All Rights Reserved 3 | 4 | headerless 5 | 6 | rom-base kseg0 + value fw-virt-base \ 1 meg of mapping space 7 | h# 10.0000 value fw-virt-size 8 | 9 | headers 10 | 11 | \ fw-virt-base fw-virt-size + ' load-base set-config-int-default 12 | 0 value load-limit \ Top address of area at load-base (set later) 13 | -------------------------------------------------------------------------------- /cpu/x86/builder.bth: -------------------------------------------------------------------------------- 1 | purpose: Load file for i386 builder 2 | 3 | dictionary: ${BP}/cpu/x86/build/tools.dic 4 | command: &x86forth &dictionary &this 5 | build-now 6 | 7 | fload ${BP}/ofw/tokenizer/tokenize.fth \ Tokenizer 8 | fload ${BP}/forth/lib/builder.fth \ Builder 9 | 10 | \- rel .( --- Saving builder.dic --- ) " builder.dic" $save-forth cr 11 | \+ rel .( --- Saving builderrel.dic --- ) " builderrel.dic" $save-forth cr 12 | -------------------------------------------------------------------------------- /cpu/mips/bonito/isaio.fth: -------------------------------------------------------------------------------- 1 | purpose: Access to ISA IO space 2 | copyright: Copyright 2000 Firmworks All Rights Reserved 3 | 4 | headers 5 | isa-io-base value io-base 6 | 7 | : pc@ ( offset -- n ) io-base + rb@ ; 8 | : pc! ( n offset -- ) io-base + rb! ; 9 | : pw@ ( offset -- n ) io-base + rw@ ; 10 | : pw! ( n offset -- ) io-base + rw! ; 11 | : pl@ ( offset -- n ) io-base + rl@ ; 12 | : pl! ( n offset -- ) io-base + rl! ; 13 | -------------------------------------------------------------------------------- /cpu/mips/broadcom/avx/68kio.fth: -------------------------------------------------------------------------------- 1 | purpose: Access to 68K IO space 2 | copyright: Copyright 2001 Firmworks All Rights Reserved 3 | 4 | headers 5 | 68k-io-base value io-base 6 | 7 | : pc@ ( offset -- n ) io-base + rb@ ; 8 | : pc! ( n offset -- ) io-base + rb! ; 9 | : pw@ ( offset -- n ) io-base + rw@ ; 10 | : pw! ( n offset -- ) io-base + rw! ; 11 | : pl@ ( offset -- n ) io-base + rl@ ; 12 | : pl! ( n offset -- ) io-base + rl! ; 13 | -------------------------------------------------------------------------------- /ofw/core/bootdev.fth: -------------------------------------------------------------------------------- 1 | purpose: Default values for some configuration variables 2 | 3 | headers 4 | " disk net" d# 256 config-string boot-device 5 | 6 | " " 7 | d# 256 config-string boot-file 8 | 9 | " net" 10 | d# 256 config-string diag-device 11 | 12 | " " 13 | d# 128 config-string diag-file 14 | false config-flag watchdog-reboot? 15 | true config-flag auto-boot? 16 | " boot" 17 | d# 64 config-string boot-command 18 | 19 | 20 | -------------------------------------------------------------------------------- /cpu/arm/mmp2/sdkit.fth: -------------------------------------------------------------------------------- 1 | fload mmap.fth 2 | 0 constant acgr-pa \ Dummy definition 3 | fload mfpr.fth 4 | mfpr-base h# 1000 mmap to mfpr-base 5 | h# d4019000 h# 1000 mmap constant gpio-base 6 | fload gpio.fth 7 | : us ( n -- ) d# 40 * 0 do loop ; 8 | : ms ( n -- ) 0 ?do d# 1000 us loop ; 9 | fload smbus.fth 10 | fload camera-test.fth 11 | fload twsi.fth 12 | fload accelerometer.fth 13 | .( See http://wiki.laptop.org/go/Forth_Lesson_22) cr 14 | hex 15 | -------------------------------------------------------------------------------- /cpu/arm/olpc/1.75/ec-version.fth: -------------------------------------------------------------------------------- 1 | \ The EC microcode 2 | macro: EC_PLATFORM cl2 3 | macro: EC_VERSION 4_1_0_01 4 | 5 | \ Alternate command for getting EC microcode, for testing new versions. 6 | \ Temporarily uncomment the line and modify the path as necessary 7 | \ macro: GET_EC cp ~rsmith/olpc/ec/ec-code15/image/ecimage.bin ec.img 8 | \ macro: GET_EC wget -q http://dev.laptop.org/pub/ec/ec_test.img -O ec.img 9 | \ macro: GET_EC cp no_event.bin ec.img 10 | -------------------------------------------------------------------------------- /cpu/arm/olpc/4.0/ec-version.fth: -------------------------------------------------------------------------------- 1 | \ The EC microcode 2 | macro: EC_PLATFORM cl4 3 | macro: EC_VERSION 7_0_5_01 4 | 5 | \ Alternate command for getting EC microcode, for testing new versions. 6 | \ Temporarily uncomment the line and modify the path as necessary 7 | \ macro: GET_EC cp ~rsmith/olpc/ec/ec-code15/image/ecimage.bin ec.img 8 | \ macro: GET_EC wget -q http://dev.laptop.org/pub/ec/ec_test.img -O ec.img 9 | \ macro: GET_EC cp no_event.bin ec.img 10 | -------------------------------------------------------------------------------- /cpu/arm/olpc/cl4/ec-version.fth: -------------------------------------------------------------------------------- 1 | \ The EC microcode 2 | macro: EC_PLATFORM cl4 3 | macro: EC_VERSION 7_0_2_02 4 | 5 | \ Alternate command for getting EC microcode, for testing new versions. 6 | \ Temporarily uncomment the line and modify the path as necessary 7 | \ macro: GET_EC cp ~rsmith/olpc/ec/ec-code15/image/ecimage.bin ec.img 8 | \ macro: GET_EC wget -q http://dev.laptop.org/pub/ec/ec_test.img -O ec.img 9 | \ macro: GET_EC cp no_event.bin ec.img 10 | -------------------------------------------------------------------------------- /dev/dec21140/dec21143.bth: -------------------------------------------------------------------------------- 1 | purpose: Load file for DEC 21143 Ethernet FCode driver 2 | 3 | command: &tokenize &this 4 | build-now 5 | 6 | silent on 7 | 8 | begin-tokenizing dec21143.fc 9 | 10 | FCode-version2 11 | fload ${BP}/dev/dec21140/dec21x40.fth 12 | fload ${BP}/dev/dec21140/dec21143.fth 13 | fload ${BP}/dev/dec21140/mif.fth 14 | fload ${BP}/dev/dec21140/loopback.fth 15 | fload ${BP}/dev/dec21140/macaddr.fth 16 | end0 17 | 18 | end-tokenizing 19 | -------------------------------------------------------------------------------- /clients/lib/powerpc/makefile: -------------------------------------------------------------------------------- 1 | CC=cc 2 | CFLAGS=-I.. 3 | 4 | libobp.a: lib.o wrappers.o malloc.o 5 | ar rcv libobp.a lib.o malloc.o wrappers.o 6 | 7 | lib.o: ../lib.c 8 | ${CC} ${CFLAGS} -c ../lib.c 9 | 10 | wrappers.o: ../wrappers.c 11 | ${CC} ${CFLAGS} -c ../wrappers.c 12 | 13 | malloc.o: ../malloc.c ../malloc.h 14 | ${CC} ${CFLAGS} -c ../malloc.c 15 | 16 | start.o: start.S 17 | as -o start.o -l -s -m ppc start.S 18 | 19 | clean: 20 | rm *~ *.o 21 | -------------------------------------------------------------------------------- /cpu/x86/pc/olpc/via/sound.fth: -------------------------------------------------------------------------------- 1 | : close-audio ( -- ) 2 | audio-ih if 3 | audio-ih close-dev 4 | 0 to audio-ih 5 | then 6 | ; 7 | : audio-quiet ( -- ) 8 | [ ' go-hook behavior compile, ] \ Chain to old behavior 9 | free-wav close-audio 10 | ; 11 | ' audio-quiet to go-hook 12 | : xp-wait-audio ( -- ) 13 | [ ' rm-go-hook behavior compile, ] \ Chain to old behavior 14 | sound-end close-audio 15 | ; 16 | ' xp-wait-audio to rm-go-hook 17 | -------------------------------------------------------------------------------- /cpu/arm/olpc/3.0/ec-version.fth: -------------------------------------------------------------------------------- 1 | \ The EC microcode 2 | macro: EC_PLATFORM cl3 3 | macro: EC_VERSION 5_0_2_01 4 | 5 | \ Alternate command for getting EC microcode, for testing new versions. 6 | \ Temporarily uncomment the line and modify the path as necessary 7 | \ macro: GET_EC cp ~rsmith/olpc/ec/ec-code15/image/ecimage.bin ec.img 8 | \ macro: GET_EC wget -q http://dev.laptop.org/pub/ec/ec_test.img -O ec.img 9 | \ macro: GET_EC cp /wmb/Documents/OLPC/3.0/ecimage.bin ec.img 10 | -------------------------------------------------------------------------------- /cpu/arm/olpc/4.0/prefw.bth: -------------------------------------------------------------------------------- 1 | purpose: Build OFW Forth dictionary for OLPC XO-4 2 | \ See license at end of file 3 | 4 | dictionary: ${BP}/cpu/arm/build/basefw.dic 5 | command: &armforth &dictionary &this 6 | build-now 7 | 8 | \ This line must be in this file instead of in prefw.fth so the definitions 9 | \ in config.fth will be tagged. 10 | " prefw.tag" r/w create-file drop tag-file ! 11 | 12 | fload ${BP}/cpu/arm/olpc/4.0/config.fth 13 | fload ${BP}/cpu/arm/olpc/prefw.fth 14 | -------------------------------------------------------------------------------- /cpu/arm/olpc/1.75/prefw.bth: -------------------------------------------------------------------------------- 1 | purpose: Build OFW Forth dictionary for OLPC XO-1.75 2 | \ See license at end of file 3 | 4 | dictionary: ${BP}/cpu/arm/build/basefw.dic 5 | command: &armforth &dictionary &this 6 | build-now 7 | 8 | \ This line must be in this file instead of in prefw.fth so the definitions 9 | \ in config.fth will be tagged. 10 | " prefw.tag" r/w create-file drop tag-file ! 11 | 12 | fload ${BP}/cpu/arm/olpc/1.75/config.fth 13 | fload ${BP}/cpu/arm/olpc/prefw.fth 14 | -------------------------------------------------------------------------------- /cpu/arm/olpc/3.0/prefw.bth: -------------------------------------------------------------------------------- 1 | purpose: Build OFW Forth dictionary for OLPC XO-1.75 2 | \ See license at end of file 3 | 4 | dictionary: ${BP}/cpu/arm/build/basefw.dic 5 | command: &armforth &dictionary &this 6 | build-now 7 | 8 | \ This line must be in this file instead of in prefw.fth so the definitions 9 | \ in config.fth will be tagged. 10 | " prefw.tag" r/w create-file drop tag-file ! 11 | 12 | fload ${BP}/cpu/arm/olpc/3.0/config.fth 13 | fload ${BP}/cpu/arm/olpc/prefw.fth 14 | -------------------------------------------------------------------------------- /cpu/arm/olpc/cl4/prefw.bth: -------------------------------------------------------------------------------- 1 | purpose: Build OFW Forth dictionary for OLPC XO-1.75 2 | \ See license at end of file 3 | 4 | dictionary: ${BP}/cpu/arm/build/basefw.dic 5 | command: &armforth &dictionary &this 6 | build-now 7 | 8 | \ This line must be in this file instead of in prefw.fth so the definitions 9 | \ in config.fth will be tagged. 10 | " prefw.tag" r/w create-file drop tag-file ! 11 | 12 | fload ${BP}/cpu/arm/olpc/cl4/config.fth 13 | fload ${BP}/cpu/arm/olpc/prefw.fth 14 | -------------------------------------------------------------------------------- /dev/mmc/sdhci/sdhci.bth: -------------------------------------------------------------------------------- 1 | purpose: Load file for SDHCI (Secure Digital Host Controller Interface) 2 | 3 | command: &tokenize &this 4 | build-now 5 | 6 | silent on 7 | 8 | begin-tokenizing sdhci.fc 9 | 10 | FCode-version2 11 | fload ${BP}/dev/mmc/sdhci/pciregs.fth 12 | fload ${BP}/dev/mmc/sdhci/sdhci.fth 13 | 14 | init 15 | new-device 16 | 1 encode-int " reg" property 17 | " sdmmc" " $load-driver" eval drop 18 | finish-device 19 | 20 | 21 | end0 22 | 23 | end-tokenizing 24 | -------------------------------------------------------------------------------- /forth/lib/circle.fth: -------------------------------------------------------------------------------- 1 | \ Midpoint circle algorithm - see http://en.wikipedia.org/wiki/Midpoint_circle_algorithm 2 | decimal 3 | 4 | d# 12 constant radius 5 | 6 | radius value y 7 | 0 value x 8 | 3 radius 2* - value err 9 | 10 | : step ( -- ) 11 | x . y . err . cr 12 | err 0< if 13 | x 2* 2* 6 + err + to err 14 | else 15 | x y - 2* 2* d# 10 + err + to err 16 | y 1- to y 17 | then 18 | x 1+ to x 19 | ; 20 | step step step step step step step step step 21 | -------------------------------------------------------------------------------- /cpu/arm/olpc/1.75/mcnand-version.fth: -------------------------------------------------------------------------------- 1 | \ The multicast NAND updater code version 2 | \ Use a specific git commit ID for a formal release or "test" for development. 3 | \ With a specific ID, mcastnand.bth will download a tarball without .git stuff. 4 | \ With "test", mcastnand.bth will clone the git head if build/multicast-nand/ 5 | \ is not already present, then you can modify the git subtree as needed. 6 | macro: MCNAND_VERSION e9c0662 7 | \ macro: MCNAND_VERSION test 8 | \ macro: MCNAND_VERSION HEAD 9 | -------------------------------------------------------------------------------- /cpu/arm/olpc/3.0/mcnand-version.fth: -------------------------------------------------------------------------------- 1 | \ The multicast NAND updater code version 2 | \ Use a specific git commit ID for a formal release or "test" for development. 3 | \ With a specific ID, mcastnand.bth will download a tarball without .git stuff. 4 | \ With "test", mcastnand.bth will clone the git head if build/multicast-nand/ 5 | \ is not already present, then you can modify the git subtree as needed. 6 | macro: MCNAND_VERSION 732fc96 7 | \ macro: MCNAND_VERSION test 8 | \ macro: MCNAND_VERSION HEAD 9 | -------------------------------------------------------------------------------- /cpu/arm/olpc/4.0/mcnand-version.fth: -------------------------------------------------------------------------------- 1 | \ The multicast NAND updater code version 2 | \ Use a specific git commit ID for a formal release or "test" for development. 3 | \ With a specific ID, mcastnand.bth will download a tarball without .git stuff. 4 | \ With "test", mcastnand.bth will clone the git head if build/multicast-nand/ 5 | \ is not already present, then you can modify the git subtree as needed. 6 | macro: MCNAND_VERSION e9c0662 7 | \ macro: MCNAND_VERSION test 8 | \ macro: MCNAND_VERSION HEAD 9 | -------------------------------------------------------------------------------- /cpu/arm/olpc/cl4/mcnand-version.fth: -------------------------------------------------------------------------------- 1 | \ The multicast NAND updater code version 2 | \ Use a specific git commit ID for a formal release or "test" for development. 3 | \ With a specific ID, mcastnand.bth will download a tarball without .git stuff. 4 | \ With "test", mcastnand.bth will clone the git head if build/multicast-nand/ 5 | \ is not already present, then you can modify the git subtree as needed. 6 | macro: MCNAND_VERSION e9c0662 7 | \ macro: MCNAND_VERSION test 8 | \ macro: MCNAND_VERSION HEAD 9 | -------------------------------------------------------------------------------- /dev/usb2/device/keyboard/usbkbd.bth: -------------------------------------------------------------------------------- 1 | purpose: Load file for USB boot keyboard driver 2 | 3 | command: &tokenize &this 4 | build-now 5 | 6 | silent on 7 | 8 | begin-tokenizing usbkbd.fc 9 | 10 | FCode-version2 11 | 12 | fload ${BP}/dev/usb2/device/common.fth \ USB device driver common routines 13 | fload ${BP}/dev/usb2/device/keyboard/request.fth \ HID requests 14 | fload ${BP}/dev/usb2/device/keyboard/kbd.fth \ USB keyboard driver 15 | 16 | end0 17 | 18 | end-tokenizing 19 | 20 | -------------------------------------------------------------------------------- /cpu/x86/pc/olpc/via/mcnand-version.fth: -------------------------------------------------------------------------------- 1 | \ The multicast NAND updater code version 2 | \ Use a specific git commit ID for a formal release or "test" for development. 3 | \ With a specific ID, mcastnand.bth will download a tarball without .git stuff. 4 | \ With "test", mcastnand.bth will clone the git head if build/multicast-nand/ 5 | \ is not already present, then you can modify the git subtree as needed. 6 | macro: MCNAND_VERSION e9c0662 7 | \ macro: MCNAND_VERSION test 8 | \ macro: MCNAND_VERSION HEAD 9 | -------------------------------------------------------------------------------- /dev/dec21140/comet.bth: -------------------------------------------------------------------------------- 1 | purpose: Load file for ADMtek Comet Ethernet FCode driver 2 | 3 | command: &tokenize &this 4 | build-now 5 | 6 | silent on 7 | 8 | begin-tokenizing comet.fc 9 | 10 | FCode-version2 11 | \ fload ${BP}/dev/dec21140/dec21x40.fth 12 | fload ${BP}/dev/dec21140/comet2.fth 13 | fload ${BP}/dev/dec21140/comet.fth 14 | \ fload ${BP}/dev/dec21140/mif.fth 15 | \ fload ${BP}/dev/dec21140/loopback.fth 16 | \ fload ${BP}/dev/dec21140/macaddr.fth 17 | end0 18 | 19 | end-tokenizing 20 | -------------------------------------------------------------------------------- /cpu/arm/mmp3/thunderstone/prefw.bth: -------------------------------------------------------------------------------- 1 | purpose: Build OFW Forth dictionary for Thunderstone 2 | \ See license at end of file 3 | 4 | dictionary: ${BP}/cpu/arm/build/basefw.dic 5 | command: &armforth &dictionary &this 6 | build-now 7 | 8 | \ This line must be in this file instead of in prefw.fth so the definitions 9 | \ in config.fth will be tagged. 10 | " prefw.tag" r/w create-file drop tag-file ! 11 | 12 | fload ${BP}/cpu/arm/mmp3/thunderstone/config.fth 13 | fload ${BP}/cpu/arm/olpc/prefw.fth 14 | -------------------------------------------------------------------------------- /dev/geode/nandflash/nandflash.bth: -------------------------------------------------------------------------------- 1 | purpose: Load file for OLPC CaFe NAND Driver 2 | 3 | command: &tokenize &this 4 | build-now 5 | 6 | silent on 7 | 8 | begin-tokenizing nandflash.fc 9 | 10 | FCode-version2 11 | 12 | fload ${BP}/dev/geode/nandflash/nand5536.fth 13 | fload ${BP}/dev/olpc/cafenand/configure.fth 14 | fload ${BP}/dev/olpc/cafenand/badblock.fth 15 | fload ${BP}/dev/olpc/cafenand/redboot.fth 16 | fload ${BP}/dev/geode/nandflash/methods.fth 17 | 18 | end0 19 | 20 | end-tokenizing 21 | -------------------------------------------------------------------------------- /cpu/x86/pc/olpc/via/dsdt.bth: -------------------------------------------------------------------------------- 1 | purpose: Build the ACPI tables 2 | 3 | command: &builder &this 4 | build-now 5 | 6 | " iasl -p dsdt -vi -vr -vs ../dsdt.dsl" expand$ $sh 7 | " iasl -p dsdt-c2only -vi -vr -vs ../dsdt-c2only.dsl" expand$ $sh 8 | \ " iasl -vi -vr -vs ../fadt.dsl" expand$ $sh 9 | \ " iasl -vi -vr -vs ../ssdt.dsl" expand$ $sh 10 | 11 | \ This forces the creation of a dsdt.log file, so we don't re-compile 12 | depends-on: ${BP}/cpu/x86/pc/olpc/via/dsdt.dsl 13 | writing dsdt.stamp 14 | ofd @ fclose 15 | -------------------------------------------------------------------------------- /cpu/arm/olpc/3.0/uart.fth: -------------------------------------------------------------------------------- 1 | 2 | \ Setup UART configuration 3 | h# d4018000 to uart-base \ UART3 4 | devalias com1 /uart@d4018000 5 | 6 | dev /uart@d4030000 \ UART1 7 | 0 " linux,unit#" integer-property 8 | device-end 9 | 10 | dev /uart@d4017000 \ UART2 11 | " disabled" " status" string-property 12 | device-end 13 | 14 | dev /uart@d4018000 \ UART3 15 | 1 " linux,unit#" integer-property 16 | device-end 17 | 18 | dev /uart@d4016000 \ UART4 19 | " disabled" " status" string-property 20 | device-end 21 | -------------------------------------------------------------------------------- /cpu/x86/Linux/armforth.qemu: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # The "-0 $0" below causes the wrapper to skip arguments 4 | # before the -0, so the program name appears to be the 5 | # name of this script ($0). That makes the logger put the 6 | # this script name in the "command: " line, instead of 7 | # putting cpu/arm/Linux/armforth.static, which is not 8 | # directly executable in the cross environment, there. 9 | # That makes fast-rebuilds from the .log file work right. 10 | 11 | qemu-arm ${BP}/cpu/arm/Linux/armforth.static -0 $0 $* 12 | -------------------------------------------------------------------------------- /dev/olpc/imagesensor.fth: -------------------------------------------------------------------------------- 1 | purpose: Interface layer to image sensor chips 2 | 3 | \ Each sensor chip driver must define sensor-found? , chaining to the 4 | \ previous definition if that sensor chip is not detected. If the 5 | \ chip is detected, the driver must set camera-config and set-mirrored 6 | \ to implementations suitable for that chip. 7 | 8 | defer camera-config ( ycrcb? -- ) 9 | defer set-mirrored ( mirrored? -- ) 10 | 11 | \ Redefine to add a new sensor 12 | : sensor-found? ( -- flag ) 13 | false 14 | ; 15 | -------------------------------------------------------------------------------- /cpu/mips/atlas/isaio.fth: -------------------------------------------------------------------------------- 1 | purpose: Access to ISA IO space for the Atlas board 2 | copyright: Copyright 2000 Firmworks All Rights Reserved 3 | 4 | headers 5 | kseg1 uart-pa + value uart-base 6 | 7 | : pc@ ( offset -- n ) 3 lshift uart-base + rb@ ; 8 | : pc! ( n offset -- ) 3 lshift uart-base + rb! ; 9 | : pw@ ( offset -- n ) 3 lshift uart-base + rw@ ; 10 | : pw! ( n offset -- ) 3 lshift uart-base + rw! ; 11 | : pl@ ( offset -- n ) 3 lshift uart-base + rl@ ; 12 | : pl! ( n offset -- ) 3 lshift uart-base + rl! ; 13 | -------------------------------------------------------------------------------- /cpu/x86/pc/olpc/via/initsmt.fth: -------------------------------------------------------------------------------- 1 | \ Inject some tag values to get the manufacturing process started 2 | : no-restart ( -- ) no-kbc-reboot kbc-on d# 300 ms ; 3 | patch no-restart io-spi-reprogrammed io-spi-start 4 | 5 | h# 202 msr@ swap h# ff invert and swap h# 202 msr! \ Uncache flash 6 | 7 | add-tag TS SMT 8 | add-tag MS cifs:\\bekins:bekind2@10.60.0.2\nb2_fvs 9 | add-tag BD u:\boot\olpc.fth cifs:\\bekins:bekind2@10.60.0.2\nb2_fvs\olpc.fth 10 | add-tag NT 10.60.0.2" evaluate 11 | 12 | .( Wrote TS, MS, BD, and NT) cr 13 | -------------------------------------------------------------------------------- /cpu/arm/olpc/sourceurl.fth: -------------------------------------------------------------------------------- 1 | \ Make a file containing the URL of the source code 2 | 3 | show-rebuilds? false to show-rebuilds? \ We don't need to see these commands 4 | 5 | " if svn info ${BP} 2>/dev/null >/dev/null; then svn info ${BP} | grep URL: | cut -d ' ' -f 2 | tr \\n ' ' >sourceurl; svnversion -n ${BP} >>sourceurl; else git svn info | grep Root: | cut -d ':' -f 2- | tr \\n ' ' > sourceurl ; echo -n 'r' >>sourceurl ; git svn info | grep Revision | cut -d':' -f 2 | tr -d [:space:] >>sourceurl ; fi" $sh 6 | 7 | to show-rebuilds? 8 | -------------------------------------------------------------------------------- /ofw/core/silentmd.fth: -------------------------------------------------------------------------------- 1 | purpose: Silent mode, in which most messages are suppressed 2 | 3 | headers 4 | false config-flag silent-mode? 5 | 6 | : (silent-mode? ( -- flag ) diagnostic-mode? 0= silent-mode? and ; 7 | 8 | : silent-type ( adr,len -- ) (silent-mode? if 2drop else type then ; 9 | : silent-cr ( -- ) (silent-mode? 0= if cr then ; 10 | : silent-.d ( n -- ) (silent-mode? if drop else .d then ; 11 | : silent-type-cr ( adr,len -- ) silent-type silent-cr ; 12 | headers 13 | -------------------------------------------------------------------------------- /cpu/x86/pc/olpc/sdtools/maketar: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | mkdir -p sdkit 3 | cp ../../../../../cpu/x86/Linux/forth sdkit 4 | cp ../../../../../cpu/x86/build/builder.dic sdkit 5 | cp ../../../../../cpu/x86/ioports.fth sdkit 6 | cp ../../../../../cpu/x86/pc/olpc/mfgdata.fth sdkit 7 | cp ../../../../../forth/lib/wrtime.fth sdkit 8 | cp ../../../../../dev/olpc/dcon/dconsmb.fth sdkit 9 | cp ../../../../../dev/olpc/kb3700/ecio.fth sdkit 10 | cp sd sd.fth ecdump.fth dumpgamma.fth sdkit 11 | chmod 755 sdkit/sd 12 | tar cfz sdkit.tgz sdkit 13 | # rm sdkit/* 14 | -------------------------------------------------------------------------------- /dev/hdaudio/hdaudio.bth: -------------------------------------------------------------------------------- 1 | purpose: Load file for Intel HDAudio interface 2 | 3 | command: &tokenize &this 4 | build-now 5 | 6 | silent on 7 | 8 | begin-tokenizing hdaudio.fc 9 | 10 | FCode-version2 11 | fload ${BP}/dev/hdaudio/core.fth 12 | fload ${BP}/dev/hdaudio/conexant.fth 13 | fload ${BP}/dev/hdaudio/audio.fth 14 | fload ${BP}/dev/hdaudio/extra.fth 15 | fload ${BP}/forth/lib/isin.fth 16 | fload ${BP}/forth/lib/tones.fth 17 | fload ${BP}/dev/geode/ac97/selftest.fth 18 | fload ${BP}/dev/hdaudio/test.fth 19 | end0 20 | 21 | end-tokenizing 22 | -------------------------------------------------------------------------------- /cpu/arm/olpc/cl4/uart.fth: -------------------------------------------------------------------------------- 1 | \ Setup UART configuration 2 | h# d4017000 to uart-base \ UART2 3 | devalias com1 /uart@d4017000 4 | 5 | dev /uart@d4030000 \ UART1 6 | " disabled" " status" string-property 7 | device-end 8 | 9 | dev /uart@d4017000 \ UART2 10 | device-end 11 | 12 | dev /uart@d4018000 \ UART3 13 | " disabled" " status" string-property 14 | device-end 15 | 16 | dev /uart@d4016000 \ UART4 17 | " disabled" " status" string-property \ Used for touchscreen BSL 18 | device-end 19 | 20 | devalias serial2 /uart@d4017000 21 | -------------------------------------------------------------------------------- /ofw/disklabel/gpttools.fth: -------------------------------------------------------------------------------- 1 | 32\ : le-x@ ( adr -- x ) dup le-l@ swap la1+ le-l@ ; 2 | 0 value #gpt-partitions 3 | 0 value /gpt-entry 4 | 32\ 0. 2value partition-lba0 5 | 32\ alias x>u drop 6 | 32\ alias u>x u>d 7 | 32\ alias x+ d+ 8 | 32\ alias x- d- 9 | 32\ alias xswap 2swap 10 | 32\ : onex 1. ; 11 | 32\ : xu*d ( x u -- d ) du* ; 12 | 64\ alias xu*d um* 13 | 14 | : gpt-magic ( -- adr len ) " EFI PART" ; 15 | : gpt-blk0 ( adr -- d.blk0 ) d# 32 + le-x@ ; 16 | : gpt-#blks ( adr -- d.blks ) dup d# 40 + le-x@ rot gpt-blk0 x- onex d+ ; 17 | -------------------------------------------------------------------------------- /dev/olpc/cafecamera/cafecamera.bth: -------------------------------------------------------------------------------- 1 | purpose: Load file for OLPC CaFe Camera Driver 2 | 3 | command: &tokenize &this 4 | build-now 5 | 6 | silent on 7 | 8 | begin-tokenizing cafecamera.fc 9 | 10 | FCode-version2 11 | 12 | fload ${BP}/dev/olpc/cafecamera/platform.fth 13 | fload ${BP}/dev/olpc/imagesensor.fth 14 | fload ${BP}/dev/olpc/seti.fth 15 | fload ${BP}/dev/olpc/ov7670.fth \ Load last; most likely to be present 16 | fload ${BP}/dev/olpc/cafecamera/cafecamera.fth 17 | fload ${BP}/dev/olpc/cameratest.fth 18 | 19 | end0 20 | 21 | end-tokenizing 22 | -------------------------------------------------------------------------------- /dev/usb2/hcd/ohci/pci.fth: -------------------------------------------------------------------------------- 1 | \ Configuration space registers 2 | my-address my-space encode-phys 3 | 0 encode-int encode+ 0 encode-int encode+ 4 | \ OHCI operational registers 5 | 0 0 my-space 0200.0010 + encode-phys encode+ 6 | 0 encode-int encode+ h# 1000 encode-int encode+ 7 | " reg" property 8 | 9 | : my-map-in ( len -- adr ) 10 | >r 0 0 my-space h# 0200.0010 + r> " map-in" $call-parent 11 | 4 my-w@ h# 16 or 4 my-w! 12 | ; 13 | : my-map-out ( adr len -- ) 14 | 4 my-w@ 7 invert and 4 my-w! 15 | " map-out" $call-parent 16 | ; 17 | -------------------------------------------------------------------------------- /cpu/arm/olpc/cl4/usb.fth: -------------------------------------------------------------------------------- 1 | purpose: Platform-specific USB elaborations 2 | \ See license at end of file 3 | 4 | dev /usb@d4208000 5 | \ Port 1 on the hub is connected to unused pins on the WLAN connector, 6 | \ so testing it is confusing 7 | \ Port 2 is right upper 8 | \ Port 3 is left 9 | " 3,2" " usb-hub-test-list" string-property 10 | device-end 11 | 12 | : (reset-usb-hub) ( -- ) 13 | usb-hub-reset-gpio# gpio-clr d# 10 ms usb-hub-reset-gpio# gpio-set 14 | ; 15 | ' (reset-usb-hub) to reset-usb-hub 16 | 17 | devalias u /usb/disk 18 | -------------------------------------------------------------------------------- /cpu/x86/pc/olpc/via/Notes/fix-ec-175-a1.fth: -------------------------------------------------------------------------------- 1 | \ This runs on an XO-1.5 and lets you repair the EC code on an XO-1.75 A1 2 | \ The XO-1.75 A1 EC code is stored in an SPI FLASH that can be tethered 3 | \ to the XO-1.5's auxiliary SPI header. 4 | 5 | : fix-ec 6 | use-bb-spi 7 | spi-start 8 | ab-id h# 10 <> abort" Wrong ID" 9 | ['] common-write to flash-write 10 | " ext:\ecimage.bin" $read-open 11 | flash-buf h# 10000 ifd @ fgets 12 | ifd @ fclose 13 | h# 10000 <> abort" Wrong image length" 14 | flash-buf h# 10000 0 write-flash-range 15 | ; 16 | -------------------------------------------------------------------------------- /clients/memtest86/olpc.c: -------------------------------------------------------------------------------- 1 | #include "msr.h" 2 | 3 | void poll_errors(void) 4 | { 5 | } 6 | void set_ecc_polling(int val) 7 | { 8 | } 9 | void show_spd(void) 10 | { 11 | } 12 | void get_menu(void) 13 | { 14 | } 15 | void find_controller(void) 16 | { 17 | } 18 | int pci_init(void) 19 | { 20 | return 0; 21 | } 22 | void warm_start() 23 | { 24 | wrmsr(0x51400017, 1, 0); 25 | } 26 | int query_linuxbios(void) 27 | { 28 | return 0; 29 | } 30 | int query_pcbios(void) 31 | { 32 | return 0; 33 | } 34 | unsigned int lfb_addr() 35 | { 36 | return 0xfd000000; 37 | } 38 | -------------------------------------------------------------------------------- /cpu/x86/pc/olpc/via/Notes/test-ideas.txt: -------------------------------------------------------------------------------- 1 | attach plastic handles to cables to make insertion easier 2 | display test - show one pattern because operators don't watch the progression 3 | led test - flash all leds at once until operator confirms 4 | audio test - messages before speaker and loopback tests 5 | only one suspend pass 6 | shorten dhcp retry delay 7 | shorter camera test 8 | remind operator to remove internal SD card before finish 9 | AC test did not ask for cable to be removed 10 | led test only flashed one led - maybe because no wlan reception (no antenna) 11 | 12 | -------------------------------------------------------------------------------- /cpu/arm/olpc/1.75/uart.fth: -------------------------------------------------------------------------------- 1 | \ Setup UART configuration 2 | h# d4018000 to uart-base \ UART3 3 | devalias com1 /uart@d4018000 4 | 5 | dev /uart@d4030000 \ UART1 6 | device-end 7 | 8 | dev /uart@d4017000 \ UART2 9 | " disabled" " status" string-property 10 | device-end 11 | 12 | dev /uart@d4018000 \ UART3 13 | device-end 14 | 15 | dev /uart@d4016000 \ UART4 16 | " disabled" " status" string-property 17 | device-end 18 | 19 | devalias serial0 /uart@d4030000 20 | devalias serial1 /uart@d4017000 21 | devalias serial2 /uart@d4018000 22 | devalias serial3 /uart@d4016000 23 | -------------------------------------------------------------------------------- /dev/video/build/load: -------------------------------------------------------------------------------- 1 | #! /bin/csh 2 | 3 | cat ../common/defer.fth 4 | 5 | cat ../dacs/tvp3025.fth 6 | cat ../dacs/tvp3026.fth 7 | cat ../dacs/ibm37rgb.fth 8 | cat ../dacs/att21498.fth 9 | cat ../dacs/s3.fth 10 | cat ../dacs/cirrus.fth 11 | cat ../dacs/trio.fth 12 | cat ../dacs/virge.fth 13 | cat ../dacs/brooktre.fth 14 | 15 | cat ../controlr/s3.fth 16 | cat ../controlr/mga.fth 17 | cat ../controlr/glint.fth 18 | cat ../controlr/viper.fth 19 | 20 | cat ../common/pci.fth 21 | cat ../common/graphics.fth 22 | cat ../common/init.fth 23 | cat ../common/display.fth 24 | 25 | echo "" 26 | 27 | -------------------------------------------------------------------------------- /cpu/arm/olpc/1.75/usb.fth: -------------------------------------------------------------------------------- 1 | purpose: Platform-specific USB elaborations 2 | \ See license at end of file 3 | 4 | dev /usb@d4208000 5 | \ Port 1 on the hub is connected to unused pins on the WLAN connector, 6 | \ so testing it is confusing 7 | \ Port 2 is right upper 8 | \ Port 3 is left 9 | \ Port 4 is right lower 10 | " 3,4,2" " usb-hub-test-list" string-property 11 | device-end 12 | 13 | : (reset-usb-hub) ( -- ) 14 | usb-hub-reset-gpio# gpio-clr d# 10 ms usb-hub-reset-gpio# gpio-set 15 | ; 16 | ' (reset-usb-hub) to reset-usb-hub 17 | 18 | devalias u /usb/disk 19 | -------------------------------------------------------------------------------- /cpu/arm/mmp3/soc-config.fth: -------------------------------------------------------------------------------- 1 | create mmp3 2 | h# 20000 constant l2-#sets 3 | 4 | h# c0f0.0000 constant mmp3-audio-pa 5 | h# 10.0000 constant /mmp3-audio 6 | 7 | h# d103.0000 constant audio-sram-pa \ Base of Audio SRAM 8 | h# 2.0000 constant /audio-sram 9 | \ No need to map audio-sram separately; it fits in the SRAM area 10 | 11 | d# 4096 constant /audio-sram-dma \ space for DMA descriptors 12 | d# 4096 constant /audio-sram-mps \ maximum period size 13 | /audio-sram /audio-sram-dma - 2 / constant /audio-sram-pcm \ buffers 14 | 15 | h# 0005.0000 constant /sram \ Size of SRAM 16 | -------------------------------------------------------------------------------- /cpu/x86/pc/olpc/via/wlan-version.fth: -------------------------------------------------------------------------------- 1 | \ The wireless LAN module firmware 2 | macro: WLAN_VERSION 9.0.7.p2 3 | 4 | \ Alternate command for getting WLAN firmware, for testing new versions. 5 | \ Temporarily uncomment the line and modify the path as necessary 6 | \ macro: GET_WLAN cp "/c/Documents and Settings/Mitch Bradley/My Documents/OLPC/DiskImages/sd8686-9.70.7.p0.bin" sd8686.bin; cp "/c/Documents and Settings/Mitch Bradley/My Documents/OLPC/DiskImages/sd8686_helper.bin" sd8686_helper.bin 7 | \ macro: GET_WLAN wget http://dev.laptop.org/pub/firmware/libertas/thinfirm/lbtf_sdio-9.0.7.p2.bin -O sd8686.bin 8 | -------------------------------------------------------------------------------- /cpu/arm/mmp2/ntim_mmp2_nand_cforth_ddr_elpida_512m.fth: -------------------------------------------------------------------------------- 1 | \ Marvel Trusted Image Module image creation script for 2 | \ MMP2 platform with 512M of Elpida RAM 3 | \ Running CForth from the security processor 4 | 5 | tim: 00030102 0 Sky! PXA688 6 | flash: NAN'6 7 | timh: TIMH 0 d1020000 8 | image: OBMI 400 0 dummy.img 9 | image: WTMI 404 d1000000 /home/wmb/OLPC/1.75/cforth-from-0xc0000.img 10 | reserved: 11 | tbrx: 00020000 12 | transfer: TIMH d1020000 13 | end-package 14 | fload ddr_elpida_512m.fth 15 | term: 16 | end-reserved 17 | end-tim 18 | 19 | save-image: nand_cforth.img 20 | -------------------------------------------------------------------------------- /ofw/wifi/loadpkg.fth: -------------------------------------------------------------------------------- 1 | purpose: Load file for supplicant support package 2 | 3 | \ Encryption/decryption 4 | [ifdef] 386-assembler 5 | fload ${BP}/ofw/wifi/sha1.fth 6 | [then] 7 | fload ${BP}/ofw/wifi/hmacsha1.fth 8 | fload ${BP}/ofw/wifi/aes.fth 9 | fload ${BP}/ofw/wifi/md5.fth 10 | fload ${BP}/ofw/wifi/rc4.fth 11 | 12 | fload ${BP}/ofw/wifi/data.fth \ Data structures 13 | fload ${BP}/ofw/wifi/eapol.fth \ EAPOL-key processing 14 | 15 | \ Usage: 16 | \ 17 | \ In devices.fth or some such: 18 | \ support-package: supplicant 19 | \ fload ${BP}/ofw/wifi/loadpkg.fth 20 | \ end-support-package 21 | \ 22 | 23 | -------------------------------------------------------------------------------- /cpu/arm/olpc/1.75/sdkit/Makefile: -------------------------------------------------------------------------------- 1 | FTHFILES= \ 2 | ../../../mmp2/gpio.fth \ 3 | ../../../mmp2/mfpr.fth \ 4 | ../../../mmap.fth \ 5 | ../../smbus.fth \ 6 | ../../twsi-i2c.fth \ 7 | ../../../mmp2/twsi.fth \ 8 | ./sdkit.fth 9 | 10 | SHFILES= ./sdkit.sh 11 | 12 | DICFILES= ../build/prefw.dic 13 | 14 | WRAPPER=../../../Linux/armforth.static 15 | 16 | D=sdkit-xo175 17 | 18 | sdkit-xo175.tgz: FORCE 19 | mkdir -p $D 20 | cp $(WRAPPER) $D/forth 21 | cp $(FTHFILES) $D 22 | cp $(DICFILES) $D 23 | cp $(SHFILES) $D 24 | tar cfz $@ $D/forth $D/*.fth $D/*.sh $D/*.dic 25 | rm -rf $D 26 | 27 | FORCE: 28 | -------------------------------------------------------------------------------- /cpu/x86/pc/lxdevel/build/Makefile: -------------------------------------------------------------------------------- 1 | OS := $(shell uname) 2 | 3 | all: lxdevel.rom 4 | 5 | lxdevel.rom: FORCE build ../../../build/inflate.bin 6 | ./build $@ 7 | 8 | ../../../${OS}/forth: 9 | @make -C ../../../${OS} forth 10 | 11 | ../../../build/inflate.bin: 12 | @make -C ../../../build inflate.bin 13 | 14 | build: ../../../${OS}/forth 15 | @ln -sf ../../../${OS}/forth build 16 | 17 | clean: 18 | rm -f *.dic *.log headers *~ *.elf *.di *.img builton.fth build 19 | 20 | clean-all: clean 21 | @make -C ../../../build clean 22 | @make -C ../../../${OS} clean 23 | 24 | .PHONY: FORCE clean all clean-all 25 | -------------------------------------------------------------------------------- /dev/mmc/sdhci/sdhci2.bth: -------------------------------------------------------------------------------- 1 | purpose: Load file for SDHCI (Secure Digital Host Controller Interface) 2 | 3 | command: &tokenize &this 4 | build-now 5 | 6 | silent on 7 | 8 | begin-tokenizing sdhci2.fc 9 | 10 | FCode-version2 11 | fload ${BP}/dev/mmc/sdhci/pciregs.fth 12 | fload ${BP}/dev/mmc/sdhci/sdhci.fth 13 | 14 | init 15 | 16 | new-device 17 | 1 encode-int " reg" property 18 | " sdmmc" " $load-driver" eval drop 19 | finish-device 20 | 21 | new-device 22 | 2 encode-int " reg" property 23 | " mv8686" " $load-driver" eval drop 24 | finish-device 25 | 26 | 27 | end0 28 | 29 | end-tokenizing 30 | -------------------------------------------------------------------------------- /cpu/x86/pc/emu/build/Makefile: -------------------------------------------------------------------------------- 1 | OS := $(shell uname) 2 | 3 | all: emuofw.rom 4 | 5 | emuofw.rom: FORCE build ../../../build/inflate.bin 6 | ./build $@ 7 | 8 | ../../../${OS}/forth: 9 | @make -C ../../../${OS} forth 10 | 11 | ../../../build/inflate.bin: 12 | @make -C ../../../build inflate.bin 13 | 14 | build: ../../../${OS}/forth 15 | @ln -sf ../../../${OS}/forth build 16 | 17 | clean: 18 | rm -f *.dic *.log headers *~ *.elf *.di *.img builton.fth build *.c32 *.rom 19 | 20 | clean-all: clean 21 | @make -C ../../../build clean 22 | @make -C ../../../${OS} clean 23 | 24 | .PHONY: FORCE clean all clean-all 25 | -------------------------------------------------------------------------------- /clients/lib/mem.c: -------------------------------------------------------------------------------- 1 | /* For gcc, compile with -fno-builtin to suppress warnings */ 2 | 3 | #include "1275.h" 4 | 5 | void 6 | memcpy(void *to, void *from, size_t len) 7 | { 8 | while (len-- > 0) 9 | *(UCHAR *)to++ = *(UCHAR *)from++; 10 | } 11 | 12 | void 13 | memset(void *cp, int c, size_t len) 14 | { 15 | while (len-- > 0) 16 | *((UCHAR *)cp + len) = c; 17 | } 18 | 19 | int 20 | memcmp(const void *s1, const void *s2, size_t n) 21 | { 22 | int diff; 23 | while (n-- > 0) { 24 | diff = *(UCHAR *)s1++ - *(UCHAR *)s2++; 25 | if (diff) 26 | return (diff < 0) ? -1 : 1; 27 | } 28 | return 0; 29 | } 30 | -------------------------------------------------------------------------------- /cpu/arm/olpc/fetch-ec.fth: -------------------------------------------------------------------------------- 1 | purpose: Common code for fetching the EC microcode 2 | 3 | \ The macros EC_PLATFORM, EC_VERSION, and optionally GET_EC, must be defined externally 4 | 5 | \ If there is a GET_EC macro, use it instead of fetching the released version. 6 | " ${GET_EC}" expand$ nip [if] 7 | " ${GET_EC}" expand$ $sh 8 | [else] 9 | " wget -q http://dev.laptop.org/pub/ec/${EC_PLATFORM}-${EC_VERSION}.img -O ec.img" expand$ $sh 10 | [then] 11 | 12 | \ This forces the creation of an ec.log file, so we don't re-fetch ec.img 13 | writing ec.version 14 | " ${EC_VERSION}"n" expand$ ofd @ fputs 15 | ofd @ fclose 16 | -------------------------------------------------------------------------------- /ofw/fcode/extcodes.fth: -------------------------------------------------------------------------------- 1 | purpose: FCode token number definitions for Firmworks extensions 2 | 3 | hex 4 | vfw 070 2 byte-code: lock[ ( -- ) 5 | vfw 071 2 byte-code: ]unlock ( -- ) 6 | 7 | vfw 072 2 byte-code: debug-me 8 | vfw 073 2 byte-code: new-instance ( args-adr args-len -- ) 9 | vfw 074 2 byte-code: destroy-instance ( -- ) 10 | vfw 075 2 byte-code: set-default-unit ( -- ) 11 | 12 | vfw 076 2 byte-code: $instructions ( name$ -- ) 13 | vfw 077 2 byte-code: instructions-done ( -- ) 14 | vfw 078 2 byte-code: instructions-idle ( -- ) 15 | 16 | vfw 079 2 byte-code: us ( -- ) 17 | -------------------------------------------------------------------------------- /cpu/arm/olpc/fetch-nn.fth: -------------------------------------------------------------------------------- 1 | purpose: Common code for fetching the NN firmware 2 | 3 | \ The macro NN_VERSION, and optionally GET_NN, must be defined externally 4 | 5 | \ If there is a GET_NN macro, use it instead of fetching the released version. 6 | " ${GET_NN}" expand$ nip [if] 7 | " ${GET_NN}" expand$ $sh 8 | [else] 9 | " wget -q http://dev.laptop.org/pub/firmware/nn/zForce_Touch_Driver_OLPC_${NN_VERSION}.hex -O nn.hex" expand$ $sh 10 | [then] 11 | 12 | \ This forces the creation of an nn.log file, so we don't re-fetch nn.img 13 | writing nn.version 14 | " ${NN_VERSION}"n" expand$ ofd @ fputs 15 | ofd @ fclose 16 | -------------------------------------------------------------------------------- /cpu/x86/pc/olpc/ec.bth: -------------------------------------------------------------------------------- 1 | purpose: Fetch the EC (Embedded Controller, i.e. KB3700) microcode 2 | 3 | command: &builder &this 4 | build-now 5 | 6 | fload ${BP}/cpu/x86/pc/olpc/versions.fth 7 | 8 | \ If there is a GET_EC macro, use it instead of fetching the released version. 9 | " ${GET_EC}" expand$ nip [if] 10 | " ${GET_EC}" expand$ $sh 11 | [else] 12 | " wget -q http://dev.laptop.org/pub/ec/ec_v${EC_VERSION}.img -O ec.img" expand$ $sh 13 | [then] 14 | 15 | \ This forces the creation of an ec.log file, so we don't re-fetch ec.img 16 | writing ec.version 17 | " ${EC_VERSION}"n" expand$ ofd @ fputs 18 | ofd @ fclose 19 | -------------------------------------------------------------------------------- /cpu/x86/pc/olpc/gamekeynames.fth: -------------------------------------------------------------------------------- 1 | purpose: Symbolic names for game key bitmasks 2 | 3 | \ These bitmasks directly match the values returned by the EC 4 | \ "game-key@" command on XO-1 and XO-1.5 hardware. For later 5 | \ hardware with different game key access methods, the hardware 6 | \ bit masks are translated into these values. 7 | 8 | h# 1 constant button-square 9 | h# 2 constant button-check 10 | h# 4 constant rocker-up 11 | h# 8 constant rocker-down 12 | h# 10 constant rocker-left 13 | h# 20 constant rocker-right 14 | h# 40 constant button-rotate 15 | h# 80 constant button-o 16 | h# 100 constant button-x 17 | -------------------------------------------------------------------------------- /dev/busl948/busl948.bth: -------------------------------------------------------------------------------- 1 | purpose: Load file for DPT SCSI controllers 2 | 3 | command: &tokenize &this 4 | build-now 5 | 6 | silent on 7 | 8 | begin-tokenizing busl948.fc 9 | 10 | FCode-version2 11 | 12 | hex 13 | 14 | fload ${BP}/dev/busl948/dma-defs.fth 15 | fload ${BP}/dev/busl948/io.fth 16 | fload ${BP}/dev/busl948/init.fth 17 | 18 | fload ${BP}/dev/scsi/hacom.fth 19 | 20 | new-device 21 | fload ${BP}/dev/scsi/scsidisk.fth 22 | " disk" device-name 23 | finish-device 24 | 25 | new-device 26 | fload ${BP}/dev/scsi/scsitape.fth 27 | " tape" device-name 28 | finish-device 29 | 30 | end0 31 | 32 | end-tokenizing 33 | -------------------------------------------------------------------------------- /cpu/arm/olpc/getmfgdata.fth: -------------------------------------------------------------------------------- 1 | purpose: Get the manufacturing data into memory where it can be manipulated 2 | 3 | \ It is tempting to use buffer: for this, but that fails because 4 | \ we need to access manufacturing data very early (for security), 5 | \ in stand-init-io before the call to clear-buffer:s in init. 6 | 0 value mfg-data-buf 7 | 8 | : get-mfg-data ( -- ) 9 | mfg-data-buf if exit then 10 | /flash-block alloc-mem to mfg-data-buf 11 | flash-open 12 | mfg-data-buf /flash-block mfg-data-offset flash-read 13 | ; 14 | 15 | : mfg-data-top ( -- adr ) 16 | get-mfg-data 17 | mfg-data-buf /flash-block + 18 | ; 19 | -------------------------------------------------------------------------------- /cpu/mips/bonito/virtaddr.fth: -------------------------------------------------------------------------------- 1 | purpose: Virtual addresses for Bonito 2 | copyright: Copyright 2001 FirmWorks All Rights Reserved 3 | 4 | headerless 5 | 6 | [ifdef] ram-image 7 | rom-base kseg0 + value fw-virt-base \ 1 meg of mapping space 8 | [else] 9 | 0 value fw-virt-base \ Setup later after we know the memory size 10 | [then] 11 | h# 10.0000 value fw-virt-size 12 | 13 | headers 14 | 15 | [ifdef] ram-image 16 | fw-virt-base fw-virt-size + ' load-base set-config-int-default 17 | [else] 18 | kseg0 h# 20.0000 + ' load-base set-config-int-default 19 | [then] 20 | 0 value load-limit \ Top address of area at load-base (set later) 21 | -------------------------------------------------------------------------------- /cpu/ppc/build/Makefile: -------------------------------------------------------------------------------- 1 | OS := $(shell uname) 2 | 3 | all: basefw.dic 4 | 5 | .PHONY: FORCE all clean 6 | 7 | .PRECIOUS: builder.dic 8 | 9 | ../${OS}/forth: 10 | @make -C ../${OS} forth 11 | 12 | build: ../${OS}/forth 13 | @ln -sf ../${OS}/forth $@ 14 | 15 | %.dic: FORCE build 16 | ./build $@ 17 | 18 | builder.dic: FORCE build 19 | -[ ! -f builder.sav ] && cp builder.dic builder.sav 20 | ./build builder.dic 21 | 22 | inflate.bin: 23 | make -C ../${OS} ../build/inflate.bin 24 | 25 | # Don't use *.dic so as not to remove builder.dic 26 | clean: 27 | rm -f tools.dic kernel.dic basefw.dic *.log headers *~ inflate.bin build 28 | -------------------------------------------------------------------------------- /cpu/x86/pc/olpc/via/ec.bth: -------------------------------------------------------------------------------- 1 | purpose: Fetch the EC (Embedded Controller, i.e. KB3700) microcode 2 | 3 | command: &builder &this 4 | build-now 5 | 6 | fload ${BP}/cpu/x86/pc/olpc/via/ec-version.fth 7 | 8 | \ If there is a GET_EC macro, use it instead of fetching the released version. 9 | " ${GET_EC}" expand$ nip [if] 10 | " ${GET_EC}" expand$ $sh 11 | [else] 12 | " wget -q http://dev.laptop.org/pub/ec/cl1b-${EC_VERSION}.img -O ec.img" expand$ $sh 13 | [then] 14 | 15 | \ This forces the creation of an ec.log file, so we don't re-fetch ec.img 16 | writing ec.version 17 | " ${EC_VERSION}"n" expand$ ofd @ fputs 18 | ofd @ fclose 19 | -------------------------------------------------------------------------------- /cpu/arm/mmp2/lcdcfg.fth: -------------------------------------------------------------------------------- 1 | d# 4 value hsync 2 | d# 800 value hdisp 3 | d# 1056 value htotal 4 | d# 212 value hbp 5 | 6 | d# 4 value vsync 7 | d# 480 value vdisp 8 | d# 525 value vtotal 9 | d# 31 value vbp 10 | 11 | : hfp ( -- n ) htotal hdisp - hsync - hbp - ; 12 | : vfp ( -- n ) vtotal vdisp - vsync - vbp - ; 13 | 14 | 2 constant #lanes 15 | 3 constant bytes/pixel 16 | d# 24 constant bpp 17 | 18 | : >bytes ( pixels -- chunks ) bytes/pixel * ; 19 | : >chunks ( pixels -- chunks ) >bytes #lanes / ; 20 | 21 | alias width hdisp 22 | alias height vdisp 23 | alias depth bpp 24 | width >bytes constant /scanline 25 | -------------------------------------------------------------------------------- /cpu/arm/mmp2/uart.fth: -------------------------------------------------------------------------------- 1 | " uart" name 2 | " mrvl,mmp-uart" +compatible 3 | my-space h# 20 reg 4 | 5 | : write ( adr len -- actual ) 6 | 0 max tuck ( actual adr actual ) 7 | bounds ?do i c@ uemit loop ( actual ) 8 | ; 9 | : read ( adr len -- actual ) 10 | 0= if drop 0 exit then 11 | ukey? if ( adr ) 12 | ukey swap c! 1 ( actual ) 13 | else ( adr ) 14 | drop -2 ( -2 ) 15 | then 16 | ; 17 | : open ( -- okay? ) true ; 18 | : close ( -- ) ; 19 | : install-abort ; 20 | : remove-abort ; 21 | -------------------------------------------------------------------------------- /cpu/x86/pc/biosload/preofhdr.fth: -------------------------------------------------------------------------------- 1 | \ See license at end of file 2 | purpose: Create header for starting Forth from preOF, 32-bit protected mode 3 | 4 | command: &builder &this 5 | build-now 6 | 7 | \needs start-assembling fload ${BP}/cpu/x86/asmtools.fth 8 | 9 | hex 10 | 11 | start-assembling 12 | 13 | label preof-hdr 14 | 15 | \ This code begins execution in 32-bit mode. 16 | 17 | [ifdef] ramsize 18 | ramsize # mem-info-pa 1 la+ #) mov 19 | 0 # mem-info-pa 2 la+ #) mov 20 | [then] 21 | ResetBase # ax mov 22 | ax jmp 23 | h# 20 pad-to 24 | end-code 25 | 26 | end-assembling 27 | here preof-hdr - constant /preof-hdr 28 | -------------------------------------------------------------------------------- /dev/olpc/spiflash/flashec.fth: -------------------------------------------------------------------------------- 1 | \ Command to replace just the EC bits in the FLASH. 2 | \ This will cause the overall CRC near the end of the FLASH to be wrong, 3 | \ but that won't prevent the system from working. 4 | 5 | \ .( EC FLASH Program. Example: ok flash-ec disk:\PQ2B31.bin) cr 6 | 7 | h# 1.0000 constant /ec 8 | 9 | : flash-ec ( "filename" -- ) 10 | reading 11 | flash-buf /ec ifd @ fgets ( len ) 12 | ifd @ fclose 13 | 14 | /ec <> abort" EC image file is the wrong length" 15 | 16 | flash-write-enable 17 | 18 | \ merge-mfg-data 19 | 20 | flash-buf /ec 0 write-flash-range \ Write everything 21 | ; 22 | -------------------------------------------------------------------------------- /cpu/arm/mmp2/ntim_mmp2_nand_ofwonly_ddr_elpida_512m.fth: -------------------------------------------------------------------------------- 1 | \ Marvel Trusted Image Module image creation script for 2 | \ MMP2 platform with 512M of Elpida RAM 3 | \ Running OFW directly, with no intermediate loader 4 | 5 | tim: 00030102 0 Sky! PXA688 6 | flash: NAN'6 7 | timh: TIMH 0 d1020000 8 | image: WTMI 1000 d1000000 /c/Documents and Settings/Mitch Bradley/My Documents/OLPC/Marvell/alpha1_sdcard_update/WtmUnresetPJ4.bin 9 | image: OBMI 80000 0 /home/wmb/ofw.test/cpu/arm/mmp2/build/ofw.rom 10 | reserved: 11 | 12 | fload ddr_elpida_512m.fth 13 | term: 14 | end-reserved 15 | end-tim 16 | 17 | save-image: nand_ofwonly.img 18 | -------------------------------------------------------------------------------- /cpu/mips/bonito/initsio.fth: -------------------------------------------------------------------------------- 1 | purpose: Initialize SuperI/O for startup messages 2 | copyright: Copyright 2001 Firmworks All Rights Reserved 3 | 4 | transient 5 | : sio-c! ( data reg -- ) \ t0: isa-io-base 6 | ( reg ) " t1 set" evaluate 7 | " t1 t0 h# 15c sb" evaluate 8 | ( data ) " t1 set" evaluate 9 | " t1 t0 h# 15d sb" evaluate 10 | ; 11 | resident 12 | 13 | label init-sio ( -- ) \ Destroys: t0 and t1 14 | isa-io-base d# 16 >> t0 lui 15 | 16 | h# 06 h# 07 sio-c! \ Select com1 17 | h# 03 h# 60 sio-c! \ At port 3f8 18 | h# f8 h# 61 sio-c! 19 | h# 01 h# 30 sio-c! \ Turn it on 20 | 21 | ra jr nop 22 | end-code 23 | 24 | -------------------------------------------------------------------------------- /cpu/x86/pc/neptune/build/atomrom.bth: -------------------------------------------------------------------------------- 1 | purpose: Add CRC to atomic.rom 2 | 3 | command: &builder &this 4 | 5 | build-now 6 | 7 | fload ${BP}/forth/lib/crc32.fth 8 | 9 | h# 80000 constant romsize 10 | 11 | writing atomrom.rom 12 | " atomic.rom" $add-file 13 | 14 | /l buffer: crcbuf 15 | 16 | romsize buffer: filebuf 17 | 0 ofd @ fseek 18 | 19 | \ Read the entire image, compute the CRC, and store it h# 30 from the end 20 | filebuf romsize ofd @ fgets romsize <> abort" Can't read back image" 21 | 0 crctab filebuf romsize ($crc) crcbuf ! 22 | 23 | romsize h# 30 - ofd @ fseek 24 | crcbuf /l ofd @ fputs 25 | 26 | ofd @ fclose 27 | -------------------------------------------------------------------------------- /dev/olpc/cafenand/cafenand.bth: -------------------------------------------------------------------------------- 1 | purpose: Load file for OLPC CaFe NAND Driver 2 | 3 | command: &tokenize &this 4 | build-now 5 | 6 | silent on 7 | 8 | begin-tokenizing cafenand.fc 9 | 10 | FCode-version2 11 | 12 | fload ${BP}/dev/olpc/cafenand/ecc.fth 13 | fload ${BP}/dev/olpc/cafenand/cafenand.fth 14 | fload ${BP}/dev/olpc/cafenand/configure.fth 15 | fload ${BP}/dev/olpc/cafenand/badblock.fth 16 | fload ${BP}/dev/olpc/cafenand/redboot.fth 17 | \ : lba-nand? 0 ; : lba-close ; 18 | fload ${BP}/dev/olpc/cafenand/lbanand.fth 19 | fload ${BP}/dev/olpc/cafenand/methods.fth 20 | fload ${BP}/dev/olpc/cafenand/selftest.fth 21 | 22 | end0 23 | 24 | end-tokenizing 25 | -------------------------------------------------------------------------------- /dev/olpc/confirm.fth: -------------------------------------------------------------------------------- 1 | purpose: Operator confirmation of selftest results 2 | 3 | : confirm-selftest? ( -- error? ) 4 | diagnostic-mode? if 5 | ." Did the test pass (n or ESC for FAIL) ? " 6 | key dup emit cr upc dup [char] N = swap h# 1b = or 7 | else 8 | false 9 | then 10 | ; 11 | 12 | : has-direct-child? ( name@unit$ -- found? ) 13 | also current @ >r ( name@unit$ r: current ) 14 | [char] @ left-parse-string ( unit$ name$ r: current ) 15 | ['] (find-node) catch ( unit$ name$ found? r: current ) 16 | >r 4drop r> 0<> ( found? r: current ) 17 | r> set-current previous ( found? ) 18 | ; 19 | -------------------------------------------------------------------------------- /cpu/x86/build/Makefile: -------------------------------------------------------------------------------- 1 | OS := $(shell uname) 2 | 3 | all: basefw.dic 4 | 5 | .PHONY: FORCE all clean 6 | 7 | .PRECIOUS: builder.dic 8 | 9 | ../${OS}/forth: 10 | @make -C ../${OS} forth 11 | 12 | build: ../${OS}/forth 13 | @ln -sf ../${OS}/forth $@ 14 | 15 | %.dic: FORCE build 16 | ./build $@ 17 | 18 | builder.dic: FORCE build 19 | -[ ! -f builder.sav ] && cp builder.dic builder.sav 20 | ./build builder.dic 21 | 22 | inflate.bin: 23 | make -C ../${OS} ../build/inflate.bin 24 | 25 | # Don't use *.dic so as not to remove builder.dic 26 | clean: 27 | rm -f tools.dic kernel.dic basefw.dic 28 | rm -f *.tag *.log headers *~ inflate.bin build 29 | make -C ../${OS} clean 30 | -------------------------------------------------------------------------------- /cpu/x86/pc/olpc/wlantest.fth: -------------------------------------------------------------------------------- 1 | purpose: Wireless LAN auto-wakeup (requires modified WLAN firmware) 2 | 3 | 0 value patched? 4 | : wackup 5 | patched? 0= if 6 | " /wlan" find-device 7 | " patch exit link-up? close" evaluate 8 | dend 9 | true to patched? 10 | then 11 | 12 | sci-wakeup 13 | 14 | " /wlan" open-dev >r 15 | " broadcast-wakeup" r@ $call-method 16 | r> close-dev 17 | 18 | 0 19 | begin 20 | " /wlan" open-dev >r 21 | " autostart" r@ $call-method 22 | " host-sleep-activate" r@ $call-method 23 | r> close-dev 24 | 5 ms 25 | s 26 | 1+ dup . 27 | d# 500 ms 28 | key? until 29 | ; 30 | -------------------------------------------------------------------------------- /cpu/arm/mmap.fth: -------------------------------------------------------------------------------- 1 | -1 value mem-fd 2 | : ?open-mem ( -- ) 3 | mem-fd 0< if 4 | 2 " /dev/mem" $cstr 8 syscall 2drop retval to mem-fd 5 | then 6 | mem-fd 0< abort" Can't open /dev/mem; try being root" 7 | ; 8 | : mmap ( phys len -- virt ) 9 | ?open-mem mem-fd d# 380 syscall 3drop retval 10 | dup -1 = abort" mmap failed" 11 | ; 12 | : munmap ( virt len -- ) mem-fd d# 384 syscall 2drop ; 13 | 14 | : unaligned-mmap ( phys -- virt ) 15 | dup h# fff and ( phys phys.lowbits ) 16 | swap h# fff invert and ( phys.lowbits phys.highbits ) 17 | h# 1000 mmap ( phys.lowbit virt.highbits ) 18 | + ( virt ) 19 | ; 20 | -------------------------------------------------------------------------------- /cpu/arm/olpc/sdregs.fth: -------------------------------------------------------------------------------- 1 | h# 200 value /regs \ SDHCI register block 2 | 1 value #slots 3 | 4 | 0 instance value base-addr 5 | 0 instance value chip 6 | 7 | : set-slot-address ( slot-address -- ) to base-addr ; 8 | : map-regs ( -- ) 9 | chip if exit then 10 | base-addr /regs " map-in" $call-parent 11 | to chip 12 | ; 13 | : unmap-regs ( -- ) 14 | chip 0= if exit then 15 | chip /regs " map-out" $call-parent 16 | 0 to chip 17 | ; 18 | 19 | : vendor-modes ( -- ) ; 20 | 21 | \ This tunes the data timing for better operation at 50 MHz 22 | : ?cafe-fpga-quirk ( -- ) h# 10a chip + rw@ h# 3f00 or h# 10a chip + rw! ; 23 | 24 | : ?via-quirk ( -- ) ; 25 | -------------------------------------------------------------------------------- /cpu/mips/bonito/flash.fth: -------------------------------------------------------------------------------- 1 | purpose: Setup for Flash ROM access 2 | copyright: Copyright 1995-2001 Firmworks. All Rights Reserved. 3 | 4 | h# 10.0000 to /flash 5 | 6 | 0 value flashbase 7 | 8 | headerless 9 | : (fctl!) ( n a -- ) flashbase + rb! ; ' (fctl!) to fctl! 10 | : (fdata!) ( n a -- ) flashbase + rb! ; ' (fdata!) to fdata! 11 | : (fc@) ( a -- n ) flashbase + rb@ ; ' (fc@) to fc@ 12 | 13 | headers 14 | : open-flash ( -- ) 15 | flashbase 0= if 16 | rom-pa /flash root-map-in to flashbase 17 | then 18 | ; 19 | : close-flash ( -- ) 20 | flashbase /flash root-map-out 0 to flashbase 21 | ; 22 | ' open-flash to enable-flash-writes 23 | 24 | -------------------------------------------------------------------------------- /cpu/arm/olpc/build-mv8787.fth: -------------------------------------------------------------------------------- 1 | purpose: Common code for fetching and building the WLAN microcode 2 | 3 | \ The macro WLAN_VERSION, and optionally GET_WLAN, must be defined externally 4 | 5 | \needs to-file fload ${BP}/forth/lib/tofile.fth 6 | \needs $md5sum-file fload ${BP}/forth/lib/md5file.fth 7 | 8 | " ${GET_WLAN}" expand$ nip [if] 9 | " ${GET_WLAN}" expand$ $sh 10 | [else] 11 | " wget -q -O mv8787.bin http://dev.laptop.org/pub/firmware/mwifiex/mv8787-${WLAN_8787_VERSION}.bin" expand$ $sh 12 | [then] 13 | 14 | \ This forces the creation of a .log file, so we don't re-fetch 15 | writing mv8787.version 16 | " ${WLAN_8787_VERSION}"n" expand$ ofd @ fputs 17 | ofd @ fclose 18 | -------------------------------------------------------------------------------- /cpu/i8051/build/Makefile: -------------------------------------------------------------------------------- 1 | SIMTTY = /dev/pts/1 2 | 3 | OS := $(shell uname) 4 | 5 | # XXX need a better way of determining this 6 | HOST := x86 7 | 8 | HOSTDIR := $(shell eval "(cd ../../${HOST}/${OS}; pwd)") 9 | 10 | all: kernel.hex 11 | 12 | .PHONY: FORCE all clean 13 | 14 | .PRECIOUS: kernel.img 15 | 16 | ${HOSTDIR}/forth: 17 | @make -C ${HOSTDIR} forth 18 | 19 | sim: kernel.hex 20 | s51 -s ${SIMTTY} -X 32M kernel.hex 21 | 22 | build: ${HOSTDIR}/forth 23 | @ln -sf ${HOSTDIR}/forth $@ 24 | 25 | %.img: FORCE build 26 | HOSTDIR=${HOSTDIR} ./build $@ 27 | 28 | %.hex: %.img 29 | objcopy -I binary -O ihex $< $@ 30 | 31 | clean: 32 | rm -f *.img *.hex *.log headers *~ build 33 | -------------------------------------------------------------------------------- /cpu/x86/pc/biosload/build/Makefile: -------------------------------------------------------------------------------- 1 | OS := $(shell uname) 2 | 3 | all: ofw.c32 4 | 5 | floppyofw.img: FORCE build ../../../build/inflate.bin 6 | ./build $@ 7 | 8 | ofw.c32: FORCE build ../../../build/inflate.bin 9 | ./build $@ 10 | 11 | ../../../${OS}/forth: 12 | @make -C ../../../${OS} forth 13 | 14 | ../../../build/inflate.bin: 15 | @make -C ../../../build inflate.bin 16 | 17 | build: ../../../${OS}/forth 18 | @ln -sf ../../../${OS}/forth build 19 | 20 | clean: 21 | rm -f *.dic *.log headers *~ *.elf *.di *.img builton.fth build *.c32 22 | 23 | clean-all: clean 24 | @make -C ../../../build clean 25 | @make -C ../../../${OS} clean 26 | 27 | .PHONY: FORCE clean all clean-all 28 | -------------------------------------------------------------------------------- /cpu/x86/pc/olpc/port80.fth: -------------------------------------------------------------------------------- 1 | purpose: Put message codes out on port 80 2 | 3 | h# 40 value the-debug-code 4 | : next-debug-code ( -- n ) the-debug-code dup 1+ to the-debug-code ; 5 | 6 | : port80 ( b -- ) h# 80 pc! ; \ Debug port callout 7 | 8 | : show-debug-code ( adr len code# -- ) 9 | ." Port80: " push-hex <# u# u# u#> type pop-base space type cr 10 | ; 11 | : put-port80 ( msg$ -- ) 12 | next-debug-code dup >r show-debug-code r> ( adr len b ) 13 | postpone literal postpone port80 ( adr len ) 14 | ; 15 | 16 | \ Automatically insert port80 codes in named stand-init: words 17 | : msg-port80 ( msg$ -- msg$ ) 2dup put-port80 ; 18 | ' msg-port80 to check-message 19 | -------------------------------------------------------------------------------- /cpu/mips/bonito/intr.fth: -------------------------------------------------------------------------------- 1 | purpose: Interrupt handlers 2 | copyright: Copyright 2001 FirmWorks All Rights Reserved 3 | 4 | headers 5 | hex 6 | 7 | : .intr-sw ( intr# -- ) ." Software Interrupt " u. cr ; 8 | : (intr-sw0) ( -- ) 0 .intr-sw ; ' (intr-sw0) to intr-sw0 9 | : (intr-sw1) ( -- ) 1 .intr-sw ; ' (intr-sw1) to intr-sw1 10 | 11 | : .intr-hw ( intr# -- ) ." Hardware Interrupt " u. cr ; 12 | ' dispatch-interrupt to intr-hw0 13 | ' dispatch-interrupt to intr-hw1 14 | : (intr-hw2) ( -- ) 2 .intr-hw ; ' (intr-hw2) to intr-hw2 15 | : (intr-hw3) ( -- ) 3 .intr-hw ; ' (intr-hw3) to intr-hw3 16 | : (intr-hw4) ( -- ) 4 .intr-hw ; ' (intr-hw4) to intr-hw4 17 | 18 | headers 19 | 20 | -------------------------------------------------------------------------------- /clients/memtest86/olpcvia.c: -------------------------------------------------------------------------------- 1 | #include "io.h" 2 | 3 | #include "test.h" 4 | #include "defs.h" 5 | #include "config.h" 6 | 7 | void poll_errors(void) 8 | { 9 | } 10 | void set_ecc_polling(int val) 11 | { 12 | } 13 | void show_spd(void) 14 | { 15 | } 16 | void get_menu(void) 17 | { 18 | } 19 | void find_controller(void) 20 | { 21 | } 22 | int pci_init(void) 23 | { 24 | return 0; 25 | } 26 | void warm_start() 27 | { 28 | outb(0,0x92); 29 | outb(1,0x92); 30 | // wrmsr(0x51400017, 1, 0); 31 | } 32 | // int query_linuxbios(void) 33 | // { 34 | // return 1; 35 | // } 36 | int query_pcbios(void) 37 | { 38 | return 0; 39 | } 40 | // int query_ofw(void) 41 | // { 42 | // return 1; 43 | // } 44 | -------------------------------------------------------------------------------- /cpu/mips/broadcom/avx/intr.fth: -------------------------------------------------------------------------------- 1 | purpose: Interrupt handlers 2 | copyright: Copyright 2001 FirmWorks All Rights Reserved 3 | 4 | headers 5 | hex 6 | 7 | : .intr-sw ( intr# -- ) ." Software Interrupt " u. cr ; 8 | : (intr-sw0) ( -- ) 0 .intr-sw ; ' (intr-sw0) to intr-sw0 9 | : (intr-sw1) ( -- ) 1 .intr-sw ; ' (intr-sw1) to intr-sw1 10 | 11 | : .intr-hw ( intr# -- ) ." Hardware Interrupt " u. cr ; 12 | ' dispatch-interrupt to intr-hw0 13 | ' dispatch-interrupt to intr-hw1 14 | : (intr-hw2) ( -- ) 2 .intr-hw ; ' (intr-hw2) to intr-hw2 15 | : (intr-hw3) ( -- ) 3 .intr-hw ; ' (intr-hw3) to intr-hw3 16 | : (intr-hw4) ( -- ) 4 .intr-hw ; ' (intr-hw4) to intr-hw4 17 | 18 | headers 19 | 20 | -------------------------------------------------------------------------------- /dev/video/loadcirrus.fth: -------------------------------------------------------------------------------- 1 | purpose: Interior load file for Cirrus video driver 2 | 3 | " vga" device-name 4 | 5 | fload ${BP}/dev/video/common/defer.fth \ Defered words 6 | 1024x768x16 7 | fload ${BP}/dev/video/controlr/pcimap.fth \ Generic PCI implementations 8 | fload ${BP}/dev/video/dacs/cirrus.fth 9 | fload ${BP}/dev/video/controlr/vga.fth \ Load generic VGA routines 10 | fload ${BP}/dev/video/controlr/cirrus.fth \ Load Cirrus routines 11 | fload ${BP}/dev/video/controlr/cirruspci.fth \ PCI routines 12 | fload ${BP}/dev/video/common/graphics.fth \ Graphics and color routines 13 | fload ${BP}/dev/video/common/init.fth \ Init code 14 | fload ${BP}/dev/video/common/display.fth \ High level interface code 15 | -------------------------------------------------------------------------------- /cpu/arm/mmp3/galcore.fth: -------------------------------------------------------------------------------- 1 | purpose: Device node for GALCORE graphics accelerator 2 | 3 | h# d420.d000 constant gpu-pa \ Base of GPU 4 | h# 1000 constant /gpu 5 | 6 | dev / 7 | new-device 8 | " gpu" device-name 9 | " mrvl,galcore" +compatible 10 | gpu-pa /gpu reg 11 | d# 0 encode-int 2 encode-int encode+ " interrupts" property 12 | " /interrupt-controller/interrupt-controller@1c0" encode-phandle " interrupt-parent" property 13 | 14 | " galcore 3D" encode-string " galcore 2D" encode-string encode+ " interrupt-names" property 15 | 16 | " /pmua" encode-phandle d# 11 encode-int encode+ " clocks" property 17 | " GCCLK" " clock-names" string-property 18 | finish-device 19 | device-end 20 | -------------------------------------------------------------------------------- /cpu/mips/broadcom/avx/rom.bth: -------------------------------------------------------------------------------- 1 | purpose: Top-level build script for Intreon AVX ROM 2 | copyright: Copyright 2001 FirmWorks All Rights Reserved 3 | 4 | command: &native &this 5 | in: romraw.img 6 | build-now 7 | 8 | \needs $add-dropin fload ${BP}/tools/mkdropin.fth 9 | 10 | \ Always re-create the builton.fth file when we make a new rom.img 11 | fload ${BP}/arch/mips/builton.bth 12 | 13 | : compute-chksum ( adr len -- chksum ) 14 | bounds 0 -rot ?do i c@ + loop 15 | ; 16 | 17 | writing rom.img 18 | " romraw.img" $read-file ( adr len ) 19 | 2dup compute-chksum -rot ( chksum adr len ) 20 | 2dup ofd @ fputs free-mem ( chksum ) 21 | h# ff and h# a5 swap - ofd @ fputc 22 | ofd @ fclose 23 | 24 | -------------------------------------------------------------------------------- /forth/lib/wrtime.fth: -------------------------------------------------------------------------------- 1 | purpose: Timing using wrapper calls 2 | 3 | \ We may need to pass a static buffer to the wrapper to hold the 4 | \ results of gettimeofday(). 5 | 0 value timeval 6 | 7 | : get-usecs ( -- d.usec ) 8 | timeval d# 348 syscall ( timeval ) 9 | ?dup 0= if retval then 2@ ( usec sec ) 10 | d# 1,000,000 um* rot 0 d+ 11 | ; 12 | 13 | \ We really should call usleep, but that wrapper doesn't have that 14 | : (us) ( d.microseconds -- ) 15 | get-usecs d+ ( d.target-time ) 16 | begin 2dup get-usecs d- d0< until ( d.target-time ) 17 | 2drop 18 | ; 19 | : us ( microseconds -- ) 0 (us) ; 20 | : ms ( milliseconds -- ) d# 1000 um* (us) ; 21 | -------------------------------------------------------------------------------- /ofw/help/tinyhelp.fth: -------------------------------------------------------------------------------- 1 | purpose: Rudimentary help facility 2 | 3 | : help ( "topic" -- ) 4 | postpone \ 5 | ." go - Resume execution of OS" cr 6 | ." boot - Boot the default OS" cr 7 | ." boot - Boot from the specified disk" cr 8 | ." printenv - Display all configuration variables" cr 9 | ." setenv - Set a configuration variable" cr 10 | ." devalias - Display all device aliases" cr 11 | ." devalias - Create or change a device alias" cr 12 | ." show-devs - Display the names of all devices" cr 13 | cr 14 | ." Many other commands are available." cr 15 | ; 16 | -------------------------------------------------------------------------------- /clients/memtest86/screen_buffer.h: -------------------------------------------------------------------------------- 1 | /* --*- C -*-- 2 | * 3 | * By Jani Averbach, Jaa@iki.fi, 2001 4 | * 5 | * Released under version 2 of the Gnu Public License. 6 | * 7 | */ 8 | #ifndef SCREEN_BUFFER_H_1D10F83B_INCLUDED 9 | #define SCREEN_BUFFER_H_1D10F83B_INCLUDED 10 | 11 | #include "config.h" 12 | 13 | char get_scrn_buf(const int y, const int x); 14 | void set_scrn_buf(const int y, const int x, const char val); 15 | void clear_screen_buf(void); 16 | void tty_print_region(const int pi_top,const int pi_left, const int pi_bottom,const int pi_right); 17 | void tty_print_line(int y, int x, const char *text); 18 | void tty_print_screen(void); 19 | void print_error(char *pstr); 20 | #endif /* SCREEN_BUFFER_H_1D10F83B_INCLUDED */ 21 | -------------------------------------------------------------------------------- /dev/mediagx/cx5530/ide.bth: -------------------------------------------------------------------------------- 1 | purpose: Load file for the Cyrix 5530 IDE function driver 2 | 3 | command: &tokenize &this 4 | build-now 5 | 6 | silent on 7 | 8 | begin-tokenizing ide.fc 9 | 10 | FCode-version2 11 | fload ${BP}/dev/mediagx/cx5530/ide.fth 12 | fload ${BP}/dev/ide/generic.fth 13 | fload ${BP}/dev/ide/onelevel.fth 14 | fload ${BP}/dev/ide/dmaide.fth 15 | \ To disable DMA, use the following line; do not omit the dmaide.fth 16 | \ file from the load, because it contains not only DMA code but also 17 | \ a workaround for the Winbond chip's PIO bug. 18 | \ With the current HAL, NT seems to be unhappy if the controller is 19 | \ left in bus mastering mode. 20 | pio 21 | end0 22 | 23 | end-tokenizing 24 | -------------------------------------------------------------------------------- /cpu/ppc/Linux/Makefile: -------------------------------------------------------------------------------- 1 | # Makefile for native PowerPC wrapper to run under Linux 2 | 3 | OPT = -O 4 | # OPT = 5 | 6 | BP=../../.. 7 | 8 | CFLAGS = -D__linux__ -DHOSTPOWERPC -DTARGET_POWERPC 9 | 10 | CC = gcc 11 | 12 | WRDIR = ${BP}/forth/wrapper 13 | ZIPDIR = ${WRDIR}/zip 14 | 15 | ZIPOBJS = adler32.o compress.o crc32.o deflate.o inflate.o trees.o zutil.o 16 | 17 | OBJS = wrapper.o logger.o ${ZIPOBJS} 18 | 19 | all: ppcforth 20 | 21 | ppcforth: forth 22 | ln -sf $< $@ 23 | 24 | forth: $(OBJS) 25 | $(CC) $(LFLAGS) $(OBJS) -o $@ 26 | 27 | %.o: ${WRDIR}/%.c 28 | ${CC} -c ${CFLAGS} $< -o $@ 29 | 30 | %.o: ${ZIPDIR}/%.c 31 | ${CC} -c ${CFLAGS} -I${ZIPDIR} $< -o $@ 32 | 33 | clean: 34 | @rm -f *.o forth ppcforth 35 | 36 | FRC: 37 | -------------------------------------------------------------------------------- /cpu/x86/pc/olpc/via/Notes/CableScramble.txt: -------------------------------------------------------------------------------- 1 | Artec End VIA End 2 | 3 | 1 RESET 2 4 | 2 LAD0 4 5 | 3 LAD1 6 6 | 4 LAD2 8 7 | 5 LAD3 7 8 | 6 LFRAME# 5 9 | 7 GND1 - 10 | 8 CLK 3 11 | 9 GND2 9 12 | 10 3V3 1 13 | 14 | 15 | ARTEC Positionally looking down onto 16 | the unit with the 7-seg displays 17 | away from you. 18 | 19 | Bot Top 20 | Row Row 21 | 22 | 3V3 10 9 GND 23 | CLK 8 7 GND 24 | LFR 6 5 LA3 25 | LA2 4 3 LA1 26 | LA0 2 1 RST 27 | 28 | 29 | VIA Positionally looking down onto the 30 | board with the silkscreen right-reading 31 | 32 | G L L C 3 33 | N A F L V 34 | D 3 R K 3 35 | 36 | 9 7 5 3 1 37 | 38 | 10 8 6 4 2 39 | 40 | L L L R 41 | A A A S 42 | 2 1 0 T 43 | -------------------------------------------------------------------------------- /cpu/arm/olpc/test-tweaks.fth: -------------------------------------------------------------------------------- 1 | \ Suppress long memory test at final test stage 2 | dev /memory 3 | 0 value old-diag-switch? 4 | : not-final-test? ( -- flag ) 5 | final-test? if false exit then 6 | smt-test? if false exit then 7 | old-diag-switch? 8 | ; 9 | warning @ warning off 10 | : selftest ( -- error? ) 11 | diag-switch? to old-diag-switch? 12 | not-final-test? to diag-switch? 13 | selftest 14 | old-diag-switch? to diag-switch? 15 | ; 16 | warning ! 17 | device-end 18 | 19 | \ Add suspend resume test except in final 20 | dev /switches 21 | warning @ warning off 22 | : selftest ( -- error? ) 23 | final-test? 0= if 24 | s3-selftest if true exit then 25 | then 26 | selftest 27 | ; 28 | warning ! 29 | device-end 30 | -------------------------------------------------------------------------------- /cpu/x86/pc/olpc/whichcsum.fth: -------------------------------------------------------------------------------- 1 | \ This is a diagnostic used when checksum-test is enabled in resume.bth 2 | \ Usage: which-all .s (ignore the first two numbers) 3 | code which-all ( -- .. ) 4 | si push di push sp dx mov 5 | \ Checksum memory from 1M to top (excluding framebuffer) 6 | h# 0010.0000 # si mov 7 | resume-data h# 10 - #) di mov \ Save checksum base address 8 | begin 9 | bx bx xor 10 | h# 10.0000 2 rshift # cx mov \ Word count for 1MB 11 | begin ax lods ax bx add loopa 12 | ax 0 [di] cmp 13 | <> if 14 | si push 15 | then 16 | 4 [di] di lea 17 | \ h# ec0.0000 # si cmp 18 | h# 300.0000 # si cmp 19 | = until 20 | 0 [dx] di mov 4 [dx] si mov 21 | c; 22 | -------------------------------------------------------------------------------- /cpu/arm/mmp2/probemem.fth: -------------------------------------------------------------------------------- 1 | purpose: Memory probing 2 | copyright: Copyright 1994 FirmWorks All Rights Reserved 3 | 4 | " /memory" find-device 5 | 6 | headerless 7 | 8 | h# ffff.ffff value low 9 | h# 0 value high 10 | 11 | : log&release ( adr len -- ) 12 | over low umin to low ( adr len ) 13 | 2dup + high umax to high ( adr len ) 14 | release 15 | ; 16 | 17 | headers 18 | : probe ( -- ) 19 | 0 available-ram-size log&release 20 | 21 | 0 0 encode-bytes ( adr 0 ) 22 | physavail ['] make-phys-memlist find-node ( adr len prev 0 ) 23 | 2drop " reg" property 24 | 25 | \ Claim the memory used by OFW 26 | \ high h# 10.0000 - h# 10.0000 0 claim drop 27 | ; 28 | 29 | device-end 30 | -------------------------------------------------------------------------------- /cpu/arm/olpc/gpio-gamekeys.fth: -------------------------------------------------------------------------------- 1 | : gpio-game-key@ ( -- n ) 2 | 0 ( n ) 3 | rotate-gpio# gpio-pin@ 0= if button-rotate or then 4 | d# 16 gpio-pin@ 0= if button-o or then 5 | d# 17 gpio-pin@ 0= if button-check or then 6 | d# 18 gpio-pin@ 0= if button-x or then 7 | d# 19 gpio-pin@ 0= if button-square or then 8 | d# 20 gpio-pin@ 0= if rocker-up or then 9 | d# 21 gpio-pin@ 0= if rocker-right or then 10 | d# 22 gpio-pin@ 0= if rocker-down or then 11 | d# 23 gpio-pin@ 0= if rocker-left or then 12 | ; 13 | ' gpio-game-key@ to game-key@ 14 | 15 | : gpio-rotate-button? ( -- flag ) rotate-gpio# gpio-pin@ 0= ; 16 | ' gpio-rotate-button? to rotate-button? 17 | -------------------------------------------------------------------------------- /cpu/mips/makeinflater.notes: -------------------------------------------------------------------------------- 1 | The inflater is made with a GCC cross compiler. 2 | 3 | To build inflate.img, the following worked at one point (the GCC options might have changed since then): 4 | 5 | cd ${BP}/cpu/mips/Linux 6 | mipsel-gcc -ffreestanding -nostdlib -mips=rm52xx -mips1 -mno-abicalls -membedded-data -g0 -EL -mno-long-calls -c ${BP}/tools/inflate.c 7 | mipsel-ld -oformat elf32-littlemips -EL -G0 -N -Ttext=80100000 inflate.o -o inflate.elf 8 | mipsel-objcopy -O binary inflate.elf inflate.img 9 | 10 | The above lines make an image which should be loaded at absolute address 8010.0000. 11 | Should that be different, the change would have to be reflected in: 12 | 13 | ${BP}/cpu/mips/basefw.bth 14 | ${BP}/cpu/mips/bonito/reset.bth (and any other reset.bth that loads the inflater) 15 | -------------------------------------------------------------------------------- /cpu/mips/bonito/initcom1.fth: -------------------------------------------------------------------------------- 1 | purpose: Initialize COM1 for startup messages 2 | copyright: Copyright 2001 Firmworks All Rights Reserved 3 | 4 | transient 5 | : isa-c! ( data isa-adr -- ) \ t0: isa-io-base 6 | swap " t1 set" evaluate 7 | " t1 t0 rot sb" evaluate 8 | ; 9 | resident 10 | 11 | \ Initialize the 8250 (or compatible) COM1 serial port. 12 | label init-com1 ( -- ) \ Destroys t0 and t1 13 | isa-io-base d# 16 >> t0 lui 14 | 15 | \ SIOA 16 | h# 3 h# 3fc isa-c! \ RTS and DTR on 17 | h# 80 h# 3fb isa-c! \ Enable divisor latch 18 | h# c h# 3f8 isa-c! \ Baud rate divisor low - 9600 baud 19 | h# 0 h# 3f9 isa-c! \ Baud rate divisor high - 9600 baud 20 | h# 3 h# 3fb isa-c! \ 8 bits, no parity 21 | 22 | ra jr nop 23 | end-code 24 | -------------------------------------------------------------------------------- /cpu/mips/broadcom/avx/initcom1.fth: -------------------------------------------------------------------------------- 1 | purpose: Initialize COM1 for startup messages 2 | copyright: Copyright 2001 Firmworks All Rights Reserved 3 | 4 | transient 5 | : isa-c! ( data isa-adr -- ) \ t0: uart-base 6 | swap " t1 set" evaluate 7 | " t1 t0 rot sb" evaluate 8 | ; 9 | resident 10 | 11 | \ Initialize the 16552 COM1 serial port with 14.318MHz clock 12 | label init-com1 ( -- ) \ Destroys t0 and t1 13 | 14 | [ifndef] for-bcm93730 15 | uart-base t0 set 16 | h# 3 h# 3fc isa-c! \ RTS and DTR on 17 | h# 80 h# 3fb isa-c! \ Enable divisor latch 18 | h# 5d h# 3f8 isa-c! \ Baud rate divisor low - 9600 baud 19 | h# 0 h# 3f9 isa-c! \ Baud rate divisor high - 9600 baud 20 | h# 3 h# 3fb isa-c! \ 8 bits, no parity 21 | [then] 22 | 23 | ra jr nop 24 | end-code 25 | -------------------------------------------------------------------------------- /cpu/arm/mmp2/sdregs.fth: -------------------------------------------------------------------------------- 1 | h# 100 value /regs \ Standard size of SDHCI register block 2 | 4 value #slots 3 | 4 | 0 instance value slot 5 | 0 instance value chip 6 | 7 | 0 0 encode-bytes 8 | h# d4280000 encode-phys encode+ /regs encode-int encode+ 9 | h# d4280800 encode-phys encode+ /regs encode-int encode+ 10 | h# d4281000 encode-phys encode+ /regs encode-int encode+ 11 | h# d4281800 encode-phys encode+ /regs encode-int encode+ 12 | " reg" property 13 | 14 | : map-regs ( -- ) 15 | chip if exit then 16 | slot 1- h# 800 * my-space + /regs " map-in" $call-parent 17 | to chip 18 | ; 19 | : unmap-regs ( -- ) 20 | chip 0= if exit then 21 | chip /regs " map-out" $call-parent 22 | 0 to chip 23 | ; 24 | 25 | : vendor-modes ( -- ) ; 26 | : ?cafe-fpga-quirk ( -- ) ; 27 | : ?via-quirk ( -- ) ; 28 | -------------------------------------------------------------------------------- /cpu/arm/olpc/3.0/wlan-version.fth: -------------------------------------------------------------------------------- 1 | \ The wireless LAN module firmware 2 | 3 | \ Thin firmware version 4 | macro: WLAN_SUBDIR thinfirm/ 5 | macro: WLAN_PREFIX lbtf_sdio- 6 | macro: WLAN_VERSION 9.0.7.p2 7 | 8 | \ Non-thin version 9 | \ macro: WLAN_SUBDIR 10 | \ macro: WLAN_PREFIX sd8686- 11 | \ macro: WLAN_VERSION 9.70.20.p0 12 | 13 | \ Alternate command for getting WLAN firmware, for testing new versions. 14 | \ Temporarily uncomment the line and modify the path as necessary 15 | \ macro: GET_WLAN cp "/c/Documents and Settings/Mitch Bradley/My Documents/OLPC/DiskImages/sd8686-9.70.7.p0.bin" sd8686.bin; cp "/c/Documents and Settings/Mitch Bradley/My Documents/OLPC/DiskImages/sd8686_helper.bin" sd8686_helper.bin 16 | \ macro: GET_WLAN wget http://dev.laptop.org/pub/firmware/libertas/thinfirm/lbtf_sdio-9.0.7.p2.bin -O sd8686.bin 17 | -------------------------------------------------------------------------------- /cpu/arm/olpc/cl4/wlan-version.fth: -------------------------------------------------------------------------------- 1 | \ The wireless LAN module firmware 2 | 3 | \ Thin firmware version 4 | macro: WLAN_SUBDIR thinfirm/ 5 | macro: WLAN_PREFIX lbtf_sdio- 6 | macro: WLAN_VERSION 9.0.7.p2 7 | 8 | \ Non-thin version 9 | \ macro: WLAN_SUBDIR 10 | \ macro: WLAN_PREFIX sd8686- 11 | \ macro: WLAN_VERSION 9.70.20.p0 12 | 13 | \ Alternate command for getting WLAN firmware, for testing new versions. 14 | \ Temporarily uncomment the line and modify the path as necessary 15 | \ macro: GET_WLAN cp "/c/Documents and Settings/Mitch Bradley/My Documents/OLPC/DiskImages/sd8686-9.70.7.p0.bin" sd8686.bin; cp "/c/Documents and Settings/Mitch Bradley/My Documents/OLPC/DiskImages/sd8686_helper.bin" sd8686_helper.bin 16 | \ macro: GET_WLAN wget http://dev.laptop.org/pub/firmware/libertas/thinfirm/lbtf_sdio-9.0.7.p2.bin -O sd8686.bin 17 | -------------------------------------------------------------------------------- /cpu/arm/olpc/1.75/wlan-version.fth: -------------------------------------------------------------------------------- 1 | \ The wireless LAN module firmware 2 | 3 | \ Thin firmware version 4 | macro: WLAN_SUBDIR thinfirm/ 5 | macro: WLAN_PREFIX lbtf_sdio- 6 | macro: WLAN_VERSION 9.0.7.p2 7 | 8 | \ Non-thin version 9 | \ macro: WLAN_SUBDIR 10 | \ macro: WLAN_PREFIX sd8686- 11 | \ macro: WLAN_VERSION 9.70.20.p0 12 | 13 | \ Alternate command for getting WLAN firmware, for testing new versions. 14 | \ Temporarily uncomment the line and modify the path as necessary 15 | \ macro: GET_WLAN cp "/c/Documents and Settings/Mitch Bradley/My Documents/OLPC/DiskImages/sd8686-9.70.7.p0.bin" sd8686.bin; cp "/c/Documents and Settings/Mitch Bradley/My Documents/OLPC/DiskImages/sd8686_helper.bin" sd8686_helper.bin 16 | \ macro: GET_WLAN wget http://dev.laptop.org/pub/firmware/libertas/thinfirm/lbtf_sdio-9.0.7.p2.bin -O sd8686.bin 17 | -------------------------------------------------------------------------------- /cpu/mips/broadcom/avx/bcuart.fth: -------------------------------------------------------------------------------- 1 | purpose: Diagnostic (before console installation) access to serial port 2 | copyright: Copyright 2001 Firmworks All Rights Reserved 3 | 4 | headerless 5 | 6 | : uart@ ( reg# -- byte ) uart-base + c@ ; \ Read from a UART register 7 | : uart! ( byte reg# -- ) uart-base + c! ; \ Write to a UART register 8 | 9 | : baud ( baud-rate -- ) drop ; 10 | 11 | : inituarts ( -- ) 12 | ; 13 | 14 | : ukey? ( -- flag ) 3 uart@ 4 and 0<> ; \ Test for rcv character 15 | : uemit? ( -- flag ) 5 uart@ 1 and 0<> ; \ Test for xmit ready 16 | : ubreak? ( -- flag ) false ; 17 | : clear-break ( -- ) ; 18 | 19 | : ukey ( -- char ) begin ukey? until 2 uart@ ; \ Receive a character 20 | : uemit ( char -- ) begin uemit? until 4 uart! ; \ Transmit a character 21 | headers 22 | -------------------------------------------------------------------------------- /cpu/arm/olpc/3.0/fw.bth: -------------------------------------------------------------------------------- 1 | purpose: Build OFW Forth dictionary for OLPC ARM platforms 2 | \ See license at end of file 3 | 4 | dictionary: ${BP}/cpu/arm/olpc/3.0/build/prefw.dic 5 | command: &armforth &dictionary &this 6 | build-now 7 | 8 | " fw.tag" r/w create-file drop tag-file ! 9 | 10 | fload ${BP}/cpu/arm/olpc/build-fw.fth 11 | 12 | fload ${BP}/cpu/arm/olpc/3.0/uart.fth 13 | fload ${BP}/cpu/arm/olpc/3.0/sdhci.fth 14 | fload ${BP}/cpu/arm/olpc/3.0/lcdcfg.fth 15 | fload ${BP}/cpu/arm/olpc/3.0/usb.fth 16 | fload ${BP}/cpu/arm/olpc/exc7200-touchscreen.fth 17 | fload ${BP}/cpu/arm/olpc/3.0/switches.fth 18 | fload ${BP}/cpu/arm/olpc/3.0/leds.fth 19 | fload ${BP}/cpu/arm/olpc/3.0/testitems.fth 20 | fload ${BP}/cpu/arm/olpc/3.0/testinstructions.fth 21 | fload ${BP}/cpu/arm/olpc/test-tweaks.fth 22 | 23 | fload ${BP}/cpu/arm/olpc/save-fw.fth 24 | -------------------------------------------------------------------------------- /cpu/mips/broadcom/avx/test.bth: -------------------------------------------------------------------------------- 1 | purpose: A test program to run in memory 2 | copyright: Copyright 2001 Firmworks. All Rights Reserved. 3 | 4 | command: &native &this 5 | build-now 6 | 7 | \needs start-assembling fload ${BP}/cpu/mips/asmtools.fth 8 | \needs write-dropin fload ${BP}/tools/mkdropin.fth 9 | 10 | create debug-reset 11 | 12 | fload ${BP}/cpu/mips/ksegaddr.fth 13 | fload ${BP}/cpu/mips/broadcom/avx/physaddr.fth 14 | fload ${BP}/cpu/mips/broadcom/avx/report.fth 15 | 16 | start-assembling 17 | 18 | label my-entry 19 | h# 20 pad-to 20 | carret ?report 21 | linefeed ?report 22 | ascii H ?report 23 | ascii e ?report 24 | ascii l ?report 25 | ascii l ?report 26 | ascii o ?report 27 | begin again nop 28 | end-code 29 | 30 | end-assembling 31 | 32 | writing test.di 33 | asm-base here over - 0 " test" write-dropin 34 | ofd @ fclose 35 | -------------------------------------------------------------------------------- /cpu/arm/olpc/1.75/cforth-version.fth: -------------------------------------------------------------------------------- 1 | \ This file controls which CForth source version to include in the OFW build 2 | \ and the method for fetching it 3 | 4 | \ If CFORTH_VERSION is "modify", the repository will be cloned with git+ssh: so can push changes. 5 | \ You need ssh access to the server. 6 | \ macro: CFORTH_VERSION modify 7 | 8 | \ If CFORTH_VERSION is "clone", the repository will be cloned with git:. You won't be able to 9 | \ push changes, but you will get the full metadata so you can use commands like git grep. 10 | \ You don't need ssh access to the server. 11 | \ macro: CFORTH_VERSION clone 12 | 13 | \ Otherwise, the source code will be will be downloaded as a tarball via gitweb. 14 | \ macro: CFORTH_VERSION 59859f04454bc2574ab68cf0fd76ebdbc5f26fb6 15 | macro: CFORTH_VERSION HEAD 16 | 17 | macro: CFORTH_BUILD_DIR cforth/build/arm-xo-1.75 18 | -------------------------------------------------------------------------------- /cpu/arm/olpc/3.0/cforth-version.fth: -------------------------------------------------------------------------------- 1 | \ This file controls which CForth source version to include in the OFW build 2 | \ and the method for fetching it 3 | 4 | \ If CFORTH_VERSION is "modify", the repository will be cloned with git+ssh: so can push changes. 5 | \ You need ssh access to the server. 6 | \ macro: CFORTH_VERSION modify 7 | 8 | \ If CFORTH_VERSION is "clone", the repository will be cloned with git:. You won't be able to 9 | \ push changes, but you will get the full metadata so you can use commands like git grep. 10 | \ You don't need ssh access to the server. 11 | \ macro: CFORTH_VERSION clone 12 | 13 | \ Otherwise, the source code will be will be downloaded as a tarball via gitweb. 14 | \ macro: CFORTH_VERSION 59859f04454bc2574ab68cf0fd76ebdbc5f26fb6 15 | macro: CFORTH_VERSION HEAD 16 | 17 | macro: CFORTH_BUILD_DIR cforth/build/arm-xo-3.0 18 | -------------------------------------------------------------------------------- /cpu/arm/olpc/4.0/cforth-version.fth: -------------------------------------------------------------------------------- 1 | \ This file controls which CForth source version to include in the OFW build 2 | \ and the method for fetching it 3 | 4 | \ If CFORTH_VERSION is "modify", the repository will be cloned with git+ssh: so can push changes. 5 | \ You need ssh access to the server. 6 | \ macro: CFORTH_VERSION modify 7 | 8 | \ If CFORTH_VERSION is "clone", the repository will be cloned with git:. You won't be able to 9 | \ push changes, but you will get the full metadata so you can use commands like git grep. 10 | \ You don't need ssh access to the server. 11 | \ macro: CFORTH_VERSION clone 12 | 13 | \ Otherwise, the source code will be will be downloaded as a tarball via gitweb. 14 | \ macro: CFORTH_VERSION 59859f04454bc2574ab68cf0fd76ebdbc5f26fb6 15 | macro: CFORTH_VERSION HEAD 16 | 17 | macro: CFORTH_BUILD_DIR cforth/build/arm-xo-cl4 18 | -------------------------------------------------------------------------------- /cpu/arm/olpc/cl4/cforth-version.fth: -------------------------------------------------------------------------------- 1 | \ This file controls which CForth source version to include in the OFW build 2 | \ and the method for fetching it 3 | 4 | \ If CFORTH_VERSION is "modify", the repository will be cloned with git+ssh: so can push changes. 5 | \ You need ssh access to the server. 6 | \ macro: CFORTH_VERSION modify 7 | 8 | \ If CFORTH_VERSION is "clone", the repository will be cloned with git:. You won't be able to 9 | \ push changes, but you will get the full metadata so you can use commands like git grep. 10 | \ You don't need ssh access to the server. 11 | \ macro: CFORTH_VERSION clone 12 | 13 | \ Otherwise, the source code will be will be downloaded as a tarball via gitweb. 14 | \ macro: CFORTH_VERSION 59859f04454bc2574ab68cf0fd76ebdbc5f26fb6 15 | macro: CFORTH_VERSION HEAD 16 | 17 | macro: CFORTH_BUILD_DIR cforth/build/arm-xo-cl4 18 | -------------------------------------------------------------------------------- /cpu/ppc/prep/build/Makefile.cross: -------------------------------------------------------------------------------- 1 | # This setting of HOSTDIR is for cross-building on an x86 Linux system 2 | # For it to work, you first need to build the simulator version of ppcforth 3 | # in cpu/x86/Linux with "make -f Makefile.ppcforth" 4 | OS := $(shell uname) 5 | 6 | HOSTCPU:=x86 7 | HOSTDIR:=../../../${HOSTCPU}/${OS} 8 | 9 | all: prepfw.dic 10 | 11 | .PHONY: FORCE all clean 12 | 13 | .PRECIOUS: prepfw.dic 14 | 15 | ${HOSTDIR}/forth: 16 | @make -C ${HOSTDIR} forth 17 | 18 | ${HOSTDIR}/ppcforth: 19 | @make -C ${HOSTDIR} -f Makefile.ppcforth ppcforth 20 | 21 | build: ${HOSTDIR}/forth 22 | @ln -sf $< $@ 23 | 24 | %.dic: FORCE build ${HOSTDIR}/ppcforth 25 | ./build $@ 26 | 27 | builder.dic: FORCE build 28 | -[ ! -f builder.sav ] && cp builder.dic builder.sav 29 | ./build builder.dic 30 | 31 | clean: 32 | rm -f prepfw.dic *.log *~ build 33 | -------------------------------------------------------------------------------- /cpu/arm/mmp2/ntim_mmp2_nand_ofw_ddr_elpida_512m.fth: -------------------------------------------------------------------------------- 1 | \ Marvel Trusted Image Module image creation script for 2 | \ MMP2 platform with 512M of Elpida RAM 3 | \ Running OFW using MMP2_JASPER_LOADER as an intermediate step 4 | 5 | tim: 00030102 0 Sky! PXA688 6 | flash: NAN'6 7 | timh: TIMH 0 d1020000 8 | image: OBMI 80000 0 /c/Documents and Settings/Mitch Bradley/My Documents/OLPC/Marvell/alpha1_sdcard_update/MMP2_JASPER_LOADER_3_2_15.bin 9 | image: WTMI c0000 d1000000 /c/Documents and Settings/Mitch Bradley/My Documents/OLPC/Marvell/alpha1_sdcard_update/WtmUnresetPJ4.bin 10 | image: OSLO 100000 100000 /home/wmb/ofw.test/cpu/arm/mmp2/build/ofw.rom 11 | reserved: 12 | tbrx: 00020000 13 | transfer: TIMH d1020000 14 | end-package 15 | fload ddr_elpida_512m.fth 16 | term: 17 | end-reserved 18 | end-tim 19 | 20 | save-image: nand_ofw.img 21 | -------------------------------------------------------------------------------- /ofw/core/loadmore.fth: -------------------------------------------------------------------------------- 1 | purpose: Load file for additional core routines 2 | 3 | [ifndef] no-tools 4 | \ Load code to recognize client program header 5 | \ fload ${BP}/ofw/core/go.fth \ Initial program state 6 | 7 | fload ${BP}/ofw/core/bootdev.fth \ S boot command parser 8 | fload ${BP}/ofw/core/bootparm.fth \ S boot command parser 9 | 10 | \ fload ${BP}/ofw/core/dload.fth \ Diagnostic loading 11 | 12 | fload ${BP}/ofw/core/callback.fth \ Client callbacks 13 | [then] 14 | 15 | fload ${BP}/ofw/core/deblock.fth \ Block-to-byte conversion package 16 | 17 | [ifndef] no-tools 18 | fload ${BP}/ofw/core/dl.fth \ Diagnostic loading 19 | fload ${BP}/ofw/core/dlfcode.fth \ Serial line loading 20 | [then] 21 | 22 | fload ${BP}/ofw/core/instcons.fth \ install-console 23 | 24 | [ifndef] custom-banner 25 | fload ${BP}/ofw/core/banner.fth \ Default banner 26 | [then] 27 | -------------------------------------------------------------------------------- /dev/video/build/makefile: -------------------------------------------------------------------------------- 1 | all: video.fc 2 | @true 3 | 4 | SRCS= ../common/*.fth ../dacs/*.fth ../controlr/*.fth 5 | 6 | include ${BP}/default.mk 7 | 8 | video.fc: loadfcod.fth ${SRCS} 9 | ${WRAPPER} ${TOKENIZER} -s "tokenize loadfcod.fth $@" 10 | 11 | clean: 12 | rm -f *.fc 13 | 14 | RELDIR=/fw/release 15 | PARTNO=631-0000-2300010-01 16 | REV=A 17 | 18 | release: 19 | mkdir ${RELDIR}/${PARTNO}/${REV}/sdriver 20 | cp -r ../controlr ${RELDIR}/${PARTNO}/${REV}/sdriver 21 | cp -r ../common ${RELDIR}/${PARTNO}/${REV}/sdriver 22 | cp -r ../dacs ${RELDIR}/${PARTNO}/${REV}/sdriver 23 | mkdir ${RELDIR}/${PARTNO}/${REV}/sdriver/build 24 | cp ../build/loadfcod.fth ${RELDIR}/${PARTNO}/${REV}/sdriver/build 25 | cp ../build/makefile ${RELDIR}/${PARTNO}/${REV}/sdriver/build 26 | cp ../build/load ${RELDIR}/${PARTNO}/${REV}/sdriver/build 27 | 28 | -------------------------------------------------------------------------------- /cpu/arm/Darwin/Makefile: -------------------------------------------------------------------------------- 1 | # Darwin ARM tools 2 | 3 | BP = ../../.. 4 | ZIPDIR = ${BP}/forth/wrapper/zip 5 | 6 | # Rationale for these flags: 7 | # -Oz optimizes for smallest possible size. (Apple-specific) 8 | # -fno-toplevel-reorder keeps inflate() as the first entry point. 9 | # -thumb gives 30%-50% improvement over ARM32. 10 | # -arch armv7 uses more powerful instructions for less space. 11 | # -static -nostartfiles allows us to link this as a static text image. 12 | # This set of flags generates an inflate.bin of 3546 bytes. 13 | 14 | CFLAGS = -Oz -arch armv7 -mthumb -static -nostartfiles -fno-toplevel-reorder 15 | 16 | INFLATEBIN = ../build/inflate.bin 17 | 18 | $(INFLATEBIN): inflate 19 | segedit $< -extract __TEXT __text $@ 20 | 21 | inflate: ${ZIPDIR}/inflate.c 22 | ${CC} ${CFLAGS} -o $@ $< 23 | 24 | clean: 25 | rm -f *.o inflate $(INFLATEBIN) 26 | -------------------------------------------------------------------------------- /dev/video/video.bth: -------------------------------------------------------------------------------- 1 | purpose: Main load file for driver 2 | 3 | command: &tokenize &this 4 | build-now 5 | 6 | silent on 7 | 8 | begin-tokenizing video.fc 9 | 10 | FCode-version2 11 | 12 | \ " vga" device-name 13 | " display" device-name 14 | 15 | fload ${BP}/dev/video/common/defer.fth \ Defered words 16 | fload ${BP}/dev/video/controlr/pcimap.fth \ Generic PCI implementations 17 | fload ${BP}/dev/video/dacs/loaddacs.fth \ DAC routines 18 | fload ${BP}/dev/video/controlr/loadcntl.fth \ Controller code 19 | fload ${BP}/dev/video/common/pci.fth \ PCI routines 20 | fload ${BP}/dev/video/common/graphics.fth \ Graphics and color routines 21 | fload ${BP}/dev/video/common/init.fth \ Init code 22 | fload ${BP}/dev/video/common/display.fth \ High level interface code 23 | fload ${BP}/dev/video/common/textmode.fth \ VGA text mode 24 | 25 | end0 26 | 27 | end-tokenizing 28 | -------------------------------------------------------------------------------- /cpu/arm/mmp2/ntim_mmp2_nand_uboot_ddr_elpida_512m.fth: -------------------------------------------------------------------------------- 1 | \ Marvel Trusted Image Module image creation script for 2 | \ MMP2 platform with 512M of Elpida RAM 3 | \ Running uboot 4 | 5 | tim: 00030102 0 Sky! PXA688 6 | flash: NAN'6 7 | timh: TIMH 0 d1020000 8 | image: OBMI 80000 0 /c/Documents and Settings/Mitch Bradley/My Documents/OLPC/Marvell/alpha1_sdcard_update/MMP2_JASPER_LOADER_3_2_15.bin 9 | image: WTMI c0000 d1000000 /c/Documents and Settings/Mitch Bradley/My Documents/OLPC/Marvell/alpha1_sdcard_update/WtmUnresetPJ4.bin 10 | image: OSLO 100000 100000 /c/Documents and Settings/Mitch Bradley/My Documents/OLPC/Marvell/alpha1_sdcard_update/u-boot.bin 11 | reserved: 12 | tbrx: 00020000 13 | transfer: TIMH d1020000 14 | end-package 15 | fload ddr_elpida_512m.fth 16 | term: 17 | end-reserved 18 | end-tim 19 | 20 | save-image: nand_from_forth.img 21 | -------------------------------------------------------------------------------- /cpu/arm/mmp2/sdhcimmp2.fth: -------------------------------------------------------------------------------- 1 | purpose: Load file for SDHCI (Secure Digital Host Controller Interface) 2 | 3 | 0 0 " d4280000" " /" begin-package 4 | 5 | fload ${BP}/cpu/arm/mmp2/sdregs.fth 6 | fload ${BP}/dev/mmc/sdhci/sdhci.fth 7 | true to avoid-high-speed? 8 | 9 | new-device 10 | 3 encode-int " reg" property 11 | fload ${BP}/dev/mmc/sdhci/sdmmc.fth 12 | \ fload ${BP}/dev/mmc/sdhci/selftest.fth 13 | " internal" " slot-name" string-property 14 | finish-device 15 | 16 | \ new-device 17 | \ 2 encode-int " reg" property 18 | \ " mv8686" " $load-driver" eval drop 19 | \ finish-device 20 | 21 | new-device 22 | 1 encode-int " reg" property 23 | fload ${BP}/dev/mmc/sdhci/sdmmc.fth 24 | \ fload ${BP}/dev/mmc/sdhci/selftest.fth 25 | " external" " slot-name" string-property 26 | finish-device 27 | 28 | end-package 29 | -------------------------------------------------------------------------------- /cpu/arm/mmp3/thunderstone/sdhci.fth: -------------------------------------------------------------------------------- 1 | purpose: Load file for SDHCI (Secure Digital Host Controller Interface) 2 | 3 | 0 0 " d4280000" " /" begin-package 4 | 5 | fload ${BP}/cpu/arm/mmp2/sdregs.fth 6 | fload ${BP}/dev/mmc/sdhci/sdhci.fth 7 | true to avoid-high-speed? 8 | 9 | new-device 10 | 3 encode-int " reg" property 11 | fload ${BP}/dev/mmc/sdhci/sdmmc.fth 12 | \ fload ${BP}/dev/mmc/sdhci/selftest.fth 13 | " internal" " slot-name" string-property 14 | finish-device 15 | 16 | \ new-device 17 | \ 2 encode-int " reg" property 18 | \ " mv8686" " $load-driver" eval drop 19 | \ finish-device 20 | 21 | new-device 22 | 1 encode-int " reg" property 23 | fload ${BP}/dev/mmc/sdhci/sdmmc.fth 24 | \ fload ${BP}/dev/mmc/sdhci/selftest.fth 25 | " external" " slot-name" string-property 26 | finish-device 27 | 28 | end-package 29 | -------------------------------------------------------------------------------- /dev/mmc/sdhci/mv8686/loadpkg.fth: -------------------------------------------------------------------------------- 1 | " sdio" name 2 | fload ${BP}/dev/mmc/sdhci/mv8686/common.fth \ Ethernet common variables and routines 3 | fload ${BP}/dev/mmc/sdhci/mv8686/ring.fth \ Receive ring management 4 | fload ${BP}/dev/mmc/sdhci/mv8686/sdio.fth \ SDIO interface routines 5 | fload ${BP}/dev/mmc/sdhci/mv8686/mv8686.fth \ SDIO I/O interface for Marvell 8686 6 | fload ${BP}/dev/mmc/sdhci/mv8686/fw8686.fth \ Marvell firmware download for SDIO 7 | 8 | 1 " #size-cells" integer-property 9 | 1 " #address-cells" integer-property 10 | : decode-unit ( adr len -- phys ) push-hex $number if 0 then pop-base ; 11 | : encode-unit ( phys -- adr len ) push-hex (u.) pop-base ; 12 | 13 | new-device 14 | 1 to my-space 15 | my-space 1 reg 16 | fload ${BP}/dev/mmc/sdhci/mv8686/libertas-interface.fth \ Marvell "Libertas" common code 17 | fload ${BP}/dev/libertas.fth \ Marvell "Libertas" common code 18 | finish-device 19 | -------------------------------------------------------------------------------- /cpu/x86/pc/alex/build/Makefile: -------------------------------------------------------------------------------- 1 | OS := $(shell uname) 2 | 3 | CPUDIR=../../.. 4 | BASEDIR := $(shell cd ${CPUDIR}/../..; pwd;) 5 | TAGFILES= ${CPUDIR}/build/*.tag *.tag 6 | CLIENTDIR=${BASEDIR}/clients 7 | CLIENTPROGS= 8 | 9 | all: ofw.elf tags 10 | 11 | fw.tag: ofw.elf 12 | 13 | tags: fw.tag 14 | @${BASEDIR}/forth/lib/toctags ${BASEDIR} ${TAGFILES} 15 | 16 | ofw.elf: FORCE build ../../../build/inflate.bin ${CLIENTPROGS} 17 | ./build $@ 18 | 19 | ../../../${OS}/forth: 20 | @make -C ../../../${OS} forth 21 | 22 | ../../../build/inflate.bin: 23 | @make -C ../../../build inflate.bin 24 | 25 | build: ../../../${OS}/forth 26 | @ln -sf ../../../${OS}/forth build 27 | 28 | clean: 29 | rm -f *.dic *.log headers *~ *.elf *.di *.img builton.fth build *.rom *.version *.bin *.tag tags 30 | 31 | clean-all: clean 32 | @make -C ../../../build clean 33 | @make -C ../../../${OS} clean 34 | 35 | .PHONY: FORCE clean all clean-all 36 | -------------------------------------------------------------------------------- /cpu/x86/pc/newton/build/Makefile: -------------------------------------------------------------------------------- 1 | OS := $(shell uname) 2 | 3 | CPUDIR=../../.. 4 | BASEDIR := $(shell cd ${CPUDIR}/../..; pwd;) 5 | TAGFILES= ${CPUDIR}/build/*.tag *.tag 6 | CLIENTDIR=${BASEDIR}/clients 7 | CLIENTPROGS= 8 | 9 | all: ofw.elf tags 10 | 11 | fw.tag: ofw.elf 12 | 13 | tags: fw.tag 14 | @${BASEDIR}/forth/lib/toctags ${BASEDIR} ${TAGFILES} 15 | 16 | ofw.elf: FORCE build ../../../build/inflate.bin ${CLIENTPROGS} 17 | ./build $@ 18 | 19 | ../../../${OS}/forth: 20 | @make -C ../../../${OS} forth 21 | 22 | ../../../build/inflate.bin: 23 | @make -C ../../../build inflate.bin 24 | 25 | build: ../../../${OS}/forth 26 | @ln -sf ../../../${OS}/forth build 27 | 28 | clean: 29 | rm -f *.dic *.log headers *~ *.elf *.di *.img builton.fth build *.rom *.version *.bin *.tag tags 30 | 31 | clean-all: clean 32 | @make -C ../../../build clean 33 | @make -C ../../../${OS} clean 34 | 35 | .PHONY: FORCE clean all clean-all 36 | -------------------------------------------------------------------------------- /cpu/x86/pc/olpc/usb8388.bth: -------------------------------------------------------------------------------- 1 | purpose: Fetch the firmware for the Marvell 8388 wireless LAN module 2 | 3 | command: &builder &this 4 | build-now 5 | 6 | fload ${BP}/cpu/x86/pc/olpc/versions.fth 7 | 8 | " rm -f usb8388.bin" expand$ $sh 9 | 10 | " wget -q http://dev.laptop.org/pub/firmware/libertas/usb8388-${WLAN_VERSION}.bin" expand$ $sh 11 | 12 | " wget -q http://dev.laptop.org/pub/firmware/libertas/usb8388-${WLAN_VERSION}.bin.md5" expand$ $sh 13 | 14 | \ " md5sum usb8388-${WLAN_VERSION}.bin | cmp - usb8388-${WLAN_VERSION}.bin.md5" expand$ $sh 15 | " md5sum -b usb8388-${WLAN_VERSION}.bin | cmp - usb8388-${WLAN_VERSION}.bin.md5" expand$ $sh 16 | 17 | " mv usb8388-${WLAN_VERSION}.bin usb8388.bin" expand$ $sh 18 | " rm usb8388-${WLAN_VERSION}.bin.md5" expand$ $sh 19 | 20 | \ This forces the creation of a .log file, so we don't re-fetch 21 | writing usb8388.version 22 | " ${WLAN_VERSION}"n" expand$ ofd @ fputs 23 | ofd @ fclose 24 | -------------------------------------------------------------------------------- /cpu/arm/mmp2/rawboot.fth: -------------------------------------------------------------------------------- 1 | \ This is some glue code to convert the machine setup that QEMU gives us 2 | \ to the setup that start-forth (see arm/boot.fth) wants. 3 | \ We get here via a call instruction at origin+8, which is inserted below 4 | 5 | label stand-cold-code ( r0: 0 r1: board-id r2: &kernel-args lr: &aif_header+8c ) 6 | here origin 8 + put-call \ Insert call instruction 7 | 8 | \ Put the arguments in safe registers 9 | sub r6,lr,#0x8c \ r6 points to header (lr set by code at origin) 10 | mov r7,#0 \ r7: functions 11 | add r8,r6,`stack-offset` \ r8: memtop - 2MiB above load address 12 | \ r9 is up 13 | mov r10,#0 \ r10: argc 14 | mov r11,r2 \ r11: argv (kernel args) 15 | mov r12,`initial-heap-size` \ r12: initial-heap-size 16 | 17 | b 'code start-forth \ Branch to the generic startup code 18 | end-code 19 | -------------------------------------------------------------------------------- /dev/usb2/device/serial/usbserial.bth: -------------------------------------------------------------------------------- 1 | purpose: Load file for USB UART driver 2 | 3 | command: &tokenize &this 4 | build-now 5 | 6 | silent on 7 | 8 | begin-tokenizing usbserial.fc 9 | 10 | FCode-version2 11 | 12 | fload ${BP}/dev/usb2/device/common.fth \ USB device driver common routines 13 | fload ${BP}/dev/usb2/vendor.fth \ Vendor/product id table search routines 14 | fload ${BP}/dev/usb2/device/serial/vendor.fth \ UART vendor/product id table 15 | fload ${BP}/dev/usb2/device/serial/common.fth \ USB uart driver common routines 16 | fload ${BP}/dev/usb2/device/serial/belkin.fth \ Belkin device routines 17 | fload ${BP}/dev/usb2/device/serial/mct_u232.fth \ MCT U232 device routines 18 | fload ${BP}/dev/usb2/device/serial/pl2303.fth \ PL2303 device routines 19 | fload ${BP}/dev/usb2/device/serial/ftdi.fth \ FTDI device routines 20 | fload ${BP}/dev/usb2/device/serial/uart.fth \ USB uart driver 21 | 22 | end0 23 | 24 | end-tokenizing 25 | 26 | -------------------------------------------------------------------------------- /cpu/arm/mmp2/galcore.fth: -------------------------------------------------------------------------------- 1 | purpose: Device node for GALCORE graphics accelerator 2 | 3 | h# d420.d000 constant gpu-pa \ Base of GPU 4 | h# 1000 constant /gpu 5 | 6 | dev / 7 | new-device 8 | " gpu" device-name 9 | " mrvl,galcore" +compatible 10 | gpu-pa /gpu reg 11 | [ifdef] mmp2 12 | 8 encode-int " interrupts" property 13 | " /interrupt-controller" encode-phandle " interrupt-parent" property 14 | " galcore 2D" encode-string encode+ " interrupt-names" property 15 | [then] 16 | 17 | [ifdef] mmp3 18 | d# 0 encode-int 2 encode-int encode+ " interrupts" property 19 | " /interrupt-controller/interrupt-controller@1c0" encode-phandle " interrupt-parent" property 20 | " galcore 3D" encode-string " galcore 2D" encode-string encode+ " interrupt-names" property 21 | [then] 22 | 23 | 24 | " /pmua" encode-phandle d# 11 encode-int encode+ " clocks" property 25 | " GCCLK" " clock-names" string-property 26 | finish-device 27 | device-end 28 | -------------------------------------------------------------------------------- /clients/memtest86/ega.h: -------------------------------------------------------------------------------- 1 | #ifndef EGA_H 2 | #define EGA_H 3 | 4 | #ifdef EMULATE_EGA 5 | 6 | void ega_init(void); 7 | void set_ega_char(int y, int x, char ch); 8 | void set_ega_color(int y, int x, char color); 9 | void set_ega_char_color(int y, int x, char ch, char color); 10 | char get_ega_char(int y, int x); 11 | char get_ega_color(int y, int x); 12 | 13 | #else 14 | #define SCREEN_ADR 0xb8000 15 | #define SCREEN_END_ADR (SCREEN_ADR + 80*25*2) 16 | 17 | #define EGA_ADR(y, x, offset) *(char *)(SCREEN_ADR + ((y) * 160) + ((x) * 2) + offset) 18 | 19 | #define ega_init() do { } while(0) 20 | #define set_ega_char(y, x, ch) EGA_ADR(y, x, 0) = (ch) 21 | #define set_ega_color(y, x, color) EGA_ADR(y, x, 1) = (color) 22 | #define set_ega_char_color(y, x, ch, color) set_ega_char(y, x, ch); set_ega_color(y, x, color) 23 | #define get_ega_char(y, x) EGA_ADR(y, x, 0) 24 | #define get_ega_color(y, x) EGA_ADR(y, x, 1) 25 | 26 | #endif /* EMULATE_EGA */ 27 | 28 | #endif /* EGA_H */ 29 | -------------------------------------------------------------------------------- /dev/mmc/sdhci/mv8686/libertas-interface.fth: -------------------------------------------------------------------------------- 1 | : alloc-buffer ( len -- adr ) " alloc-buffer" $call-parent ; 2 | : free-buffer ( adr len -- ) " free-buffer" $call-parent ; 3 | : cmd-out ( adr len -- ) " cmd-out" $call-parent ; 4 | : data-out ( adr len -- ) " data-out" $call-parent ; 5 | : got-packet? ( -- false | error true | buf len type 0 true ) " got-packet?" $call-parent ; 6 | : recycle-packet ( -- ) " recycle-packet" $call-parent ; 7 | : reset-host-bus ( -- ) " reset-host-bus" $call-parent ; 8 | : data-out ( adr len -- ) " data-out" $call-parent ; 9 | : release-bus-resources ( -- ) " release-bus-resources" $call-parent ; 10 | : multifunction? ( -- flag ) " multifunction?" $call-parent ; 11 | : mv8787? ( -- flag ) " mv8787?" $call-parent ; 12 | : set-parent-channel ( -- ) my-space " set-address" $call-parent ; 13 | : setup-transport ( -- error? ) false ; \ Done by parent 14 | 15 | \ : x-cmd-out ( adr len -- ) /fw-transport + cmd-out ; 16 | -------------------------------------------------------------------------------- /cpu/mips/broadcom/avx/pcicfg.fth: -------------------------------------------------------------------------------- 1 | purpose: Configuration space access using "configuration mechanism 1" 2 | copyright: Copyright 2001 Firmworks All Rights Reserved 3 | 4 | \ Ostensibly this applies to the PCI bus and thus should be in the PCI node. 5 | \ However, many of the host bridge registers are accessed via this mechanism, 6 | \ so it is convenient to make the configuration access words globally-visible. 7 | \ This mechanism works for several different PCI host bridges. 8 | 9 | headerless 10 | 11 | : config-map ( config-adr -- port ) 12 | dup h# ffff.fffc and h# 8000.0000 or pci-cf8 rl! 13 | 3 and pci-cfc + 14 | ; 15 | 16 | : config-l@ ( config-addr -- l ) config-map rl@ ; 17 | : config-l! ( l config-addr -- ) config-map rl! ; 18 | : config-w@ ( config-addr -- w ) config-map rw@ ; 19 | : config-w! ( w config-addr -- ) config-map rw! ; 20 | : config-b@ ( config-addr -- c ) config-map rb@ ; 21 | : config-b! ( c config-addr -- ) config-map rb! ; 22 | 23 | -------------------------------------------------------------------------------- /clients/emacs/epath.h: -------------------------------------------------------------------------------- 1 | /* PATH: This file contains certain info needed to locate the 2 | MicroEMACS files on a system dependant basis. 3 | 4 | */ 5 | 6 | /* possible names and paths of help files under different OSs */ 7 | 8 | char *pathname[] = 9 | 10 | #if OFW 11 | { 12 | "emacs.rc", 13 | "emacs.hlp", 14 | "", 15 | "/disk:\\", 16 | "rom:" 17 | }; 18 | #endif 19 | 20 | #if AMIGA 21 | { 22 | ".emacsrc", 23 | "emacs.hlp", 24 | "", 25 | ":c/", 26 | ":t/" 27 | }; 28 | #endif 29 | 30 | #if MSDOS 31 | { 32 | "emacs.rc", 33 | "emacs.hlp", 34 | "", 35 | "\\", 36 | "\\bin\\", 37 | "\\fm\\emacs\\", 38 | "c:\\fm\\emacs\\" 39 | }; 40 | #endif 41 | 42 | #if V7 | BSD | USG 43 | { 44 | ".emacsrc", 45 | "emacs.hlp", 46 | "/usr/local/", 47 | "/usr/lib/", 48 | "" 49 | }; 50 | #endif 51 | 52 | #if VMS 53 | { 54 | "emacs.rc", 55 | "emacs.hlp", 56 | "", 57 | "sys$sysdevice:[vmstools]" 58 | }; 59 | #endif 60 | 61 | #define NPNAMES (sizeof(pathname)/sizeof(char *)) 62 | -------------------------------------------------------------------------------- /cpu/ppc/prep/qemu/build/Makefile.cross: -------------------------------------------------------------------------------- 1 | # This setting of HOSTDIR is for cross-building on an x86 Linux system 2 | # For it to work, you first need to build the simulator version of ppcforth 3 | # in cpu/x86/Linux with "make -f Makefile.ppcforth" 4 | OS := $(shell uname) 5 | 6 | HOSTCPU:=x86 7 | HOSTDIR:=../../../../${HOSTCPU}/${OS} 8 | 9 | all: qprepofw.rom 10 | 11 | .PHONY: FORCE all clean 12 | 13 | .PRECIOUS: qprepofw.rom 14 | 15 | ${HOSTDIR}/forth: 16 | @make -C ${HOSTDIR} forth 17 | 18 | ${HOSTDIR}/ppcforth: 19 | @make -C ${HOSTDIR} -f Makefile.ppcforth ppcforth 20 | 21 | build: ${HOSTDIR}/forth 22 | @ln -sf $< $@ 23 | 24 | %.di: FORCE build ${HOSTDIR}/ppcforth 25 | ./build $@ 26 | 27 | %.dic: FORCE build resetvec.di start.di 28 | ./build $@ 29 | 30 | qprepofw.rom: FORCE build fw.dic 31 | ./build rom 32 | 33 | builder.dic: FORCE build 34 | -[ ! -f builder.sav ] && cp builder.dic builder.sav 35 | ./build builder.dic 36 | 37 | clean: 38 | rm -f fw.dic *.di *.log *~ build 39 | -------------------------------------------------------------------------------- /clients/memtest86/extra.h: -------------------------------------------------------------------------------- 1 | // This is the extra stuff added to the memtest+ from memtest.org 2 | // Code from Eric Nelson and Wee 3 | /* extra.c 4 | * 5 | * Released under version 2 of the Gnu Public License. 6 | * 7 | */ 8 | 9 | #ifndef MEMTEST_EXTRA_H 10 | #define MEMTEST_EXTRA_H 11 | 12 | void change_timing(int cas, int rcd, int rp, int ras); 13 | void find_memctr(void); 14 | void disclaimer(void); 15 | void get_option(void); 16 | void get_menu(void); 17 | void a64_parameter(void); 18 | int get_cas(void); 19 | void change_timing_i852(int cas, int rcd, int rp, int ras); 20 | void change_timing_i925(int cas, int rcd, int rp, int ras); 21 | void change_timing_i875(int cas, int rcd, int rp, int ras); 22 | void change_timing_nf2(int cas, int rcd, int rp, int ras); 23 | void change_timing_amd64(int cas, int rcd, int rp, int ras); 24 | void amd64_tweak(int rwt, int wrt, int ref, int en2t, int rct, int rrd, int rwqb, int wr); 25 | void __delay(ulong loops); 26 | 27 | #endif /* MEMTEST_EXTRA_H */ 28 | -------------------------------------------------------------------------------- /ofw/inet/httpdemo/free.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | OK Prompt 5 | 6 | 7 |
8 |
  9 |
  10 |
  11 |
12 | This demo is intended to show the flexibility of the HTTP interface, we do 13 | not necessarily recomend implementing this specific interface. 14 |

15 | Enter in the box below, any Internet Boot ROM command that one might enter 16 | via the user interface. 17 |
18 |
19 | 20 | ROM Command: 21 | 22 |

23 | 24 | 25 |

26 | 27 |
  28 |
  29 |
  30 |
Back to Main Page
31 |
32 |
33 | 34 | 35 | -------------------------------------------------------------------------------- /cpu/arm/build/Makefile: -------------------------------------------------------------------------------- 1 | BASEDIR= $(shell cd ../../../; pwd) 2 | 3 | OS := $(shell uname) 4 | HOSTCPU= $(shell ${BASEDIR}/forth/lib/hostcpu.sh) 5 | HOSTDIR= ${BASEDIR}/cpu/${HOSTCPU}/${OS} 6 | BUILDSH= ${BASEDIR}/forth/lib/build.sh 7 | 8 | all: basefw.dic 9 | 10 | .PHONY: FORCE all clean 11 | 12 | .PRECIOUS: builder.dic 13 | 14 | ${HOSTDIR}/forth: FORCE 15 | @make -C ${HOSTDIR} forth 16 | 17 | ${HOSTDIR}/armforth: FORCE 18 | @make -C ${HOSTDIR} armforth 19 | 20 | build: ${HOSTDIR}/forth ${HOSTDIR}/armforth 21 | @ln -sf ${BUILDSH} build 22 | 23 | %.dic: FORCE build 24 | ./build $@ 25 | 26 | builder.dic: FORCE build 27 | -[ ! -f builder.sav ] && cp builder.dic builder.sav 28 | ./build builder.dic 29 | 30 | inflate.bin: 31 | make -C ../${OS} ../build/inflate.bin 32 | 33 | # Don't use *.dic so as not to remove builder.dic 34 | clean: 35 | rm -f tools.dic kernel.dic basefw.dic 36 | rm -f *.tag *.log headers *~ inflate.bin build 37 | @make -C ../${OS} clean 38 | @make -C ${HOSTDIR} clean 39 | -------------------------------------------------------------------------------- /cpu/arm/olpc/build-mcnand.fth: -------------------------------------------------------------------------------- 1 | purpose: Common code for fetching and building the NANDblaster support code 2 | 3 | \ The macro MCNAND_VERSION must be set externally 4 | 5 | " ${MCNAND_VERSION}" expand$ " test" $= [if] 6 | " multicast-nand/Makefile" $file-exists? 0= [if] 7 | " git clone -q git+ssh://dev.laptop.org/git/users/wmb/multicast-nand" expand$ $sh 8 | [then] 9 | [else] 10 | " rm -rf multicast-nand" $sh 11 | " wget -q -O - http://dev.laptop.org/git/users/wmb/multicast-nand/snapshot/multicast-nand-${MCNAND_VERSION}.tar.gz | tar xfz -" expand$ $sh 12 | " mv multicast-nand-${MCNAND_VERSION} multicast-nand" expand$ $sh 13 | [then] 14 | 15 | " (cd multicast-nand; make BPDIR=../../../../../.. OFW_CPU=arm nandblaster15_rx.bin nandblaster_tx.bin; cp nandblaster15_rx.bin nandblaster_tx.bin ..)" expand$ $sh 16 | 17 | \ This forces the creation of a .log file, so we don't re-fetch 18 | writing mcastnand.version 19 | " ${MCNAND_VERSION}"n" expand$ ofd @ fputs 20 | ofd @ fclose 21 | -------------------------------------------------------------------------------- /cpu/ppc/build/Makefile.cross: -------------------------------------------------------------------------------- 1 | # This setting of HOSTDIR is for cross-building on an x86 Linux system 2 | # For it to work, you first need to build the simulator version of ppcforth 3 | # in cpu/x86/Linux with "make -f Makefile.ppcforth" 4 | OS := $(shell uname) 5 | 6 | HOSTCPU:=x86 7 | HOSTDIR:=../../${HOSTCPU}/${OS} 8 | 9 | all: basefw.dic 10 | 11 | .PHONY: FORCE all clean 12 | 13 | .PRECIOUS: builder.dic 14 | 15 | ${HOSTDIR}/forth: 16 | @make -C ${HOSTDIR} forth 17 | 18 | ${HOSTDIR}/ppcforth: 19 | @make -C ${HOSTDIR} -f Makefile.ppcforth ppcforth 20 | 21 | build: ${HOSTDIR}/forth 22 | @ln -sf $< $@ 23 | 24 | %.dic: FORCE build ${HOSTDIR}/ppcforth 25 | ./build $@ 26 | 27 | builder.dic: FORCE build 28 | -[ ! -f builder.sav ] && cp builder.dic builder.sav 29 | ./build builder.dic 30 | 31 | inflate.bin: 32 | make -C ../${OS} ../build/inflate.bin 33 | 34 | # Don't use *.dic so as not to remove builder.dic 35 | clean: 36 | rm -f tools.dic kernel.dic basefw.dic *.log headers *~ inflate.bin build 37 | -------------------------------------------------------------------------------- /clients/lib/string.h: -------------------------------------------------------------------------------- 1 | #define ISUPPER(c) ((c) >= 'A' && (c) <= 'Z') 2 | #define TOLOWER(c) ((c) - 'A' + 'a') 3 | 4 | int strcmp(const char *s, const char *t); 5 | int strncmp(const char *s, const char *t, size_t len); 6 | int strcasecmp(const char *s, const char *t); 7 | int strncasecmp(const char *s, const char *t, size_t len); 8 | int strlen(const char *s); 9 | int strnlen(const char *s, size_t maxlen); 10 | char *strcpy(char *to, const char *from); 11 | char *strncpy(char *to, const char *from, size_t maxlen); 12 | char *strcat(char *to, const char *from); 13 | char *strchr(char *s, int c); 14 | char *strctok(char *s, const char sep); 15 | char *strstr(const char *haystack, const char *needle); 16 | char *strcasestr(const char *haystack, const char *needle); 17 | void *memchr(const void *s, int c, size_t len); 18 | void *memcpy(void *dest, const void *src, size_t n); 19 | int memcmp(const void *s1, const void *s2, size_t n); 20 | void *memset(void *s, int c, size_t n); 21 | int toupper(int c); 22 | -------------------------------------------------------------------------------- /cpu/x86/pc/olpc/sdtools/ecdump.fth: -------------------------------------------------------------------------------- 1 | : .3r space <# u# u# u#> type ; 2 | : dump-ec ( adr len -- ) 3 | dup h# 10 < if 4 | over 4 u.r ." : " bounds do i ec@ .3r loop cr 5 | else 6 | bounds ?do 7 | i 4 u.r ." : " 8 | i h# 10 bounds ?do i ec@ .3r loop cr 9 | h# 10 +loop 10 | then 11 | ; 12 | : dump-ec-regs ( -- ) 13 | ." GPIOO " fc00 4 dump-ec 14 | ." GPIOE " fc10 6 dump-ec 15 | ." GPIOD " fc20 6 dump-ec 16 | ." GPIOIN " fc30 7 dump-ec 17 | ." GPIOPU " fc40 6 dump-ec 18 | ." GPIOOD " fc50 4 dump-ec 19 | ." GPIOIE " fc60 7 dump-ec 20 | ." GPIOM " fc70 1 dump-ec 21 | ." KBC " fc80 7 dump-ec 22 | ." PWM " fe00 e dump-ec 23 | ." GPT " fe50 a dump-ec 24 | ." SPI " fea0 10 dump-ec 25 | ." WDT " fe80 6 dump-ec 26 | ." LPC " fe90 10 dump-ec 27 | ." PS2 " fee0 7 dump-ec 28 | ." EC " ff00 20 dump-ec 29 | ." GPWUEN " ff30 4 dump-ec 30 | ." GPWUPF " ff40 4 dump-ec 31 | ." GPWUPS " ff50 4 dump-ec 32 | ." GPWUEL " ff60 4 dump-ec 33 | ; 34 | -------------------------------------------------------------------------------- /cpu/arm/olpc/cl4/fw.bth: -------------------------------------------------------------------------------- 1 | purpose: Build OFW Forth dictionary for OLPC CL4 2 | \ See license at end of file 3 | 4 | dictionary: ${BP}/cpu/arm/olpc/cl4/build/prefw.dic 5 | command: &armforth &dictionary &this 6 | build-now 7 | 8 | " fw.tag" r/w create-file drop tag-file ! 9 | 10 | h# 16000 +io constant bsl-uart-base \ UART4 11 | h# 88 constant bsl-uart-clock-offset \ APBC_UART4_CLK_RST 12 | 13 | fload ${BP}/cpu/arm/olpc/build-fw.fth 14 | 15 | \ true to stand-init-debug? 16 | 17 | fload ${BP}/cpu/arm/olpc/cl4/uart.fth 18 | fload ${BP}/cpu/arm/olpc/cl4/sdhci.fth 19 | fload ${BP}/cpu/arm/olpc/1.75/lcdcfg.fth 20 | fload ${BP}/cpu/arm/olpc/cl4/usb.fth 21 | fload ${BP}/cpu/arm/olpc/nn-touchscreen.fth 22 | fload ${BP}/cpu/arm/olpc/cl4/switches.fth 23 | fload ${BP}/cpu/arm/olpc/cl4/leds.fth 24 | fload ${BP}/cpu/arm/olpc/cl4/testitems.fth 25 | fload ${BP}/cpu/arm/olpc/cl4/testinstructions.fth 26 | fload ${BP}/cpu/arm/olpc/gpio-gamekeys.fth 27 | fload ${BP}/cpu/arm/olpc/test-tweaks.fth 28 | 29 | fload ${BP}/cpu/arm/olpc/save-fw.fth 30 | -------------------------------------------------------------------------------- /clients/memtest86/makeiso.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # check to see if the correct tools are installed 4 | for X in wc mkisofs 5 | do 6 | if [ "$(which $X)" = "" ]; then 7 | echo "makeiso.sh error: $X is not in your path." >&2 8 | exit 1 9 | elif [ ! -x $(which $X) ]; then 10 | echo "makeiso.sh error: $X is not executable." >&2 11 | exit 1 12 | fi 13 | done 14 | 15 | #check to see if memtest.bin is present 16 | if [ ! -w memtest.bin ]; then 17 | echo "makeiso.sh error: cannot find memtest.bin, did you compile it?" >&2 18 | exit 1 19 | fi 20 | 21 | # enlarge the size of memtest.bin 22 | SIZE=$(wc -c memtest.bin | awk '{print $1}') 23 | FILL=$((1474560 - $SIZE)) 24 | dd if=/dev/zero of=fill.tmp bs=$FILL count=1 25 | cat memtest.bin fill.tmp >memtest.img 26 | rm -f fill.tmp 27 | 28 | echo "generating iso image ..." 29 | 30 | mkdir "cd" 31 | mkdir "cd/boot" 32 | mv memtest.img cd/boot 33 | cd cd 34 | mkisofs -b boot/memtest.img -c boot/boot.catalog -o memtest.iso . 35 | mv memtest.iso .. 36 | cd .. 37 | rm -rf cd 38 | 39 | echo "done" 40 | -------------------------------------------------------------------------------- /cpu/x86/pc/olpc/via/startclkgen.fth: -------------------------------------------------------------------------------- 1 | \ We depend on ioinit.fth having already established the following settings 2 | \ D17F0 Rx04[0]=1 I/O space enable 3 | \ D17F0 Rx94[7]=0 Clock from 14 MHz divider 4 | \ D17F0 Rxd2[2]=1 Clock divider 5 | \ D17F0 Rxd2[0]=1 Enable SMBus host controller 6 | \ D17F0 Rxd0,d1 set to smbus-io-base 7 | 8 | h# de smbus-io-base 0 + port-wb \ Clear all errors 9 | \ We assume that the SMBus controller is not busy 10 | h# d2 smbus-io-base 4 + port-wb \ Target address of clock generator chip and WRITE mode 11 | h# 05 smbus-io-base 3 + port-wb \ Register number inside clock generator (output config) 12 | h# 01 smbus-io-base 5 + port-wb \ Byte count 13 | smbus-io-base 2 + port-rb \ Read to reset the byte counter for the next write 14 | h# 03 smbus-io-base 7 + port-wb \ Value to put in the clock generator output config reg - turns off PCIe clocks 15 | h# 54 smbus-io-base 2 + port-wb \ Fire off the command. 40 is the start bit, 14 is the "SMBus block data" command 16 | \ We don't wait for it to finish 17 | -------------------------------------------------------------------------------- /cpu/arm/mmp2/hwaddrs.fth: -------------------------------------------------------------------------------- 1 | \ Defined by MMP2 hardware 2 | h# d000.0000 constant memctrl-pa 3 | 4 | h# d100.0000 constant sram-pa \ Base of SRAM 5 | 6 | h# d400.0000 constant apb-pa \ Base of APB bus 7 | h# d420.0000 constant axi-pa \ Base of AXI bus 8 | h# f000.0000 constant axi2-pa \ Another AXI bus area 9 | 10 | apb-pa constant io-pa \ We use this as the base for most IO accesses 11 | h# 0030.0000 constant /io 12 | 13 | axi2-pa constant io2-pa \ Additional I/O space 14 | h# 0010.0000 constant /io2 15 | 16 | 17 | \ The following are offsets from io-pa 18 | \ AXI devices 19 | h# 01.4000 constant timer-pa 20 | h# 01.5000 constant clock-unit-pa 21 | h# 01.9000 constant gpio-base 22 | h# 05.0000 constant main-pmu-pa 23 | h# 05.1024 constant acgr-pa 24 | 25 | \ APB devices 26 | h# 20.b800 constant dsi1-pa \ 4-lane controller 27 | h# 20.ba00 constant dsi2-pa \ 3-lane controller 28 | h# 20.b000 constant lcd-pa 29 | h# 28.2800 constant pmua-pa \ Application processor PMU register base 30 | 31 | -------------------------------------------------------------------------------- /cpu/arm/olpc/4.0/fw.bth: -------------------------------------------------------------------------------- 1 | purpose: Build OFW Forth dictionary for OLPC XO-4 2 | \ See license at end of file 3 | 4 | dictionary: ${BP}/cpu/arm/olpc/4.0/build/prefw.dic 5 | command: &armforth &dictionary &this 6 | build-now 7 | 8 | " fw.tag" r/w create-file drop tag-file ! 9 | 10 | h# 16000 +io constant bsl-uart-base \ UART4 11 | h# 88 constant bsl-uart-clock-offset \ APBC_UART4_CLK_RST 12 | 13 | fload ${BP}/cpu/arm/olpc/build-fw.fth 14 | 15 | \ true to stand-init-debug? 16 | 17 | fload ${BP}/cpu/arm/olpc/cl4/uart.fth 18 | fload ${BP}/cpu/arm/olpc/cl4/sdhci.fth 19 | fload ${BP}/cpu/arm/olpc/1.75/lcdcfg.fth 20 | fload ${BP}/cpu/arm/olpc/cl4/usb.fth 21 | fload ${BP}/cpu/arm/olpc/nn-touchscreen.fth 22 | fload ${BP}/cpu/arm/olpc/cl4/switches.fth 23 | fload ${BP}/cpu/arm/olpc/cl4/leds.fth 24 | fload ${BP}/cpu/arm/olpc/cl4/testitems.fth 25 | fload ${BP}/cpu/arm/olpc/cl4/testinstructions.fth 26 | fload ${BP}/cpu/arm/olpc/gpio-gamekeys.fth 27 | fload ${BP}/cpu/arm/olpc/test-tweaks.fth 28 | fload ${BP}/dev/edid.fth 29 | 30 | fload ${BP}/cpu/arm/olpc/save-fw.fth 31 | -------------------------------------------------------------------------------- /cpu/x86/pc/olpc/usbpwr.fth: -------------------------------------------------------------------------------- 1 | purpose: Bounce USB power to reset devices 2 | 3 | \ This is used by the biosload build for OLPC to reset USB 4 | \ devices. Insyde BIOS / GeodeROM leaves some USB sticks in 5 | \ funny state in which reads fail. Power cycling fixes them. 6 | 7 | : power-cycle-usb ( -- ) 8 | " /pci/usb@f,4" open-dev >r \ OHCI controller 9 | 10 | \ Configure the OHCI controller for global power switching 11 | " hc-rh-desa@" r@ $call-method ( desA ) 12 | h# 300 invert and ( desA' ) 13 | " hc-rh-desa!" r@ $call-method ( desA ) 14 | 15 | \ Turn off the power from the OHCI point of view, leaving the 16 | \ EHCI in control (the power switches are the logical OR 17 | \ of the OHCI and EHCI controls) 18 | 1 " hc-rh-stat!" r@ $call-method 19 | r> close-dev 20 | d# 100 ms 21 | 22 | " /pci/usb@f,5" open-dev ( ih ) \ EHCI controller 23 | 4 0 do 0 i " portsc!" 4 pick $call-method loop ( ih ) 24 | d# 100 ms 25 | 4 0 do i " power-port" 3 pick $call-method loop ( ih ) 26 | close-dev 27 | ; 28 | -------------------------------------------------------------------------------- /cpu/x86/pc/biosload/i945.fth: -------------------------------------------------------------------------------- 1 | purpose: Startup hacks for Intel 945 chipset 2 | 3 | create use-pata 4 | \ create use-sata 5 | : ?configure-i945 ( -- ) 6 | [ifdef] use-pata 7 | h# f900 config-l@ h# 27df8086 = if \ i945 IDE 8 | h# 8000 h# f940 config-w! \ Turn on IDE decode 9 | h# fa00 config-l@ h# 27c08086 = if \ i945 SATA 10 | h# 8f h# fa09 config-b! \ Prevent the legacy mode driver from binding 11 | h# 0000 h# fa40 config-w! \ Turn off IDE decode 12 | then 13 | then 14 | [then] 15 | [ifdef] use-sata 16 | h# fa00 config-l@ h# 27c08086 = if \ i945 SATA 17 | h# 8000 h# fa40 config-w! \ Turn on IDE decode 18 | h# 8a h# fa09 config-b! \ Allow the legacy mode driver to bind 19 | \ h# 00 h# fa90 config-b! \ IDE mode using SATA for all devices 20 | h# 01 h# fa90 config-b! \ IDE mode using PATA as primary, SATA as secondary 21 | \ h# 02 h# fa90 config-b! \ IDE mode using SATA as primary, PATA as secondary 22 | then 23 | [then] 24 | ; 25 | stand-init: I945 26 | ?configure-i945 27 | ; 28 | -------------------------------------------------------------------------------- /cpu/x86/pc/olpc/via/startmemtop.fth: -------------------------------------------------------------------------------- 1 | \ Determine the top of usable memory. 2 | \ Start with the bottom address of the area used for the frame buffer. 3 | 4 | bx bx xor 5 | h# 6d h# 3c4 port-wb h# 3c5 port-rb al bl mov \ Sequencer register 6d 6 | h# 6e h# 3c4 port-wb h# 3c5 port-rb al bh mov \ Sequencer register 6e 7 | d# 21 # bx shl 8 | \ There are some higher bits in 6f but we only support 32-bit addresses 9 | 10 | \ Then subtract the top SMM memory size, if it is enabled 11 | h# 386 config-rb 12 | 4 # ax test 0<> if 13 | 6 # ax shr \ Top SMM memory size field 14 | ax cx mov \ Move to cx 15 | h# 10.0000 # ax mov \ Field==0 means 1M 16 | ax cl shl \ Now ax contains SMM memory size 17 | ax bx sub \ Adjust bx 18 | then 19 | 20 | bx mem-info-pa 4 + #) mov \ Top of memory 21 | 22 | \ bx di mov 23 | \ h# 800.0000 # di sub \ Clear the last 128 MB 24 | \ h# 800.0000 4 / # cx mov \ Longword count 25 | \ cld 26 | \ ax ax xor 27 | \ rep ax stos 28 | --------------------------------------------------------------------------------