[openfirmware] [commit] r2409 - in cpu/arm: mmp2 olpc olpc/1.75
repository service
svn at openfirmware.info
Wed Aug 3 04:13:27 CEST 2011
Author: wmb
Date: Wed Aug 3 04:13:27 2011
New Revision: 2409
URL: http://tracker.coreboot.org/trac/openfirmware/changeset/2409
Log:
OLPC XO-1.75 - New ATAG format for reporting OFW memory, and new virtual addresses that dovetail nicely with Linux usage.
Modified:
cpu/arm/mmp2/rootnode.fth
cpu/arm/olpc/1.75/addrs.fth
cpu/arm/olpc/1.75/devices.fth
cpu/arm/olpc/1.75/fw.bth
cpu/arm/olpc/initmmu.fth
Modified: cpu/arm/mmp2/rootnode.fth
==============================================================================
--- cpu/arm/mmp2/rootnode.fth Wed Aug 3 03:04:18 2011 (r2408)
+++ cpu/arm/mmp2/rootnode.fth Wed Aug 3 04:13:27 2011 (r2409)
@@ -25,7 +25,9 @@
: close ( -- ) ;
: map-in ( phys size -- virt )
- drop io-pa - io-va +
+ drop ( phys )
+ dup fb-pa = if drop fb-va exit then ( phys )
+ io-pa - io-va +
;
: map-out ( virtual size -- )
2drop
Modified: cpu/arm/olpc/1.75/addrs.fth
==============================================================================
--- cpu/arm/olpc/1.75/addrs.fth Wed Aug 3 03:04:18 2011 (r2408)
+++ cpu/arm/olpc/1.75/addrs.fth Wed Aug 3 04:13:27 2011 (r2409)
@@ -33,10 +33,10 @@
h# 1f80.0000 constant extra-mem-pa
h# 20.0000 constant /extra-mem
-h# ef00.0000 constant dma-va
-h# ef80.0000 constant extra-mem-va
-h# efa0.0000 constant fw-va
-h# efc0.0000 constant fb-va
+h# fd00.0000 constant dma-va
+h# fd80.0000 constant extra-mem-va
+h# fda0.0000 constant fw-va
+h# fdc0.0000 constant fb-va
h# fe00.0000 constant io-va
[ifdef] virtual-mode
Modified: cpu/arm/olpc/1.75/devices.fth
==============================================================================
--- cpu/arm/olpc/1.75/devices.fth Wed Aug 3 03:04:18 2011 (r2408)
+++ cpu/arm/olpc/1.75/devices.fth Wed Aug 3 04:13:27 2011 (r2409)
@@ -238,7 +238,7 @@
init-lcd
;
: map-frame-buffer ( -- )
- fb-pa to frame-buffer-adr
+ fb-pa fb-size " map-in" $call-parent to frame-buffer-adr
;
" display" device-type
" ISO8859-1" encode-string " character-set" property
Modified: cpu/arm/olpc/1.75/fw.bth
==============================================================================
--- cpu/arm/olpc/1.75/fw.bth Wed Aug 3 03:04:18 2011 (r2408)
+++ cpu/arm/olpc/1.75/fw.bth Wed Aug 3 04:13:27 2011 (r2409)
@@ -46,27 +46,37 @@
d# 900 tag-w, \ Height
d# 24 tag-w, \ Depth
d# 1200 3 * tag-w, \ Pitch
- fb-pa tag-l, \ Base address
+ fb-va tag-l, \ Base address
d# 1200 3 * d# 900 * tag-l, \ Total size - perhaps could be larger
- 8 tag-b, \ Red size
- d# 0 tag-b, \ Red position
- 8 tag-b, \ Green size
- d# 8 tag-b, \ Green position
- 8 tag-b, \ Blue size
- d# 16 tag-b, \ Blue position
+ 5 tag-b, \ Red size
+ d# 11 tag-b, \ Red position
+ 6 tag-b, \ Green size
+ d# 5 tag-b, \ Green position
+ 5 tag-b, \ Blue size
+ d# 0 tag-b, \ Blue position
0 tag-b, \ Rsvd size
- d# 24 tag-b, \ Rsvd position
+ d# 16 tag-b, \ Rsvd position
;
' mmp-fb-tag, to fb-tag,
\ Add a tag describing the OFW callback
+3 constant MT_DEVICE_WC
+9 constant MT_MEMORY
: (ofw-tag,) ( -- )
- 6 tag-l, \ size
- h# 41000501 tag-l, \ ATAG_MEM
+ 4 2 * 3 + tag-l, \ size
+ h# 41000502 tag-l, \ ATAG_MEM
cif-handler tag-l, \ Client interface handler callback address
- page-table@ tag-l, \ OFW's top-level page tables
- extra-mem-va d# 20 >> tag-l, \ First section entry number
- fw-virt-base /fw-ram + extra-mem-va - d# 20 >> tag-l, \ Number of section entries
+
+ \ Each of these groups is a struct map_desc as defined in arch/arm/include/asm/mach/
+ extra-mem-va tag-l, \ VA of OFW memory
+ extra-mem-pa pageshift rshift tag-l, \ Page frame number of OFW memory
+ fw-virt-base /fw-ram + extra-mem-va - tag-l, \ Size of OFW memory
+ MT_MEMORY tag-l, \ Mapping type of OFW memory
+
+ fb-va tag-l, \ VA of OFW Frame Buffer
+ fb-pa pageshift rshift tag-l, \ PA of OFW Frame Buffer
+ fb-size tag-l, \ Size of OFW memory
+ MT_DEVICE_WC tag-l, \ Mapping type of OFW frame buffer
;
' (ofw-tag,) to ofw-tag,
Modified: cpu/arm/olpc/initmmu.fth
==============================================================================
--- cpu/arm/olpc/initmmu.fth Wed Aug 3 03:04:18 2011 (r2408)
+++ cpu/arm/olpc/initmmu.fth Wed Aug 3 04:13:27 2011 (r2409)
@@ -266,6 +266,12 @@
set r4,`dma-va #` \ Virtual address
bl `map-sections`
+ set r1,`fb-pa #` \ Address - Frame buffer
+ set r2,`fb-size #` \ Size of frame buffer
+ set r3,#0xc06 \ Write bufferable
+ set r4,`fb-va #` \ Virtual address
+ bl `map-sections
+
set r1,`extra-mem-pa #` \ Address of additional allocatable memory
set r2,`/extra-mem #` \ Size of additional allocatable memory
set r3,#0xc0e \ Write bufferable
More information about the openfirmware
mailing list