AGESA code have two mechanisms to run tasks on AP cores. The first one is used before "Relinquish control of APs", and the second one is used after it.
I doubt in the second one, cause it is used only in probe filter initialization (and now OS can't boot with this feature)
I walked "RunLateApTaskOnAllAPs(..)" function [the second mechanism] step by step and didn't find of how system transmits task poinetrs to APs. It seems like code executes on BSC (boot strap core) as many times as APs present in system.
AGESA code is very complicated, we traveles a lot to final function, that is located in the same file. If someone look at code, I drew little scheme of this travel. Here it is: http://tinypic.com/r/25sx7p3/6 Maybe i'am missing something, but I can't see the point, where agesa transmits pointers to APs.
Also i put LibAmdMsrRead function in DisableAllCaches function and read MSRs containing NodeId and BSC bits. And for all cases of its execution DisableAllCaches prints that NodeId=0 and BSC=1. If i didn't mess up, it proves my theory above.
So... How does "RunLateApTaskOnAllAPs(..)" work?
______________ Aladyshev Konstantin
Am Donnerstag, den 07.03.2013, 20:53 +0400 schrieb Аладышев Константин:
AGESA code have two mechanisms to run tasks on AP cores. The first one is used before "Relinquish control of APs", and the second one is used after it.
I doubt in the second one, cause it is used only in probe filter initialization (and now OS can't boot with this feature)
I walked "RunLateApTaskOnAllAPs(..)" function [the second mechanism] step by step and didn't find of how system transmits task poinetrs to APs. It seems like code executes on BSC (boot strap core) as many times as APs present in system.
AGESA code is very complicated, we traveles a lot to final function, that is located in the same file. If someone look at code, I drew little scheme of this travel. Here it is: http://tinypic.com/r/25sx7p3/6 Maybe i'am missing something, but I can't see the point, where agesa transmits pointers to APs.
Also i put LibAmdMsrRead function in DisableAllCaches function and read MSRs containing NodeId and BSC bits. And for all cases of its execution DisableAllCaches prints that NodeId=0 and BSC=1. If i didn't mess up, it proves my theory above.
So... How does "RunLateApTaskOnAllAPs(..)" work?
In the #coreboot IRC channel, Aladyshev pointed out that coreboot uses AGESA version 1.2 and the proprietary vendor BIOS of his Supermicro boards uses AGESA version 1.5. So it might be a good idea to check the changes between these versions.
Thanks,
Paul
Paul Menzel wrote:
coreboot uses AGESA version 1.2 and the proprietary vendor BIOS of his Supermicro boards uses AGESA version 1.5. So it might be a good idea to check the changes between these versions.
What do you mean? It's not like someone is secretly sitting on 1.5 and can do that comparison. If AMD could contribute 1.5 easily I expect that they would already have done so.
If you're saying that you hope that AMD (and all other vendors) will eventually find a good rhythm for more continuous contributions then I guess everyone agrees that that would be great.
//Peter
Am Freitag, den 08.03.2013, 12:23 +0100 schrieb Peter Stuge:
Paul Menzel wrote:
coreboot uses AGESA version 1.2 and the proprietary vendor BIOS of his Supermicro boards uses AGESA version 1.5. So it might be a good idea to check the changes between these versions.
What do you mean? It's not like someone is secretly sitting on 1.5 and can do that comparison. If AMD could contribute 1.5 easily I expect that they would already have done so.
True.
If you're saying that you hope that AMD (and all other vendors) will eventually find a good rhythm for more continuous contributions then I guess everyone agrees that that would be great.
Of course I meant the latter. Sorry for my phrasing.
Thanks,
Paul
On Thu, Mar 7, 2013 at 9:53 AM, Аладышев Константин kostr22@rambler.ru wrote:
AGESA code have two mechanisms to run tasks on AP cores. The first one is used before "Relinquish control of APs", and the second one is used after it.
I doubt in the second one, cause it is used only in probe filter initialization (and now OS can't boot with this feature)
I walked "RunLateApTaskOnAllAPs(..)" function [the second mechanism] step by step and didn't find of how system transmits task poinetrs to APs. It seems like code executes on BSC (boot strap core) as many times as APs present in system.
AGESA code is very complicated, we traveles a lot to final function, that is located in the same file. If someone look at code, I drew little scheme of this travel. Here it is: http://tinypic.com/r/25sx7p3/6 Maybe i'am missing something, but I can't see the point, where agesa transmits pointers to APs.
Also i put LibAmdMsrRead function in DisableAllCaches function and read MSRs containing NodeId and BSC bits. And for all cases of its execution DisableAllCaches prints that NodeId=0 and BSC=1. If i didn't mess up, it proves my theory above.
So... How does "RunLateApTaskOnAllAPs(..)" work?
Aladyshev Konstantin
coreboot mailing list: coreboot@coreboot.org http://www.coreboot.org/mailman/listinfo/coreboot
I traced the calls and I agree with you. There is a bug here. AGESA handles the early AP init, but the later init (post memory setup) uses the callout BiosRunFuncOnAp and it is only running on the BSC, not being directed to the APs. The re-entry point in AGESA is AmdLateRunApTaskWrapper. That function clearly states:
; Purpose: ; This entry point is tightly connected with the "AgesaRunFcnOnAp" ; call out. The AGESA software will call the call-out "AgesaRunFcnOnAp"; ; the host environment will then call this entry point to have the AP ; execute the requested function. This is needed late in the Post and ; Resume branches for running an AP task since the AGESA software has ; relinquished control of the APs to the host environment. ; ; Dependencies: ; The host environment must implement the"AgesaRunFcnOnAp" call-out ; and route execution to the target AP.
The coreboot wrapper BiosRunFuncOnAp isn't doing the AP setup and execution. This needs to be addressed.
Note, this problem doesn't manifest on APU systems, just multi-node systems like fam15.
Marc