Attempt to at least align MODINFO_* blocks. IMHO, decoding this stuff
should be MD code since one day we'll have to recover pages from deleted preload data. MI code can't be expected to know how to deal with pmap internals, assuming it gets done via pmap that is. :-)
This commit is contained in:
parent
1d59e49683
commit
7deb2dabef
|
@ -23,12 +23,13 @@
|
|||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: bootinfo.c,v 1.10 1998/10/07 10:55:46 peter Exp $
|
||||
* $Id: bootinfo.c,v 1.11 1998/10/09 07:11:19 msmith Exp $
|
||||
*/
|
||||
|
||||
#include <stand.h>
|
||||
#include <sys/param.h>
|
||||
#include <sys/reboot.h>
|
||||
#include <sys/linker.h>
|
||||
#include <machine/bootinfo.h>
|
||||
#include "bootstrap.h"
|
||||
#include "libi386.h"
|
||||
|
@ -165,7 +166,7 @@ bi_copyenv(vm_offset_t addr)
|
|||
COPY32(t, a); \
|
||||
COPY32(strlen(s) + 1, a); \
|
||||
i386_copyin(s, a, strlen(s) + 1); \
|
||||
a += strlen(s) + 1; \
|
||||
a += roundup(strlen(s) + 1, sizeof(u_int32_t));\
|
||||
}
|
||||
|
||||
#define MOD_NAME(a, s) MOD_STR(MODINFO_NAME, a, s)
|
||||
|
@ -175,7 +176,7 @@ bi_copyenv(vm_offset_t addr)
|
|||
COPY32(t, a); \
|
||||
COPY32(sizeof(s), a); \
|
||||
i386_copyin(&s, a, sizeof(s)); \
|
||||
a += sizeof(s); \
|
||||
a += roundup(sizeof(s), sizeof(u_int32_t)); \
|
||||
}
|
||||
|
||||
#define MOD_ADDR(a, s) MOD_VAR(MODINFO_ADDR, a, s)
|
||||
|
@ -185,7 +186,7 @@ bi_copyenv(vm_offset_t addr)
|
|||
COPY32(MODINFO_METADATA | mm->md_type, a); \
|
||||
COPY32(mm->md_size, a); \
|
||||
i386_copyin(mm->md_data, a, mm->md_size); \
|
||||
a += mm->md_size; \
|
||||
a += roundup(mm->md_size, sizeof(u_int32_t));\
|
||||
}
|
||||
|
||||
#define MOD_END(a) { \
|
||||
|
@ -201,7 +202,7 @@ bi_copymodules(vm_offset_t addr)
|
|||
|
||||
/* start with the first module on the list, should be the kernel */
|
||||
for (mp = mod_findmodule(NULL, NULL); mp != NULL; mp = mp->m_next) {
|
||||
|
||||
|
||||
MOD_NAME(addr, mp->m_name); /* this field must come first */
|
||||
MOD_TYPE(addr, mp->m_type);
|
||||
MOD_ADDR(addr, mp->m_addr);
|
||||
|
|
|
@ -23,12 +23,13 @@
|
|||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: bootinfo.c,v 1.10 1998/10/07 10:55:46 peter Exp $
|
||||
* $Id: bootinfo.c,v 1.11 1998/10/09 07:11:19 msmith Exp $
|
||||
*/
|
||||
|
||||
#include <stand.h>
|
||||
#include <sys/param.h>
|
||||
#include <sys/reboot.h>
|
||||
#include <sys/linker.h>
|
||||
#include <machine/bootinfo.h>
|
||||
#include "bootstrap.h"
|
||||
#include "libi386.h"
|
||||
|
@ -165,7 +166,7 @@ bi_copyenv(vm_offset_t addr)
|
|||
COPY32(t, a); \
|
||||
COPY32(strlen(s) + 1, a); \
|
||||
i386_copyin(s, a, strlen(s) + 1); \
|
||||
a += strlen(s) + 1; \
|
||||
a += roundup(strlen(s) + 1, sizeof(u_int32_t));\
|
||||
}
|
||||
|
||||
#define MOD_NAME(a, s) MOD_STR(MODINFO_NAME, a, s)
|
||||
|
@ -175,7 +176,7 @@ bi_copyenv(vm_offset_t addr)
|
|||
COPY32(t, a); \
|
||||
COPY32(sizeof(s), a); \
|
||||
i386_copyin(&s, a, sizeof(s)); \
|
||||
a += sizeof(s); \
|
||||
a += roundup(sizeof(s), sizeof(u_int32_t)); \
|
||||
}
|
||||
|
||||
#define MOD_ADDR(a, s) MOD_VAR(MODINFO_ADDR, a, s)
|
||||
|
@ -185,7 +186,7 @@ bi_copyenv(vm_offset_t addr)
|
|||
COPY32(MODINFO_METADATA | mm->md_type, a); \
|
||||
COPY32(mm->md_size, a); \
|
||||
i386_copyin(mm->md_data, a, mm->md_size); \
|
||||
a += mm->md_size; \
|
||||
a += roundup(mm->md_size, sizeof(u_int32_t));\
|
||||
}
|
||||
|
||||
#define MOD_END(a) { \
|
||||
|
@ -201,7 +202,7 @@ bi_copymodules(vm_offset_t addr)
|
|||
|
||||
/* start with the first module on the list, should be the kernel */
|
||||
for (mp = mod_findmodule(NULL, NULL); mp != NULL; mp = mp->m_next) {
|
||||
|
||||
|
||||
MOD_NAME(addr, mp->m_name); /* this field must come first */
|
||||
MOD_TYPE(addr, mp->m_type);
|
||||
MOD_ADDR(addr, mp->m_addr);
|
||||
|
|
|
@ -23,12 +23,13 @@
|
|||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: bootinfo.c,v 1.10 1998/10/07 10:55:46 peter Exp $
|
||||
* $Id: bootinfo.c,v 1.11 1998/10/09 07:11:19 msmith Exp $
|
||||
*/
|
||||
|
||||
#include <stand.h>
|
||||
#include <sys/param.h>
|
||||
#include <sys/reboot.h>
|
||||
#include <sys/linker.h>
|
||||
#include <machine/bootinfo.h>
|
||||
#include "bootstrap.h"
|
||||
#include "libi386.h"
|
||||
|
@ -165,7 +166,7 @@ bi_copyenv(vm_offset_t addr)
|
|||
COPY32(t, a); \
|
||||
COPY32(strlen(s) + 1, a); \
|
||||
i386_copyin(s, a, strlen(s) + 1); \
|
||||
a += strlen(s) + 1; \
|
||||
a += roundup(strlen(s) + 1, sizeof(u_int32_t));\
|
||||
}
|
||||
|
||||
#define MOD_NAME(a, s) MOD_STR(MODINFO_NAME, a, s)
|
||||
|
@ -175,7 +176,7 @@ bi_copyenv(vm_offset_t addr)
|
|||
COPY32(t, a); \
|
||||
COPY32(sizeof(s), a); \
|
||||
i386_copyin(&s, a, sizeof(s)); \
|
||||
a += sizeof(s); \
|
||||
a += roundup(sizeof(s), sizeof(u_int32_t)); \
|
||||
}
|
||||
|
||||
#define MOD_ADDR(a, s) MOD_VAR(MODINFO_ADDR, a, s)
|
||||
|
@ -185,7 +186,7 @@ bi_copyenv(vm_offset_t addr)
|
|||
COPY32(MODINFO_METADATA | mm->md_type, a); \
|
||||
COPY32(mm->md_size, a); \
|
||||
i386_copyin(mm->md_data, a, mm->md_size); \
|
||||
a += mm->md_size; \
|
||||
a += roundup(mm->md_size, sizeof(u_int32_t));\
|
||||
}
|
||||
|
||||
#define MOD_END(a) { \
|
||||
|
@ -201,7 +202,7 @@ bi_copymodules(vm_offset_t addr)
|
|||
|
||||
/* start with the first module on the list, should be the kernel */
|
||||
for (mp = mod_findmodule(NULL, NULL); mp != NULL; mp = mp->m_next) {
|
||||
|
||||
|
||||
MOD_NAME(addr, mp->m_name); /* this field must come first */
|
||||
MOD_TYPE(addr, mp->m_type);
|
||||
MOD_ADDR(addr, mp->m_addr);
|
||||
|
|
Loading…
Reference in New Issue