Tartarus changed the topic of #u-boot to: SOURCE MOVED TO https://source.denx.de/u-boot/u-boot.git / U-Boot v2023.04, v2023.07-rc2 are OUT / Merge Window is CLOSED, next branch is OPEN / Release v2023.07 is scheduled for 03 July 2023 / Channel archives at https://libera.irclog.whitequark.org/u-boot
macromorgan has quit [Read error: Connection reset by peer]
macromorgan has joined #u-boot
vagrantc has quit [Quit: leaving]
apritzel_ has quit [Ping timeout: 256 seconds]
qschulz has quit [Read error: Connection reset by peer]
qschulz has joined #u-boot
macromorgan has quit [Read error: Connection reset by peer]
macromorgan has joined #u-boot
mmu_man has quit [Ping timeout: 268 seconds]
prabhakarlad has quit [Quit: Client closed]
persmule has quit [Quit: Leaving]
thopiekar has quit [Ping timeout: 248 seconds]
thopiekar has joined #u-boot
persmule has joined #u-boot
<sjg1> Tartarus: I restarted weka so see how it goes. It might have been overheating but should be cooler now
macromorgan has quit [Read error: Connection reset by peer]
macromorgan has joined #u-boot
wooosaiiii has quit [Quit: wooosaiiii]
wooosaiiii has joined #u-boot
Wouter0100670440 has quit [Quit: The Lounge - https://thelounge.chat]
Wouter0100670440 has joined #u-boot
apritzel_ has joined #u-boot
macromorgan has quit [Read error: Connection reset by peer]
macromorgan has joined #u-boot
apritzel_ has quit [Ping timeout: 240 seconds]
guillaume_g has joined #u-boot
monstr has joined #u-boot
mncheckm has joined #u-boot
goliath has joined #u-boot
mckoan|away is now known as mckoan
macromorgan has quit [Read error: Connection reset by peer]
macromorgan has joined #u-boot
frieder has joined #u-boot
samueldr has quit [Quit: Bridge terminating on SIGTERM]
Tooniis[m] has quit [Quit: Bridge terminating on SIGTERM]
LinuxHackerman has quit [Quit: Bridge terminating on SIGTERM]
jluthra has quit [Quit: Bridge terminating on SIGTERM]
mvaittin has quit [Quit: Bridge terminating on SIGTERM]
csrpi[m] has quit [Quit: Bridge terminating on SIGTERM]
archive[m] has quit [Read error: Connection reset by peer]
Mis012[m] has quit [Quit: Bridge terminating on SIGTERM]
vulpes2[m] has quit [Quit: Bridge terminating on SIGTERM]
sylensky[m] has quit [Quit: Bridge terminating on SIGTERM]
konradybcio[m] has quit [Quit: Bridge terminating on SIGTERM]
ikarso has joined #u-boot
runcom has joined #u-boot
Gravis_ has joined #u-boot
Gravis has quit [Ping timeout: 268 seconds]
sszy has joined #u-boot
ldevulder has joined #u-boot
Leopold has joined #u-boot
LinuxHackerman has joined #u-boot
zibolo has joined #u-boot
Wouter0100670440 has quit [Quit: The Lounge - https://thelounge.chat]
Wouter0100670440 has joined #u-boot
runcom has quit [Remote host closed the connection]
runcom has joined #u-boot
runcom has quit [Read error: Connection reset by peer]
runcom_ has joined #u-boot
runcom has joined #u-boot
runcom_ has quit [Read error: Connection reset by peer]
runcom has quit [Client Quit]
runcom has joined #u-boot
runcom has quit [Read error: Connection reset by peer]
runcom has joined #u-boot
xroumegue has quit [Ping timeout: 240 seconds]
xroumegue has joined #u-boot
runcom has quit [Ping timeout: 240 seconds]
pbergin has joined #u-boot
ldevulder_ has joined #u-boot
ldevulder has quit [Ping timeout: 265 seconds]
mmu_man has joined #u-boot
mmu_man has quit [Ping timeout: 264 seconds]
mmu_man has joined #u-boot
Leopold has quit [Remote host closed the connection]
Leopold has joined #u-boot
runcom has joined #u-boot
ldevulder_ is now known as ldevulder
stefanro has quit [Remote host closed the connection]
stefanro has joined #u-boot
slobodan has joined #u-boot
runcom has quit [Ping timeout: 265 seconds]
torez has joined #u-boot
mvaittin has joined #u-boot
vulpes2[m] has joined #u-boot
sylensky[m] has joined #u-boot
Mis012[m] has joined #u-boot
Tooniis[m] has joined #u-boot
jluthra has joined #u-boot
samueldr has joined #u-boot
archive[m] has joined #u-boot
csrpi[m] has joined #u-boot
konradybcio[m] has joined #u-boot
Wouter0100670440 has quit [Quit: The Lounge - https://thelounge.chat]
Wouter0100670440 has joined #u-boot
matthias_bgg has joined #u-boot
runcom has joined #u-boot
slobodan has quit [Ping timeout: 264 seconds]
runcom has quit [Ping timeout: 264 seconds]
runcom has joined #u-boot
runcom has quit [Ping timeout: 265 seconds]
runcom has joined #u-boot
goliath has quit [Quit: SIGSEGV]
runcom has quit [Ping timeout: 265 seconds]
ladis has quit [Remote host closed the connection]
torez has quit [Remote host closed the connection]
ladis has joined #u-boot
davlefou has quit [Ping timeout: 240 seconds]
monstr has quit [Remote host closed the connection]
davlefou has joined #u-boot
mmu_man has quit [Ping timeout: 240 seconds]
vagrantc has joined #u-boot
mmu_man has joined #u-boot
mmu_man has quit [Ping timeout: 240 seconds]
___nick___ has joined #u-boot
___nick___ has quit [Client Quit]
<apalos> sjg1: I dont really follow any of the arguments in the ML
<apalos> tpm init is faulty right now since you have to call 3 more commands for the device to work
<apalos> And you *must* call them if you want to use the device
<apalos> So tpm_init() as is is pretty useless
<apalos> and noone acounts for the -EBUSY ret code anyway
<apalos> And on top of that it makes the python testing code crap
<apalos> So we should really just get rid of tpm_init to begin with
<apalos> and replace the 'manual' init sequence of 4 u-boot commands with tpm_auto_start
<apalos> also you seem to have the wrong idea about EFI?
___nick___ has joined #u-boot
<apalos> EFI just needs the tpm up and running, It can happen as early as possible
<apalos> In the past you argued (a lot) that the device is 'slow' and we should init it ad-hoc
<apalos> which we now do, but it doesnt matter how many times you call tpm_auto_start()
<apalos> It always does the right thing and only inits the device once, and the overhead --if any-- sahould be minmal
<apalos> but I am trying to keep the changes sort, once we sort out the init mess, I have more patches cleaning up tpm_init() in all code + tests
mmu_man has joined #u-boot
<Tartarus> apalos, xypron: Not a rush, but, some solution to the EFI guid thing with clang will be merged soon I hope? I've put clang+arm in my HW test loops, so I see the warning a lot now :)
<xypron> Tartarus: apalos said he would put reviewed-by on your patch. But I have not seen that yet.
mckoan is now known as mckoan|away
<xypron> Tartarus: If it is so annoying currently, please, merge https://patchwork.ozlabs.org/project/uboot/patch/20230405234859.1446811-9-trini@konsulko.com/.
<Tartarus> xypron: No rush, my script only stops when tests fail
guillaume_g has quit [Quit: Konversation terminated!]
<sjg1> apalos: In my testing, initing the TPM multiple times makes it fail. Why not add a new command for what you want for EFI?
<apalos> xypron: yea my bad i wanted to be sure before I send it
<apalos> will do tomorrow
<apalos> sjg1: because I *dont* want anything for the efi
<apalos> and because tpm init as it is is useles
<apalos> IOW if you do tpm init -> try to do anything with the TPM every command fails
<apalos> Literally
<apalos> In order to use it you need to basically do what tpm_auto_start does
<apalos> So what's the point of having it to begin with ?
<apalos> just to force people use 4 console commands to init the device?
<apalos> test/py/tests/test_tpm2.py for example
<apalos> we call force_init() every single time
<apalos> but that's *exactly* what auto start does
<apalos> so you can instead call 'tpm init' and not get an error code randomly
sszy has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
<sjg1> So just add 'tpm autoinit' ?? I'm just lost as to why you want to change 'tpm init' to do something else? How do you handle suspend/resume? This is just not making any sense so I must be missing something
<apalos> what does suspend resume have to do with tpm init?
frieder has quit [Remote host closed the connection]
mmu_man has quit [Ping timeout: 246 seconds]
<apalos> and what else do you need to make sense apart from 'tpm init' does nothing?
<apalos> tpm init gets called into the python tests as well, and expects a ret code of 0
<apalos> which is not always true, if you call it multiple times you get -EBUSY
<apalos> iow let me reverse the argument. Can you point me to a single piece of code where tpm_init() is useful ?
mmu_man has joined #u-boot
<sjg1> When resuming you must not clear the TPM
<sjg1> Init should "Request access to locality 0 for the caller"
<sjg1> Really init should be called open. It is confusing to have tpm_init() call tpm_open()
<sjg1> close should release the locality
<sjg1> What you are talking about is a TPM operation. I thought you added the autostart to make things work for EFI? So why not add a command? Then people who don't want to put the TPM in this state don't have to.
vagrantc has quit [Ping timeout: 246 seconds]
<sjg1> As soon as you change what tpm_init() means, it breaks the API, since there is no way to open the TPM without it automatically starting itself. E.g. tests which check that behaviour can't work. It just doesn't make sense
<sjg1> What problem are you actually solving?
vagrantc has joined #u-boot
mmu_man has quit [Ping timeout: 265 seconds]
hanetzer has quit [Ping timeout: 256 seconds]
<milkylainen> sjg1: I looked a bit further into packing. It seems the code already does pack? fit_import_data doesn't seem to care about original size?
hanetzer has joined #u-boot
<sjg1> milkylainen: Isn't that for the FIT itself? I am talking about u-boot.dtb or wherever the public key ends up
<milkylainen> sjg1: Hmm.
<milkylainen> sjg1: Isn't this for fit images only? u-boot dtb has extra place for stuff. pubkey gets generated here, but not packed. Ie, it's added the same size as the fit itself during size_inc increases.
redbrain has quit [Read error: Connection reset by peer]
redbrain has joined #u-boot
<apalos> sjg1: as far as close is concerned, we dont even implement it
<apalos> youar argument on "resuming" the tpm is completely moot
<apalos> You cant possibly expect people to resume the TPM on amanual commands right?>
<apalos> If we ever fix it, we should just automate that
<apalos> so again, what does tpm_init() currently does, that is of *any* use
<apalos> the problem I am trying to solve is make the layer look sane to begin with
<apalos> So unless you expect people to interrupt products and do tpm init && tpm tpm startup ST_STATE
<apalos> which makes no sense to begin with, I can see why you even want to keep tpm init as is
<apalos> not to mention that suspend and resume are used on *power management* in an OS
<apalos> not from a bootloader
<apalos> and as far as request locality goes you need to do it on every transaction
<apalos> that's why we have it in _send()
rfs613 has quit [Ping timeout: 256 seconds]
rfs613 has joined #u-boot
<apalos> for example:
<apalos> configs/chromebook_coral_defconfig -> CONFIG_BOOTCOMMAND="tpm init; tpm startup TPM2_SU_CLEAR
<apalos> And that is sprinkled around everywhere. So a reasonable comment would be that I should also clean up some configs
slobodan has joined #u-boot
ikarso has quit [Quit: Connection closed for inactivity]
apritzel_ has joined #u-boot
Gravis_ is now known as Gravis
Wouter0100670440 has quit [Quit: The Lounge - https://thelounge.chat]
Wouter0100670440 has joined #u-boot
vagrantc has quit [Quit: leaving]
<marex> apalos: hey, are you still around to discuss a couple of basic tpm2 questions ?
<marex> apalos: one of them is, should the TPM2 module be zeroed-out (PCRs reset to default values, ie 0 or 0xf) after each OS warm reset ?
<apalos> marex: yes it should
<apalos> unless you tell the tpm to suspend/resume it's operation
___nick___ has quit [Ping timeout: 240 seconds]
<apalos> But I am not aware of any OS/firmware interactions doing that
<marex> apalos: and that requires some sort of HW signal, right ?
<marex> apalos: hehehe, was about to ask that
<apalos> they usually connect the CPU reset line with the CPU one
<apalos> Sorry the CPU reset with the TPM reset*
<marex> well, warm reset doesnt necessarily toggle reset line, but I do see your point
<marex> so ...
<apalos> having the tpm reset on a gpio is not exaclty a best practice, since you can trick the device
<marex> when U-Boot comes up and takes PCR measurements of blobs, the measurements always start with registers in some defined state , like 0 ?
<apalos> yes 0
<marex> apalos: all right, thanks for confirming
<apalos> marex: yw
<apalos> FWIW we are trying to fix some vendor odities
<marex> apalos: does U-Boot already have any built-in non-EFI PCR sampling points ? Or should I do that in a board file for now ?
<marex> I do it in both SPL and UBoot in a board file for now
<apalos> marex, I should have cc'ed you give me a sec
<marex> apalos: just tell me which series :)
<marex> apalos: also, did you work with the ST STM33 TPMs yet ?
<apalos> So when i wrote the tcg code, I only cared about efi and had in that subsystem
<marex> apalos: I mightve been partly CCed on that
<apalos> However the code was intentionally generic enough in case anyone cared to move it into core
<apalos> So Eddie bascailly moved some EFI code around to u-boot proper and now you can measure stuff with bootm
<marex> apalos: well, 4/9 , NICE
<apalos> I've tested/reviewed most of these, there are some details to clarify and i'll pull it in
<apalos> apologies for the partial cc btw
<apalos> get_maintainer randomly cc'ed people that changed tests....
<marex> apalos: if you pull it in, I'll just switch to this and submit whatever might be missing
<apalos> excellent
<marex> apalos: I only started looking into the TPM, so, no surprise I wasnt in maintainers file
<apalos> Well the last prerequisite is the remaining patches I was discussing with Simon,
<apalos> Once we sort that out, I'll pull them, i've spent quite some time helping/reviewing this
<marex> apalos: that is much appreciated
<apalos> and no i havent worked on the ST tpm device
<marex> apalos: well, it could be I will be sending fixes then ;)
<marex> apalos: so far I have infineon on my desk, but the ST one might be coming
<apalos> Keep in mind that since 2c9626c463151f1c178b5855bc763978e3878954 it should be trivial to add a new TPM driver
<marex> apalos: ACK
<apalos> as long as it's TIS, you just need to define how the bus accesses the device
<apalos> And that's it
<marex> the infineon is TIS
<apalos> yea it should work already
<marex> the STM33, I do not know yet, didnt take a closer look
<apalos> ok ping me once you get it,m
<marex> it has SPI or I2C interface though, so I suspect it would be TIS too
runcom has joined #u-boot
<marex> apalos: either will do, or will send a patch
<apalos> ah we have tpm_tis_st33zp24_spi.c
<apalos> and an i2c equivalent, but we havent cleaned up those to use the TIS api
<marex> apalos: ah well, when it arrives (likely will take a bit), I will be digging in
runcom has quit [Quit: Konversation terminated!]
runcom has joined #u-boot
runcom has quit [Ping timeout: 265 seconds]
matthias_bgg has quit [Quit: Leaving]
apritzel_ has quit [Ping timeout: 246 seconds]
mmu_man has joined #u-boot
goliath has joined #u-boot
ldevulder has quit [Quit: Leaving]
slobodan has quit [Ping timeout: 246 seconds]
prabhakarlad has joined #u-boot
apritzel_ has joined #u-boot
mmu_man has quit [Ping timeout: 246 seconds]
mncheckm has quit [Ping timeout: 268 seconds]
mmu_man has joined #u-boot