(submit/cleanup-api-xfree86) xfree86: int10: move private defs out of xf86int10.h
public server module API headers shouldn't be clobbered with non-exported definitions, so move them out to private header file. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
		
							parent
							
								
									d275b26c66
								
							
						
					
					
						commit
						73e3103f88
					
				| 
						 | 
				
			
			@ -15,7 +15,7 @@
 | 
			
		|||
#include "xf86_OSproc.h"
 | 
			
		||||
#include "compiler.h"
 | 
			
		||||
#define _INT10_PRIVATE
 | 
			
		||||
#include "xf86int10.h"
 | 
			
		||||
#include "xf86int10_priv.h"
 | 
			
		||||
#include "int10Defines.h"
 | 
			
		||||
#include "Pci.h"
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -30,7 +30,7 @@
 | 
			
		|||
#include "compiler.h"
 | 
			
		||||
#define _INT10_PRIVATE
 | 
			
		||||
#include "int10Defines.h"
 | 
			
		||||
#include "xf86int10.h"
 | 
			
		||||
#include "xf86int10_priv.h"
 | 
			
		||||
#include "Pci.h"
 | 
			
		||||
#ifdef _X86EMU
 | 
			
		||||
#include "x86emu/x86emui.h"
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -18,7 +18,7 @@
 | 
			
		|||
#if 0
 | 
			
		||||
#include "int10Defines.h"
 | 
			
		||||
#endif
 | 
			
		||||
#include "xf86int10.h"
 | 
			
		||||
#include "xf86int10_priv.h"
 | 
			
		||||
 | 
			
		||||
#define REG pInt
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -11,7 +11,7 @@
 | 
			
		|||
#include "xf86.h"
 | 
			
		||||
#include "compiler.h"
 | 
			
		||||
#define _INT10_PRIVATE
 | 
			
		||||
#include "xf86int10.h"
 | 
			
		||||
#include "xf86int10_priv.h"
 | 
			
		||||
#include "int10Defines.h"
 | 
			
		||||
#include "Pci.h"
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -122,70 +122,18 @@ extern _X_EXPORT Bool xf86Int10ExecSetup(xf86Int10InfoPtr pInt);
 | 
			
		|||
 | 
			
		||||
/* int.c */
 | 
			
		||||
extern _X_EXPORT xf86Int10InfoPtr Int10Current;
 | 
			
		||||
int int_handler(xf86Int10InfoPtr pInt);
 | 
			
		||||
 | 
			
		||||
/* helper_exec.c */
 | 
			
		||||
int setup_int(xf86Int10InfoPtr pInt);
 | 
			
		||||
void finish_int(xf86Int10InfoPtr, int sig);
 | 
			
		||||
uint32_t getIntVect(xf86Int10InfoPtr pInt, int num);
 | 
			
		||||
void pushw(xf86Int10InfoPtr pInt, uint16_t val);
 | 
			
		||||
int run_bios_int(int num, xf86Int10InfoPtr pInt);
 | 
			
		||||
void dump_code(xf86Int10InfoPtr pInt);
 | 
			
		||||
void dump_registers(xf86Int10InfoPtr pInt);
 | 
			
		||||
void stack_trace(xf86Int10InfoPtr pInt);
 | 
			
		||||
uint8_t bios_checksum(const uint8_t *start, int size);
 | 
			
		||||
void LockLegacyVGA(xf86Int10InfoPtr pInt, legacyVGAPtr vga);
 | 
			
		||||
void UnlockLegacyVGA(xf86Int10InfoPtr pInt, legacyVGAPtr vga);
 | 
			
		||||
 | 
			
		||||
#if defined (_PC)
 | 
			
		||||
extern _X_EXPORT void xf86Int10SaveRestoreBIOSVars(xf86Int10InfoPtr pInt,
 | 
			
		||||
                                                   Bool save);
 | 
			
		||||
#endif
 | 
			
		||||
int port_rep_inb(xf86Int10InfoPtr pInt,
 | 
			
		||||
                 uint16_t port, uint32_t base, int d_f, uint32_t count);
 | 
			
		||||
int port_rep_inw(xf86Int10InfoPtr pInt,
 | 
			
		||||
                 uint16_t port, uint32_t base, int d_f, uint32_t count);
 | 
			
		||||
int port_rep_inl(xf86Int10InfoPtr pInt,
 | 
			
		||||
                 uint16_t port, uint32_t base, int d_f, uint32_t count);
 | 
			
		||||
int port_rep_outb(xf86Int10InfoPtr pInt,
 | 
			
		||||
                  uint16_t port, uint32_t base, int d_f, uint32_t count);
 | 
			
		||||
int port_rep_outw(xf86Int10InfoPtr pInt,
 | 
			
		||||
                  uint16_t port, uint32_t base, int d_f, uint32_t count);
 | 
			
		||||
int port_rep_outl(xf86Int10InfoPtr pInt,
 | 
			
		||||
                  uint16_t port, uint32_t base, int d_f, uint32_t count);
 | 
			
		||||
 | 
			
		||||
uint8_t x_inb(uint16_t port);
 | 
			
		||||
uint16_t x_inw(uint16_t port);
 | 
			
		||||
void x_outb(uint16_t port, uint8_t val);
 | 
			
		||||
void x_outw(uint16_t port, uint16_t val);
 | 
			
		||||
uint32_t x_inl(uint16_t port);
 | 
			
		||||
void x_outl(uint16_t port, uint32_t val);
 | 
			
		||||
 | 
			
		||||
uint8_t Mem_rb(uint32_t addr);
 | 
			
		||||
uint16_t Mem_rw(uint32_t addr);
 | 
			
		||||
uint32_t Mem_rl(uint32_t addr);
 | 
			
		||||
void Mem_wb(uint32_t addr, uint8_t val);
 | 
			
		||||
void Mem_ww(uint32_t addr, uint16_t val);
 | 
			
		||||
void Mem_wl(uint32_t addr, uint32_t val);
 | 
			
		||||
 | 
			
		||||
/* helper_mem.c */
 | 
			
		||||
void setup_int_vect(xf86Int10InfoPtr pInt);
 | 
			
		||||
int setup_system_bios(void *base_addr);
 | 
			
		||||
void reset_int_vect(xf86Int10InfoPtr pInt);
 | 
			
		||||
void set_return_trap(xf86Int10InfoPtr pInt);
 | 
			
		||||
extern _X_EXPORT void *xf86HandleInt10Options(ScrnInfoPtr pScrn,
 | 
			
		||||
                                              int entityIndex);
 | 
			
		||||
Bool int10skip(const void *options);
 | 
			
		||||
Bool int10_check_bios(int scrnIndex, int codeSeg,
 | 
			
		||||
                      const unsigned char *vbiosMem);
 | 
			
		||||
Bool initPrimary(const void *options);
 | 
			
		||||
extern _X_EXPORT BusType xf86int10GetBiosLocationType(const xf86Int10InfoPtr
 | 
			
		||||
                                                      pInt);
 | 
			
		||||
extern _X_EXPORT Bool xf86int10GetBiosSegment(xf86Int10InfoPtr pInt,
 | 
			
		||||
                                              void *base);
 | 
			
		||||
#ifdef DEBUG
 | 
			
		||||
void dprint(unsigned long start, unsigned long size);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#endif                          /* _INT10_PRIVATE */
 | 
			
		||||
#endif                          /* _XF86INT10_H */
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -0,0 +1,77 @@
 | 
			
		|||
/* SPDX-License-Identifier: MIT OR X11
 | 
			
		||||
 *
 | 
			
		||||
 * Copyright © 2024 Enrico Weigelt, metux IT consult <info@metux.net>
 | 
			
		||||
 * Copyright © 1999 Egbert Eich
 | 
			
		||||
 *
 | 
			
		||||
 *                   XFree86 int10 module
 | 
			
		||||
 *   execute BIOS int 10h calls in x86 real mode environment
 | 
			
		||||
 */
 | 
			
		||||
#ifndef _XSERVER_XF86INT10_H
 | 
			
		||||
#define _XSERVER_XF86INT10_H
 | 
			
		||||
 | 
			
		||||
#include <X11/Xmd.h>
 | 
			
		||||
#include <X11/Xdefs.h>
 | 
			
		||||
#include "xf86Pci.h"
 | 
			
		||||
#include "xf86int10.h"
 | 
			
		||||
 | 
			
		||||
#ifdef _INT10_PRIVATE
 | 
			
		||||
 | 
			
		||||
/* int.c */
 | 
			
		||||
int int_handler(xf86Int10InfoPtr pInt);
 | 
			
		||||
 | 
			
		||||
/* helper_exec.c */
 | 
			
		||||
int setup_int(xf86Int10InfoPtr pInt);
 | 
			
		||||
void finish_int(xf86Int10InfoPtr, int sig);
 | 
			
		||||
uint32_t getIntVect(xf86Int10InfoPtr pInt, int num);
 | 
			
		||||
void pushw(xf86Int10InfoPtr pInt, uint16_t val);
 | 
			
		||||
int run_bios_int(int num, xf86Int10InfoPtr pInt);
 | 
			
		||||
void dump_code(xf86Int10InfoPtr pInt);
 | 
			
		||||
void dump_registers(xf86Int10InfoPtr pInt);
 | 
			
		||||
void stack_trace(xf86Int10InfoPtr pInt);
 | 
			
		||||
uint8_t bios_checksum(const uint8_t *start, int size);
 | 
			
		||||
void LockLegacyVGA(xf86Int10InfoPtr pInt, legacyVGAPtr vga);
 | 
			
		||||
void UnlockLegacyVGA(xf86Int10InfoPtr pInt, legacyVGAPtr vga);
 | 
			
		||||
 | 
			
		||||
int port_rep_inb(xf86Int10InfoPtr pInt,
 | 
			
		||||
                 uint16_t port, uint32_t base, int d_f, uint32_t count);
 | 
			
		||||
int port_rep_inw(xf86Int10InfoPtr pInt,
 | 
			
		||||
                 uint16_t port, uint32_t base, int d_f, uint32_t count);
 | 
			
		||||
int port_rep_inl(xf86Int10InfoPtr pInt,
 | 
			
		||||
                 uint16_t port, uint32_t base, int d_f, uint32_t count);
 | 
			
		||||
int port_rep_outb(xf86Int10InfoPtr pInt,
 | 
			
		||||
                  uint16_t port, uint32_t base, int d_f, uint32_t count);
 | 
			
		||||
int port_rep_outw(xf86Int10InfoPtr pInt,
 | 
			
		||||
                  uint16_t port, uint32_t base, int d_f, uint32_t count);
 | 
			
		||||
int port_rep_outl(xf86Int10InfoPtr pInt,
 | 
			
		||||
                  uint16_t port, uint32_t base, int d_f, uint32_t count);
 | 
			
		||||
 | 
			
		||||
uint8_t x_inb(uint16_t port);
 | 
			
		||||
uint16_t x_inw(uint16_t port);
 | 
			
		||||
void x_outb(uint16_t port, uint8_t val);
 | 
			
		||||
void x_outw(uint16_t port, uint16_t val);
 | 
			
		||||
uint32_t x_inl(uint16_t port);
 | 
			
		||||
void x_outl(uint16_t port, uint32_t val);
 | 
			
		||||
 | 
			
		||||
uint8_t Mem_rb(uint32_t addr);
 | 
			
		||||
uint16_t Mem_rw(uint32_t addr);
 | 
			
		||||
uint32_t Mem_rl(uint32_t addr);
 | 
			
		||||
void Mem_wb(uint32_t addr, uint8_t val);
 | 
			
		||||
void Mem_ww(uint32_t addr, uint16_t val);
 | 
			
		||||
void Mem_wl(uint32_t addr, uint32_t val);
 | 
			
		||||
 | 
			
		||||
/* helper_mem.c */
 | 
			
		||||
void setup_int_vect(xf86Int10InfoPtr pInt);
 | 
			
		||||
int setup_system_bios(void *base_addr);
 | 
			
		||||
void reset_int_vect(xf86Int10InfoPtr pInt);
 | 
			
		||||
void set_return_trap(xf86Int10InfoPtr pInt);
 | 
			
		||||
Bool int10skip(const void *options);
 | 
			
		||||
Bool int10_check_bios(int scrnIndex, int codeSeg,
 | 
			
		||||
                      const unsigned char *vbiosMem);
 | 
			
		||||
Bool initPrimary(const void *options);
 | 
			
		||||
#ifdef DEBUG
 | 
			
		||||
void dprint(unsigned long start, unsigned long size);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#endif                          /* _INT10_PRIVATE */
 | 
			
		||||
 | 
			
		||||
#endif /* _XSERVER_XF86INT10_H */
 | 
			
		||||
| 
						 | 
				
			
			@ -11,7 +11,7 @@
 | 
			
		|||
#include "xf86_OSproc.h"
 | 
			
		||||
#include "xf86Pci.h"
 | 
			
		||||
#define _INT10_PRIVATE
 | 
			
		||||
#include "xf86int10.h"
 | 
			
		||||
#include "xf86int10_priv.h"
 | 
			
		||||
#include "int10Defines.h"
 | 
			
		||||
#include <x86emu.h>
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue