bootrom: Adding bootrom parameters (#857)
BootROM parameters currently control the boot rom address, size, and the hang which essentially sets the reset vector. This commit allows specifying different parameter values as required.
This commit is contained in:
parent
b7f1ba3428
commit
f2533ce825
@ -34,6 +34,8 @@ class BasePlatformConfig extends Config((site, here, up) => {
|
|||||||
case SOCBusConfig => site(L1toL2Config)
|
case SOCBusConfig => site(L1toL2Config)
|
||||||
case PeripheryBusConfig => TLBusConfig(beatBytes = 4)
|
case PeripheryBusConfig => TLBusConfig(beatBytes = 4)
|
||||||
case PeripheryBusArithmetic => true
|
case PeripheryBusArithmetic => true
|
||||||
|
// Default BootROMParams
|
||||||
|
case PeripheryBootROMKey => BootROMParams()
|
||||||
// Note that PLIC asserts that this is > 0.
|
// Note that PLIC asserts that this is > 0.
|
||||||
case IncludeJtagDTM => false
|
case IncludeJtagDTM => false
|
||||||
case JtagDTMKey => new JtagDTMKeyDefault()
|
case JtagDTMKey => new JtagDTMKeyDefault()
|
||||||
|
@ -100,10 +100,15 @@ trait HasPeripheryRTCCounterModuleImp extends LazyMultiIOModuleImp {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** Adds a boot ROM that contains the DTB describing the system's coreplex. */
|
/** Adds a boot ROM that contains the DTB describing the system's coreplex. */
|
||||||
|
case class BootROMParams(address: BigInt = 0x10000, size: Int = 0x10000, hang: BigInt = 0x10040)
|
||||||
|
|
||||||
|
case object PeripheryBootROMKey extends Field[BootROMParams]
|
||||||
|
|
||||||
trait HasPeripheryBootROM extends HasSystemNetworks with HasCoreplexRISCVPlatform {
|
trait HasPeripheryBootROM extends HasSystemNetworks with HasCoreplexRISCVPlatform {
|
||||||
val bootrom_address = 0x10000
|
val bootROMParams = p(PeripheryBootROMKey)
|
||||||
val bootrom_size = 0x10000
|
val bootrom_address = bootROMParams.address
|
||||||
val bootrom_hang = 0x10040
|
val bootrom_size = bootROMParams.size
|
||||||
|
val bootrom_hang = bootROMParams.hang
|
||||||
private lazy val bootrom_contents = GenerateBootROM(coreplex.dtb)
|
private lazy val bootrom_contents = GenerateBootROM(coreplex.dtb)
|
||||||
val bootrom = LazyModule(new TLROM(bootrom_address, bootrom_size, bootrom_contents, true, peripheryBusConfig.beatBytes))
|
val bootrom = LazyModule(new TLROM(bootrom_address, bootrom_size, bootrom_contents, true, peripheryBusConfig.beatBytes))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user