ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/SheepShaver/src/Unix/main_unix.cpp
(Generate patch)

Comparing SheepShaver/src/Unix/main_unix.cpp (file contents):
Revision 1.13 by gbeauche, 2003-11-03T21:28:25Z vs.
Revision 1.23 by gbeauche, 2004-01-04T18:35:21Z

# Line 109 | Line 109
109   #include "user_strings.h"
110   #include "vm_alloc.h"
111   #include "sigsegv.h"
112 + #include "thunks.h"
113  
114   #define DEBUG 0
115   #include "debug.h"
# Line 131 | Line 132
132   #endif
133  
134  
135 + // Enable emulation of unaligned lmw/stmw?
136 + #define EMULATE_UNALIGNED_LOADSTORE_MULTIPLE 1
137 +
138   // Enable Execute68k() safety checks?
139   #define SAFE_EXEC_68K 0
140  
# Line 145 | Line 149
149   const char ROM_FILE_NAME[] = "ROM";
150   const char ROM_FILE_NAME2[] = "Mac OS ROM";
151  
152 < const uint32 RAM_BASE = 0x20000000;                     // Base address of RAM
152 > const uintptr RAM_BASE = 0x20000000;            // Base address of RAM
153   const uint32 SIG_STACK_SIZE = 0x10000;          // Size of signal stack
154  
155  
# Line 172 | Line 176 | void *TOC;                             // Small data pointer (r13
176   #endif
177   uint32 RAMBase;                 // Base address of Mac RAM
178   uint32 RAMSize;                 // Size of Mac RAM
175 uint32 SheepStack1Base; // SheepShaver first alternate stack base
176 uint32 SheepStack2Base; // SheepShaver second alternate stack base
177 uint32 SheepThunksBase; // SheepShaver thunks base
179   uint32 KernelDataAddr;  // Address of Kernel Data
180   uint32 BootGlobsAddr;   // Address of BootGlobs structure at top of Mac RAM
181   uint32 PVR;                             // Theoretical PVR
# Line 185 | Line 186 | int64 BusClockSpeed;   // Bus clock speed
186   // Global variables
187   char *x_display_name = NULL;                            // X11 display name
188   Display *x_display = NULL;                                      // X11 display handle
189 + #ifdef X11_LOCK_TYPE
190 + X11_LOCK_TYPE x_display_lock = X11_LOCK_INIT; // X11 display lock
191 + #endif
192  
193   static int zero_fd = 0;                                         // FD of /dev/zero
190 static bool sheep_area_mapped = false;          // Flag: SheepShaver data area mmap()ed
194   static bool lm_area_mapped = false;                     // Flag: Low Memory area mmap()ped
195   static int kernel_area = -1;                            // SHM ID of Kernel Data area
196   static bool rom_area_mapped = false;            // Flag: Mac ROM mmap()ped
# Line 207 | Line 210 | static bool ready_for_signals = false;
210   static int64 num_segv = 0;                                      // Number of handled SEGV signals
211  
212   static struct sigaction sigusr2_action;         // Interrupt signal (of emulator thread)
213 < #if !EMULATED_PPC
213 > #if EMULATED_PPC
214 > static uintptr sig_stack = 0;                           // Stack for PowerPC interrupt routine
215 > #else
216   static struct sigaction sigsegv_action;         // Data access exception signal (of emulator thread)
217   static struct sigaction sigill_action;          // Illegal instruction signal (of emulator thread)
218   static void *sig_stack = NULL;                          // Stack for signal handlers
219   static void *extra_stack = NULL;                        // Stack for SIGSEGV inside interrupt handler
220   static bool emul_thread_fatal = false;          // Flag: MacOS thread crashed, tick thread shall dump debug output
221   static sigregs sigsegv_regs;                            // Register dump when crashed
222 + static const char *crash_reason = NULL;         // Reason of the crash (SIGSEGV, SIGBUS, SIGILL)
223   #endif
224  
225 + uintptr SheepMem::zero_page = 0;                        // Address of ro page filled in with zeros
226 + uintptr SheepMem::base = 0x60000000;            // Address of SheepShaver data
227 + uintptr SheepMem::top = 0;                                      // Top of SheepShaver data (stack like storage)
228 +
229  
230   // Prototypes
231   static void Quit(void);
# Line 252 | Line 262 | extern void paranoia_check(void);
262  
263   #if EMULATED_PPC
264   /*
265 + *  Return signal stack base
266 + */
267 +
268 + uintptr SignalStackBase(void)
269 + {
270 +        return sig_stack + SIG_STACK_SIZE;
271 + }
272 +
273 +
274 + /*
275   *  Atomic operations
276   */
277  
# Line 470 | Line 490 | int main(int argc, char **argv)
490                  ErrorAlert(str);
491                  goto quit;
492          }
493 <        kernel_data = (KernelData *)0x68ffe000;
493 >        kernel_data = (KernelData *)KERNEL_DATA_BASE;
494          emulator_data = &kernel_data->ed;
495 <        KernelDataAddr = (uint32)kernel_data;
495 >        KernelDataAddr = KERNEL_DATA_BASE;
496          D(bug("Kernel Data at %p, Emulator Data at %p\n", kernel_data, emulator_data));
497  
498          // Create area for SheepShaver data
499 <        if (vm_acquire_fixed((char *)SHEEP_BASE, SHEEP_SIZE) < 0) {
499 >        if (!SheepMem::Init()) {
500                  sprintf(str, GetString(STR_SHEEP_MEM_MMAP_ERR), strerror(errno));
501                  ErrorAlert(str);
502                  goto quit;
503          }
484        SheepStack1Base = SHEEP_BASE + 0x10000;
485        SheepStack2Base = SheepStack1Base + 0x10000;
486        SheepThunksBase = SheepStack2Base + 0x1000;
487        sheep_area_mapped = true;
504  
505          // Create area for Mac ROM
506          if (vm_acquire_fixed((char *)ROM_BASE, ROM_AREA_SIZE) < 0) {
# Line 579 | Line 595 | int main(int argc, char **argv)
595          boot_globs[1] = htonl(RAMSize);
596          boot_globs[2] = htonl((uint32)-1);                      // End of bank table
597  
598 +        // Init thunks
599 +        if (!ThunksInit())
600 +                goto quit;
601 +
602          // Init drivers
603          SonyInit();
604          DiskInit();
# Line 588 | Line 608 | int main(int argc, char **argv)
608          // Init external file system
609          ExtFSInit();
610  
611 +        // Init ADB
612 +        ADBInit();
613 +
614          // Init audio
615          AudioInit();
616  
# Line 622 | Line 645 | int main(int argc, char **argv)
645          // Initialize Kernel Data
646          memset(kernel_data, 0, sizeof(KernelData));
647          if (ROMType == ROMTYPE_NEWWORLD) {
648 <                static uint32 of_dev_tree[4] = {0, 0, 0, 0};
649 <                static uint8 vector_lookup_tbl[128];
650 <                static uint8 vector_mask_tbl[64];
648 >                uintptr of_dev_tree = SheepMem::Reserve(4 * sizeof(uint32));
649 >                memset((void *)of_dev_tree, 0, 4 * sizeof(uint32));
650 >                uintptr vector_lookup_tbl = SheepMem::Reserve(128);
651 >                uintptr vector_mask_tbl = SheepMem::Reserve(64);
652                  memset((uint8 *)kernel_data + 0xb80, 0x3d, 0x80);
653 <                memset(vector_lookup_tbl, 0, 128);
654 <                memset(vector_mask_tbl, 0, 64);
653 >                memset((void *)vector_lookup_tbl, 0, 128);
654 >                memset((void *)vector_mask_tbl, 0, 64);
655                  kernel_data->v[0xb80 >> 2] = htonl(ROM_BASE);
656 <                kernel_data->v[0xb84 >> 2] = htonl((uint32)of_dev_tree);        // OF device tree base
657 <                kernel_data->v[0xb90 >> 2] = htonl((uint32)vector_lookup_tbl);
658 <                kernel_data->v[0xb94 >> 2] = htonl((uint32)vector_mask_tbl);
656 >                kernel_data->v[0xb84 >> 2] = htonl(of_dev_tree);                        // OF device tree base
657 >                kernel_data->v[0xb90 >> 2] = htonl(vector_lookup_tbl);
658 >                kernel_data->v[0xb94 >> 2] = htonl(vector_mask_tbl);
659                  kernel_data->v[0xb98 >> 2] = htonl(ROM_BASE);                           // OpenPIC base
660                  kernel_data->v[0xbb0 >> 2] = htonl(0);                                          // ADB base
661                  kernel_data->v[0xc20 >> 2] = htonl(RAMSize);
# Line 667 | Line 691 | int main(int argc, char **argv)
691          D(bug("Initializing Low Memory...\n"));
692          memset(NULL, 0, 0x3000);
693          WriteMacInt32(XLM_SIGNATURE, FOURCC('B','a','a','h'));                  // Signature to detect SheepShaver
694 <        WriteMacInt32(XLM_KERNEL_DATA, (uint32)kernel_data);                    // For trap replacement routines
694 >        WriteMacInt32(XLM_KERNEL_DATA, KernelDataAddr);                                 // For trap replacement routines
695          WriteMacInt32(XLM_PVR, PVR);                                                                    // Theoretical PVR
696          WriteMacInt32(XLM_BUS_CLOCK, BusClockSpeed);                                    // For DriverServicesLib patch
697          WriteMacInt16(XLM_EXEC_RETURN_OPCODE, M68K_EXEC_RETURN);                // For Execute68k() (RTS from the executed 68k code will jump here and end 68k mode)
698 < #if EMULATED_PPC
699 <        WriteMacInt32(XLM_ETHER_INIT, POWERPC_NATIVE_OP_FUNC(NATIVE_ETHER_INIT));
700 <        WriteMacInt32(XLM_ETHER_TERM, POWERPC_NATIVE_OP_FUNC(NATIVE_ETHER_TERM));
677 <        WriteMacInt32(XLM_ETHER_OPEN, POWERPC_NATIVE_OP_FUNC(NATIVE_ETHER_OPEN));
678 <        WriteMacInt32(XLM_ETHER_CLOSE, POWERPC_NATIVE_OP_FUNC(NATIVE_ETHER_CLOSE));
679 <        WriteMacInt32(XLM_ETHER_WPUT, POWERPC_NATIVE_OP_FUNC(NATIVE_ETHER_WPUT));
680 <        WriteMacInt32(XLM_ETHER_RSRV, POWERPC_NATIVE_OP_FUNC(NATIVE_ETHER_RSRV));
681 <        WriteMacInt32(XLM_VIDEO_DOIO, POWERPC_NATIVE_OP_FUNC(NATIVE_VIDEO_DO_DRIVER_IO));
682 < #else
683 <        WriteMacInt32(XLM_TOC, (uint32)TOC);                                                    // TOC pointer of emulator
684 <        WriteMacInt32(XLM_ETHER_INIT, (uint32)InitStreamModule);                // DLPI ethernet driver functions
685 <        WriteMacInt32(XLM_ETHER_TERM, (uint32)TerminateStreamModule);
686 <        WriteMacInt32(XLM_ETHER_OPEN, (uint32)ether_open);
687 <        WriteMacInt32(XLM_ETHER_CLOSE, (uint32)ether_close);
688 <        WriteMacInt32(XLM_ETHER_WPUT, (uint32)ether_wput);
689 <        WriteMacInt32(XLM_ETHER_RSRV, (uint32)ether_rsrv);
690 <        WriteMacInt32(XLM_VIDEO_DOIO, (uint32)VideoDoDriverIO);
698 >        WriteMacInt32(XLM_ZERO_PAGE, SheepMem::ZeroPage());                             // Pointer to read-only page with all bits set to 0
699 > #if !EMULATED_PPC
700 >        WriteMacInt32(XLM_TOC, (uint32)TOC);                                                            // TOC pointer of emulator
701   #endif
702 +        WriteMacInt32(XLM_ETHER_INIT, NativeFunction(NATIVE_ETHER_INIT));       // DLPI ethernet driver functions
703 +        WriteMacInt32(XLM_ETHER_TERM, NativeFunction(NATIVE_ETHER_TERM));
704 +        WriteMacInt32(XLM_ETHER_OPEN, NativeFunction(NATIVE_ETHER_OPEN));
705 +        WriteMacInt32(XLM_ETHER_CLOSE, NativeFunction(NATIVE_ETHER_CLOSE));
706 +        WriteMacInt32(XLM_ETHER_WPUT, NativeFunction(NATIVE_ETHER_WPUT));
707 +        WriteMacInt32(XLM_ETHER_RSRV, NativeFunction(NATIVE_ETHER_RSRV));
708 +        WriteMacInt32(XLM_VIDEO_DOIO, NativeFunction(NATIVE_VIDEO_DO_DRIVER_IO));
709          D(bug("Low Memory initialized\n"));
710  
711          // Start 60Hz thread
# Line 726 | Line 743 | int main(int argc, char **argv)
743   #endif
744  
745   #if !EMULATED_PPC
746 <        // Install SIGSEGV handler
746 >        // Install SIGSEGV and SIGBUS handlers
747          sigemptyset(&sigsegv_action.sa_mask);   // Block interrupts during SEGV handling
748          sigaddset(&sigsegv_action.sa_mask, SIGUSR2);
749          sigsegv_action.sa_handler = (__sighandler_t)sigsegv_handler;
# Line 737 | Line 754 | int main(int argc, char **argv)
754                  ErrorAlert(str);
755                  goto quit;
756          }
757 +        if (sigaction(SIGBUS, &sigsegv_action, NULL) < 0) {
758 +                sprintf(str, GetString(STR_SIGSEGV_INSTALL_ERR), strerror(errno));
759 +                ErrorAlert(str);
760 +                goto quit;
761 +        }
762  
763          // Install SIGILL handler
764          sigemptyset(&sigill_action.sa_mask);    // Block interrupts during ILL handling
# Line 800 | Line 822 | static void Quit(void)
822          }
823  
824   #if !EMULATED_PPC
825 <        // Uninstall SIGSEGV handler
825 >        // Uninstall SIGSEGV and SIGBUS handlers
826          sigemptyset(&sigsegv_action.sa_mask);
827          sigsegv_action.sa_handler = SIG_DFL;
828          sigsegv_action.sa_flags = 0;
829          sigaction(SIGSEGV, &sigsegv_action, NULL);
830 +        sigaction(SIGBUS, &sigsegv_action, NULL);
831  
832          // Uninstall SIGILL handler
833          sigemptyset(&sigill_action.sa_mask);
# Line 831 | Line 854 | static void Quit(void)
854          // Exit audio
855          AudioExit();
856  
857 +        // Exit ADB
858 +        ADBExit();
859 +
860          // Exit video
861          VideoExit();
862  
# Line 843 | Line 869 | static void Quit(void)
869          DiskExit();
870          SonyExit();
871  
872 +        // Delete SheepShaver globals
873 +        SheepMem::Exit();
874 +
875          // Delete RAM area
876          if (ram_area_mapped)
877                  vm_release((char *)RAM_BASE, RAMSize);
# Line 954 | Line 983 | void Execute68kTrap(uint16 trap, M68kReg
983          uint16 proc[2] = {trap, M68K_RTS};
984          Execute68k((uint32)proc, r);
985   }
957
958
959 /*
960 *  Execute PPC code from EMUL_OP routine (real mode switch)
961 */
962
963 void ExecutePPC(void (*func)())
964 {
965        uint32 tvect[2] = {(uint32)func, 0};    // Fake TVECT
966        RoutineDescriptor desc = BUILD_PPC_ROUTINE_DESCRIPTOR(0, tvect);
967        M68kRegisters r;
968        Execute68k((uint32)&desc, &r);
969 }
986   #endif
987  
988  
# Line 1045 | Line 1061 | void MakeExecutable(int dummy, void *sta
1061  
1062   void PatchAfterStartup(void)
1063   {
1048 #if EMULATED_PPC
1064          ExecuteNative(NATIVE_VIDEO_INSTALL_ACCEL);
1050 #else
1051        ExecutePPC(VideoInstallAccel);
1052 #endif
1065          InstallExtFS();
1066   }
1067  
# Line 1096 | Line 1108 | static void *tick_func(void *arg)
1108                          // Yes, dump registers
1109                          pt_regs *r = (pt_regs *)&sigsegv_regs;
1110                          char str[256];
1111 <                        sprintf(str, "SIGSEGV\n"
1111 >                        if (crash_reason == NULL)
1112 >                                crash_reason = "SIGSEGV";
1113 >                        sprintf(str, "%s\n"
1114                                  "   pc %08lx     lr %08lx    ctr %08lx    msr %08lx\n"
1115                                  "  xer %08lx     cr %08lx  \n"
1116                                  "   r0 %08lx     r1 %08lx     r2 %08lx     r3 %08lx\n"
# Line 1107 | Line 1121 | static void *tick_func(void *arg)
1121                                  "  r20 %08lx    r21 %08lx    r22 %08lx    r23 %08lx\n"
1122                                  "  r24 %08lx    r25 %08lx    r26 %08lx    r27 %08lx\n"
1123                                  "  r28 %08lx    r29 %08lx    r30 %08lx    r31 %08lx\n",
1124 +                                crash_reason,
1125                                  r->nip, r->link, r->ctr, r->msr,
1126                                  r->xer, r->ccr,
1127                                  r->gpr[0], r->gpr[1], r->gpr[2], r->gpr[3],
# Line 1152 | Line 1167 | static void *tick_func(void *arg)
1167  
1168   void Set_pthread_attr(pthread_attr_t *attr, int priority)
1169   {
1170 <        // nothing to do
1170 > #ifdef HAVE_PTHREADS
1171 >        pthread_attr_init(attr);
1172 > #if defined(_POSIX_THREAD_PRIORITY_SCHEDULING)
1173 >        // Some of these only work for superuser
1174 >        if (geteuid() == 0) {
1175 >                pthread_attr_setinheritsched(attr, PTHREAD_EXPLICIT_SCHED);
1176 >                pthread_attr_setschedpolicy(attr, SCHED_FIFO);
1177 >                struct sched_param fifo_param;
1178 >                fifo_param.sched_priority = ((sched_get_priority_min(SCHED_FIFO) +
1179 >                                              sched_get_priority_max(SCHED_FIFO)) / 2 +
1180 >                                             priority);
1181 >                pthread_attr_setschedparam(attr, &fifo_param);
1182 >        }
1183 >        if (pthread_attr_setscope(attr, PTHREAD_SCOPE_SYSTEM) != 0) {
1184 > #ifdef PTHREAD_SCOPE_BOUND_NP
1185 >            // If system scope is not available (eg. we're not running
1186 >            // with CAP_SCHED_MGT capability on an SGI box), try bound
1187 >            // scope.  It exposes pthread scheduling to the kernel,
1188 >            // without setting realtime priority.
1189 >            pthread_attr_setscope(attr, PTHREAD_SCOPE_BOUND_NP);
1190 > #endif
1191 >        }
1192 > #endif
1193 > #endif
1194   }
1195  
1196  
# Line 1367 | Line 1405 | static void sigusr2_handler(int sig, sig
1405                                          if (InterruptFlags & INTFLAG_VIA) {
1406                                                  ClearInterruptFlag(INTFLAG_VIA);
1407                                                  ADBInterrupt();
1408 <                                                ExecutePPC(VideoVBL);
1408 >                                                ExecuteNative(NATIVE_VIDEO_VBL);
1409                                          }
1410                                  }
1411   #endif
# Line 1526 | Line 1564 | static void sigsegv_handler(int sig, sig
1564                                  transfer_type = TYPE_STORE; transfer_size = SIZE_HALFWORD; addr_mode = MODE_NORM; break;
1565                          case 45:        // sthu
1566                                  transfer_type = TYPE_STORE; transfer_size = SIZE_HALFWORD; addr_mode = MODE_U; break;
1567 + #if EMULATE_UNALIGNED_LOADSTORE_MULTIPLE
1568 +                        case 46:        // lmw
1569 +                                if (sig == SIGBUS) {
1570 +                                        uint32 ea = (ra == 0 ? 0 : r->gpr[ra]) + imm;
1571 +                                        D(bug("WARNING: unaligned lmw to EA=%08x from IP=%08x\n", ea, r->nip));
1572 +                                        for (int i = rd; i <= 31; i++) {
1573 +                                                r->gpr[i] = ReadMacInt32(ea);
1574 +                                                ea += 4;
1575 +                                        }
1576 +                                        r->nip += 4;
1577 +                                        goto rti;
1578 +                                }
1579 +                                break;
1580 +                        case 47:        // stmw
1581 +                                if (sig == SIGBUS) {
1582 +                                        uint32 ea = (ra == 0 ? 0 : r->gpr[ra]) + imm;
1583 +                                        D(bug("WARNING: unaligned stmw to EA=%08x from IP=%08x\n", ea, r->nip));
1584 +                                        for (int i = rd; i <= 31; i++) {
1585 +                                                WriteMacInt32(ea, r->gpr[i]);
1586 +                                                ea += 4;
1587 +                                        }
1588 +                                        r->nip += 4;
1589 +                                        goto rti;
1590 +                                }
1591 +                                break;
1592 + #endif
1593                  }
1594          
1595                  // Ignore ROM writes
# Line 1561 | Line 1625 | static void sigsegv_handler(int sig, sig
1625          }
1626  
1627          // For all other errors, jump into debugger (sort of...)
1628 +        crash_reason = (sig == SIGBUS) ? "SIGBUS" : "SIGSEGV";
1629          if (!ready_for_signals) {
1630 <                printf("SIGSEGV\n");
1630 >                printf("%s\n");
1631                  printf(" sigcontext %p, pt_regs %p\n", sc, r);
1632                  printf(
1633                          "   pc %08lx     lr %08lx    ctr %08lx    msr %08lx\n"
# Line 1575 | Line 1640 | static void sigsegv_handler(int sig, sig
1640                          "  r20 %08lx    r21 %08lx    r22 %08lx    r23 %08lx\n"
1641                          "  r24 %08lx    r25 %08lx    r26 %08lx    r27 %08lx\n"
1642                          "  r28 %08lx    r29 %08lx    r30 %08lx    r31 %08lx\n",
1643 +                        crash_reason,
1644                          r->nip, r->link, r->ctr, r->msr,
1645                          r->xer, r->ccr,
1646                          r->gpr[0], r->gpr[1], r->gpr[2], r->gpr[3],
# Line 1725 | Line 1791 | power_inst:            sprintf(str, GetString(STR_
1791          }
1792  
1793          // For all other errors, jump into debugger (sort of...)
1794 +        crash_reason = "SIGILL";
1795          if (!ready_for_signals) {
1796 <                printf("SIGILL\n");
1796 >                printf("%s\n");
1797                  printf(" sigcontext %p, pt_regs %p\n", sc, r);
1798                  printf(
1799                          "   pc %08lx     lr %08lx    ctr %08lx    msr %08lx\n"
# Line 1739 | Line 1806 | power_inst:            sprintf(str, GetString(STR_
1806                          "  r20 %08lx    r21 %08lx    r22 %08lx    r23 %08lx\n"
1807                          "  r24 %08lx    r25 %08lx    r26 %08lx    r27 %08lx\n"
1808                          "  r28 %08lx    r29 %08lx    r30 %08lx    r31 %08lx\n",
1809 +                        crash_reason,
1810                          r->nip, r->link, r->ctr, r->msr,
1811                          r->xer, r->ccr,
1812                          r->gpr[0], r->gpr[1], r->gpr[2], r->gpr[3],
# Line 1764 | Line 1832 | rti:;
1832  
1833  
1834   /*
1835 + *  Helpers to share 32-bit addressable data with MacOS
1836 + */
1837 +
1838 + bool SheepMem::Init(void)
1839 + {
1840 +        const int page_size = getpagesize();
1841 +
1842 +        // Allocate SheepShaver globals
1843 +        if (vm_acquire_fixed((char *)base, size) < 0)
1844 +                return false;
1845 +
1846 +        // Allocate page with all bits set to 0
1847 +        zero_page = base + size;
1848 +        if (vm_acquire_fixed((char *)zero_page, page_size) < 0)
1849 +                return false;
1850 +        memset((char *)zero_page, 0, page_size);
1851 +        if (vm_protect((char *)zero_page, page_size, VM_PAGE_READ) < 0)
1852 +                return false;
1853 +
1854 + #if EMULATED_PPC
1855 +        // Allocate alternate stack for PowerPC interrupt routine
1856 +        sig_stack = zero_page + page_size;
1857 +        if (vm_acquire_fixed((char *)sig_stack, SIG_STACK_SIZE) < 0)
1858 +                return false;
1859 + #endif
1860 +
1861 +        top = base + size;
1862 +        return true;
1863 + }
1864 +
1865 + void SheepMem::Exit(void)
1866 + {
1867 +        if (top) {
1868 +                const int page_size = getpagesize();
1869 +
1870 +                // Delete SheepShaver globals
1871 +                vm_release((void *)base, size);
1872 +
1873 +                // Delete zero page
1874 +                vm_release((void *)zero_page, page_size);
1875 +
1876 + #if EMULATED_PPC
1877 +                // Delete alternate stack for PowerPC interrupt routine
1878 +                vm_release((void *)sig_stack, SIG_STACK_SIZE);
1879 + #endif
1880 +        }
1881 + }
1882 +
1883 +
1884 + /*
1885   *  Display alert
1886   */
1887  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines