History | View | Annotate | Download (14 kB)
Add endianness as io mem parameter
As stated before, devices can be little, big or native endian. Thetarget endianness is not of their concern, so we need to push thingsdown a level.
This patch adds a parameter to cpu_register_io_memory that allows adevice to choose its endianness. For now, all devices simply choose...
Make simple io mem handler endian aware
As an alternative to the 3 individual handlers, there is also a simplifiedio mem hook function. To be consistent, let's add an endianness parameterthere too.
Signed-off-by: Alexander Graf <agraf@suse.de>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
pci_bridge: introduce pci bridge library.
introduce pci bridge library.convert apb bridge and dec p2p bridge to use new pci bridge library.save/restore is supported as a side effect.This is also preparation for pci express root/upstream/downstream port....
pci/bridge: split out pci bridge code into pci_bridge.c from pci.c
Move pci bridge related code into pci_bridge.c from pci.cfor further enhancement. pci.c is big enough now, so split it out.No code change but exporting some accesser functions.
In fact, few pci bridge functions stays in pci.c....
pci: set PCI multi-function bit appropriately.
Set PCI multi-function bit according to multifunction property.PCI address, devfn ,is exported to users as addr property,so users can populate pci function(PCIDevice in qemu)at arbitrary devfn.It means each function(PCIDevice) don't know whether pci device...
pci_bridge: make pci bridge aware of pci multi function bit.
make pci bridge aware of pci multi function property and let pci genericcode to set the bit.
Cc: Blue Swirl <blauwirbel@gmail.com>Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
pci: remove PCIDeviceInfo::header_type
replace PCIDeviceInfo::header_type with is_bridgeas suggested by Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
pci: don't overwrite multi functio bit in pci header type.
Don't overwrite pci header type.Otherwise, multi function bit which pci_init_header_type() setsappropriately is lost.Anyway PCI_HEADER_TYPE_NORMAL is zero, so it is unnecessary to zerowhich is already zero cleared....
blockdev: Collect block device code in new blockdev.c
Anything that moves hundreds of lines out of vl.c can't be all bad.
Signed-off-by: Markus Armbruster <armbru@redhat.com>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
sparc64: clean up pci bridge map
- remove unused host state and store pci bus pointer only- do not map host state access into unused 1fe.10000000 range- reorder pci region registration- assign pci i/o region to isa_mem_base
Signed-off-by: Igor V. Kovalenko <igor.v.kovalenko@gmail.com>...
apb: don't use any static state
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Fix Sparc64 build
952760bb7bce7fbfe0afcf04fee268745f297b87 missed one change.
apc_pci: simplify using rwhandler
Use rwhandler to simplify apb_pci.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
apb_pci: minor cleanup
pci_data_write ignores high 8 bit in address,so there seems to be no need to set themin apb_pci.
sparc64: use PCI accessors for APB/PBM
Remove useless set to zero lines. Latency programming should bedone by BIOS, reset value is zero.
Add revision to APB, don't enable PCI_COMMAND_MASTER and set statusaccording to APB specification.
sparc64: implement basic IOMMU/interrupt handling
Also add reset control.
Sparc64: byte swap IO port access
This requires an updated OpenBIOS image.
PCI: fix bridge configuration
PCI bridges' qdev info structures must indicate bridge header type,otherwise critical bridge registers (esp. PCI_PRIMARY_BUS,PCI_SECONDARY_BUS, PCI_SUBORDINATE_BUS) will not be writable.
Sparc64: fix PCI probe problems
Byte swap PCI config values.
Remove old bogus PCI config mechanism so that device 0:0.0 can be probed.This requires OpenBIOS r667.
Sparc64: Fix PCI config accessor order
Fix by Igor Kovalenko.
Sparc64: enable real access to PCI configuration space
Leave the bogus access method used by OpenBIOS in place for now.
Sparc64: increase APB register range
Sparc64: move APB PCI memory base to correct location
pci: move apb specific stuff to apb_pci.c
pci code had a TODO to move apb specificpci bridge initialization to apb_pci.Implement this and remove the TODO.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
pci: shorten pci_host_{conf, data}_register_xxx function a bit.
pci_host_data_register_io_memory and its variants are too long a bit.So shorten them. Now they arepci_host_{conf, data}_register_{mmio, mmio_noswap, ioport}()
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>...
pci: pci.h cleanup: move out stuff not in pci.c
pci.h declares some functions which aren'tdefined in pci.h. Clean up moving thingsto appropriate headers, and update all users.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
pci_host: consolidate pci config address access.
consolidate pci_config address access into pci_host.c
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
pci_host.h: move functions in pci_host.h into .c file.
split static functions in pci_host.h into pci_host.c andpci_host_template.h.Later a structures declared in pci_host.h, PCIHostState, will be used.However pci_host.h doesn't allow to include itself easily. This patches...
pci: use PCI_SLOT() and PCI_FUNC().
use PCI_SLOT() and PCI_FUNC() where appropriate instead ofdirect use of bit operation.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>Acked-by: Michael S. Tsirkin <mst@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Add some chipset doc links
New qdev_init_nofail()
Like qdev_init(), but terminate program via hw_error() instead ofreturning an error value.
Use it instead of qdev_init() where terminating the program on failureis okay, either because it's during machine construction, or because...
Revert "Get rid of _t suffix"
In the very least, a change like this requires discussion on the list.
The naming convention is goofy and it causes a massive merge problem. Somethinglike this must be presented on the list first so people can provide input...
Get rid of _t suffix
Some not so obvious bits, slirp and Xen were left alone for the timebeing.
Signed-off-by: malc <av1474@comtv.ru>
ioports: remove unused env parameter and compile only once
The CPU state parameter is not used, remove it and adjust callers. Now wecan compile ioport.c once for all targets.
Sparc64: make system bus parent of PCI bus
We want the argument pass to set_irq to be opaque
piix_pci want to pass more things that the pic
Signed-off-by: Juan Quintela <quintela@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
qdev: add return value to init() callbacks.
Sorry folks, but it has to be. One more of these invasive qdev patches.
We have a serious design bug in the qdev interface: device initcallbacks can't signal failure because the init() callback has noreturn value. This patch fixes it....
Make CPURead/WriteFunc structure 'const'
Sparc64: convert APB to qdev
Thanks to Igor Kovalenko for a bugfix.
Revert "Fix the PCI header type of APB"
This reverts commit e8d2a88755b849bdadaf80d19e342eade3c017bc.
use constant IOPORTS_MASK instead of 0xffff.
Fix the PCI header type of APB
Remove io_index argument from cpu_register_io_memory()
The parameter is always zero except when registering the three internalio regions (ROM, unassigned, notdirty). Remove the parameter to reducethe API's power, thus facilitating future change.
Signed-off-by: Avi Kivity <avi@redhat.com>...
Add common BusState
Implement and use a common device bus state. The main side-effect isthat creating a bus and attaching it to a parent device are no longerseparate operations. For legacy code we allow a NULL parent, but thatshould go away eventually....
Replace gcc variadic macro extension with C99 version
use PCI_HEADER_TYPE.
use symbolic value instead of 0x0e and related value.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Add and use #defines for PCI device classes
This patch adds and uses #defines for PCI device classes and subclases,using a new pci_config_set_class() function, similar to the recentlyadded pci_config_set_vendor_id() and pci_config_set_device_id().
Change since v1: fixed compilation of hw/sun4u.c...
Add Simba device ID
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6465 c046a42c-6fe2-441c-8c8c-71466251a162
Define PCI vendor and device IDs in pci.h (Stuart Brady)
This patch defines PCI vendor and device IDs in pci.h (matching thosefrom Linux's pci_ids.h), and uses those definitions where appropriate.
Change from v1: Introduces pci_config_set_vendor_id() / pci_config_set_device_id()...
Add EBUS bridge
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6266 c046a42c-6fe2-441c-8c8c-71466251a162
Fix APB
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6265 c046a42c-6fe2-441c-8c8c-71466251a162
Remove unnecessary trailing newlines
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6000 c046a42c-6fe2-441c-8c8c-71466251a162
Wrap long lines
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4440 c046a42c-6fe2-441c-8c8c-71466251a162
Break up vl.h.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3674 c046a42c-6fe2-441c-8c8c-71466251a162
More detabification
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3338 c046a42c-6fe2-441c-8c8c-71466251a162
find -type f | xargs sed -i 's/[\t ]$//g' # on most files
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3173 c046a42c-6fe2-441c-8c8c-71466251a162
Replace target_ulong with target_phys_addr_t
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2899 c046a42c-6fe2-441c-8c8c-71466251a162
Unify IRQ handling.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2635 c046a42c-6fe2-441c-8c8c-71466251a162
Sparc64 build fix (Igor Kovalenko).
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2269 c046a42c-6fe2-441c-8c8c-71466251a162
Implement sun4u PCI IRQ routing.Allow multiple PCI busses and PCI-PCI bridges.Fix bugs in Versatile PCI implementation.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2166 c046a42c-6fe2-441c-8c8c-71466251a162
PCI shared IRQ fix (original patch by andrzej zaborowski).
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2165 c046a42c-6fe2-441c-8c8c-71466251a162
Rearrange PCI host emulation code.Add ARM PCI emulation.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1916 c046a42c-6fe2-441c-8c8c-71466251a162