Commit 3a51dee658b9cc781acd57dd11bffbd1e402f93d
1 parent
cc38b844
disabled signal hacks for softmmu version (qemu should be much more portable now...)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@409 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
1 changed file
with
33 additions
and
29 deletions
vl.c
... | ... | @@ -2067,40 +2067,40 @@ static void ide_identify(IDEState *s) |
2067 | 2067 | |
2068 | 2068 | memset(s->io_buffer, 0, 512); |
2069 | 2069 | p = (uint16_t *)s->io_buffer; |
2070 | - stw(p + 0, 0x0040); | |
2071 | - stw(p + 1, s->cylinders); | |
2072 | - stw(p + 3, s->heads); | |
2073 | - stw(p + 4, 512 * s->sectors); /* sectors */ | |
2074 | - stw(p + 5, 512); /* sector size */ | |
2075 | - stw(p + 6, s->sectors); | |
2076 | - stw(p + 20, 3); /* buffer type */ | |
2077 | - stw(p + 21, 512); /* cache size in sectors */ | |
2078 | - stw(p + 22, 4); /* ecc bytes */ | |
2070 | + stw_raw(p + 0, 0x0040); | |
2071 | + stw_raw(p + 1, s->cylinders); | |
2072 | + stw_raw(p + 3, s->heads); | |
2073 | + stw_raw(p + 4, 512 * s->sectors); /* sectors */ | |
2074 | + stw_raw(p + 5, 512); /* sector size */ | |
2075 | + stw_raw(p + 6, s->sectors); | |
2076 | + stw_raw(p + 20, 3); /* buffer type */ | |
2077 | + stw_raw(p + 21, 512); /* cache size in sectors */ | |
2078 | + stw_raw(p + 22, 4); /* ecc bytes */ | |
2079 | 2079 | padstr((uint8_t *)(p + 27), "QEMU HARDDISK", 40); |
2080 | 2080 | #if MAX_MULT_SECTORS > 1 |
2081 | - stw(p + 47, MAX_MULT_SECTORS); | |
2081 | + stw_raw(p + 47, MAX_MULT_SECTORS); | |
2082 | 2082 | #endif |
2083 | - stw(p + 48, 1); /* dword I/O */ | |
2084 | - stw(p + 49, 1 << 9); /* LBA supported, no DMA */ | |
2085 | - stw(p + 51, 0x200); /* PIO transfer cycle */ | |
2086 | - stw(p + 52, 0x200); /* DMA transfer cycle */ | |
2087 | - stw(p + 54, s->cylinders); | |
2088 | - stw(p + 55, s->heads); | |
2089 | - stw(p + 56, s->sectors); | |
2083 | + stw_raw(p + 48, 1); /* dword I/O */ | |
2084 | + stw_raw(p + 49, 1 << 9); /* LBA supported, no DMA */ | |
2085 | + stw_raw(p + 51, 0x200); /* PIO transfer cycle */ | |
2086 | + stw_raw(p + 52, 0x200); /* DMA transfer cycle */ | |
2087 | + stw_raw(p + 54, s->cylinders); | |
2088 | + stw_raw(p + 55, s->heads); | |
2089 | + stw_raw(p + 56, s->sectors); | |
2090 | 2090 | oldsize = s->cylinders * s->heads * s->sectors; |
2091 | - stw(p + 57, oldsize); | |
2092 | - stw(p + 58, oldsize >> 16); | |
2091 | + stw_raw(p + 57, oldsize); | |
2092 | + stw_raw(p + 58, oldsize >> 16); | |
2093 | 2093 | if (s->mult_sectors) |
2094 | - stw(p + 59, 0x100 | s->mult_sectors); | |
2095 | - stw(p + 60, s->nb_sectors); | |
2096 | - stw(p + 61, s->nb_sectors >> 16); | |
2097 | - stw(p + 80, (1 << 1) | (1 << 2)); | |
2098 | - stw(p + 82, (1 << 14)); | |
2099 | - stw(p + 83, (1 << 14)); | |
2100 | - stw(p + 84, (1 << 14)); | |
2101 | - stw(p + 85, (1 << 14)); | |
2102 | - stw(p + 86, 0); | |
2103 | - stw(p + 87, (1 << 14)); | |
2094 | + stw_raw(p + 59, 0x100 | s->mult_sectors); | |
2095 | + stw_raw(p + 60, s->nb_sectors); | |
2096 | + stw_raw(p + 61, s->nb_sectors >> 16); | |
2097 | + stw_raw(p + 80, (1 << 1) | (1 << 2)); | |
2098 | + stw_raw(p + 82, (1 << 14)); | |
2099 | + stw_raw(p + 83, (1 << 14)); | |
2100 | + stw_raw(p + 84, (1 << 14)); | |
2101 | + stw_raw(p + 85, (1 << 14)); | |
2102 | + stw_raw(p + 86, 0); | |
2103 | + stw_raw(p + 87, (1 << 14)); | |
2104 | 2104 | } |
2105 | 2105 | |
2106 | 2106 | static inline void ide_abort_command(IDEState *s) |
... | ... | @@ -3275,6 +3275,7 @@ void dumb_display_init(DisplayState *ds) |
3275 | 3275 | ds->dpy_refresh = dumb_refresh; |
3276 | 3276 | } |
3277 | 3277 | |
3278 | +#if !defined(CONFIG_SOFTMMU) | |
3278 | 3279 | /***********************************************************/ |
3279 | 3280 | /* cpu signal handler */ |
3280 | 3281 | static void host_segv_handler(int host_signum, siginfo_t *info, |
... | ... | @@ -3285,6 +3286,7 @@ static void host_segv_handler(int host_signum, siginfo_t *info, |
3285 | 3286 | term_exit(); |
3286 | 3287 | abort(); |
3287 | 3288 | } |
3289 | +#endif | |
3288 | 3290 | |
3289 | 3291 | static int timer_irq_pending; |
3290 | 3292 | static int timer_irq_count; |
... | ... | @@ -3807,9 +3809,11 @@ int main(int argc, char **argv) |
3807 | 3809 | /* setup cpu signal handlers for MMU / self modifying code handling */ |
3808 | 3810 | sigfillset(&act.sa_mask); |
3809 | 3811 | act.sa_flags = SA_SIGINFO; |
3812 | +#if !defined(CONFIG_SOFTMMU) | |
3810 | 3813 | act.sa_sigaction = host_segv_handler; |
3811 | 3814 | sigaction(SIGSEGV, &act, NULL); |
3812 | 3815 | sigaction(SIGBUS, &act, NULL); |
3816 | +#endif | |
3813 | 3817 | |
3814 | 3818 | act.sa_sigaction = host_alarm_handler; |
3815 | 3819 | sigaction(SIGALRM, &act, NULL); | ... | ... |