Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 12 Nov 2019 15:47:46 +0000 (UTC)
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r354644 - head/sys/amd64/amd64
Message-ID:  <201911121547.xACFlk0L003871@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kib
Date: Tue Nov 12 15:47:46 2019
New Revision: 354644
URL: https://svnweb.freebsd.org/changeset/base/354644

Log:
  amd64: assert that size of the software prototype table for gdt is equal
  to the size of hardware gdt.
  
  Reviewed by:	jhb, markj
  Tested by:	pho
  Sponsored by:	The FreeBSD Foundation
  MFC after:	1 week
  Differential revision:	https://reviews.freebsd.org/D22302

Modified:
  head/sys/amd64/amd64/machdep.c

Modified: head/sys/amd64/amd64/machdep.c
==============================================================================
--- head/sys/amd64/amd64/machdep.c	Tue Nov 12 15:46:28 2019	(r354643)
+++ head/sys/amd64/amd64/machdep.c	Tue Nov 12 15:47:46 2019	(r354644)
@@ -794,6 +794,7 @@ struct soft_segment_descriptor gdt_segs[] = {
 	.ssd_def32 = 0,
 	.ssd_gran = 0		},
 };
+_Static_assert(nitems(gdt_segs) == NGDT, "Stale NGDT");
 
 void
 setidt(int idx, inthand_t *func, int typ, int dpl, int ist)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201911121547.xACFlk0L003871>