Tartarus changed the topic of #u-boot to: SOURCE MOVED TO https://source.denx.de/u-boot/u-boot.git / U-Boot v2025.07, v2025.10-rc2 are OUT / Merge Window is CLOSED, next branch is OPEN / Release v2025.10 is scheduled for 06 October 2025 / Channel archives at https://libera.irclog.whitequark.org/u-boot
mmu_man has joined #u-boot
qschulz has quit [Remote host closed the connection]
qschulz has joined #u-boot
crb has quit [Quit: This computer has gone to sleep]
mmu_man has quit [Ping timeout: 245 seconds]
jclsn has quit [Ping timeout: 272 seconds]
jclsn has joined #u-boot
persmule has quit [Ping timeout: 240 seconds]
persmule has joined #u-boot
kata has quit [Read error: Connection reset by peer]
kata has joined #u-boot
pigmoral has quit [Remote host closed the connection]
per1cycle has quit [Remote host closed the connection]
clamor has joined #u-boot
alpernebbi has quit [Ping timeout: 260 seconds]
dsimic has quit [Ping timeout: 244 seconds]
persmule has quit [Remote host closed the connection]
alpernebbi has joined #u-boot
clamor has quit [Ping timeout: 244 seconds]
clamor has joined #u-boot
gsz has joined #u-boot
_whitelogger has joined #u-boot
clamor has quit [Read error: Connection reset by peer]
warpme has joined #u-boot
clamor has joined #u-boot
leah has quit [Remote host closed the connection]
leah has joined #u-boot
goliath has joined #u-boot
clamor has quit [Ping timeout: 255 seconds]
clamor has joined #u-boot
clamor has quit [Ping timeout: 244 seconds]
clamor has joined #u-boot
ikarso has joined #u-boot
steffen[m]_ has joined #u-boot
warpme has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<marex> +memory@0 {
<marex> +reg = <0 0x1000000 0 0x3f000000>;
<marex> this is a contradiction ... both node unit and reg should match
<marex> i.e. memory@0 { reg = <0 0 ....>; }; ... or memory@1000000 { reg = <0 0x10000000 ... >; };
<marex> i.e. memory@0 { reg = <0 0 ....>; }; ... or memory@1000000 { reg = <0 0x1000000 ... >; };
<marex> got one extra zero there, sorry
<marex> I think in your case, what you really do want is reserved-memory {} node
<marex> i.e. memory@0 { reg = <0 0 0 0x40000000>; }; reserved-memory { stuff@0 { reg = <0 0 0 0x1000000>; }; };
steffen[m]_ has quit [Remote host closed the connection]
steffen[m]_ has joined #u-boot
<dujem> marex: tried the reserved-memory approach, it again dies at "DRAM:", this is what debug logs show:
<dujem> Model: Samsung Galaxy Core Prime VE LTE
<dujem> DRAM: common/malloc_simple.c:26- alloc_simple() size=30, ptr=578, limit=2000: 100023a8
<dujem> common/malloc_simple.c:26- alloc_simple() size=60, ptr=5d8, limit=2000: 100023d8
steffen[m]_ has quit [Remote host closed the connection]
steffen[m]_ has joined #u-boot
steffen[m]_ has quit [Remote host closed the connection]
steffen[m]_ has joined #u-boot
LainIwakura has joined #u-boot
clamor has quit [Ping timeout: 252 seconds]
<marex> dujem: you might want to check if that reserved-memory node gets carved out of U-Boot view of DRAM in the first place
clamor has joined #u-boot
qqe has joined #u-boot
mmu_man has joined #u-boot
<dujem> looks like ill be "borrowing" another function from mach-snapdragon
slobodan has joined #u-boot
slobodan has quit [Read error: Connection reset by peer]
slobodan has joined #u-boot
clamor has quit [Ping timeout: 255 seconds]
slobodan_ has joined #u-boot
slobodan_ has quit [Read error: Connection reset by peer]
clamor has joined #u-boot
slobodan has quit [Ping timeout: 244 seconds]
slobodan has joined #u-boot
slobodan has quit [Remote host closed the connection]
LainIwakura has quit [Quit: Client closed]
slobodan has joined #u-boot
zsoltiv_ has joined #u-boot
<marex> dujem: check for generic implementation, or add it if its still missing
<dujem> marex: nevermind that. it seems that whenever these first 16M are touched in any way everything breaks, even if its just to mark that region as PTE_TYPE_FAULT
<marex> dujem: maybe there is some prior stage bootloader that configures some MMU tables to protect that region ?
<dujem> there is a 1st stage bootloader, but i do not have its source code nor any idea what exactly it does
<dujem> the closest thing i have is an ancient u boot fork for a sbc based on the same soc
<dujem> s/a/an
<marex> dujem: is this arm32 or arm64 ?
<dujem> arm64
<marex> stick this somewhere into your misc init or arch init or somewhere where it will get called
<marex> printf("EL: %d\n", current_el());
<marex> what does it print ... EL2 I guess ?
<dujem> indeed
<marex> so probably the prior stage bootloader configured some protection on this area
<dujem> in that case i guess it is best to do memory@1000000?
<marex> dujem: memory@0 which describes 1 GiB of DRAM + reserved-memory to eliminate the inaccessible bit
slobodan_ has joined #u-boot
<dujem> that just breaks boot completely
slobodan has quit [Ping timeout: 252 seconds]
<dujem> also tried mmu_change_region_attr(0, 0x1000000, PTE_TYPE_FAULT); in dram_init() just before fdtdec_setup_mem_size_base(), doesnt change anything
pigmoral has joined #u-boot
<dujem> hm, i moved that call to a new enable_caches() and now it prints 'PTE 000000003fff0000 (0) for addr=0 should be a table', might be getting somewhere
<marex> if you are configuring MMU, that has to happen before cache config , because cachable regions are described in MMU tables
<dujem> wow, i finally got it working
<dujem> turns out i had to change CFG_SYS_SDRAM_BASE from 1000000 to 0
<dujem> now i could see is it maybe possible to access that region after all
<dujem> ah, it is not
zen_desu has quit [Server closed connection]
zen_desu has joined #u-boot
goliath has quit [Quit: SIGSEGV]
<marex> dujem: see this
<marex> board/xilinx/common/board.c: reg = get_mem_top(gd->ram_base, gd->ram_size, size,
<marex> common/memtop.c:phys_addr_t get_mem_top(phys_addr_t ram_start, phys_size_t ram_size,
<marex> common/memtop.c: /* process reserved-memory */
<marex> common/memtop.c: nodeoffset = fdt_subnode_offset(fdt_blob, 0, "reserved-memory");
<marex> dujem: you will need to replicate that in your board_get_usable_ram_top()
<marex> except in your case, it is more like a ... usable ram bottom
<marex> see common/board_f.c -> setup_dest_addr() , that's where board_get_usable_ram_top() is called from
<marex> you could try and implement similar function for gd->ram_base assignment
<dujem> wdym? everything is working perfectly now
<marex> oh ... hum, OK then
<dujem> only way that reserved region could get accessed is by explicitly using the md command
<marex> dujem: then the prior stage bootloader must have mapped it as device memory
persmule has joined #u-boot
___nick___ has joined #u-boot
mmu_man has quit [Ping timeout: 272 seconds]
mmu_man has joined #u-boot
ikarso has quit [Quit: Connection closed for inactivity]
warpme has joined #u-boot
clamor has quit [Ping timeout: 252 seconds]
chili-b has quit []
chili-b has joined #u-boot
clamor has joined #u-boot
zumbi has quit [Server closed connection]
warthog9 has quit [Server closed connection]
zumbi has joined #u-boot
clamor has quit [Ping timeout: 252 seconds]
clamor has joined #u-boot
persmule has quit [Remote host closed the connection]
persmule has joined #u-boot
warthog9 has joined #u-boot
haritz has joined #u-boot
haritz has quit [Changing host]
haritz has joined #u-boot
mmu_man has quit [Ping timeout: 252 seconds]
mmu_man has joined #u-boot
warpme has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
steffen[m]_ has quit [Remote host closed the connection]
balejk has joined #u-boot
jdiez has quit [Server closed connection]
jdiez has joined #u-boot
mmu_man has quit [Ping timeout: 252 seconds]
qqe has quit [Quit: Lost terminal]
mmu_man has joined #u-boot
clamor has quit [Ping timeout: 248 seconds]
clamor has joined #u-boot
gsz has quit [Ping timeout: 244 seconds]
clamor has quit [Read error: Connection reset by peer]
___nick___ has quit [Ping timeout: 272 seconds]
rvalue- has joined #u-boot
rvalue has quit [Ping timeout: 255 seconds]
rvalue- is now known as rvalue
mmu_man has quit [Read error: Connection reset by peer]
slobodan_ has quit [Ping timeout: 252 seconds]