summaryrefslogtreecommitdiff
path: root/src/drivers/intel/gma/gma.ads
blob: 157ec89fcc11d7dae25c5ee7f809484017f29809 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
with Interfaces.C;

with HW;
use HW;

package GMA
is

   procedure gfxinit
     (mmio_base   : in     word64;
      linear_fb   : in     word64;
      phys_fb     : in     word32;
      lightup_ok  :    out Interfaces.C.int);
   pragma Export (C, gfxinit, "gma_gfxinit");

   ----------------------------------------------------------------------------

   type lb_framebuffer is record
      tag                  : word32;
      size                 : word32;

      physical_address     : word64;
      x_resolution         : word32;
      y_resolution         : word32;
      bytes_per_line       : word32;
      bits_per_pixel       : word8;
      red_mask_pos         : word8;
      red_mask_size        : word8;
      green_mask_pos       : word8;
      green_mask_size      : word8;
      blue_mask_pos        : word8;
      blue_mask_size       : word8;
      reserved_mask_pos    : word8;
      reserved_mask_size   : word8;
   end record;

   function fill_lb_framebuffer
     (framebuffer : in out lb_framebuffer)
      return Interfaces.C.int;
   pragma Export (C, fill_lb_framebuffer, "fill_lb_framebuffer");

end GMA;