bcm2835_mbox.c (95a9457fd44ad97c518858a4e1586a5498f9773c) bcm2835_mbox.c (e1ecf8c8026fc1b1a742160e69c0ab3087bc2841)
1/*
2 * Raspberry Pi emulation (c) 2012 Gregory Estrade
3 * This code is licensed under the GNU GPLv2 and later.
4 *
5 * This file models the system mailboxes, which are used for
6 * communication with low-bandwidth GPU peripherals. Refs:
7 * https://github.com/raspberrypi/firmware/wiki/Mailboxes
8 * https://github.com/raspberrypi/firmware/wiki/Accessing-mailboxes

--- 162 unchanged lines hidden (view full) ---

171 res = s->mbox[0].config;
172 break;
173
174 case MAIL1_STATUS:
175 res = s->mbox[1].status;
176 break;
177
178 default:
1/*
2 * Raspberry Pi emulation (c) 2012 Gregory Estrade
3 * This code is licensed under the GNU GPLv2 and later.
4 *
5 * This file models the system mailboxes, which are used for
6 * communication with low-bandwidth GPU peripherals. Refs:
7 * https://github.com/raspberrypi/firmware/wiki/Mailboxes
8 * https://github.com/raspberrypi/firmware/wiki/Accessing-mailboxes

--- 162 unchanged lines hidden (view full) ---

171 res = s->mbox[0].config;
172 break;
173
174 case MAIL1_STATUS:
175 res = s->mbox[1].status;
176 break;
177
178 default:
179 qemu_log_mask(LOG_GUEST_ERROR, "%s: Bad offset %"HWADDR_PRIx"\n",
179 qemu_log_mask(LOG_UNIMP, "%s: Unsupported offset 0x%"HWADDR_PRIx"\n",
180 __func__, offset);
181 return 0;
182 }
183
184 bcm2835_mbox_update(s);
185
186 return res;
187}

--- 35 unchanged lines hidden (view full) ---

223 /* Invalid channel number */
224 qemu_log_mask(LOG_GUEST_ERROR, "%s: invalid channel %u\n",
225 __func__, ch);
226 }
227 }
228 break;
229
230 default:
180 __func__, offset);
181 return 0;
182 }
183
184 bcm2835_mbox_update(s);
185
186 return res;
187}

--- 35 unchanged lines hidden (view full) ---

223 /* Invalid channel number */
224 qemu_log_mask(LOG_GUEST_ERROR, "%s: invalid channel %u\n",
225 __func__, ch);
226 }
227 }
228 break;
229
230 default:
231 qemu_log_mask(LOG_GUEST_ERROR, "%s: Bad offset %"HWADDR_PRIx"\n",
232 __func__, offset);
231 qemu_log_mask(LOG_UNIMP, "%s: Unsupported offset 0x%"HWADDR_PRIx
232 " value 0x%"PRIx64"\n",
233 __func__, offset, value);
233 return;
234 }
235
236 bcm2835_mbox_update(s);
237}
238
239static const MemoryRegionOps bcm2835_mbox_ops = {
240 .read = bcm2835_mbox_read,

--- 99 unchanged lines hidden ---
234 return;
235 }
236
237 bcm2835_mbox_update(s);
238}
239
240static const MemoryRegionOps bcm2835_mbox_ops = {
241 .read = bcm2835_mbox_read,

--- 99 unchanged lines hidden ---