Quellcodebibliothek Statistik Leitseite products/sources/formale Sprachen/C/Linux/arch/powerpc/mm/ptdump/   (Open Source Betriebssystem Version 6.17.9©)  Datei vom 24.10.2025 mit Größe 1 kB image not shown  

Quelle  segment_regs.c   Sprache: C

 
// SPDX-License-Identifier: GPL-2.0+
/*
 * Copyright 2018, Christophe Leroy CS S.I.
 * <christophe.leroy@c-s.fr>
 *
 * This dumps the content of Segment Registers
 */


#include <linux/debugfs.h>

static void seg_show(struct seq_file *m, int i)
{
 u32 val = mfsr(i << 28);

 seq_printf(m, "0x%01x0000000-0x%01xfffffff ", i, i);
 seq_printf(m, "Kern key %d ", (val >> 30) & 1);
 seq_printf(m, "User key %d ", (val >> 29) & 1);
 if (val & 0x80000000) {
  seq_printf(m, "Device 0x%03x", (val >> 20) & 0x1ff);
  seq_printf(m, "-0x%05x", val & 0xfffff);
 } else {
  if (val & 0x10000000)
   seq_puts(m, "No Exec ");
  seq_printf(m, "VSID 0x%06x", val & 0xffffff);
 }
 seq_puts(m, "\n");
}

static int sr_show(struct seq_file *m, void *v)
{
 int i;

 seq_puts(m, "---[ User Segments ]---\n");
 for (i = 0; i < TASK_SIZE >> 28; i++)
  seg_show(m, i);

 seq_puts(m, "\n---[ Kernel Segments ]---\n");
 for (; i < 16; i++)
  seg_show(m, i);

 return 0;
}

DEFINE_SHOW_ATTRIBUTE(sr);

static int __init sr_init(void)
{
 debugfs_create_file("segment_registers", 0400, arch_debugfs_dir,
       NULL, &sr_fops);
 return 0;
}
device_initcall(sr_init);

Messung V0.5
C=85 H=89 G=86

¤ Dauer der Verarbeitung: 0.3 Sekunden  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.