Align to sizeof(long) rather than sizeof(int32_t). It needs to be
long because this code is shared with the alpha. I hope the alpha can read 32 bit ints at 32 bit alignment (vs. 64 bit alignment).
This commit is contained in:
parent
fdbdd3a05f
commit
2a26e9ea83
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=40336
@ -23,7 +23,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: bootinfo.c,v 1.11 1998/10/09 07:11:19 msmith Exp $
|
||||
* $Id: bootinfo.c,v 1.12 1998/10/09 23:24:55 peter Exp $
|
||||
*/
|
||||
|
||||
#include <stand.h>
|
||||
@ -166,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 += roundup(strlen(s) + 1, sizeof(u_int32_t));\
|
||||
a += roundup(strlen(s) + 1, sizeof(u_long));\
|
||||
}
|
||||
|
||||
#define MOD_NAME(a, s) MOD_STR(MODINFO_NAME, a, s)
|
||||
@ -176,7 +176,7 @@ bi_copyenv(vm_offset_t addr)
|
||||
COPY32(t, a); \
|
||||
COPY32(sizeof(s), a); \
|
||||
i386_copyin(&s, a, sizeof(s)); \
|
||||
a += roundup(sizeof(s), sizeof(u_int32_t)); \
|
||||
a += roundup(sizeof(s), sizeof(u_long)); \
|
||||
}
|
||||
|
||||
#define MOD_ADDR(a, s) MOD_VAR(MODINFO_ADDR, a, s)
|
||||
@ -186,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 += roundup(mm->md_size, sizeof(u_int32_t));\
|
||||
a += roundup(mm->md_size, sizeof(u_long));\
|
||||
}
|
||||
|
||||
#define MOD_END(a) { \
|
||||
|
@ -23,7 +23,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: bootinfo.c,v 1.11 1998/10/09 07:11:19 msmith Exp $
|
||||
* $Id: bootinfo.c,v 1.12 1998/10/09 23:24:55 peter Exp $
|
||||
*/
|
||||
|
||||
#include <stand.h>
|
||||
@ -166,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 += roundup(strlen(s) + 1, sizeof(u_int32_t));\
|
||||
a += roundup(strlen(s) + 1, sizeof(u_long));\
|
||||
}
|
||||
|
||||
#define MOD_NAME(a, s) MOD_STR(MODINFO_NAME, a, s)
|
||||
@ -176,7 +176,7 @@ bi_copyenv(vm_offset_t addr)
|
||||
COPY32(t, a); \
|
||||
COPY32(sizeof(s), a); \
|
||||
i386_copyin(&s, a, sizeof(s)); \
|
||||
a += roundup(sizeof(s), sizeof(u_int32_t)); \
|
||||
a += roundup(sizeof(s), sizeof(u_long)); \
|
||||
}
|
||||
|
||||
#define MOD_ADDR(a, s) MOD_VAR(MODINFO_ADDR, a, s)
|
||||
@ -186,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 += roundup(mm->md_size, sizeof(u_int32_t));\
|
||||
a += roundup(mm->md_size, sizeof(u_long));\
|
||||
}
|
||||
|
||||
#define MOD_END(a) { \
|
||||
|
@ -23,7 +23,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: bootinfo.c,v 1.11 1998/10/09 07:11:19 msmith Exp $
|
||||
* $Id: bootinfo.c,v 1.12 1998/10/09 23:24:55 peter Exp $
|
||||
*/
|
||||
|
||||
#include <stand.h>
|
||||
@ -166,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 += roundup(strlen(s) + 1, sizeof(u_int32_t));\
|
||||
a += roundup(strlen(s) + 1, sizeof(u_long));\
|
||||
}
|
||||
|
||||
#define MOD_NAME(a, s) MOD_STR(MODINFO_NAME, a, s)
|
||||
@ -176,7 +176,7 @@ bi_copyenv(vm_offset_t addr)
|
||||
COPY32(t, a); \
|
||||
COPY32(sizeof(s), a); \
|
||||
i386_copyin(&s, a, sizeof(s)); \
|
||||
a += roundup(sizeof(s), sizeof(u_int32_t)); \
|
||||
a += roundup(sizeof(s), sizeof(u_long)); \
|
||||
}
|
||||
|
||||
#define MOD_ADDR(a, s) MOD_VAR(MODINFO_ADDR, a, s)
|
||||
@ -186,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 += roundup(mm->md_size, sizeof(u_int32_t));\
|
||||
a += roundup(mm->md_size, sizeof(u_long));\
|
||||
}
|
||||
|
||||
#define MOD_END(a) { \
|
||||
|
@ -23,7 +23,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: subr_module.c,v 1.2 1998/10/09 23:59:01 peter Exp $
|
||||
* $Id: subr_module.c,v 1.3 1998/10/12 09:03:48 peter Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -62,7 +62,7 @@ preload_search_by_name(const char *name)
|
||||
|
||||
/* skip to next field */
|
||||
next = sizeof(u_int32_t) * 2 + hdr[1];
|
||||
next = roundup(next, sizeof(u_int32_t));
|
||||
next = roundup(next, sizeof(u_long));
|
||||
curp += next;
|
||||
}
|
||||
}
|
||||
@ -99,7 +99,7 @@ preload_search_by_type(const char *type)
|
||||
|
||||
/* skip to next field */
|
||||
next = sizeof(u_int32_t) * 2 + hdr[1];
|
||||
next = roundup(next, sizeof(u_int32_t));
|
||||
next = roundup(next, sizeof(u_long));
|
||||
curp += next;
|
||||
}
|
||||
}
|
||||
@ -124,7 +124,7 @@ preload_search_next_name(caddr_t base)
|
||||
curp = base;
|
||||
hdr = (u_int32_t *)curp;
|
||||
next = sizeof(u_int32_t) * 2 + hdr[1];
|
||||
next = roundup(next, sizeof(u_int32_t));
|
||||
next = roundup(next, sizeof(u_long));
|
||||
curp += next;
|
||||
} else
|
||||
curp = preload_metadata;
|
||||
@ -140,7 +140,7 @@ preload_search_next_name(caddr_t base)
|
||||
|
||||
/* skip to next field */
|
||||
next = sizeof(u_int32_t) * 2 + hdr[1];
|
||||
next = roundup(next, sizeof(u_int32_t));
|
||||
next = roundup(next, sizeof(u_long));
|
||||
curp += next;
|
||||
}
|
||||
}
|
||||
@ -186,7 +186,7 @@ preload_search_info(caddr_t mod, int inf)
|
||||
|
||||
/* skip to next field */
|
||||
next = sizeof(u_int32_t) * 2 + hdr[1];
|
||||
next = roundup(next, sizeof(u_int32_t));
|
||||
next = roundup(next, sizeof(u_long));
|
||||
curp += next;
|
||||
}
|
||||
return(NULL);
|
||||
@ -224,7 +224,7 @@ preload_delete_name(const char *name)
|
||||
|
||||
/* skip to next field */
|
||||
next = sizeof(u_int32_t) * 2 + hdr[1];
|
||||
next = roundup(next, sizeof(u_int32_t));
|
||||
next = roundup(next, sizeof(u_long));
|
||||
curp += next;
|
||||
}
|
||||
}
|
||||
@ -260,7 +260,7 @@ preload_bootstrap_relocate(vm_offset_t offset)
|
||||
|
||||
/* skip to next field */
|
||||
next = sizeof(u_int32_t) * 2 + hdr[1];
|
||||
next = roundup(next, sizeof(u_int32_t));
|
||||
next = roundup(next, sizeof(u_long));
|
||||
curp += next;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user