SS: Apple Silicon Mac: without shared memory

This commit is contained in:
kanjitalk755 2022-06-04 16:41:12 +09:00
parent 11e88dd94f
commit 8cd260690c
3 changed files with 4 additions and 4 deletions

View File

@ -428,7 +428,7 @@
/* Define if the __PAGEZERO Mach-O Low Memory Globals hack works on this
system. */
/* #define PAGEZERO_HACK 1 */
#define PAGEZERO_HACK 1
/* Define as the return type of signal handlers (`int' or `void'). */
#define RETSIGTYPE void

View File

@ -196,7 +196,7 @@ uint8 *RAMBaseHost; // Base address of Mac RAM (host address space)
uint8 *ROMBaseHost; // Base address of Mac ROM (host address space)
uint32 ROMEnd;
#if defined(__APPLE__) && defined(__x86_64__)
#ifdef __APPLE__
uint8 gZeroPage[0x3000], gKernelData[0x2000];
#endif
@ -921,7 +921,7 @@ int main(int argc, char **argv)
goto quit;
}
#if !defined(__APPLE__) || !defined(__x86_64__)
#ifndef __APPLE__
// Create areas for Kernel Data
if (!kernel_data_init())
goto quit;

View File

@ -206,7 +206,7 @@ const uintptr VMBaseDiff = NATMEM_OFFSET;
static inline uint8 * vm_do_get_real_address(vm_addr_t addr)
{
uintptr a = vm_wrap_address(addr);
#if defined(__APPLE__) && defined(__x86_64__)
#ifdef __APPLE__
extern uint8 gZeroPage[0x3000], gKernelData[0x2000];
if (a < 0x3000) return &gZeroPage[a];
else if ((a & ~0x1fff) == 0x68ffe000 || (a & ~0x1fff) == 0x5fffe000) return &gKernelData[a & 0x1fff];