In atom_allocate_fb_scratch in atom.c, scratch is allocated in kernel RAM based on the VRAM_UsageByFirmwareTable or harcoded to 20kB.
What's the story about this table and the hardcoded value?
It specifies the max size of the scratch buffer used by the vbios. If for some reason the table is empty the default value is 20k.
Originally Posted by sylware
Indeed, the "VRAM...table" is supposed to target VRAM, isn't it?
Moreover, ARG_FB for the atombios means Frame Buffer, I presume?
It doesn't matter. It's just a scratch buffer for storing large buffers required by some command tables. When the command tables are called during real mode post, they use vram to avoid using system memory, but when the driver is loaded, you can just use system memory.