Welcome to our website
To take full advantage of all features you need to login or register. Registration is completely free and takes only a few seconds.
Samsung UEFI bug not Linux specific
Posted by Philipp Esselbach on: 02/10/2013 10:04 AM [ Print | 0 comment(s) ]
Matthew Garrett posted on his blog that the Samsung UEFI bug is not Linux specific
We're not quite sure what those problems are yet. Originally we assumed that the magic values we wrote were causing the problem, so the samsung-laptop driver was patched to disable it on UEFI systems. Unfortunately, this doesn't actually fix the problem - it just avoids the easiest way of triggering it. It turns out that it wasn't the writes that caused the problem, it was what happened next. Performing the writes triggered a hardware error of some description. The Linux kernel caught and logged this. In the old days, people would often never see these logs - the system would then be frozen and it would be impossible to access the hard drive, so they never got written to disk. There's code in the kernel to make this easier on UEFI systems. Whenever a severe error is encountered, the kernel copies recent messages to the UEFI variable storage space. They're then available to userspace after a reboot, allowing more accurate diagnostics of what caused the crash.
That crash dump takes about 10K of UEFI storage space. Microsoft require that Windows 8 systems have at least 64K of storage space available. We only keep one crash dump - if the system crashes again it'll simply overwrite the existing one rather than creating another. This is all completely compatible with the UEFI specification, and Apple actually do something very similar on their hardware. Unfortunately, it turns out that some Samsung laptops will fail to boot if too much of the variable storage space is used. We don't know what "too much" is yet, but writing a bunch of variables from Windows is enough to trigger it. I put some sample code here - it writes out 36 variables each containing a kilobyte of random data. I ran this as an administrator under Windows and then rebooted the system. It never came back.
This is pretty obviously a firmware bug. Writing UEFI variables is expressly permitted by the specification, and there should never be a situation in which an OS can fill the variable store in such a way that the firmware refuses to boot the system. We've seen similar bugs in Intel's reference code in the past, but they were all fixed early last year. For now the safest thing to do is not to use UEFI on any Samsung laptops. Unfortunately, if you're using Windows, that'll require you to reinstall it from scratch.
That crash dump takes about 10K of UEFI storage space. Microsoft require that Windows 8 systems have at least 64K of storage space available. We only keep one crash dump - if the system crashes again it'll simply overwrite the existing one rather than creating another. This is all completely compatible with the UEFI specification, and Apple actually do something very similar on their hardware. Unfortunately, it turns out that some Samsung laptops will fail to boot if too much of the variable storage space is used. We don't know what "too much" is yet, but writing a bunch of variables from Windows is enough to trigger it. I put some sample code here - it writes out 36 variables each containing a kilobyte of random data. I ran this as an administrator under Windows and then rebooted the system. It never came back.
This is pretty obviously a firmware bug. Writing UEFI variables is expressly permitted by the specification, and there should never be a situation in which an OS can fill the variable store in such a way that the firmware refuses to boot the system. We've seen similar bugs in Intel's reference code in the past, but they were all fixed early last year. For now the safest thing to do is not to use UEFI on any Samsung laptops. Unfortunately, if you're using Windows, that'll require you to reinstall it from scratch.
Samsung UEFI bug not Linux specific
Related Threads
03/19/2007 09:37 AM: Samsung SATA DVD burner not reading, Help (4) by danleff
03/22/2010 11:13 PM: Samsung SATA Drive Problems (13) by NocarOnion
05/28/2006 07:49 PM: Help with Samsung CD-ROM SC-152A (2) by dbegmore
10/11/2005 06:18 PM: Samsung Yepp YP-Neu (1) by mctonale
01/04/2005 11:31 PM: Samsung Yepp digital audio player...Y5-T5 (1) by lilkels08
12/10/2004 09:34 AM: Low level Format Samsung Hd (4) by Newumbrella
06/05/2006 02:19 PM: samsung sd612 dvd-rom will not plat dvd's since xp upgrade (17) by templeofboom
05/07/2003 11:33 PM: Samsung sw-216b (1) by Tomay
04/25/2006 03:10 PM: Samsung SD-612B Drivers (Windows XP) (10) by Cormac
02/10/2002 11:04 PM: Samsung 955DF (3) by Brian Frank
03/22/2010 11:13 PM: Samsung SATA Drive Problems (13) by NocarOnion
05/28/2006 07:49 PM: Help with Samsung CD-ROM SC-152A (2) by dbegmore
10/11/2005 06:18 PM: Samsung Yepp YP-Neu (1) by mctonale
01/04/2005 11:31 PM: Samsung Yepp digital audio player...Y5-T5 (1) by lilkels08
12/10/2004 09:34 AM: Low level Format Samsung Hd (4) by Newumbrella
06/05/2006 02:19 PM: samsung sd612 dvd-rom will not plat dvd's since xp upgrade (17) by templeofboom
05/07/2003 11:33 PM: Samsung sw-216b (1) by Tomay
04/25/2006 03:10 PM: Samsung SD-612B Drivers (Windows XP) (10) by Cormac
02/10/2002 11:04 PM: Samsung 955DF (3) by Brian Frank

