Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#5182 closed bug (fixed)

[PATCH] boot_loader_openfirmware: Fix second kernel argument

Reported by: andreasf Owned by: axeld
Priority: blocker Milestone: R1
Component: System/Boot Loader Version: R1/Development
Keywords: Cc: kallisti5
Blocked By: Blocking: #1048
Platform: PowerPC


The kernel's entry function _start expects as second argument an int currentCPU.

The boot loader didn't initialize GPR4, passing its second argument, the kernel entry address, as CPU number, causing smp_cpu_rendezvous to loop forever.

The attached patch initializes it to zero for now.

Attachments (1)

kernel_arg_cpu.diff (505 bytes ) - added by andreasf 11 years ago.
proposed patch

Download all attachments as: .zip

Change History (5)

by andreasf, 11 years ago

Attachment: kernel_arg_cpu.diff added

proposed patch

comment:1 by kallisti5, 11 years ago

works great, tested on G3 Lombard. With the patch above we finally get to the kernel debug prompt on real hardware.

comment:2 by stippi, 11 years ago

Resolution: fixed
Status: newclosed

Applied in hrev34854. Thanks a lot!

comment:3 by stippi, 11 years ago

After commiting it, I just thought one could add a TODO to the code where the CPU index is fixed to 0. It should eventually be adjusted to pass the actual index on an SMP system.

comment:4 by kallisti5, 11 years ago

Thanks for getting on top of this stippi. Your right, a todo might be good there.. we need to throughly comment any workarounds for PPC to make sure their meaning doesn't get lost.

Note: See TracTickets for help on using tickets.