Is it possible to put OpenFirmware on an SD card and use it to boot off
e.g. a USB-attached mass storage device or using TFTP over a LAN?
--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk
[Opinions above are the author's, not those of his employers or colleagues]
Author: quozl
Date: Mon Apr 29 08:02:14 2013
New Revision: 3651
URL: http://tracker.coreboot.org/trac/openfirmware/changeset/3651
Log:
OLPC XO-1 - suppress the RTC amnesia check introduced in r3649, because the VRT bit works fine, and the century value at 0x1a is occasionally cleared by a power cycle. This clearing is ingored by ds1385r.fth get-time, which forces the returned century to 0x20. Curiously, the century value at 0x32 (as set by MSR 5140.0057) is not used in ds1385r.fth, and keeps what Linux set it to.
Modified:
cpu/x86/pc/olpc/via/config.fth
dev/ds1385r.fth
Modified: cpu/x86/pc/olpc/via/config.fth
==============================================================================
--- cpu/x86/pc/olpc/via/config.fth Mon Apr 29 07:55:38 2013 (r3650)
+++ cpu/x86/pc/olpc/via/config.fth Mon Apr 29 08:02:14 2013 (r3651)
@@ -3,6 +3,7 @@
create olpc \ OLPC-specific build
create olpc-cl1
+create olpc-xo-1.5
create compute-timings
\ create demo-board
Modified: dev/ds1385r.fth
==============================================================================
--- dev/ds1385r.fth Mon Apr 29 07:55:38 2013 (r3650)
+++ dev/ds1385r.fth Mon Apr 29 08:02:14 2013 (r3651)
@@ -88,6 +88,7 @@
cr
then
;
+[ifdef] olpc-xo-1.5
\ : $?lost ( flag head$ -- flag )
\ 2 pick if ." RTC amnesia - " type cr else 2drop then
\ ;
@@ -112,6 +113,7 @@
d# 10 rtc@ h# 70 and rega-mode h# 70 and <> \ " divider" $?lost
or
;
+[then]
: reinit
h# 20 h# 1a rtc! \ century
h# 13 h# 9 rtc! \ year
@@ -128,7 +130,9 @@
: open ( -- true )
my-unit 2 " map-in" $call-parent is rtc-adr
first-open? if
- amnesia? if reinit then
+ [ifdef] olpc-xo-1.5
+ amnesia? if reinit then
+ [then]
rega-mode d# 10 rtc!
regb-mode d# 11 rtc!
\ If the battery is bad, display a message, but go open the device anyway
Author: quozl
Date: Sat Apr 27 07:47:57 2013
New Revision: 3649
URL: http://tracker.coreboot.org/trac/openfirmware/changeset/3649
Log:
OLPC XO-1.5 - the Valid RAM and Time (VRT) bit in RTC register 0xd can't be trusted on the XO-1.5, so use other means to detect loss of data. This works in most cases, but there is still the possibility of data corruption when the battery is missing or discharged. #12600.
Modified:
dev/ds1385r.fth
Modified: dev/ds1385r.fth
==============================================================================
--- dev/ds1385r.fth Thu Apr 18 06:11:10 2013 (r3648)
+++ dev/ds1385r.fth Sat Apr 27 07:47:57 2013 (r3649)
@@ -88,6 +88,30 @@
cr
then
;
+\ : $?lost ( flag head$ -- flag )
+\ 2 pick if ." RTC amnesia - " type cr else 2drop then
+\ ;
+: amnesia? ( -- flag )
+ 0 rtc@ h# 59 > \ " seconds" $?lost
+ 2 rtc@ h# 59 > \ " minutes" $?lost
+ or
+ 4 rtc@ h# 23 > \ " hours" $?lost
+ or
+ 6 rtc@ h# 10 = \ " day of week" $?lost
+ or
+ 7 rtc@ dup 0= swap h# 31 > or \ " day of month" $?lost
+ or
+ 8 rtc@ dup 0= swap h# 12 > or \ " month" $?lost
+ or
+ 9 rtc@ h# 99 > \ " year high" $?lost
+ or
+ 9 rtc@ h# 13 < \ " year low" $?lost
+ or
+ h# 1a rtc@ h# 20 <> \ " century" $?lost
+ or
+ d# 10 rtc@ h# 70 and rega-mode h# 70 and <> \ " divider" $?lost
+ or
+;
: reinit
h# 20 h# 1a rtc! \ century
h# 13 h# 9 rtc! \ year
@@ -104,6 +128,7 @@
: open ( -- true )
my-unit 2 " map-in" $call-parent is rtc-adr
first-open? if
+ amnesia? if reinit then
rega-mode d# 10 rtc!
regb-mode d# 11 rtc!
\ If the battery is bad, display a message, but go open the device anyway
Author: quozl
Date: Thu Apr 18 05:44:59 2013
New Revision: 3645
URL: http://tracker.coreboot.org/trac/openfirmware/changeset/3645
Log:
OLPC XO-4 - add device-tree entries in /pcm to describe allocation of audio SRAM, used by kernel only. Open Firmware uses other allocations. #12400
Modified:
cpu/arm/mmp3/soc-config.fth
cpu/arm/olpc/sound.fth
Modified: cpu/arm/mmp3/soc-config.fth
==============================================================================
--- cpu/arm/mmp3/soc-config.fth Tue Apr 16 04:16:23 2013 (r3644)
+++ cpu/arm/mmp3/soc-config.fth Thu Apr 18 05:44:59 2013 (r3645)
@@ -8,4 +8,8 @@
h# 2.0000 constant /audio-sram
\ No need to map audio-sram separately; it fits in the SRAM area
+d# 4096 constant /audio-sram-dma \ space for DMA descriptors
+d# 2048 constant /audio-sram-mps \ maximum period size
+/audio-sram /audio-sram-dma - 2 / constant /audio-sram-pcm \ buffers
+
h# 0005.0000 constant /sram \ Size of SRAM
Modified: cpu/arm/olpc/sound.fth
==============================================================================
--- cpu/arm/olpc/sound.fth Tue Apr 16 04:16:23 2013 (r3644)
+++ cpu/arm/olpc/sound.fth Thu Apr 18 05:44:59 2013 (r3645)
@@ -81,6 +81,25 @@
\ the Audio DMA resources
" marvell,mmp-pcm-audio" +compatible \ snd_soc_dai_link.cpu_dai_of_node
+[ifdef] mmp3
+ \ Our asram node (below) declares that /audio-sram bytes of SRAM
+ \ are assigned to the audio function. We divide that here, roughly
+ \ half to playback and half to recording.
+
+ \ Even though we choose big buffers, we do leave a little bit of
+ \ free space for the DMA engine which also needs to use a bit of
+ \ the SRAM area for DMA descriptors. Therefore we choose 62kb for
+ \ each buffer, leaving 4kb available for DMA descriptors.
+
+ \ For the max period size, we don't have any justification other
+ \ than 2048 is the value we've been using all along.
+
+ /audio-sram-pcm encode-int
+ /audio-sram-mps encode-int encode+
+ /audio-sram-pcm encode-int encode+
+ /audio-sram-mps encode-int encode+
+ " marvell,buffer-sizes" property
+[then]
finish-device
new-device