1+ /*
2+ * Copyright (C) 2026 Clément Dieperink <clement.dieperink@heig-vd.ch>
3+ *
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License version 2 as
6+ * published by the Free Software Foundation.
7+ *
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
12+ *
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program; if not, write to the Free Software
15+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
16+ */
17+
118#include <heap.h>
219#include <avz/fbdev_gnt.h>
320#include <avz/domain.h>
421#include <avz/memslot.h>
522#include <avz/sched.h>
623
724typedef struct {
8- fbdev_pfns_t fbdev ;
25+ fbdev_pfns_t fbdev_pfns ;
926 void * fake_fbdev ;
1027 int current_slotID ;
1128} fbdev_priv_t ;
@@ -69,16 +86,16 @@ void fbdev_ipamap_domain(struct domain *d, int slotID)
6986 return ;
7087
7188 if (slotID == priv .current_slotID )
72- __map_fbdev (d , & priv .fbdev );
89+ __map_fbdev (d , & priv .fbdev_pfns );
7390 else
74- __map_fake_fbdev (d , & priv .fbdev );
91+ __map_fake_fbdev (d , & priv .fbdev_pfns );
7592}
7693
7794void fbdev_set_pfns (fbdev_pfns_t * fbdev )
7895{
7996 int slotID ;
8097
81- memcpy (& priv .fbdev , fbdev , sizeof (* fbdev ));
98+ memcpy (& priv .fbdev_pfns , fbdev , sizeof (* fbdev ));
8299
83100 /* Map framebuffer to all capsules. */
84101 for (slotID = MEMSLOT_BASE ; slotID < MEMSLOT_NR ; slotID ++ )
@@ -90,11 +107,11 @@ void fbdev_change_focus(int new_slotID)
90107{
91108 /* Remap old capsule to fake framebuffer */
92109 if ((priv .current_slotID >= MEMSLOT_BASE ) && memslot [priv .current_slotID ].busy )
93- __map_fake_fbdev (domains [priv .current_slotID ], & priv .fbdev );
110+ __map_fake_fbdev (domains [priv .current_slotID ], & priv .fbdev_pfns );
94111
95112 /* Map the new capsule to the framebuffer */
96113 if ((new_slotID >= MEMSLOT_BASE ) && memslot [new_slotID ].busy )
97- __map_fbdev (domains [new_slotID ], & priv .fbdev );
114+ __map_fbdev (domains [new_slotID ], & priv .fbdev_pfns );
98115
99116 priv .current_slotID = new_slotID ;
100117}
0 commit comments