Skip to content
Permalink
Browse files
kernel/resource: Make ioport_resource.start configurable
Make IO space base address to be configurable through IO_SPACE_BASE.

This will allow architectures which do not natively support IO ports -
like arm64 - to harden against legacy ISA-based drivers which use
hardcoded addresses to access IO ports.

Any attempts for these drivers to request a resource region will now fail
for architectures with set IO_SPACE_BASE above legacy ISA IO port region
(0xffff).

Signed-off-by: John Garry <john.garry@huawei.com>
  • Loading branch information
johnpgarry authored and intel-lab-lkp committed Jan 15, 2021
1 parent 0b1f561 commit 48d619e4d6beb0d7a086cbe60a0b24355d3ddd52
Showing 1 changed file with 1 addition and 1 deletion.
@@ -29,7 +29,7 @@

struct resource ioport_resource = {
.name = "PCI IO",
.start = 0,
.start = IO_SPACE_BASE,
.end = IO_SPACE_LIMIT,
.flags = IORESOURCE_IO,
};

0 comments on commit 48d619e

Please sign in to comment.