Conflict resolution.

This commit is contained in:
OBattler
2021-10-19 18:18:15 +02:00
24 changed files with 922 additions and 1216 deletions

View File

@@ -39,6 +39,13 @@ extern "C" {
#define SCI_EN (1 << 0)
#define SUS_EN (1 << 13)
#define SUS_POWER_OFF (1 << 0)
#define SUS_SUSPEND (1 << 1)
#define SUS_NVR (1 << 2)
#define SUS_RESET_CPU (1 << 3)
#define SUS_RESET_CACHE (1 << 4)
#define SUS_RESET_PCI (1 << 5)
#define ACPI_ENABLE 0xf1
#define ACPI_DISABLE 0xf0
@@ -56,7 +63,8 @@ typedef struct
smicmd, gpio_dir,
gpio_val, muxcntrl, ali_soft_smi,
timer32, smireg,
gpireg[3], gporeg[4];
gpireg[3], gporeg[4],
extiotrapsts, extiotrapen;
uint16_t pmsts, pmen,
pmcntrl, gpsts, gpsts1,
gpen, gpen1, gpscien,
@@ -79,16 +87,18 @@ typedef struct
{
acpi_regs_t regs;
uint8_t gpireg2_default, pad[3],
gporeg_default[4];
gporeg_default[4],
suspend_types[8];
uint16_t io_base, aux_io_base;
int vendor,
slot, irq_mode,
irq_pin, irq_line,
mirq_is_level;
pc_timer_t timer;
pc_timer_t timer, resume_timer;
nvr_t *nvr;
apm_t *apm;
void *i2c;
void *i2c,
(*trap_update)(void *priv), *trap_priv;
} acpi_t;
@@ -104,6 +114,8 @@ extern const device_t acpi_via_596b_device;
/* Functions */
extern void acpi_update_irq(acpi_t *dev);
extern void acpi_raise_smi(void *priv, int do_smi);
extern void acpi_update_io_mapping(acpi_t *dev, uint32_t base, int chipset_en);
extern void acpi_update_aux_io_mapping(acpi_t *dev, uint32_t base, int chipset_en);
extern void acpi_init_gporeg(acpi_t *dev, uint8_t val0, uint8_t val1, uint8_t val2, uint8_t val3);
@@ -115,6 +127,7 @@ extern void acpi_set_irq_line(acpi_t *dev, int irq_line);
extern void acpi_set_mirq_is_level(acpi_t *dev, int mirq_is_level);
extern void acpi_set_gpireg2_default(acpi_t *dev, uint8_t gpireg2_default);
extern void acpi_set_nvr(acpi_t *dev, nvr_t *nvr);
extern void acpi_set_trap_update(acpi_t *dev, void (*update)(void *priv), void *priv);
extern uint8_t acpi_ali_soft_smi_status_read(acpi_t *dev);
extern void acpi_ali_soft_smi_status_write(acpi_t *dev, uint8_t soft_smi);

View File

@@ -22,7 +22,6 @@ enum {
ICS9xxx_xx,
ICS9150_08,
ICS9248_39,
#if 0
ICS9248_81,
ICS9248_95,
ICS9248_98,
@@ -35,16 +34,12 @@ enum {
ICS9248_143,
ICS9248_151,
ICS9248_192,
#endif
ICS9250_08,
#if 0
ICS9250_10,
ICS9250_13,
ICS9250_14,
ICS9250_16,
#endif
ICS9250_18,
#if 0
ICS9250_19,
ICS9250_23,
ICS9250_25,
@@ -56,7 +51,6 @@ enum {
ICS9250_32,
ICS9250_38,
ICS9250_50,
#endif
ICS9xxx_MAX
};

View File

@@ -111,5 +111,10 @@ extern void outw(uint16_t port, uint16_t val);
extern uint32_t inl(uint16_t port);
extern void outl(uint16_t port, uint32_t val);
extern void *io_trap_add(void (*func)(int size, uint16_t addr, uint8_t write, uint8_t val, void *priv),
void *priv);
extern void io_trap_remap(void *handle, int enable, uint16_t addr, uint16_t size);
extern void io_trap_remove(void *handle);
#endif /*EMU_IO_H*/

View File

@@ -602,7 +602,7 @@ extern int machine_at_awo671r_init(const machine_t *);
extern int machine_at_63a_init(const machine_t *);
extern int machine_at_s370sba_init(const machine_t *);
extern int machine_at_apas3_init(const machine_t *);
extern int machine_at_wcf681_init(const machine_t *);
extern int machine_at_gt694va_init(const machine_t *);
extern int machine_at_cuv4xls_init(const machine_t *);
extern int machine_at_6via90ap_init(const machine_t *);
extern int machine_at_trinity371_init(const machine_t *);
@@ -693,7 +693,7 @@ extern int machine_xt_pc4i_init(const machine_t *);
extern int machine_xt_mpc1600_init(const machine_t *);
extern int machine_xt_pcspirit_init(const machine_t *);
extern int machine_xt_pc700_init(const machine_t *);
extern int machine_xt_multitechpc500_init(const machine_t *);
extern int machine_xt_pc500_init(const machine_t *);
extern int machine_xt_iskra3104_init(const machine_t *);

View File

@@ -105,6 +105,8 @@ extern void plat_path_slash(char *path);
extern int plat_path_abs(char *path);
extern int plat_dir_check(char *path);
extern int plat_dir_create(char *path);
extern void *plat_mmap(size_t size, uint8_t executable);
extern void plat_munmap(void *ptr, size_t size);
extern uint64_t plat_timer_read(void);
extern uint32_t plat_get_ticks(void);
extern uint32_t plat_get_micro_ticks(void);

View File

@@ -5,16 +5,6 @@
fbzColorPath
*/
#if defined(__linux__) || defined(__APPLE__)
#include <sys/mman.h>
#include <unistd.h>
#endif
#if _WIN64
#define BITMAP windows_BITMAP
#include <windows.h>
#undef BITMAP
#endif
#ifdef _MSC_VER
#include <intrin.h>
#else
@@ -3432,11 +3422,7 @@ void voodoo_codegen_init(voodoo_t *voodoo)
{
int c;
#if _WIN64
voodoo->codegen_data = VirtualAlloc(NULL, sizeof(voodoo_x86_data_t) * BLOCK_NUM * 4, MEM_COMMIT, PAGE_EXECUTE_READWRITE);
#else
voodoo->codegen_data = mmap(0, sizeof(voodoo_x86_data_t) * BLOCK_NUM*4, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_ANON|MAP_PRIVATE, 0, 0);
#endif
voodoo->codegen_data = plat_mmap(sizeof(voodoo_x86_data_t) * BLOCK_NUM*4, 1);
for (c = 0; c < 256; c++)
{
@@ -3462,10 +3448,5 @@ void voodoo_codegen_init(voodoo_t *voodoo)
void voodoo_codegen_close(voodoo_t *voodoo)
{
#if _WIN64
VirtualFree(voodoo->codegen_data, 0, MEM_RELEASE);
#else
munmap(voodoo->codegen_data, sizeof(voodoo_x86_data_t) * BLOCK_NUM*4);
#endif
plat_munmap(voodoo->codegen_data, sizeof(voodoo_x86_data_t) * BLOCK_NUM*4);
}

View File

@@ -5,16 +5,6 @@
fbzColorPath
*/
#if defined(__linux__) || defined(__APPLE__)
#include <sys/mman.h>
#include <unistd.h>
#endif
#if defined WIN32 || defined _WIN32 || defined _WIN32
#define BITMAP windows_BITMAP
#include <windows.h>
#undef BITMAP
#endif
#ifdef _MSC_VER
#include <intrin.h>
#else
@@ -3378,11 +3368,7 @@ void voodoo_codegen_init(voodoo_t *voodoo)
long pagemask = ~(pagesize - 1);
#endif
#if defined WIN32 || defined _WIN32 || defined _WIN32
voodoo->codegen_data = VirtualAlloc(NULL, sizeof(voodoo_x86_data_t) * BLOCK_NUM*4, MEM_COMMIT, PAGE_EXECUTE_READWRITE);
#else
voodoo->codegen_data = mmap(0, sizeof(voodoo_x86_data_t) * BLOCK_NUM*4, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_ANON|MAP_PRIVATE, 0, 0);
#endif
voodoo->codegen_data = plat_mmap(sizeof(voodoo_x86_data_t) * BLOCK_NUM*4, 1);
for (c = 0; c < 256; c++)
{
@@ -3408,9 +3394,5 @@ void voodoo_codegen_init(voodoo_t *voodoo)
void voodoo_codegen_close(voodoo_t *voodoo)
{
#if defined WIN32 || defined _WIN32 || defined _WIN32
VirtualFree(voodoo->codegen_data, 0, MEM_RELEASE);
#else
munmap(voodoo->codegen_data, sizeof(voodoo_x86_data_t) * BLOCK_NUM*4);
#endif
plat_munmap(voodoo->codegen_data, sizeof(voodoo_x86_data_t) * BLOCK_NUM*4);
}