Tim Newsome
ceb8dc048d
Make general CSR reads work.
...
Change-Id: Ic9b7e065b7303b3707c28c9b7c496cc1c1e91acd
2017-02-14 12:55:03 -08:00
Tim Newsome
ae4fda2719
Make it all the way through examine().
...
This includes reading GPRs (although I haven't confirmed the values) and
doing some CSR reading/writing to disable triggers that may be left over
from a previous setting.
Change-Id: I2c627bd002d601e302a40f838087541897c025fd
2017-02-14 11:43:58 -08:00
Tim Newsome
00925574d5
More dbus->dmi.
...
Change-Id: Ia691f1e7ce909da4d9c16e6d691c4f2cf768a7fb
2017-02-14 09:38:09 -08:00
Tim Newsome
24033b53d8
Read misa during examine(), using program buffer.
...
Change-Id: Icad5324d216b61207cb5f6024b2deab065658640
2017-02-13 21:29:02 -08:00
Tim Newsome
0fa8162a8c
dbus -> dmi
...
Change-Id: I4c3343f8f5ffd45e3d76a2218aaa5dee8e546839
2017-02-13 11:13:14 -08:00
Tim Newsome
e2a5e02d1c
Discover XLEN using abstract reg reads.
...
Change-Id: Ib7480b8e4925cf08e5b59d263bcdcc672a89dc4b
2017-02-13 09:54:05 -08:00
Tim Newsome
e6221e75c9
Attempt to discover XLEN with abstract reg reads
...
Change-Id: I7ce9c8c0c34bd875dba11596e6f6268320b2fb3a
2017-02-10 19:08:44 -08:00
Tim Newsome
5e3d9803ab
Halt target in riscv_examine().
...
Change-Id: I11ab915901f2e75f9b728d6cf72c6498e3950ded
2017-02-10 11:31:14 -08:00
Tim Newsome
075c0e80d1
Add debug_defines.h.
...
Change-Id: I94753f9bed11cbc978daa0f3ea3ecf2023b93893
2017-02-09 09:57:54 -08:00
Tim Newsome
2ad366e658
Detect and smoketest data and ibuf registers.
...
Change-Id: I7ee4817ec63041a1577b83392d40b676fb67c207
2017-02-08 20:40:37 -08:00
Tim Newsome
8cac7d0cee
Correctly parse dmcontrol.
...
Change-Id: Ibae425f4ccbe9e504c41e185f264f667e091fca4
2017-02-08 19:47:34 -08:00
Tim Newsome
8af4a9a053
Update DMI bus width for 0.13.
...
Change-Id: Ieff13a7a0084fe822b7cc6d927727eba4f158ef0
2017-02-07 11:28:50 -08:00
Tim Newsome
d78ee9303e
Merge pull request #16 from sifive/0.13
...
Refactor code to support multiple debug spec versions.
2017-02-06 09:20:15 -08:00
Tim Newsome
ecc5b6ecad
Add missing header file.
...
Change-Id: I19df5112c2503ec6652f2d09e7324180af5024df
2017-02-05 21:32:44 -08:00
Tim Newsome
6f78eb1ec1
Add the first difference for 0.13 targets.
...
Just to confirm the 0.13 code takes a different path.
Change-Id: I7f1c9c8f3b586aee001dbeef2213f5f2e6a94f36
2017-02-05 18:21:34 -08:00
Tim Newsome
8d195afd2d
Use the csrNNN name instead of "mstatus".
...
Fixes flashing code.
Change-Id: Id12c926f5ada009e06f6601362deefec946afc98
2017-02-05 18:19:00 -08:00
Tim Newsome
d055f86552
Most gdbserver tests pass now.
...
Change-Id: I14a8360d9cf2800ca5e6a44f7e58102b2baef719
2017-02-05 18:09:19 -08:00
Tim Newsome
9bab0782d3
Merge pull request #13 from sifive/disable_interrupts
...
riscv: Globally disable interrupts when running algorithms.
2017-01-26 10:45:13 -08:00
Megan Wachs
5d82a395f1
riscv: disable interrupts for all priviledge levels
2017-01-25 21:51:02 -08:00
Megan Wachs
d5892f0ee5
riscv: Use proper UINT packing and unpacking routines for disabling interrupts before running algorithms.
2017-01-25 15:23:10 -08:00
Megan Wachs
5766efe0c3
riscv: Globally disable interrupts when running algorithms.
2017-01-25 11:35:57 -08:00
Tim Newsome
193f630948
Merge pull request #11 from sifive/malloc_off_by_1
...
Correct off by 1 in malloc
2016-12-24 10:14:53 -08:00
mwachs5
ddb4caf846
Correct off by 1 in malloc, which causes this to fail on macOS (and in theory on any platform).
2016-12-23 17:53:26 -08:00
Tim Newsome
b474c22b33
Merge pull request #9 from sifive/increase_as_size
...
riscv: Increase the number of Algorithm Steps
2016-12-19 09:42:47 -08:00
Megan Wachs
37ca3d7810
riscv: Increase the number of Algorithm Steps
2016-12-18 12:11:48 -08:00
Tim Newsome
e31dd225fa
Merge pull request #7 from sifive/temp_verify_blank_check
...
riscv: implement skeletons for Memory Blank Check and CRC.
2016-12-08 13:19:00 -08:00
Megan Wachs
4a0d3fb035
riscv: implement skeletons for Memory Blank Check and CRC. Otherwise you just get a segfault when attempting to perform these actions.
2016-12-07 15:09:35 -08:00
Tim Newsome
c1da323144
Fix issue #6 : build failure on gcc 6
...
Change-Id: If890a6d62fdd55befb9057f83726f60721ac8078
2016-12-01 19:15:55 -08:00
Tim Newsome
52d7d49d6c
Merge pull request #5 from sifive/format-warning
...
Use portable format specifier for size_t
2016-11-30 16:01:43 -08:00
Albert Ou
9601429ac7
Use portable format specifier for size_t
...
This fixes a gcc warning [-Werror=format] on an i686-pc-linux-gnu host,
which defines size_t as unsigned int instead of long int.
2016-11-30 15:06:04 -08:00
Megan Wachs
db2ec672b5
Merge pull request #4 from sifive/mwachs5-patch-sckdiv
...
Don't write SCKDIV when flashing
2016-11-30 10:19:54 -08:00
Megan Wachs
ce49da9947
Don't write SCKDIV when flashing
...
The target may have already configured its clock to run at a higher frequency and would have set SCKDIV and other dividers at that time. Don't restore the SCKDIV to its default or the flash interface may run too fast and programming will fail.
Otherwise, the default value is fine and there is no need to write SCKDIV.
2016-11-27 21:21:45 -08:00
Tim Newsome
b8879d81a2
Add timeout to infinite loop.
...
Change-Id: I7d005b4779154b4dfe8c9a26f4f0e351f426df9b
2016-11-27 15:09:42 -08:00
Tim Newsome
364f4b5ab9
Add some timeouts that I ran into.
...
Change-Id: I8eeb1c934ceead0d99dcdc618a3f8aa351119cb0
2016-11-25 17:12:50 -08:00
Tim Newsome
7dd48acdc0
Cope better if the target unexpectedly resets.
...
Change-Id: I713f7f8a3afbbb02be0e2f19f4d32778366d37f9
2016-11-25 09:46:55 -08:00
Tim Newsome
bb7dedcbaa
Fix typo.
...
Change-Id: If04ba1103817f772fe55659cb3b5b4533c734f2a
2016-11-23 11:14:00 -08:00
Tim Newsome
452be58b63
Merge branch 'sifive/add_issi_flash' into riscv
2016-11-19 15:41:20 -08:00
Tim Newsome
b585e2e324
Fix off-by-one error in assert.
...
Change-Id: I86447c747a212175be560170378c655ac801f5a6
2016-11-19 15:40:49 -08:00
Megan Wachs
f38d70c134
Add the ISSI SPI Flash to the list
2016-11-19 11:05:36 -08:00
Tim Newsome
8ee0647365
Flash at 8KB/s, using 10,000 byte working area.
...
If the working area is large enough, every fespi_write() results in just
a single algorithm execution.
Change-Id: I87a12e29f50ef6ea1f46fbd1edf440f9e54a2162
2016-11-18 10:58:26 -08:00
Tim Newsome
1551916027
2KB/s, by using the algorithm more.
...
Change-Id: If55dcf432f9243355ed22eb8d1559ecdbca3c5c9
2016-11-17 14:33:10 -08:00
Tim Newsome
8aef60fafa
Base work for using a much smarter algorithm.
...
Change-Id: I0bf6af12ac2e3c07ffe3f95ad490eb4a88244a97
2016-11-17 14:18:39 -08:00
Tim Newsome
c406b4530e
Merge branch 'Og' into enable_flash_prog
2016-11-17 13:44:35 -08:00
Tim Newsome
18eedf996c
Use algorithm to speed up fespi flash programming.
...
It's still really slow, at 854b/s, but it seems to work and it's a lot
of new code.
Change-Id: I9dd057bbcc81a56eb558b4f33ac35f6f03c23588
2016-11-16 17:54:55 -08:00
Megan Wachs
6686e71bd6
riscv: In FESPI driver, rename 'wip' to 'tx_wait', a more descriptive name.
2016-11-14 16:14:39 -08:00
Megan Wachs
8de4ab011d
riscv: Correct reading SPI Flash ID
2016-11-07 20:42:43 -08:00
Megan Wachs
05b12c5c20
riscv: Add first cut of Flash driver for Freedom E platforms. Completely untested.
2016-11-04 19:43:53 -07:00
Tim Newsome
e51b0360f5
Make fpu regs work even if mstatus.fs is 0.
...
Change-Id: I2c283f2de226518ab9a4e0476edada51825b2993
2016-11-01 12:58:37 -07:00
Tim Newsome
e7a745ed3b
Fix bug with slow targets.
...
Halting didn't work right in slow targets, because some code assumed the
register cache is valid before it was guaranteed to be.
Also made dbus_busy_delay and interrupt_high_delay grow faster, so that
on slow targets it takes less time to learn the correct values.
Change-Id: I948a49d4e3cd0638f5449ab94994406319fd5f42
2016-10-27 13:00:26 -07:00
Tim Newsome
e6e2070692
Add some comments.
...
Change-Id: Icd7d5eb370c6c893ec4717c92249f35fb100370a
2016-10-24 14:21:34 -07:00