Page MenuHomeFreeBSD

D51006.1789657687.diff
No OneTemporary

Size
1 KB
Referenced Files
None
Subscribers
None

D51006.1789657687.diff

diff --git a/lib/libsys/auxv.3 b/lib/libsys/auxv.3
--- a/lib/libsys/auxv.3
+++ b/lib/libsys/auxv.3
@@ -22,7 +22,7 @@
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
-.Dd September 16, 2022
+.Dd June 24, 2025
.Dt ELF_AUX_INFO 3
.Os
.Sh NAME
@@ -59,6 +59,12 @@
.It AT_HWCAP2
CPU / hardware feature flags
.Dv (sizeof(u_long)).
+.It AT_HWCAP3
+CPU / hardware feature flags
+.Dv (sizeof(u_long)).
+.It AT_HWCAP4
+CPU / hardware feature flags
+.Dv (sizeof(u_long)).
.It AT_NCPUS
Number of CPUs
.Dv (sizeof(int)).
diff --git a/lib/libsys/auxv.c b/lib/libsys/auxv.c
--- a/lib/libsys/auxv.c
+++ b/lib/libsys/auxv.c
@@ -69,10 +69,10 @@
static int aux_once;
static int pagesize, osreldate, canary_len, ncpus, pagesizes_len, bsdflags;
-static int hwcap_present, hwcap2_present;
+static int hwcap_present, hwcap2_present, hwcap3_present, hwcap4_present;
static char *canary, *pagesizes, *execpath;
static void *ps_strings, *timekeep;
-static u_long hwcap, hwcap2;
+static u_long hwcap, hwcap2, hwcap3, hwcap4;
static void *fxrng_seed_version;
static u_long usrstackbase, usrstacklim;
@@ -123,6 +123,16 @@
hwcap2 = (u_long)(aux->a_un.a_val);
break;
+ case AT_HWCAP3:
+ hwcap3_present = 1;
+ hwcap3 = (u_long)(aux->a_un.a_val);
+ break;
+
+ case AT_HWCAP4:
+ hwcap4_present = 1;
+ hwcap4 = (u_long)(aux->a_un.a_val);
+ break;
+
case AT_PAGESIZES:
pagesizes = (char *)(aux->a_un.a_ptr);
break;
@@ -318,6 +328,20 @@
} else
res = ENOENT;
break;
+ case AT_HWCAP3:
+ if (hwcap3_present && buflen == sizeof(u_long)) {
+ *(u_long *)buf = hwcap3;
+ res = 0;
+ } else
+ res = ENOENT;
+ break;
+ case AT_HWCAP4:
+ if (hwcap4_present && buflen == sizeof(u_long)) {
+ *(u_long *)buf = hwcap4;
+ res = 0;
+ } else
+ res = ENOENT;
+ break;
case AT_PAGESIZES:
if (pagesizes != NULL && pagesizes_len >= buflen) {
memcpy(buf, pagesizes, buflen);

File Metadata

Mime Type
text/plain
Expires
Thu, Sep 17, 3:08 PM (9 h, 16 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29697907
Default Alt Text
D51006.1789657687.diff (1 KB)

Event Timeline