xref: /plan9-contrib/sys/src/9/bcm/words (revision b4d1cf41cd5301e4c76aef9c04ddee28ac168a8e)
1raspberry pi
2
3broadcom 2835 SoC (based on 2708)
4arm1176jzf-s (v6 arch) 700MHz cpu, apparently dual-issue, with vfp2
5videocore 4 gpu
6
7l1 I & D VIPT caches
8	16K each: 4-way, 128 sets, 32-byte lines
9	l1 D is write-through, l1 I is write-back
10unified l2 PIPT cache 128K: 4-way?, 1024? sets, 32-byte lines, mostly for gpu
11(by default CPU doesn't see it)
12
13we arrange that device register accesses are uncached and unbuffered
14(strongly ordered, in armv6/v7 terminology).
15
16256MB or 512MB of dram at physical address 0, shared with gpu
17non-16550 uart for console
18	uart serial voltages are TTL (3.3v, not rs232 which is nominally 12v);
19	could use usb serial (ick).
20there's no real ethernet controller, so we have to use usb ether,
21and the usb controller is nastier than usual.
22
23There's a serial port (115200b/s) on P1 connector pins (GND,TXD,RXD) =
24(6,8,10).  These are 3v TTL signals: use a level-shifter to convert to
25RS232, or a USB-to-TTL-serial adapter.  Add the line "console=0
26b115200" to the /cfg/pxe file on the server, or the parameter
27"console='0 b115200'" to cmdline.txt on the SD card.
28
299pi is a Plan 9 terminal, which can boot with local fossil root on the
30sd card (/dev/sdM0), or with root from a Plan 9 file server via tcp.
31
329picpu is a Plan 9 cpu server, which could be used in a headless
33configuration without screen, keyboard or mouse.
34
359pifat is a minimal configuration which boots a shell script boot.rc
36with root in /plan9 on the dos partition, maybe useful for embedded
37applications where a full Plan 9 system is not needed.
38
39Network booting with u-boot:
40start with a normal rpi u-boot sd (e.g. raspberry-pi-uboot-20120707).
41update the start.elf with a version from a newer rpi distro (see below).
42mk installall
43add new system to ndb
44see booting(8)
45
46Booting from sd card:
47- start with a normal rpi distro sd (e.g. 2012-08-16-wheezy-raspbian)
48  [NB: versions of start.elf earlier than this may not be compatible]
49- copy 9pi to sd's root directory
50- add or change "kernel=" line in config.txt to "kernel=9pi"
51- plan9.ini is built from the "kernel arguments" in cmdline.txt - each
52  var=value entry becomes one plan9.ini line, so entries with spaces will
53  need single quotes.
54
55
56	physical mem map
57
58hex addr size	what
59----
600	 256MB	sdram, cached (newer models have 512MB)
6100000000 64	exception vectors
6200000100 7936	boot ATAGs (inc. cmdline.txt)
6300002000 4K	Mach
6400003000 1K	L2 page table for exception vectors
6500003400 1K	videocore mailbox buffer
6600003800 2K	FIQ stack
6700004000 16K	L1 page table for kernel
6800008000 -	default kernel load address
6901000000 16K	u-boot env
7020000000 16M	peripherals
7120003000	system timer(s)
7220007000	dma
732000B000	arm control: intr, timers 0 & 1, semas, doorbells, mboxes
7420100000	power, reset, watchdog
7520200000	gpio
7620201000	uart0
7720202000	mmc
7820215040	uart1 (mini uart)
7920300000	eMMC
8020600000	smi
8120980000	otg usb
82
8340000000	l2 cache only
847e00b000	arm control
857e2000c0	jtag
867e201000?	pl011 usrt
877e215000	aux: uart1, spi[12]
88
8980000000
90
91c0000000	bypass caches
92
93	virtual mem map (from cpu address map & mmu mappings)
94
95hex addr size	what
96----
970	 512MB	user process address space
987e000000 16M	i/o registers
9980000000 <=224M	kzero, kernel ram (reserve some for GPU)
100ffff0000 4K	exception vectors
101
102Linux params at *R2 (default 0x100) are a sequence of ATAGs
103  struct atag {
104	u32int size;		/* size of ATAG in words, including header */
105	u32int tag;		/* ATAG_CORE is first, ATAG_NONE is last */
106	u32int data[size-2];
107  };
10800000000	ATAG_NONE
10954410001	ATAG_CORE
11054410002	ATAG_MEM
11154410009	ATAG_CMDLINE
112
113uart dmas	15, 14
114
115intrs (96)
116irq1
1170	timer0
1181	timer1
1192	timer2
1203	timer3
1218	isp
1229	usb
12316	dma0
12417	dma1
12512628	dma12
12729	aux: uart1
12830	arm
12931	vpu dma
130
131irq2
13235	sdc
13336	dsio
13440	hdmi0
13541	hdmi1
13648	smi
13756	sdio
13857	uart1 aka "vc uart"
139
140irq0
14164	timer
14265	mbox
14366	doorbell0
14467	doorbell1
14575	usb
14677	dma2
14778	dma3
14882	sdio
14983	uart0
150