def generate_overlay(tree, overlay): """Generate the overlay""" bootrom = get_spi_flash(tree) model = tree.root().get_field("model") if model == "sifive,hifive1": offset = 0x400000 elif model == "sifive,hifive1-revb": offset = 0x10000 else: offset = 0x0 if bootrom is not None: region = get_spi_region(bootrom) set_entry(overlay, bootrom, region, offset) set_boot_hart(tree, overlay) set_stdout(tree, overlay, 115200) if model == "sifive,hifive-unmatched-a00" or \ model == "sifive,hifive-unleashed-a00": ram = itim = ccache = get_ccache(tree) region = get_ccache_region(ccache) set_rams(overlay, ram, itim, region) else: ram, itim = get_rams(tree) set_rams(overlay, ram, itim)
def generate_overlay(tree, overlay): """Generate the overlay""" bootrom = get_spi_flash(tree) if bootrom is not None: region = get_spi_region(bootrom) set_entry(overlay, bootrom, region, 0x400000) set_boot_hart(tree, overlay) set_stdout(tree, overlay, 115200) ram, itim = get_rams(tree) # If the ram and itim are the same sram node ram_compat = ram.get_field("compatible") if ram_compat is None: ram_compat = "" if ram == itim and "sram" in ram_compat: # get the size of the first tuple size = ram.get_reg()[0][1] # if the size is above the threshold if size >= SRAM_SPLIT_MIN_SIZE: # split the memory into separate ram and itim set_ram(overlay, ram, 0, 0) set_itim(overlay, ram, 0, size / 2) return set_rams(overlay, ram, itim)
def generate_overlay(tree, overlay): """Generate the overlay""" bootrom = tree.get_by_path("/memory") if bootrom is not None: set_entry(overlay, bootrom, 0, 0) set_boot_hart(tree, overlay) set_stdout(tree, overlay, 115200) ram, itim = get_rams(tree) set_rams(overlay, ram, itim)
def generate_overlay(tree, overlay): """Generate the overlay""" spi = get_spi_flash(tree) memory = tree.get_by_path("/memory") if spi is not None: region = get_spi_region(spi) set_entry(overlay, spi, region, 0x400000) else: set_entry(overlay, memory, 0, 0x0) set_boot_hart(tree, overlay) set_stdout(tree, overlay, 115200) ram, itim = get_rams(tree) set_rams(overlay, ram, itim)
def generate_overlay(tree, overlay): """Generate the overlay""" bootrom = tree.get_by_path("/memory") if bootrom is not None: set_entry(overlay, bootrom, 0, 0) set_boot_hart(tree, overlay) set_stdout(tree, overlay, 115200) ram, itim = get_rams(tree) # Prioritize the dtim over /memory dtim = get_dtim(tree, get_boot_hart(tree)) if dtim is not None: ram = dtim set_rams(overlay, ram, itim)
def generate_overlay(tree, overlay): """Generate the overlay""" attach_testrams(tree, overlay) bootrom = get_boot_rom(tree) if bootrom is not None: set_entry(overlay, bootrom, 0, 0) set_boot_hart(tree, overlay) set_ecc_scrub(tree, overlay) ram, itim = get_rams(tree) # If no RAM exists, put everything in the testram if ram is None: ram = bootrom set_rams(overlay, ram, itim)
def generate_overlay(tree, overlay): """Generate the overlay""" attach_testrams(tree, overlay) bootrom = get_boot_rom(tree) if bootrom is not None: set_entry(overlay, bootrom, 0, 0) set_boot_hart(tree, overlay) ram, itim = get_rams(tree) # If no RAM exists, put everything in the testram if ram is None: ram = bootrom # Do scrub If ROM and RAM is not the same node if get_reference(bootrom) != get_reference(ram): set_ecc_scrub(tree, overlay) set_rams(overlay, ram, itim)