Skip to contentSkip to conversation

add SMBIOS information to /proc/smbios -- UPDATED

PATCH Lev Makhlis 2 participants 2 messages May 1, 2004

lore
Share & tools
lore
#0 lore raw
Quoted 7 lines
Quoted 3 lines

-- This information is, in the very near future, _not_ going to be static anymore. There will be systems that update the information in dynamically during SMIs.

That's fine - /dev/mem can handle that too. An user will have to poll for changes anyways, so having it it /proc does not have any advantages.

One problem is that /dev/mem access isn't atomic. You need to read a pointer, then follow the pointer to read data. If the pointer changes in the middle, you lose. That said, I don't see any mechanism that helps avoid that in kernel, either.

#1 lore raw
Quoted 4 lines · Lev Makhlis
Quoted 4 lines
Quoted 3 lines

-- This information is, in the very near future, _not_ going to be static anymore. There will be systems that update the information in dynamically during SMIs.

Quoted 9 lines
Quoted 3 lines

That's fine - /dev/mem can handle that too. An user will have to poll for changes anyways, so having it it /proc does not have any advantages.

One problem is that /dev/mem access isn't atomic. You need to read a pointer, then follow the pointer to read data. If the pointer changes in the middle, you lose. That said, I don't see any mechanism that helps avoid that in kernel, either.

Exactly. The kernel code doesn't help with that.

You could always read everything twice and compare and do that until it stops changing. I personally think it is overkill, because SMBIOS information is normally only used for diagnosis, where a rare race is not that bad.

Also hopefully the SMI handlers will change the thing in a atomic way, so this may never happen.

-Andi