Post AaABMpPfeB0soAdFGy by mjg59@nondeterministic.computer
 (DIR) More posts by mjg59@nondeterministic.computer
 (DIR) Post #AaAB9MoGgLXwKeibBY by mjg59@nondeterministic.computer
       2023-09-26T15:27:31Z
       
       0 likes, 0 repeats
       
       I've been nerdsniped into discovering that there *is* actually a way to get the framebuffer offset in UGA, but it's documented in a self-extracting zip file that's only available from the Wayback Machine
       
 (DIR) Post #AaABMpPfeB0soAdFGy by mjg59@nondeterministic.computer
       2023-09-26T15:28:32Z
       
       0 likes, 0 repeats
       
       "UGA_Firmware_Interface_Spec.doc" I am probably the first person to read this in over a decade
       
 (DIR) Post #AaABasONMqVi6Nj0gC by mjg59@nondeterministic.computer
       2023-09-26T15:30:42Z
       
       0 likes, 0 repeats
       
       The simple UGA interfaces let you get and set a mode, but don't tell you where your framebuffer is or what its stride (how many bytes per line, which is not always the same as the number of pixels multiplied by the bytes per pixel). So Linux hardcoded the addresses for basically all known UGA systems (basically Itanium and some early Macs), and grub… drew a line into the framebuffer, then searched video memory until it found that line, giving it both the location and stride
       
 (DIR) Post #AaABb09mUzacBQxT2e by mjg59@nondeterministic.computer
       2023-09-26T15:32:11Z
       
       0 likes, 0 repeats
       
       But, entirely unknown to me, there's a magical UGA Dispatch() function that takes another set of calls and one of those is UGAIoGetMemoryConfiguration which is apparently supposed to tell you how stuff is set up, but it's 100% undocumented in the EFI spec, which instead points you to a long-dead Microsoft page. So now I'm going to read this spec and find out how the fuck this was ever meant to work.
       
 (DIR) Post #AaABb37PUGTXMws7GK by mjg59@nondeterministic.computer
       2023-09-26T15:32:40Z
       
       0 likes, 0 repeats
       
       The contents page references a virtual machine, so I'm already terrified
       
 (DIR) Post #AaABqx4fj89JFzAqsy by liw@toot.liw.fi
       2023-09-26T15:31:21Z
       
       0 likes, 0 repeats
       
       @mjg59 The best kind of documentation.
       
 (DIR) Post #AaACVBqQEOEgeIhCZE by ted@social.gould.cx
       2023-09-26T15:33:33Z
       
       0 likes, 0 repeats
       
       @mjg59 so what I hear you saying is that it is documented.
       
 (DIR) Post #AaACjIedhzijp8ueBM by mjg59@nondeterministic.computer
       2023-09-26T15:36:39Z
       
       0 likes, 0 repeats
       
       Well ok UgaIOGetMemoryConfiguration does in fact return a structure that contains both the framebuffer base and the stride, so fuck me I guess we should actually have read the docs properly back then
       
 (DIR) Post #AaACjVXJoWaZmCaU4m by mjg59@nondeterministic.computer
       2023-09-26T15:37:06Z
       
       0 likes, 0 repeats
       
       (To be fair this was the era where we were largely told not to download docs from Microsoft and implement them because patents so I'm glad things are more relaxed now)
       
 (DIR) Post #AaACjZDy6PUHDLZ5TE by mjg59@nondeterministic.computer
       2023-09-26T15:46:10Z
       
       0 likes, 0 repeats
       
       It is unclear to me whether this spec actually covers what the OS is supposed to do, rather than just documenting how firmware authors glue their driver into a blob that Windows knows how to talk to
       
 (DIR) Post #AaADT24tfiEPjY09Cq by vathpela@better.boston
       2023-09-26T15:38:04Z
       
       0 likes, 0 repeats
       
       @mjg59 there's also https://patents.google.com/patent/US7562161 ...
       
 (DIR) Post #AaADfK72RgiB8qrcKu by sbisson@mastodon.social
       2023-09-26T15:38:26Z
       
       0 likes, 0 repeats
       
       @mjg59 Amusingly knowing folk at Microsoft in those days, it went both ways.
       
 (DIR) Post #AaAE9CeOklp2gciPSK by jjdavis@infosec.exchange
       2023-09-26T15:48:00Z
       
       0 likes, 0 repeats
       
       @mjg59 Were you an archaeologist in a previous life? 😀
       
 (DIR) Post #AaAENdVpg7lQ3EahrU by rotopenguin@mastodon.social
       2023-09-26T15:48:11Z
       
       0 likes, 0 repeats
       
       @mjg59 you must enable macros to read this spec dot ps1
       
 (DIR) Post #AaAEZzY7ZUjps9YLmC by mjg59@nondeterministic.computer
       2023-09-26T15:50:05Z
       
       0 likes, 0 repeats
       
       Yeah I can't find /any/ description of the virtual machine in this spec at all, which means making use of it remains a mystery (other than what can be scraped out of the patent)
       
 (DIR) Post #AaAEpKSg6QS54fJvpA by foone@digipres.club
       2023-09-26T15:42:13Z
       
       0 likes, 0 repeats
       
       @mjg59 behind a door labeled "beware of tiger"
       
 (DIR) Post #AaAF6DEMEy6dZRfmMa by ersatzmaus@mastodon.social
       2023-09-26T16:11:44Z
       
       0 likes, 0 repeats
       
       @mjg59 I apologise unreservedly.
       
 (DIR) Post #AaAWHhr6PsnIxTrVBI by sbisson@mastodon.social
       2023-09-26T19:24:20Z
       
       0 likes, 0 repeats
       
       @mjg59 You probably need to track down some of the original Connectix folk for that; a lot of this is based on their work that later became Hyper-V.
       
 (DIR) Post #AaAZIHMahNtIwkYTfE by alwayscurious@infosec.exchange
       2023-09-26T19:58:43Z
       
       0 likes, 0 repeats
       
       @mjg59 UGA?
       
 (DIR) Post #AaAZxbUelCddFg25vk by mjg59@nondeterministic.computer
       2023-09-26T20:06:47Z
       
       0 likes, 0 repeats
       
       @alwayscurious Universal Graphics Adapter, a Microsoft spec for a generic way to speak to graphics cards in the late 90s/early 2000s that was implemented approximately nowhere
       
 (DIR) Post #AaAaCVeWl5YhTrl1bE by alwayscurious@infosec.exchange
       2023-09-26T20:07:33Z
       
       0 likes, 0 repeats
       
       @mjg59 why do you even care about it?
       
 (DIR) Post #AaAaStD0wdExAkhOls by mjg59@nondeterministic.computer
       2023-09-26T20:09:05Z
       
       0 likes, 0 repeats
       
       @alwayscurious because it bested me then and I wish to best it now
       
 (DIR) Post #AaAc25hWaiBo0PJqwi by alwayscurious@infosec.exchange
       2023-09-26T20:29:36Z
       
       0 likes, 0 repeats
       
       @mjg59 did anyone implement the standard, or is it useless?
       
 (DIR) Post #AaAcKcbuyNQ7HkX6EC by mjg59@nondeterministic.computer
       2023-09-26T20:32:25Z
       
       0 likes, 0 repeats
       
       @alwayscurious Itanium vendors, and Apple