Commit Graph

1324 Commits

Author SHA1 Message Date
Brian Swetland
4feb0286b4 [platform][lpc43xx] option for using bootloader clock config 2015-07-26 21:57:44 -07:00
Brian Swetland
b83ca46590 [lpc43xx][udc] some basic locking to avoid badness
The big bit of unfinished work is supporting multiple queue'd requests
and queueing a request against an endpoint where requests are in progress
(neither work yet, both will result in things getting messed up).
2015-07-26 14:43:33 -07:00
Brian Swetland
a17c1b3a89 [app][udctest] exercise the udc api 2015-07-26 12:28:10 -07:00
Brian Swetland
945ae49780 [platform][lpc43xx][udc] USB Device Controller Driver
This borrows liberally from the old LK MSM72xx UDC driver that existed
back in 2008.  Turns out the MSM72xx and LPC43xx use the same UDC IP
block.

Code has been tidied up a bit, uses a hw header I threw together
before finding the old driver, and some udc common code has been
broken out into a separate file, but not yet a library.

Still needs some locking code and other cleanup, but enumeration
and bulk transfers are working.
2015-07-26 12:28:10 -07:00
Brian Swetland
5747ede097 [target][lpc4337xpresso] absorb the 'generic' 43xx project 2015-07-26 12:28:10 -07:00
Brian Swetland
65aceadb1e [platform][lpc43xx] update irq defs 2015-07-26 12:28:10 -07:00
Brian Swetland
af1368b199 [lib][udc] dust off and clean up the long-dormant UDC interface 2015-07-26 12:28:10 -07:00
Will Lee
06cfce0adf [platform][stm32f4xx] internal flash support for bio layer 2015-07-16 18:21:56 -07:00
Brian Swetland
52dc703a5e [platform][lpc43xx] more clock setup fiddling 2015-07-14 23:34:39 -07:00
Shinya Suzuki
d953d335e7 [platform][stm32f4xx] support uart baud rate change 2015-07-14 14:24:13 -07:00
Brian Swetland
76749b16d1 [platform][lpc43xx] pass correct frequency to arm_cm_systick_init() 2015-07-13 00:21:24 -07:00
Brian Swetland
08492fa540 [platform][lpc43xx] spifi serial flash controller registers 2015-07-13 00:19:14 -07:00
Brian Swetland
d68991fd41 [platform][lpc43xx] configure for 192MHz PLL1 and BASE_M4_CLK
Max is 204MHz, but 192 divides better for UARTs, etc.
2015-07-13 00:18:04 -07:00
Brian Swetland
ab23ec112a [platform][lpc43xx] more clock registers 2015-07-13 00:15:46 -07:00
Brian Swetland
5ce67dc53c [platform][lpc43xx] generate lk.bin.sign with lpc rom checksum 2015-07-12 00:52:33 -07:00
Travis Geiselbrecht
867782bb56 WIP STM32F7
add rx side of uart
enable systick at proper speed
2015-07-10 00:52:37 -07:00
Travis Geiselbrecht
440a1d50fe [app][tests][cache_test] fix the order of an error printf 2015-07-10 00:52:17 -07:00
Travis Geiselbrecht
88c923d88f [arch][arm-m] add support for m7 cache, add memory barrier in systick driver
The memory barrier is needed to order the reading of the val register to ensure
it is read properly on M7 cores.
2015-07-10 00:50:05 -07:00
Will Lee
c4ab10c760 [platform][stm32f4xx] disable platform vector table relocation
This can interfere with LK's management of the vector table.
2015-07-09 17:46:03 -07:00
Brian Swetland
e21e81f24d [arch][arm-m] debugger info
Use the reserved cortex-m vectors 8 and 9 for a magic cookie and
pointer to a debugger info structure.  This structure contains
pointers to the threadlist, the current thread pointer, and
offsets to important members of the thread structure.  With
this information, an attached debugger can walk the threadlist
and obtain state, name, registers, etc for each thread.

Use global define WITH_DEBUGGER_INFO to enable this.
2015-07-09 17:39:25 -07:00
Travis Geiselbrecht
94d4d499f7 WIP support for stm32f746g-eval2 board 2015-07-08 02:24:59 -07:00
Travis Geiselbrecht
d8ee04f2bf [arch][arm] initial support for cortex-m7 2015-07-08 02:24:59 -07:00
Carlos Pizano
5543feae56 update CMSIS form arm-m 2015-07-08 00:11:11 -07:00
Carlos Pizano
594f1b9439 enhance readme 2015-07-08 00:10:58 -07:00
Will Lee
141e4ffaa5 [kernel] call static constructors after heap init
Avoids badness when a constructor needs to malloc() something, etc.
2015-07-07 15:56:45 -07:00
Brian Swetland
eea18f45cc [platform][lpc43xx] usb device controller register/structure info 2015-07-06 00:01:00 -07:00
Brian Swetland
b736d68903 [platform][lpc43xx] support some faster debug uart baudrates
TARGET_DEBUG_BAUDRATE may be 115200, 1000000, 2000000, or 3000000
2015-07-05 23:10:55 -07:00
Brian Swetland
45a6034cf6 [platform][lpc43xx] hook up reboot 2015-07-05 05:45:02 -07:00
Brian Swetland
3e3036d0c2 [platform][lpc43xx] hook up debug uart
For the moment, just a trivial implementation in debug.c.
To be replaced with a standard lk uart "driver" later on.
2015-07-05 05:44:54 -07:00
Brian Swetland
c1f044266f [platform][lpc43xx] add register definitions for some core bits 2015-07-05 05:44:54 -07:00
Brian Swetland
39afbc9668 [platform][lpc43xxx] minimal skeleton platform, target, and project
Just enough to compile cleanly.  Not much platform-specific information
besides the IRQ numbers just yet.
2015-07-05 05:44:54 -07:00
Brian Swetland
818352d4a3 [platform][stm32f4xx] minor cleanup 2015-07-02 15:19:14 -07:00
Brian Swetland
05636f5eb2 [platform][stm32f4xx] allow per-uart baudrate and rxbuf size configuration 2015-07-02 15:14:38 -07:00
Brian Swetland
cbc6bb96fd [target][stm32f4-discovery] run system at 168MHz
SYSCLK 168000000
HCLK   168000000
PCLK1  42000000
PCLK2  84000000
2015-07-01 22:47:40 -07:00
Brian Swetland
31d66a7b3a [platform][stm32f4xx] fix warning in uart.c 2015-07-01 22:47:23 -07:00
Brian Swetland
12fdd82e03 [platform][stm32f4xx] fix uart_getc() to work properly if wait==1
return a negative value if no characters are available
2015-07-01 19:47:35 -07:00
Brian Swetland
1c3205eab1 [target][stm32f4-discovery] update to use platform/stm32f4xx 2015-06-30 23:03:02 -07:00
Brian Swetland
174c3889a8 [lib][lwip] allow targets to override lwip configuration
LWIP has a lot of knobs and creating a generic configuration that works
everywhere (or even most places) is hard.  So if you add WITH_TARGET_LWIPOPTS
to the configuration, pull options from <target/lwipopts.h> instead of
the defaults in lib/lwip/include/lwipopts.h
2015-06-30 17:06:32 -07:00
John Grossman
eab2816302 [lib][ptable] Modify ptable to respect erase geometries.
Modify the existing ptable code to pay attention to bio device erase
geometry if present.  Significant changes include...

+ Partitions must be allocated on both program and erase block
  boundaries.
+ Partitions lengths must be multiples of both program and erase block
  sizes.
+ Partitions may not span non-homogeneous regions of erase geometry.
+ ptable_allocate as been made private.
+ Users may no longer explicitly select a position for partitions to
  be added, they may only ask for the partition to be allocated at the
  begining or the end of the block device.
+ A bio subdevice will be registered for each active partition in the
  system.  Users are encouraged to add their partition using
  ptable_add, and then open a handle to the subdevice using bio_open.
  The bio subdevice will prevent accidental scribbling outside of the
  partition lines, and also advertise the partition erase size.

Signed-off-by: John Grossman <johngro@google.com>
Change-Id: I09bf9038d210ff8be42d44166ab92c789872e036
2015-06-29 17:32:10 -07:00
John Grossman
8a7219ddb1 [lib][bio] Add erase geometry to lib/bio
Extend the block i/o system to allow registered devices to advertise
an erase geometry.  Devices which do not need to be explicitly erased
may skip this.  Extent the Zynq spiflash code to publish the erase
geometry as read from the flash device.

Signed-off-by: John Grossman <johngro@google.com>
Change-Id: I42e16fbe9a0fcf8334c317f16dea1c551c203eb2
2015-06-29 17:32:10 -07:00
John Grossman
8028f42df6 [lib][bio] Add a dump command to the bio console
Signed-off-by: John Grossman <johngro@google.com>
Change-Id: Icef8e97fae9b587e188dae6e8f367dbdf05c070c
2015-06-29 17:32:10 -07:00
John Grossman
0fd9dffaee [debug] Add hexdump8_ex
Add a version of hexdump8 which lets the user specify the displayed offset
rather than always using the in-memory offset.

Signed-off-by: John Grossman <johngro@google.com>
Change-Id: Iad0ee36294d1e0a82f3a086b8b4fa856438764af
2015-06-29 17:32:10 -07:00
Nathaniel Quillin
6c3dc4cdda [lkboot] add flag to disable autoboot from a project
Change-Id: Iea9c714c869543ba486f63a6604f379acd469385
2015-06-30 00:29:54 +00:00
Travis Geiselbrecht
f963a62468 [tools] remove the CDECL stuff from tools/ since they can't safely include compiler.h
Change-Id: I304d64e9957c0c264d5031f0ffc77e6995417bf4
2015-06-29 17:28:04 -07:00
Brian Swetland
56d87d83cb [platform][stm32f4xx] allow rom/mem base overrides 2015-06-29 13:49:30 -07:00
Brian Swetland
56d269dc68 [kernel] don't print tls entries on platforms with no tls slots
Avoids wasting a line on this in the thread list.
2015-06-28 13:56:24 -07:00
Brian Swetland
6f768c2382 [lib][lwip] use lk heap instead of static memory pools 2015-06-28 09:49:11 -07:00
Brian Swetland
2577259477 [lib][lwip] is_valid fixups 2015-06-28 09:48:23 -07:00
Brian Swetland
bddac5dc05 [lib][lwip] simplify thread interface
- no lwip callers pay attention to the return value
  (they all create long lived, never exiting threads)
- using TLS requires reserving a slot in every thread
  which is overkill for something that needs no per
  thread data
2015-06-28 08:08:49 -07:00
Brian Swetland
ae8ece4d94 [kernel][thread] require valid TLS slot number via static assert
Since TLS slot numbers are reserved at compile time, use a static assert
to ensure bogus ones are not used, leading to thread name corruption or
general heap corruption, depending on the number.
2015-06-28 08:00:00 -07:00