Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F146369340
D38944.id118931.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
D38944.id118931.diff
View Options
diff --git a/sys/arm64/arm64/nexus.c b/sys/arm64/arm64/nexus.c
--- a/sys/arm64/arm64/nexus.c
+++ b/sys/arm64/arm64/nexus.c
@@ -83,6 +83,10 @@
struct resource_list nx_resources;
};
+static int force_np;
+SYSCTL_INT(_kern, OID_AUTO, force_nonposted, CTLFLAG_RDTUN, &force_np, 0,
+ "Force all devices to use non-posted device memory");
+
#define DEVTONX(dev) ((struct nexus_device *)device_get_ivars(dev))
static struct rman mem_rman;
@@ -373,7 +377,7 @@
{
struct resource_map_request args;
struct resource_map map;
- int err;
+ int err, use_np;
if ((err = rman_activate_resource(r)) != 0)
return (err);
@@ -386,7 +390,13 @@
case SYS_RES_MEMORY:
if ((rman_get_flags(r) & RF_UNMAPPED) == 0) {
resource_init_map_request(&args);
- if ((flags & BUS_SPACE_MAP_NONPOSTED) != 0)
+ use_np = (flags & BUS_SPACE_MAP_NONPOSTED) != 0 ||
+ force_np;
+ if (!use_np)
+ resource_int_value(device_get_name(child),
+ device_get_unit(child), "force_nonposted",
+ &use_np);
+ if (use_np)
args.memattr = VM_MEMATTR_DEVICE_NP;
err = nexus_map_resource(bus, child, type, r, &args,
&map);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Mar 3, 3:38 AM (5 h, 57 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29180965
Default Alt Text
D38944.id118931.diff (1 KB)
Attached To
Mode
D38944: Allow forcing non-posted memory on arm64
Attached
Detach File
Event Timeline
Log In to Comment