Author: rsmith
Date: Thu Mar 7 10:10:51 2013
New Revision: 3597
URL: http://tracker.coreboot.org/trac/openfirmware/changeset/3597
Log:
Revert -mlittle-endian removal in r3596
The _real_ problem was user error. I was trying to compile the arm
execuatable with an x86 compiler. -mlittle-endian is a perfectly
valid option for the arm-elf-gcc compiler. Thankfully its the default
so the removal didn't actually cause a problem.
Same sort of thing for the xinflate change in r3596 but I didn't
revert that becuase it does make it clearer whats going on and that
there are 2 versions of the inflate object.
Modified:
cpu/arm/Linux/Makefile
Modified: cpu/arm/Linux/Makefile
==============================================================================
--- cpu/arm/Linux/Makefile Thu Mar 7 09:42:59 2013 (r3596)
+++ cpu/arm/Linux/Makefile Thu Mar 7 10:10:51 2013 (r3597)
@@ -2,8 +2,7 @@
BP=../../..
-CFLAGS = -O -DARM
-# -mlittle-endian
+CFLAGS = -O -DARM -mlittle-endian
WRTAIL = forth/wrapper
WRDIR = ${BP}/${WRTAIL}
Author: rsmith
Date: Thu Mar 7 09:42:59 2013
New Revision: 3596
URL: http://tracker.coreboot.org/trac/openfirmware/changeset/3596
Log:
arm/Linux/Makefile fixup for arm-elf-gcc 3.4.3
- Remove use of -mlittle-endian as it made gcc error.
- Use different rules for building the two different versions of inflate.o / xinflate.o - one to use in the wrapper, the other for standalone use in OFW images. Fixes the "ld: error in inflate.o(.eh_frame); no .eh_frame_hdr table will be created" message.
Modified:
cpu/arm/Linux/Makefile
Modified: cpu/arm/Linux/Makefile
==============================================================================
--- cpu/arm/Linux/Makefile Thu Mar 7 09:17:32 2013 (r3595)
+++ cpu/arm/Linux/Makefile Thu Mar 7 09:42:59 2013 (r3596)
@@ -2,7 +2,8 @@
BP=../../..
-CFLAGS = -O -DARM -mlittle-endian
+CFLAGS = -O -DARM
+# -mlittle-endian
WRTAIL = forth/wrapper
WRDIR = ${BP}/${WRTAIL}
@@ -13,7 +14,7 @@
OBJS = wrapper.o logger.o ${ZIPOBJS}
-all: forth inflate.bin
+all: forth ../build/inflate.bin
# Use forth when you just need to run Forth but don't care what
# native instruction set it is on.
@@ -30,13 +31,13 @@
armforth.static: ${OBJS}
${CC} ${CFLAGS} ${LFLAGS} -static -o $@ ${OBJS}
-inflate.lo: ${ZIPDIR}/inflate.c
+xinflate.lo: ${ZIPDIR}/inflate.c
${CC} -c ${CFLAGS} -O $< -o $@
-inflate.o: inflate.lo
+xinflate.o: xinflate.lo
${LD} -T inflate.ld $< -o $@
-../build/inflate.bin: inflate.o
+../build/inflate.bin: xinflate.o
objcopy -O binary $< $@
%.o: ${WRDIR}/%.c
Author: wmb
Date: Wed Mar 6 20:53:52 2013
New Revision: 3594
URL: http://tracker.coreboot.org/trac/openfirmware/changeset/3594
Log:
wrapper.c - added commentary telling another way to accomplish
the same result as mprotect()ing the dictionary memory to make
it executable.
Modified:
forth/wrapper/wrapper.c
Modified: forth/wrapper/wrapper.c
==============================================================================
--- forth/wrapper/wrapper.c Wed Mar 6 19:55:27 2013 (r3593)
+++ forth/wrapper/wrapper.c Wed Mar 6 20:53:52 2013 (r3594)
@@ -2201,6 +2201,13 @@
return 0L;
#endif
#if defined(__linux__) && defined(ARM)
+ /* There is another way to achieve the goal of making the */
+ /* dictionary executable. You can add "-Wl,-z,execstack" */
+ /* to the cc command line or add "-z execstack" to the ld */
+ /* command line. mprotect() is perhaps more precise, making */
+ /* only the dictionary executable while leaving the stack */
+ /* protected, although that is probably pointless since */
+ /* the whole point of this program is code injection. */
mprotect(adr, len, PROT_READ | PROT_WRITE | PROT_EXEC);
__clear_cache(adr, adr+len);
return 0L;
Author: wmb
Date: Wed Mar 6 19:55:27 2013
New Revision: 3593
URL: http://tracker.coreboot.org/trac/openfirmware/changeset/3593
Log:
OLPC XO-1.5 - fixed build problem introduced by Bluetooth driver.
The problem is that the bluetooth driver uses some Forth words
that don't have FCode equivalents, but the WLAN driver stack is
in FCode form on XO-1.5. The easy fix is to omit the bluetooth
driver for XO-1.5. As a result, if you try to use an 8787 module
in an XO-1.5, the Bluetooth diagnostic won't work. That doesn't
violate any known use case, since the BT diag's purpose is factory
testing of XO-4s.
Added:
dev/mmc/sdhci/mv8686/bluetooth-pkg.fth
Modified:
dev/mmc/sdhci/mv8686/loadpkg.fth
Added: dev/mmc/sdhci/mv8686/bluetooth-pkg.fth
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ dev/mmc/sdhci/mv8686/bluetooth-pkg.fth Wed Mar 6 19:55:27 2013 (r3593)
@@ -0,0 +1,6 @@
+new-device
+2 to my-space
+my-space 1 reg
+" bluetooth" name
+fload ${BP}/dev/bluetooth/marvell-hci.fth \ Bluetooth driver
+finish-device
Modified: dev/mmc/sdhci/mv8686/loadpkg.fth
==============================================================================
--- dev/mmc/sdhci/mv8686/loadpkg.fth Wed Mar 6 19:45:09 2013 (r3592)
+++ dev/mmc/sdhci/mv8686/loadpkg.fth Wed Mar 6 19:55:27 2013 (r3593)
@@ -16,10 +16,3 @@
fload ${BP}/dev/mmc/sdhci/mv8686/libertas-interface.fth \ Marvell "Libertas" common code
fload ${BP}/dev/libertas.fth \ Marvell "Libertas" common code
finish-device
-
-new-device
-2 to my-space
-my-space 1 reg
-" bluetooth" name
-fload ${BP}/dev/bluetooth/marvell-hci.fth \ Bluetooth driver
-finish-device
Author: wmb
Date: Wed Mar 6 19:45:09 2013
New Revision: 3592
URL: http://tracker.coreboot.org/trac/openfirmware/changeset/3592
Log:
Bluetooth driver - added commentary and license text; no functional change.
Modified:
dev/bluetooth/marvell-hci.fth
Modified: dev/bluetooth/marvell-hci.fth
==============================================================================
--- dev/bluetooth/marvell-hci.fth Wed Mar 6 19:42:03 2013 (r3591)
+++ dev/bluetooth/marvell-hci.fth Wed Mar 6 19:45:09 2013 (r3592)
@@ -1,18 +1,13 @@
+\ See license at end of file
+purpose: Driver for Marvell Bluetooth Host Controller (HCI)
-\ h# 00 constant config-reg \ 03 for 8688
-\ h# 02 constant host-int-mask-reg \ 04 for 8688
-\ h# 03 constant host-intstatus-reg \ 05 for 8688
-\ h# 30 constant card-status-reg \ 20 for 8688
-\ h# 40 constant sq-read-base-addr-a0-reg \ 10 for 8688
-\ h# 41 constant sq-read-base-addr-a1-reg \ 11 for 8688
-\ h# 5c constant card-revision-reg \ ?? for 8688
-\ h# 60 constant card-fw-status0-reg \ 40 for 8688
-\ h# 61 constant card-fw-status1-reg \ 41 for 8688
-\ h# 62 constant card-rx-len-reg \ 42 for 8688
-\ h# 63 constant card-rx-unit-reg \ 43 for 8688
-\ h# 78 constant ioport0-reg \ 00 for 8688
-\ h# 79 constant ioport1-reg \ 01 for 8688
-\ h# 7a constant ioport2-reg \ 02 for 8688
+\ At present, this driver is only useful for diagnostic purposes,
+\ primarily supporting inquiry and scan. Infrastructure for other
+\ HCI commands is present, but the overall structure for pairing
+\ devices and using them is not there.
+
+\ Most of this is generic to all Bluetooth HCIs;
+\ only a tiny fraction is Marvell-specific
h# 200 value SDIO_BLOCK_SIZE
@@ -55,7 +50,7 @@
cdump cr
; h# 01 set-event
-: inquiry-result \ b.nresp { bdaddr b.pscan-rep-mode b.pscan-period-mode b.pscan-mode b.dev-class[3] w.clock-offset }
+: inquiry-result \ b.nresp { bdaddr b.pscan-rep-mode b.pscan-period-mode b.pscan-mode b.dev-class[3] w.clock-offset }
cdump cr
; h# 02 set-event
@@ -979,3 +974,27 @@
\ Major: Computer 100, Phone 200, LAN AP 300, AV 400, Peripheral 500, Imaging 600, Wearable 700, Toy 800, Misc 000, Uncategorized 1f00
\ Minor: major-dependent, e.g. 204 is cell phone
\ P2030 phone: 51 04 8c 68 30 2c Class: 5a0204
+
+\ LICENSE_BEGIN
+\ Copyright (c) 2013 FirmWorks
+\
+\ Permission is hereby granted, free of charge, to any person obtaining
+\ a copy of this software and associated documentation files (the
+\ "Software"), to deal in the Software without restriction, including
+\ without limitation the rights to use, copy, modify, merge, publish,
+\ distribute, sublicense, and/or sell copies of the Software, and to
+\ permit persons to whom the Software is furnished to do so, subject to
+\ the following conditions:
+\
+\ The above copyright notice and this permission notice shall be
+\ included in all copies or substantial portions of the Software.
+\
+\ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+\ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+\ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+\ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+\ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+\ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+\ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+\
+\ LICENSE_END
Author: quozl
Date: Tue Mar 5 06:05:16 2013
New Revision: 3588
URL: http://tracker.coreboot.org/trac/openfirmware/changeset/3588
Log:
OLPC - change name of flag variable, to avoid having it look like a verb, in r3584.
Modified:
cpu/x86/pc/olpc/setwp.fth
Modified: cpu/x86/pc/olpc/setwp.fth
==============================================================================
--- cpu/x86/pc/olpc/setwp.fth Tue Mar 5 06:04:54 2013 (r3587)
+++ cpu/x86/pc/olpc/setwp.fth Tue Mar 5 06:05:16 2013 (r3588)
@@ -71,13 +71,13 @@
[then]
\ Write mfg data from RAM to FLASH
-true value commit-tag
-: tags( false to commit-tag ;
+true value autocommit?
+: tags( false to autocommit? ;
: )tags ?sync-ec spi-reprogrammed ;
: put-mfg-data ( -- )
spi-start spi-identify
(put-mfg-data)
- commit-tag if )tags then
+ autocommit? if )tags then
;
\ Find RAM address of tag, given FLASH address