Re: VESA standart PMode programming
Posted: Wed Mar 07, 2018 4:32 pm
Hi,
Then I started looking at the manuals for other generations. The first one I found that actually had useful information (the fourth one I looked at) was "Intel OpenSource HD Graphics Programmer’s Reference Manual (PRM) Volume 3 Part 2: PCI Registers (Ivy Bridge); For the 2012 Intel CoreTM Processor Family" where the table has duplicate values with conflicting information (e.g. "5h = 32 MiB" at the top of the table, and then another "5h = 160 MiB" near the middle of the table). It looks like maybe the upper half of the table is an older draft that should've been deleted but wasn't and the bottom half of the table is correct. With that assumption, "10h = 512 MiB" and all higher values were reserved; so I'm thinking that for Haswell (the successor to Ivy Bridge) they might have defined a value that was reserved in the previous generation (e.g. "11h = reserved for Ivy Bridge but 1024 MiB for Haswell").
I also found a much newer manual from 2015 for "Iris Pro" which uses different registers, but has a similar "bits 15:8 = GSM: This field is used to select the amount of main memory that is pre-allocated to support the Internal Graphics Device....." field where the table includes "20h = 1024 MiB", "30h = 1536 MiB" and "3Fh = 2016 MiB". This at least suggests that the amount of memory that can be pre-allocated in Intel's integrated video might be increasing with each generation. Note: at first glance, "2016 MiB" looked like a typo to me, but then I realised it fit an early "amount of memory in 32 MiB chunks" theory I had - e.g. "3Fh * 32 MiB = 63 * 32 MiB = 2016 MiB").
In any case; after wandering randomly through manuals the only thing I can say without any doubt is that Intel's manuals are horrible/incomplete.
Cheers,
Brendan
I got that value from the BIOS. The settings the BIOS allows are 32 MiB, 64 MiB, 96 MiB, 128 MiB, 192 MiB, 224 MiB, 256 MiB, 320 MiB, 384 MiB, 448 MiB, 512 MiB, 1024 MiB; and it's was set to the maximum (1024 MiB).Korona wrote:But you got that value from Windows or from the memory map and/or the BIOS?Brendan wrote:For my Windows machine (Haswell, HD4600) it's 1 GiB - far too large for "a few frame buffers and not much else". I'd assume that part of the reason for this is that a lot of games are optimised for discrete graphics (where there's a fixed amount of video RAM and higher latency/lower bandwidth for system memory accesses and no point using "shared between CPU and GPU" memory).
I took a look at the manual ("Chapter 12: PCIE Configuration Registers (Haswell)" from 12/18/2013), which (for PCI register 0x50 on PCI bus 0, device 2, function 0) says what each field of the register is for (e.g. "bits 3:7 = GSM/Graphics Mode Select: This field is used to select the amount of main memory that is pre-allocated to support the Internal Graphics Device....."), but doesn't provide any information on any of the values. I couldn't find any useful information for this register/field anywhere else in the manuals either.Korona wrote:I do not think 1 GiB is supported if I read the docs correctly. The value should be in bits 3:7 of PCI register 0x50 on PCI bus 0, device 2, function 0. The value is encoded by some lookup table. I'm not copying the whole table here but the documents mention that 160 MiB (corresponding to value 5) is default and 512 MiB (corresponding to value 16) is max.
Then I started looking at the manuals for other generations. The first one I found that actually had useful information (the fourth one I looked at) was "Intel OpenSource HD Graphics Programmer’s Reference Manual (PRM) Volume 3 Part 2: PCI Registers (Ivy Bridge); For the 2012 Intel CoreTM Processor Family" where the table has duplicate values with conflicting information (e.g. "5h = 32 MiB" at the top of the table, and then another "5h = 160 MiB" near the middle of the table). It looks like maybe the upper half of the table is an older draft that should've been deleted but wasn't and the bottom half of the table is correct. With that assumption, "10h = 512 MiB" and all higher values were reserved; so I'm thinking that for Haswell (the successor to Ivy Bridge) they might have defined a value that was reserved in the previous generation (e.g. "11h = reserved for Ivy Bridge but 1024 MiB for Haswell").
I also found a much newer manual from 2015 for "Iris Pro" which uses different registers, but has a similar "bits 15:8 = GSM: This field is used to select the amount of main memory that is pre-allocated to support the Internal Graphics Device....." field where the table includes "20h = 1024 MiB", "30h = 1536 MiB" and "3Fh = 2016 MiB". This at least suggests that the amount of memory that can be pre-allocated in Intel's integrated video might be increasing with each generation. Note: at first glance, "2016 MiB" looked like a typo to me, but then I realised it fit an early "amount of memory in 32 MiB chunks" theory I had - e.g. "3Fh * 32 MiB = 63 * 32 MiB = 2016 MiB").
In any case; after wandering randomly through manuals the only thing I can say without any doubt is that Intel's manuals are horrible/incomplete.
Cheers,
Brendan