| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
Proxied memory was not rounded up to page size, causing
error with vm_map'ing the underlying memory.
WARNING: Assumes pci memory resources are at least page aligned.
If not, this will expose part of next resource to userspace.
Message-ID: <20241228073545.712061-1-damien@zamaudio.com>
|
|
|
|
|
|
|
| |
* pci-arbiter/netfs_impl.c:
* get_filemap_region(): Return MACH_PORT_NULL and set errno to EOPNOTSUPP
when the client tries to map a IO region file.
Message-Id: <20230705193812.6384-2-jlledom@mailfence.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* pci-arbiter/device_map.h:
* pci-arbiter/device_map.c:
* New function: device_map_rom
* Copies the whole rom in the arbiter space.
* pci-arbiter/pcifs.h:
* struct pcifs_dirent:
* New field to store the mapping address for each device rom.
o pci-arbiter/func_files.h:
* pci-arbiter/func_files.c:
* read_rom_file:
* Retrieves the rom contents from the local space instead of
libpciaccess.
* pci-arbiter/netfs_impl.c:
* netfs_attempt_read:get_filemap_region
* Update call to read_rom_file.
* get_filemap_region:
* Uses the old code at netfs_get_filemap to get a proxy to
the device memory region.
* get_filemap_rom:
* Returns a proxy to the locally mapped device rom.
* netfs_get_filemap:
* Checks the requested file to map and calls get_filemap_rom,
get_filemap_region or returns en error.
Message-Id: <20220815161520.6059-2-jlledom@mailfence.com>
|
|
|
|
|
| |
Now that the RPCs have const, this forces us cleaning our const-meant
functions.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use a internal array of pointers instead
* pci-arbiter/device_map.h:
* Update device_map_region() prototype
* Now it receives an output address as parameter
* pci-arbiter/device_map.c:
* Update device_map_region() definition to match the new prototype
* Support for legacy mappings
* When the base address is lower than 1 mb
* pci-arbiter/func_files.c:
* pci-arbiter/netfs_impl.c:
* Update calls to device_map_region to match the new prototype
* Use the internal array of pointers instead of region->memory
* pci-arbiter/pcifs.h:
* struct pcifs_dirent: Declare the internal array of pointers
Message-Id: <20220108121537.6277-2-jlledom@mailfence.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* pci-arbiter/Makefile:
* Add device_map.c to sources
* pci-arbiter/device_map.c:
* pci-arbiter/device_map.h:
* New module for device mapping
* Relies on libpciaccess mapping methods
* pci-arbiter/func_files.c:
* io_region_file(): Use the new device mapping module
* pci-arbiter/netfs_impl.c:
* Implements netfs_get_filemap():
* Uses the device mapping module to map the region to the
arbiter space
* Calls the kernel RPC vm_region_create_proxy() to obtain the
memory object proxy
* Only region files are mapped for now
Message-Id: <20211219112647.11512-4-jlledom@mailfence.com>
|
|
|
|
|
|
|
|
| |
* acpi/netfs_impl.c (get_dirents): Fix computing number of
elements to be returned. Simplify computing the data size.
* pci-arbiter/netfs_impl.c (get_dirents): Likewise.
(netfs_get_dirents): Fix passing max_data_len rather than max_entries a
second time.
|
|
|
|
|
| |
* pci-arbiter/netfs_impl.c:
* netfs_attempt_write: Cast op function to pci_io_op_t
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch removes all embedded pciaccess code from the arbiter
and instead uses the external pciaccess library.
* pci-arbiter/Makefile:
* Remove pci_access.c and x86_pci.c from the sources.
* pci-arbiter/func_files.c:
* io_config_file: Use a harcoded PCI config size.
* read_rom_file:
Grab the full rom first, then return the
requested amount.
* pci-arbiter/main.c:
* main: Call create_fs_tree() w/o pci_sys.
Since it's not part of the translator anymore.
* pci-arbiter/netfs_impl.c:
* netfs_attempt_read:
Send pci_device_cfg_read() as the read op.
* netfs_attempt_write:
Send pci_device_cfg_write() as the write op.
* pci-arbiter/pci-ops.c:
* S_pci_conf_read: Call libpciaccess' pci_device_cfg_read().
* S_pci_conf_write: Call libpciaccess' pci_device_cfg_write().
* S_pci_get_dev_rom:
Set rom.base_addr to zero for the moment, until
libpciaccess esposes it properly.
* pci-arbiter/pci_access.c: Deleted
* pci-arbiter/pci_access.h: Deleted
* pci-arbiter/pcifs.c:
* create_fs_tree:
Remove the pci_sys parameter.
Use libpciaccess' iterator.
Use a hardcoded config space size.
* pci-arbiter/pcifs.h: Definitions for changes in pcifs.c.
* pci-arbiter/x86_pci.c: Deleted.
* pci-arbiter/x86_pci.h: Deleted.
|
|
|