Opened 10 years ago

Closed 10 years ago

Last modified 10 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
Has a Patch: no Platform: PowerPC

Description

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 10 years ago.
proposed patch

Download all attachments as: .zip

Change History (5)

Changed 10 years ago by andreasf

Attachment: kernel_arg_cpu.diff added

proposed patch

comment:1 Changed 10 years ago by kallisti5

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

comment:2 Changed 10 years ago by stippi

Resolution: fixed
Status: newclosed

Applied in hrev34854. Thanks a lot!

comment:3 Changed 10 years ago by stippi

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 Changed 10 years ago by kallisti5

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.