Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F159769721
D57573.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D57573.id.diff
View Options
Index: sys/compat/linuxkpi/common/include/linux/pci.h
===================================================================
--- sys/compat/linuxkpi/common/include/linux/pci.h
+++ sys/compat/linuxkpi/common/include/linux/pci.h
@@ -908,6 +908,13 @@
#define pci_unmap_len dma_unmap_len
#define pci_unmap_len_set dma_unmap_len_set
+void *linuxkpi_pci_map_rom(struct pci_dev *pdev, size_t *size);
+void linuxkpi_pci_unmap_rom(struct pci_dev *pdev, void *rom);
+#if defined(LINUXKPI_VERSION) && LINUXKPI_VERSION >= 61300
+#define pci_map_rom(pdev, size) linuxkpi_pci_map_rom(pdev, size)
+#define pci_unmap_rom(pdev, rom) linuxkpi_pci_unmap_rom(pdev, rom)
+#endif
+
typedef unsigned int __bitwise pci_channel_state_t;
typedef unsigned int __bitwise pci_ers_result_t;
Index: sys/compat/linuxkpi/common/src/linux_pci.c
===================================================================
--- sys/compat/linuxkpi/common/src/linux_pci.c
+++ sys/compat/linuxkpi/common/src/linux_pci.c
@@ -1546,6 +1546,33 @@
return (bus_child_present(dev));
}
+void *
+linuxkpi_pci_map_rom(struct pci_dev *pdev, size_t *size)
+{
+ device_t dev;
+
+ dev = pdev->dev.bsddev;
+
+ if (pci_get_class(dev) != PCIC_DISPLAY &&
+ (pci_get_class(dev) != PCIC_OLD ||
+ pci_get_subclass(dev) != PCIS_OLD_VGA)) {
+ pr_debug("%s: TODO\n", __func__);
+ return (NULL);
+ }
+
+ return (vga_pci_map_bios(device_get_parent(dev), size));
+}
+
+void
+linuxkpi_pci_unmap_rom(struct pci_dev *pdev, void *rom)
+{
+ device_t dev;
+
+ dev = pdev->dev.bsddev;
+
+ vga_pci_unmap_bios(device_get_parent(dev), rom);
+}
+
CTASSERT(sizeof(dma_addr_t) <= sizeof(uint64_t));
struct linux_dma_obj {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Jun 19, 12:49 AM (18 h, 7 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
34063717
Default Alt Text
D57573.id.diff (1 KB)
Attached To
Mode
D57573: linuxkpi: Add `pci_map_rom()` and `pci_unmap_rom()`
Attached
Detach File
Event Timeline
Log In to Comment