svn commit: r277205 - in head: sys/boot/common sys/sys usr.sbin/kldxref

Warner Losh imp at FreeBSD.org
Thu Jan 15 00:46:32 UTC 2015


Author: imp
Date: Thu Jan 15 00:46:30 2015
New Revision: 277205
URL: https://svnweb.freebsd.org/changeset/base/277205

Log:
  Reserve and ignore the a new module metadata type MDT_PNP_INFO for
  associating an optional PNP hint table with this module. In the
  future, when these are added, these changes will silently ignore the
  new type they would otherwise warn about. It will always be safe to
  ignore this data. Get this into the builds today for some future
  proofing.
  
  MFC After: 3 days

Modified:
  head/sys/boot/common/load_elf_obj.c
  head/sys/sys/module.h
  head/usr.sbin/kldxref/kldxref.c

Modified: head/sys/boot/common/load_elf_obj.c
==============================================================================
--- head/sys/boot/common/load_elf_obj.c	Thu Jan 15 00:42:06 2015	(r277204)
+++ head/sys/boot/common/load_elf_obj.c	Thu Jan 15 00:46:30 2015	(r277205)
@@ -416,6 +416,7 @@ __elfN(obj_parse_modmetadata)(struct pre
 			modcnt++;
 			break;
 		case MDT_MODULE:
+		case MDT_PNP_INFO:
 			break;
 		default:
 			printf("unknown type %d\n", md.md_type);

Modified: head/sys/sys/module.h
==============================================================================
--- head/sys/sys/module.h	Thu Jan 15 00:42:06 2015	(r277204)
+++ head/sys/sys/module.h	Thu Jan 15 00:46:30 2015	(r277205)
@@ -35,6 +35,7 @@
 #define	MDT_DEPEND	1		/* argument is a module name */
 #define	MDT_MODULE	2		/* module declaration */
 #define	MDT_VERSION	3		/* module version(s) */
+#define	MDT_PNP_INFO	4		/* Plug and play hints record */
 
 #define	MDT_STRUCT_VERSION	1	/* version of metadata structure */
 #define	MDT_SETNAME	"modmetadata_set"

Modified: head/usr.sbin/kldxref/kldxref.c
==============================================================================
--- head/usr.sbin/kldxref/kldxref.c	Thu Jan 15 00:42:06 2015	(r277204)
+++ head/usr.sbin/kldxref/kldxref.c	Thu Jan 15 00:46:30 2015	(r277205)
@@ -172,6 +172,10 @@ parse_entry(struct mod_metadata *md, con
 			record_string(kldname);
 		}
 		break;
+	case MDT_PNP_INFO:
+		if (dflag) {
+			printf("  pnp info for bus %s\n", cval);
+		}
 	default:
 		warnx("unknown metadata record %d in file %s", md->md_type, kldname);
 	}


More information about the svn-src-all mailing list