PERFORCE change 30235 for review
Peter Wemm
peter at FreeBSD.org
Wed Apr 30 19:34:13 PDT 2003
http://perforce.freebsd.org/chv.cgi?CH=30235
Change 30235 by peter at peter_daintree on 2003/04/30 19:33:11
Try and avoid blowing the sparc64 and powerpc folks out of the
water.
Affected files ...
.. //depot/projects/hammer/sys/amd64/include/metadata.h#1 add
.. //depot/projects/hammer/sys/boot/i386/libi386/biossmap.c#3 edit
.. //depot/projects/hammer/sys/boot/powerpc/loader/metadata.c#5 edit
.. //depot/projects/hammer/sys/boot/sparc64/loader/metadata.c#6 edit
.. //depot/projects/hammer/sys/i386/include/metadata.h#1 add
.. //depot/projects/hammer/sys/powerpc/include/metadata.h#2 edit
.. //depot/projects/hammer/sys/sparc64/include/metadata.h#2 edit
.. //depot/projects/hammer/sys/sys/linker.h#8 edit
Differences ...
==== //depot/projects/hammer/sys/boot/i386/libi386/biossmap.c#3 (text+ko) ====
@@ -32,6 +32,7 @@
#include <stand.h>
#include <sys/param.h>
#include <sys/linker.h>
+#include <machine/metadata.h>
#include "bootstrap.h"
#include "libi386.h"
#include "btxv86.h"
==== //depot/projects/hammer/sys/boot/powerpc/loader/metadata.c#5 (text+ko) ====
@@ -302,6 +302,10 @@
file_addmetadata(kfp, MODINFOMD_HOWTO, sizeof howto, &howto);
file_addmetadata(kfp, MODINFOMD_ENVP, sizeof envp, &envp);
file_addmetadata(kfp, MODINFOMD_KERNEND, sizeof kernend, &kernend);
+ /* Compatability with older kernels */
+ file_addmetadata(kfp, MODINFOMD_OHOWTO, sizeof howto, &howto);
+ file_addmetadata(kfp, MODINFOMD_OENVP, sizeof envp, &envp);
+ file_addmetadata(kfp, MODINFOMD_OKERNEND, sizeof kernend, &kernend);
*modulep = addr;
size = md_copymodules(0);
@@ -309,6 +313,8 @@
md = file_findmetadata(kfp, MODINFOMD_KERNEND);
bcopy(&kernend, md->md_data, sizeof kernend);
+ md = file_findmetadata(kfp, MODINFOMD_OKERNEND); /* Compat */
+ bcopy(&kernend, md->md_data, sizeof kernend);
(void)md_copymodules(addr);
==== //depot/projects/hammer/sys/boot/sparc64/loader/metadata.c#6 (text+ko) ====
@@ -304,6 +304,10 @@
file_addmetadata(kfp, MODINFOMD_HOWTO, sizeof howto, &howto);
file_addmetadata(kfp, MODINFOMD_ENVP, sizeof envp, &envp);
file_addmetadata(kfp, MODINFOMD_KERNEND, sizeof kernend, &kernend);
+ /* The next three are for compatability with older kernels */
+ file_addmetadata(kfp, MODINFOMD_OHOWTO, sizeof howto, &howto);
+ file_addmetadata(kfp, MODINFOMD_OENVP, sizeof envp, &envp);
+ file_addmetadata(kfp, MODINFOMD_OKERNEND, sizeof kernend, &kernend);
file_addmetadata(kfp, MODINFOMD_DTLB_SLOTS, sizeof dtlb_slot, &dtlb_slot);
file_addmetadata(kfp, MODINFOMD_ITLB_SLOTS, sizeof itlb_slot, &itlb_slot);
file_addmetadata(kfp, MODINFOMD_DTLB,
@@ -317,6 +321,8 @@
md = file_findmetadata(kfp, MODINFOMD_KERNEND);
bcopy(&kernend, md->md_data, sizeof kernend);
+ md = file_findmetadata(kfp, MODINFOMD_OKERNEND); /* Compat */
+ bcopy(&kernend, md->md_data, sizeof kernend);
(void)md_copymodules(addr);
==== //depot/projects/hammer/sys/powerpc/include/metadata.h#2 (text+ko) ====
@@ -29,14 +29,9 @@
#ifndef _MACHINE_METADATA_H_
#define _MACHINE_METADATA_H_
-#define MODINFOMD_ENVP 0x1001
-#define MODINFOMD_HOWTO 0x1002
-#define MODINFOMD_KERNEND 0x1003
-
-#define MD_FETCH(mdp, info, type) ({ \
- type *__p; \
- __p = (type *)preload_search_info((mdp), MODINFO_METADATA | (info)); \
- __p ? *__p : 0; \
-})
+/* These three have been moved to MI */
+#define MODINFOMD_OENVP 0x1001
+#define MODINFOMD_OHOWTO 0x1002
+#define MODINFOMD_OKERNEND 0x1003
#endif /* !_MACHINE_METADATA_H_ */
==== //depot/projects/hammer/sys/sparc64/include/metadata.h#2 (text+ko) ====
@@ -29,9 +29,10 @@
#ifndef _MACHINE_METADATA_H_
#define _MACHINE_METADATA_H_
-#define MODINFOMD_ENVP 0x1001
-#define MODINFOMD_HOWTO 0x1002
-#define MODINFOMD_KERNEND 0x1003
+/* The first three have been promoted to MI */
+#define MODINFOMD_OENVP 0x1001
+#define MODINFOMD_OHOWTO 0x1002
+#define MODINFOMD_OKERNEND 0x1003
#define MODINFOMD_DTLB_SLOTS 0x1004
#define MODINFOMD_ITLB_SLOTS 0x1005
#define MODINFOMD_DTLB 0x1006
@@ -42,10 +43,4 @@
vm_offset_t te_va;
};
-#define MD_FETCH(mdp, info, type) ({ \
- type *__p; \
- __p = (type *)preload_search_info((mdp), MODINFO_METADATA | (info)); \
- __p ? *__p : 0; \
-})
-
#endif /* !_MACHINE_METADATA_H_ */
==== //depot/projects/hammer/sys/sys/linker.h#8 (text+ko) ====
@@ -194,7 +194,6 @@
#define MODINFOMD_ENVP 0x0006 /* envp[] */
#define MODINFOMD_HOWTO 0x0007 /* boothowto */
#define MODINFOMD_KERNEND 0x0008 /* kernend */
-#define MODINFOMD_SMAP 0x0009 /* i386 bios smap */
#define MODINFOMD_NOCOPY 0x8000 /* don't copy this metadata to the kernel */
#define MODINFOMD_DEPLIST (0x4001 | MODINFOMD_NOCOPY) /* depends on */
More information about the p4-projects
mailing list