29 |
|
*/ |
30 |
|
|
31 |
|
// Align on page boundaries |
32 |
< |
static uint32 align_on_page_boundary(uint32 size) |
32 |
> |
static uintptr align_on_page_boundary(uintptr size) |
33 |
|
{ |
34 |
|
const uint32 page_size = getpagesize(); |
35 |
|
const uint32 page_mask = page_size - 1; |
182 |
|
(dst = (src)) |
183 |
|
|
184 |
|
#define FB_BLIT_2(dst, src) \ |
185 |
< |
(dst = (((src) >> 24) & 0xff) | (((src) >> 16) & 0xff00) | (((src) & 0xff00) << 16) | (((src) & 0xff) << 24)) |
185 |
> |
(dst = (((src) >> 24) & 0xff) | (((src) >> 8) & 0xff00) | (((src) & 0xff00) << 8) | (((src) & 0xff) << 24)) |
186 |
|
|
187 |
|
#define FB_DEPTH 24 |
188 |
|
#include "video_blit.h" |
240 |
|
* Screen fault handler |
241 |
|
*/ |
242 |
|
|
243 |
< |
static inline void do_handle_screen_fault(unsigned long addr) |
243 |
> |
static inline void do_handle_screen_fault(uintptr addr) |
244 |
|
{ |
245 |
|
if ((addr < mainBuffer.memStart) || (addr >= mainBuffer.memEnd)) { |
246 |
|
fprintf(stderr, "Segmentation fault at 0x%08X\n", addr); |
263 |
|
static void Screen_fault_handler(int, siginfo_t * sip, void *) |
264 |
|
{ |
265 |
|
D(bug("Screen_fault_handler: ADDR=0x%08X\n", sip->si_addr)); |
266 |
< |
do_handle_screen_fault((unsigned long)sip->si_addr); |
266 |
> |
do_handle_screen_fault((uintptr)sip->si_addr); |
267 |
|
} |
268 |
|
#elif defined(HAVE_SIGCONTEXT_SUBTERFUGE) |
269 |
|
# if defined(__i386__) && defined(__linux__) |
270 |
|
static void Screen_fault_handler(int, struct sigcontext scs) |
271 |
|
{ |
272 |
|
D(bug("Screen_fault_handler: ADDR=0x%08X from IP=0x%08X\n", scs.cr2, scs.eip)); |
273 |
< |
do_handle_screen_fault((unsigned long)scs.cr2); |
273 |
> |
do_handle_screen_fault((uintptr)scs.cr2); |
274 |
|
} |
275 |
|
# else |
276 |
|
# error "No suitable subterfuge for Video on SEGV signals" |
323 |
|
break; |
324 |
|
|
325 |
|
const int first_page = page; |
326 |
< |
PFLAG_CLEAR(first_page); |
327 |
< |
while ((++page < mainBuffer.pageCount) && PFLAG_ISSET(page)) |
326 |
> |
while ((page < mainBuffer.pageCount) && PFLAG_ISSET(page)) { |
327 |
|
PFLAG_CLEAR(page); |
328 |
+ |
++page; |
329 |
+ |
} |
330 |
|
|
331 |
|
// Make the dirty pages read-only again |
332 |
|
const int32 offset = first_page << mainBuffer.pageBits; |
408 |
|
break; |
409 |
|
|
410 |
|
const int first_page = page; |
411 |
< |
PFLAG_CLEAR(first_page); |
411 |
< |
while ((++page < mainBuffer.pageCount) && PFLAG_ISSET(page)) |
411 |
> |
while ((page < mainBuffer.pageCount) && PFLAG_ISSET(page)) { |
412 |
|
PFLAG_CLEAR(page); |
413 |
+ |
++page; |
414 |
+ |
} |
415 |
|
|
416 |
|
// Make the dirty pages read-only again |
417 |
|
const int32 offset = first_page << mainBuffer.pageBits; |