Sat Dec 2 21:04:59 2017 UTC ()
Add padding to make the 32/64 bit structs the same.


(christos)
diff -r1.82 -r1.83 src/sys/arch/x86/include/cpu.h

cvs diff -r1.82 -r1.83 src/sys/arch/x86/include/cpu.h (expand / switch to unified diff)

--- src/sys/arch/x86/include/cpu.h 2017/11/27 09:10:12 1.82
+++ src/sys/arch/x86/include/cpu.h 2017/12/02 21:04:59 1.83
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: cpu.h,v 1.82 2017/11/27 09:10:12 maxv Exp $ */ 1/* $NetBSD: cpu.h,v 1.83 2017/12/02 21:04:59 christos Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 1990 The Regents of the University of California. 4 * Copyright (c) 1990 The Regents of the University of California.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * This code is derived from software contributed to Berkeley by 7 * This code is derived from software contributed to Berkeley by
8 * William Jolitz. 8 * William Jolitz.
9 * 9 *
10 * Redistribution and use in source and binary forms, with or without 10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions 11 * modification, are permitted provided that the following conditions
12 * are met: 12 * are met:
13 * 1. Redistributions of source code must retain the above copyright 13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer. 14 * notice, this list of conditions and the following disclaimer.
@@ -516,32 +516,34 @@ void x86_bus_space_mallocok(void); @@ -516,32 +516,34 @@ void x86_bus_space_mallocok(void);
516#define CPU_FPU_SAVE_SIZE 16 /* int: FPU Instruction layout size */ 516#define CPU_FPU_SAVE_SIZE 16 /* int: FPU Instruction layout size */
517#define CPU_XSAVE_FEATURES 17 /* quad: XSAVE features */ 517#define CPU_XSAVE_FEATURES 17 /* quad: XSAVE features */
518 518
519#define CPU_MAXID 18 /* number of valid machdep ids */ 519#define CPU_MAXID 18 /* number of valid machdep ids */
520 520
521/* 521/*
522 * Structure for CPU_DISKINFO sysctl call. 522 * Structure for CPU_DISKINFO sysctl call.
523 * XXX this should be somewhere else. 523 * XXX this should be somewhere else.
524 */ 524 */
525#define MAX_BIOSDISKS 16 525#define MAX_BIOSDISKS 16
526 526
527struct disklist { 527struct disklist {
528 int dl_nbiosdisks; /* number of bios disks */ 528 int dl_nbiosdisks; /* number of bios disks */
 529 int dl_unused;
529 struct biosdisk_info { 530 struct biosdisk_info {
530 int bi_dev; /* BIOS device # (0x80 ..) */ 531 int bi_dev; /* BIOS device # (0x80 ..) */
531 int bi_cyl; /* cylinders on disk */ 532 int bi_cyl; /* cylinders on disk */
532 int bi_head; /* heads per track */ 533 int bi_head; /* heads per track */
533 int bi_sec; /* sectors per track */ 534 int bi_sec; /* sectors per track */
534 uint64_t bi_lbasecs; /* total sec. (iff ext13) */ 535 uint64_t bi_lbasecs; /* total sec. (iff ext13) */
535#define BIFLAG_INVALID 0x01 536#define BIFLAG_INVALID 0x01
536#define BIFLAG_EXTINT13 0x02 537#define BIFLAG_EXTINT13 0x02
537 int bi_flags; 538 int bi_flags;
 539 int bi_unused;
538 } dl_biosdisks[MAX_BIOSDISKS]; 540 } dl_biosdisks[MAX_BIOSDISKS];
539 541
540 int dl_nnativedisks; /* number of native disks */ 542 int dl_nnativedisks; /* number of native disks */
541 struct nativedisk_info { 543 struct nativedisk_info {
542 char ni_devname[16]; /* native device name */ 544 char ni_devname[16]; /* native device name */
543 int ni_nmatches; /* # of matches w/ BIOS */ 545 int ni_nmatches; /* # of matches w/ BIOS */
544 int ni_biosmatches[MAX_BIOSDISKS]; /* indices in dl_biosdisks */ 546 int ni_biosmatches[MAX_BIOSDISKS]; /* indices in dl_biosdisks */
545 } dl_nativedisks[1]; /* actually longer */ 547 } dl_nativedisks[1]; /* actually longer */
546}; 548};
547#endif /* !_X86_CPU_H_ */ 549#endif /* !_X86_CPU_H_ */