summaryrefslogtreecommitdiff
path: root/hw/core/platform-bus.c
AgeCommit message (Collapse)AuthorFilesLines
2016-01-29hw/core: Clean up includesPeter Maydell1-0/+1
Clean up includes so that osdep.h is included first and headers which it implies are not included manually. This commit was created with scripts/clean-includes. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 1453832250-766-37-git-send-email-peter.maydell@linaro.org
2016-01-13sysbus: Don't use hw_error() in machine_init_done_notifiersMarkus Armbruster1-13/+12
platform_bus_map_irq() and platform_bus_map_mmio() use hw_error() to fail. They run in machine_init_done_notifiers, via platform_bus_init_notify() and link_sysbus_device(). Printing CPU registers is not helpful there. Replace hw_error() by error_report(); exit(1). If these are programming errors, it should be replaced by an assertion instead. While there, observe that both functions always return 0, and link_sysbus_device() ignores the return value. Change them to void. Cc: Alexander Graf <agraf@suse.de> Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Message-Id: <1450370121-5768-9-git-send-email-armbru@redhat.com>
2015-06-22Include monitor/monitor.h exactly where neededMarkus Armbruster1-1/+0
In particular, don't include it into headers. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com>
2014-11-04sysbus: Add new platform bus helper deviceAlexander Graf1-0/+253
We need to support spawning of sysbus devices dynamically via the command line. The easiest way to represent these dynamically spawned devices in the guest's memory and IRQ layout is by preallocating some space for dynamic sysbus devices. This is what the "platform bus" device does. It is a sysbus device that exports a configurably sized MMIO region and a configurable number of IRQ lines. When this device encounters sysbus devices that have been dynamically created and not manually wired up, it dynamically connects them to its own pool of resources. The machine model can then loop through all of these devices and create a guest configuration (device tree) to make them visible to the guest. Signed-off-by: Alexander Graf <agraf@suse.de>