Tartarus changed the topic of #u-boot to: SOURCE MOVED TO https://source.denx.de/u-boot/u-boot.git / U-Boot v2023.01, v2023.04-rc2 / Merge Window is CLOSED, next branch is OPEN / Release v2023.04 is scheduled for 2023-04-03 / Channel archives at https://libera.irclog.whitequark.org/u-boot
apritzel_ has quit [Ping timeout: 248 seconds]
Wouter010067044 has quit [Quit: The Lounge - https://thelounge.chat]
Wouter010067044 has joined #u-boot
camus has joined #u-boot
hanetzer has quit [Ping timeout: 248 seconds]
hanetzer has joined #u-boot
thopiekar_ has quit [Ping timeout: 268 seconds]
thopiekar has joined #u-boot
alan_o has quit [Remote host closed the connection]
alan_o has joined #u-boot
alan_o has quit [Remote host closed the connection]
alan_o has joined #u-boot
alan_o has quit [Ping timeout: 260 seconds]
alan_o has joined #u-boot
alan_o has quit [Remote host closed the connection]
alan_o has joined #u-boot
alan_o has quit [Ping timeout: 248 seconds]
mmu_man has quit [Ping timeout: 255 seconds]
alan_o has joined #u-boot
alan_o has quit [Ping timeout: 260 seconds]
alan_o has joined #u-boot
mrnuke has quit [Ping timeout: 255 seconds]
mrnuke has joined #u-boot
mrnuke has quit [Ping timeout: 255 seconds]
mrnuke has joined #u-boot
davlefou has quit [Ping timeout: 252 seconds]
davlefou has joined #u-boot
torez has joined #u-boot
ikarso has joined #u-boot
Wouter010067044 has quit [Quit: The Lounge - https://thelounge.chat]
Wouter010067044 has joined #u-boot
goliath has joined #u-boot
naoki has quit [Quit: naoki]
mncheck has joined #u-boot
guillaume_g has joined #u-boot
goliath has quit [Quit: SIGSEGV]
apritzel_ has joined #u-boot
ccf has joined #u-boot
<ccf> Current master fails to compile when CONFIG_SPL_OPTEE_IMAGE=y, see here: https://pastebin.com/Z85dqBaz it's an Assembler message, any ideas? Board is rk3399.
apritzel_ has quit [Ping timeout: 268 seconds]
Michael23 has joined #u-boot
mckoan|away is now known as mckoan
vagrantc has quit [Quit: leaving]
zPlus has quit [Ping timeout: 248 seconds]
frieder has joined #u-boot
goliath has joined #u-boot
ikarso has quit [Quit: Connection closed for inactivity]
<indy> hi all, is there any example of loading image using u-boot when pcie is in endpoint mode? i would like to load kernel from host passed to pcie 'device' as firmware (if it is possible with u-boot)
<indy> i'm playing with rk3399 with pcie as endpoint
<ccf> indy: I have no clue, but wow, that sounds so cool! I have seen some mails on linux-kernel-mailinglist regarding RK3399 PCIe endpoint controller driver. Are you involved there?
<indy> ccf, trying to jump on train :) asked author for wiring guide with regard to rk3399 as i've found only https://www.elinux.org/RZ-G/RZG2_pcie_ep
apalos has joined #u-boot
apritzel has joined #u-boot
<indy> i've found this - https://source.denx.de/u-boot/u-boot/-/tree/master/drivers/pci_endpoint but no board/soc using it
Michael23 has quit [Ping timeout: 260 seconds]
<apalos> sjg1: I tried re-using the existing API as you suggested.
<apalos> However since theinit sequences in tpm1.2 and 2.0 are quite different, the code ends up looking ugluer imho
<apalos> Since you need to check return values against tpmv2 tpm 1.2 etc
<apalos> Adding another function to the API looks much cleaner to me
naoki has joined #u-boot
Michael23 has joined #u-boot
sszy has joined #u-boot
Leopold has quit [Ping timeout: 255 seconds]
Leopold has joined #u-boot
d-s-e has joined #u-boot
Algotech has quit [Ping timeout: 252 seconds]
Algotech has joined #u-boot
rockworld has quit [Quit: it was nice to meet you peace]
mmu_man has joined #u-boot
prabhakarlad has quit [Quit: Client closed]
prabhakarlad has joined #u-boot
apalos has quit [Quit: ZNC 1.7.2 - https://znc.in]
apalos has joined #u-boot
stefanro has quit [Ping timeout: 248 seconds]
apalos has quit [Quit: ZNC 1.7.2 - https://znc.in]
rockworld has joined #u-boot
apalos has joined #u-boot
stefanro has joined #u-boot
d-s-e has quit [Ping timeout: 246 seconds]
vfazio__ is now known as vfazio
mckoan is now known as mckoan|away
d-s-e has joined #u-boot
mmu_man has quit [Ping timeout: 246 seconds]
mmu_man has joined #u-boot
rvalue has quit [Read error: Connection reset by peer]
rvalue has joined #u-boot
monstr has joined #u-boot
Michael23 has quit [Quit: Client closed]
<sjg1> apalos: I will send a patch on top of your series showing what I mean
<sjg1> apalos: One question is whether we should always do a self test. I thought that was just done at the factory?
<apalos> we should always do a self test
torez has quit [Quit: torez]
<apalos> sjg1: ^^. What the self test does is prepare the hardware for extra functionality
<apalos> The details are in my commit message
<apalos> because the tpm will return an error code saying "you need to do self tests is you want to run crypt alg X"
<apalos> But we dont check for that error code
<apalos> and tbh we shouldnt, the self tests are usually fast, so perform them unconditionally
<apalos> and get over with it
<apalos> Now with tpm 1.2 the init sequence is difference that what you have in that WIP patch
<apalos> You just need toi perform the self-test
<apalos> But my whole point is that *using* API functions for the auto start is gonna look ugly
<apalos> We are way better of just defining an extra API function
torez has joined #u-boot
<apalos> So I can send a PR to Tom, with my changes and the work together on that WIP you have
<sjg1> The problem with self test is that it can take a while, several hundred milliseconds, sometimes longer. So we can't do this on every boot, unless we are using UEFI where it doesn't matter :-)
<sjg1> How long does your TPMv2 take to do the self test?
GNUtoo_ has quit [Remote host closed the connection]
GNUtoo has joined #u-boot
vagrantc has joined #u-boot
<apalos> sjg1: I havent measured, but in definitely less than 1 sec
<apalos> sjg1: the alternative is teach u-boot's core to run the selftests, if that erro code is returned
<apalos> As far as boot times are concerned, stay tuned,
<apalos> there's going to a presentation in Linaro connect about boot times on EFI
<sjg1> apalos: So long as you are just wanting this for EFI I really don't mind how long it takes. We can add a full self test every time. But is tpm_auto_start() the right name in that case? Perhaps tpm_first_start() ?
<sjg1> apalos: Bear in mind that 1000ms is the total time taken for ChromeOS firmware to get to kernel handoff. It is a long time.
<apalos> sjg1: it only plugs in EFI for now
<apalos> it's actually 'auto_startup', because that's the proper way to init a TPM
<apalos> I also added the tests you asked for
<apalos> And as I said, I am happy to help and improve testing + speed
<apalos> What I dont like, is being asked to rewrite half of the API :>
<apalos> I already did that for the drivers, and unfortunately I am drowing in other stuff
<apalos> So If we can take one step at a time I am fine
prabhakarlad has quit [Ping timeout: 260 seconds]
<xypron> sjg1: we should enable all tests on the sandbox. If you don't want them on your local machine, doable them locally.
goliath has quit [Quit: SIGSEGV]
<xypron> disable
mmu_man has quit [Ping timeout: 255 seconds]
<sjg1> apalos: If that is what you want auto_startup to be, it is fine with me. I will update my patch to add a full self test for TPMv1 too. But note that we probably cannot use this in general, due to the effect on boot time
mmu_man has joined #u-boot
<apalos> you want me to send a PR to Tom with my patches?
<apalos> If yes please have a look and tell me, I also had to change the sandbox tpm2 error code, to match the other drivers
<sjg1> apalos: I want it supported in tpmv1 as well, so please hold off until we sort that out. If you OK with the changes I can turn them into patches (will add self test)
<sjg1> apalos: As to changing half the API, I could about 35 functions at present. Your series adds a new one, but doesn't change anything else. My patch doesn't touch it. Are you talking about something else?
<apalos> no I mean having add more code to sandbox etc, since 1.2 wasn't supported
<apalos> the one new function in the API is actually needed as i said
<apalos> Becuase if we go down the path you suggested on calling api functions for selftest etc, we will end up with spaghetti code
<apalos> simply because 1.2 vs 2.o have a different init sequence
<apalos> I'll respond to your email
<sjg1> apalos: OK. I just don't know what to say. The API is the API. We can of course have things that cannot be supported. But we should not add functions that can easily be supported on both, but we don't want to...
<sjg1> apalos: I think it is reasonable to add more tests to tpm.c as my patch does
<sjg1> xypron: Yes, at present a lot of the tests are in the 'tpmtest' command. Many of them could usefully be brought over to test/dm/tpm.c without a lot of effort. Some of them would be harder
d-s-e has quit [Ping timeout: 248 seconds]
<apalos> sjg1: yes it is
<apalos> sjg1: we are saying different things on the API
<apalos> On an older comment you told me to use the API existing functions instead of creating a new one
<apalos> What I am trying to explain is that with the different return codes of tpm_self_test_full() doing so would look really ugly
<apalos> because the *selftest* command returns completely differnt results
<apalos> So you either abstract the rerutn codes in an internal u-boot API
<apalos> Or you just keep those specific in the equivalent subsystem,
<sjg1> apalos: We are just not communicating properly. I didn't want you to use existing API functions. I just wanted you to implement it for tpm v1 and v2. It is fine to add a new API function, of course
<sjg1> apalos: By adding a new API which collates several things, you are creating the necessity for handling these different return codes. So long as it is documented, it seems fine to me
<sjg1> apalos: You are wanting a way to start the TPM even if it has never been provisioned, a way to handle it no matter what state it is in. That seems fine to me. I am solely objecting to your saying that you don't have time to implement it for TPMv1
<sjg1> apalos: That is why I sent my patch
<apalos> sjg1: you literally replied
<apalos> Again, tpm_self_test_full(). We are trying to provide a TPM API that
<apalos> covers v1 and v2, to the extent possible.
monstr has quit [Remote host closed the connection]
<apalos> So i assumed you want to re-use existing functions, which isnt really doable here :>
mmu_man has quit [Ping timeout: 252 seconds]
<apalos> and it's not only time,
<sjg1> apalos: Oh....I did change it to call tpm_init() at the API level, since both v1 and v2 call that. Beyond that, each one has to have its own impl
<apalos> yea i never said anything about the init though
<apalos> That does make sense,
<apalos> Anyway< not gonna argue about that
<apalos> My problem is that we are adding a tpm_auto_start which isnt equivalent with 1.2 vs 2
<apalos> and what I said is that my main problem is that i dont have a *device* to test that
<apalos> So I didnt want to add that code,
d-s-e has joined #u-boot
guillaume_g has quit [Quit: Konversation terminated!]
<apalos> sjg1: I can pick it up and resend it with my series btw
<apalos> Or just send it and i'll prepare a PR with both
naoki has quit [Quit: naoki]
Wouter010067044 has quit [Quit: The Lounge - https://thelounge.chat]
sszy has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
Wouter010067044 has joined #u-boot
<sjg1> apalos: OK, afk for a while...one of my patches modifies one of yours, but apart from that I can patchify it and send later on
frieder has quit [Remote host closed the connection]
<apalos> sjg1: that's ok, just name yours "add tpm1.2" support and I am ok
<sjg1> ok
<apalos> As long as we introcude and intermediate build failures (which we dont)
<apalos> I dont mind people changing or moving my code around :)
goliath has joined #u-boot
<apalos> we dont introduce* obviously
pgreco_ has quit [Quit: ZNC 1.8.2 - https://znc.in]
d-s-e has quit [Quit: Konversation terminated!]
hanetzer has quit [Ping timeout: 268 seconds]
hanetzer has joined #u-boot
pgreco has joined #u-boot
apritzel has quit [Ping timeout: 260 seconds]
<vagrantc> sjg1: so, i'm not even able to get rockpro64-rk3399 to boot at all ... hangs at ...
<vagrantc> U-Boot SPL 2023.04-rc2+dfsg-1 (Feb 15 2023 - 22:00:22 +0000)
<vagrantc> Trying to boot from MMC2
<vagrantc> pinebook-pro-rk3399 gets considerably farther
<sjg1> vagrantc: Same here...there is a series posted though -see https://patchwork.ozlabs.org/project/uboot/list/?series=342582
<sjg1> vagrantc: Have not tried it yet
<sjg1> apalos: OK will get to it laterr or more likely tomorrow morning
<vagrantc> i think i have at least one more rk3399 to test ...
tafama is now known as tafa
tafa has quit [Quit: ZNC - https://znc.in]
tafa has joined #u-boot
tafa is now known as help
help is now known as tafa
WoC has quit [Remote host closed the connection]
Leopold has quit [Remote host closed the connection]
WoC has joined #u-boot
apritzel_ has joined #u-boot
Wouter010067044 has quit [Quit: The Lounge - https://thelounge.chat]
Wouter010067044 has joined #u-boot
Leopold has joined #u-boot
prabhakarlad has joined #u-boot
naoki has joined #u-boot
mmu_man has joined #u-boot
<sjg1> apalos: OK I sent the two patches
advi[1] has joined #u-boot
ccf has quit [Ping timeout: 264 seconds]
Gravis_ is now known as Gravis
torez has quit [Quit: torez]
goliath has quit [Quit: SIGSEGV]