bios/boot: add bootargs support on netboot/sdcardboot to optionally specify r1/r2...
authorFlorent Kermarrec <florent@enjoy-digital.fr>
Thu, 16 Jul 2020 16:09:18 +0000 (18:09 +0200)
committerFlorent Kermarrec <florent@enjoy-digital.fr>
Thu, 16 Jul 2020 16:12:11 +0000 (18:12 +0200)
commitac35e158c1a908f8ea35ded97587c78a72babcae
tree482ecd744bc5d1a083e07ef3ef0f85fd843d3e24
parentee4b1d81a7cf2911f977810636f1f30602797b0c
bios/boot: add bootargs support on netboot/sdcardboot to optionally specify r1/r2/r3/addr.

For example:
{
"Image":  "0x40000000",
"bootargs": {
"r1":  "0x12345678",
}
}

will copy Image to 0x40000000 and set r1 to 0x12345678.

By default, r1,r2,r3 are set to 0 and addr is the address if the last loaded image, so:

{
"Image":         "0x40000000",
"rootfs.cpio":   "0x40800000",
"rv32.dtb":      "0x41000000",
"emulator.bin":  "0x41100000",
}

is equivalent to:

{
"Image":         "0x40000000",
"rootfs.cpio":   "0x40800000",
"rv32.dtb":      "0x41000000",
"emulator.bin":  "0x41100000",
"bootargs": {
"r1":   "0x00000000",
"r2":   "0x00000000",
"r3":   "0x00000000",
"addr": "0x00000000",
}
}
litex/soc/software/bios/boot.c