Commit Graph

8 Commits (4e3cf62f5bdc481eeb31b7e1556442291925f3ae)

Author SHA1 Message Date
Joel Stanley 4e3cf62f5b Add Linux loader
This privdes just enough firmware to load Linux. The loader is linked to
run from the aliased BRAM address. This means you should configure your
SoC with BRAM (ie, don't pass --no_bram).

It can load a raw kernel (vmlinux.bin) or a wrapper that embeds the
device tree (dtbImage.microwatt).

The printf comes from https://github.com/mpredfearn/simple-printf

 1. Build Linux for microwatt
  objcopy -O binary microwatt/vmlinux vmlinux.bin

 2. Build a dtb

 3. Set MW_DEBUG to point to a copy of mw_debug and type `make load` to
    load the loader into BRAM.

 4. Press 'RESET'

 5. Follow the instructions:

	Microwatt Loader (Jun 22 2020 16:44:59

	Load binaries into SDRAM and select option to start:

	vmlinux.bin and dtb:
	 mw_debug -b jtag stop load vmlinux.bin load microwatt.dtb 0x1000000 start
	 press 'l' to start'

	dtbImage.microwatt:
	 mw_debug -b jtag stop load dtbImage.microwatt 0x500000 start
	 press 'w' to start'

	Flash:
	 To boot a binary from flash, write it to 0000000000300000
	 press 'f' to start'

If you want to test other software, such as MicroPython, you can also
load it to the start of SDRAM and the loader will jump to it with 'l'.

Signed-off-by: Joel Stanley <joel@jms.id.au>
5 years ago
Benjamin Herrenschmidt 183d05de86 gitignore: Add more exlusions
litedram build directory used by the generator and the
verilator obj_dir can be taken out

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
5 years ago
Michael Neuling ff162e42eb Add VHDL TAGS
Adds `make TAGS`

Signed-off-by: Michael Neuling <mikey@neuling.org>
5 years ago
Michael Neuling 9d7df2d507 Add test cases for new exceptions and supervisor state
This adds test cases for:
- sc, illegals and decrementer exceptions
- decrementer overflow
- rfid
- mt/mf sprg0/1 srr0/1
- mtdec
- mtmsrd
- sc

It also adds these test cases to make check/check_light

Signed-off-by: Michael Neuling <mikey@neuling.org>
5 years ago
Michael Neuling 54a399f162 gitignore: Fix RAM file name
From:
    commit 8e0389b973
    Author: Benjamin Herrenschmidt <benh@kernel.crashing.org>
    Date:   Wed Oct 23 12:08:55 2019 +1100
    ram: Rework main RAM interface

We need to change the name.

Signed-off-by: Michael Neuling <mikey@neuling.org>
6 years ago
Michael Neuling 1edc4aa004 Update gitignore for new test bench build files
Just ignore all *_tb files

Signed-off-by: Michael Neuling <mikey@neuling.org>
6 years ago
Michael Neuling 5ae92a721f Add new files to git ignore
Signed-off-by: Michael Neuling <mikey@neuling.org>
6 years ago
Anton Blanchard 5a29cb4699 Initial import of microwatt
Signed-off-by: Anton Blanchard <anton@linux.ibm.com>
6 years ago