ChanServ changed the topic of #armlinux to: ARM kernel talk [Upstream kernel, find your vendor forums for questions about their kernels] | https://libera.irclog.whitequark.org/armlinux
hanetzer has quit [Ping timeout: 272 seconds]
prabhakarlad has quit [Ping timeout: 245 seconds]
heat has quit [Ping timeout: 246 seconds]
hanetzer has joined #armlinux
apritzel_ has quit [Ping timeout: 245 seconds]
nsaenz has joined #armlinux
jclsn has quit [Ping timeout: 260 seconds]
jclsn has joined #armlinux
sakman has joined #armlinux
cbeznea has joined #armlinux
hanetzer has quit [Ping timeout: 260 seconds]
hanetzer has joined #armlinux
hanetzer has quit [Ping timeout: 255 seconds]
hanetzer has joined #armlinux
monstr has joined #armlinux
ezulian_ has joined #armlinux
apritzel_ has joined #armlinux
monstr has quit [Ping timeout: 245 seconds]
Nact has joined #armlinux
apritzel_ has quit [Ping timeout: 255 seconds]
ezulian_ has quit [Quit: ezulian_]
gclement has joined #armlinux
frieder has joined #armlinux
iivanov has joined #armlinux
ezulian has joined #armlinux
monstr has joined #armlinux
rgallaispou has joined #armlinux
luispm has quit [Ping timeout: 260 seconds]
sszy has joined #armlinux
prabhakarlad has joined #armlinux
elastic_dog has quit [Ping timeout: 258 seconds]
elastic_dog has joined #armlinux
luispm has joined #armlinux
headless has joined #armlinux
nsaenz has quit [Remote host closed the connection]
headless has quit [Quit: Konversation terminated!]
heat has joined #armlinux
cbeznea_ has joined #armlinux
cbeznea has quit [Ping timeout: 245 seconds]
heat has quit [Ping timeout: 258 seconds]
matthias_bgg has quit [Ping timeout: 258 seconds]
matthias_bgg has joined #armlinux
MWelchUK7 has quit [Quit: The Lounge - https://thelounge.chat]
MWelchUK7 has joined #armlinux
MWelchUK7 has quit [Client Quit]
prabhakarlad has quit [Quit: Client closed]
Amit_T has joined #armlinux
apritzel_ has joined #armlinux
cbeznea has joined #armlinux
cbeznea_ has quit [Ping timeout: 245 seconds]
matthias_bgg has quit [Ping timeout: 272 seconds]
iivanov has quit [Remote host closed the connection]
iivanov has joined #armlinux
prabhakarlad has joined #armlinux
MWelchUK7 has joined #armlinux
apritzel_ has quit [Ping timeout: 260 seconds]
deathcamel57 has joined #armlinux
<deathcamel57> I'm working on a linux port for a niche SoC that's not supported. I'm struggling to get my IRQ chip initialized. `irqchip_init` is called on a `arm,pl390` compatible GIC, even though I have the GIC in the DTSI set as compatible with `arm,cortex-a9-gic`. I have `CONFIG_ARM_GIC` set as well. Any pointers on where I can look to figure out why it's not initializing my GIC?
Nact has quit [Quit: Konversation terminated!]
<geertu> deathcamel57: arm,cortex-a9-gic or arm,pl390 shouldn't matter much, as all GICs are initialized using the same entry point gic_of_init()
<deathcamel57> geertu: Changing the compatible string to `arm,pl390` results in `of_irq_init` looking for a compatible string `arm,pl390`, but the `for_each_matching_node_and_match` isn't finding it for some reason.
heat has joined #armlinux
headless has joined #armlinux
<maz> deathcamel57: please post your DTS somewhere so that we can have a look.
<deathcamel57> maz: https://pastebin.com/K5nwUgp1 It's a total mess, it's my first time trying to port linux. Lines 35-44 are GIC.
<maz> looks OK to me. not sure what you mean about `for_each_matching_node_and_match`, as there is no such code in the GIC driver.
monstr has quit [Remote host closed the connection]
<maz> ah no, you
<maz> ah no, you're on about irqchip_init()
<deathcamel57> So I added a bunch of debugging messages. `init_IRQ` -> `irqchip_init` -> `of_irq_init`. `of_irq_init` has a `for_each_matching_node_and_match` that I'm pretty sure is supposed to scan for matching GICs. However, it's not finding any, and completely skips the `for_each_matching_node_and_match` section.
<geertu> deathcamel57: If you want to be sure about the exact tGIC type, you can read the GIC_DIST_IIDR address at offset 8 from e.g. U-Boot
<mrutland> Are you sure that kernel's getting the right DT?
<mrutland> If it's not getting into the body of for_each_matching_node_and_match(), then either there's no matching node in the DT, or the match table is messed up somehow
prabhakarlad has quit [Quit: Client closed]
<deathcamel57> I'm using this in U-Boot to load in the DTB from a flash drive `fatload usb 0 0x82000000 uImage; fatload usb 0 0x83000000 hi3520dv200-demb.dtb;bootm 0x82000000 - 0x83000000`. The `DT_MACHINE_START`->`.dt_compat` contains `hisilicon,hi3520dv200-demb` and my DTS for the board contains that string as well. Is there anything else I should look into to see if the DTB is the right one?
<deathcamel57> `setup_machine_fdt` returns `NULL` due to `if (!dt_virt || !early_init_dt_verify(dt_virt))` being true. So maybe my device tree isn't loading?
<mrutland> That's possible, or the DTB might be too close to the kernel and be getting clobbered during boot?
<mrutland> Either way, the kernel isn't finding a valid DTB
<deathcamel57> Moving the kernel address to earlier in memory has the same issue. Is the command I'm using in U-Boot accurate to load in the uImage and DTB, then boot the kernel properly?
iivanov has quit [Quit: Leaving]
gclement has quit [Ping timeout: 264 seconds]
Perflosopher has quit [Read error: Connection reset by peer]
<geertu> deathcamel57: hat if you move the DTB to 0x81000000?
<geertu> s/hat/what/
<deathcamel57> Unfortunately `fdt_check_early_init_dt_verify` still returns false because `fdt_check_header` does
Perflosopher has joined #armlinux
frieder has quit [Remote host closed the connection]
rgallaispou has quit [Quit: Leaving.]
<deathcamel57> Kind of confused, since inspecting `0x81000000` after loading it from USB, that address does contain the DTB. However when starting the kernel with `bootm 0x83000000 - 0x81000000`, the kernel can't find it.
punit has quit [Remote host closed the connection]
deathcamel57 has quit [Read error: Connection reset by peer]
deathcamel57 has joined #armlinux
apritzel has quit [Ping timeout: 258 seconds]
<deathcamel57> So I think I'm getting closer. `fdt_check_header` gives `FDT_ERR_BADMAGIC`. My device stores the data in little endian, and I think the kernel is loading the DTB in the wrong endian? Doing a memory inspect, I can see that memory holds `0xedfe0dd0`, whereas linux is expecting `0xd00dfeed`. How can I go about swapping the endian that the kernel is looking for?
luispm has quit [Ping timeout: 260 seconds]
<silurian_invader> deathcamel57: devicetree is always big-endian; if you have a little-endian machine the above is correct, since the kernel will automatically perform byte-swapping as necessary
heat_ has joined #armlinux
heat has quit [Read error: Connection reset by peer]
heat_ is now known as heat
heat has quit [Remote host closed the connection]
heat has joined #armlinux
prabhakarlad has joined #armlinux
Amit_T has quit [Quit: Leaving]
cbeznea has quit [Ping timeout: 255 seconds]
mal`` has quit [Quit: Leaving]
amitk has quit [Ping timeout: 252 seconds]
mal`` has joined #armlinux
sszy has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
apritzel_ has joined #armlinux
headless has quit [Quit: Konversation terminated!]
deathcamel57 has quit [Read error: Connection reset by peer]
deathcamel57_ has joined #armlinux