qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Helge Deller <deller@gmx.de>
To: qemu-devel@nongnu.org
Cc: Helge Deller <deller@gmx.de>, Richard Henderson <rth@twiddle.net>
Subject: [PATCH 2/7] hw/hppa: Make number of TLB and BTLB entries configurable
Date: Tue,  1 Sep 2020 20:34:47 +0200	[thread overview]
Message-ID: <20200901183452.24967-3-deller@gmx.de> (raw)
In-Reply-To: <20200901183452.24967-1-deller@gmx.de>

Until now the TLB size was fixed at 256 entries. To allow operating
systems to utilize more TLB entries in the future, we need to tell
firmware how many TLB entries we actually support in the emulation.
Firmware then reports this to the operating system via the
PDC_CACHE_INFO call.

This patch simply does the preparation to allow more TLB entries.

Signed-off-by: Helge Deller <deller@gmx.de>
---
 hw/hppa/machine.c | 8 ++++++++
 target/hppa/cpu.h | 5 ++++-
 2 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/hw/hppa/machine.c b/hw/hppa/machine.c
index 90aeefe2a4..e9d84d0f03 100644
--- a/hw/hppa/machine.c
+++ b/hw/hppa/machine.c
@@ -72,6 +72,14 @@ static FWCfgState *create_fw_cfg(MachineState *ms)
     fw_cfg_add_file(fw_cfg, "/etc/firmware-min-version",
                     g_memdup(&val, sizeof(val)), sizeof(val));

+    val = cpu_to_le64(HPPA_TLB_ENTRIES);
+    fw_cfg_add_file(fw_cfg, "/etc/cpu/tlb_entries",
+                    g_memdup(&val, sizeof(val)), sizeof(val));
+
+    val = cpu_to_le64(HPPA_BTLB_ENTRIES);
+    fw_cfg_add_file(fw_cfg, "/etc/cpu/btlb_entries",
+                    g_memdup(&val, sizeof(val)), sizeof(val));
+
     return fw_cfg;
 }

diff --git a/target/hppa/cpu.h b/target/hppa/cpu.h
index 801a4fb1ba..440104dc3c 100644
--- a/target/hppa/cpu.h
+++ b/target/hppa/cpu.h
@@ -196,9 +196,12 @@ struct CPUHPPAState {
     target_ureg shadow[7];   /* shadow registers */

     /* ??? The number of entries isn't specified by the architecture.  */
+    #define HPPA_TLB_ENTRIES        256
+    #define HPPA_BTLB_ENTRIES       0
+
     /* ??? Implement a unified itlb/dtlb for the moment.  */
     /* ??? We should use a more intelligent data structure.  */
-    hppa_tlb_entry tlb[256];
+    hppa_tlb_entry tlb[HPPA_TLB_ENTRIES];
     uint32_t tlb_last;
 };

--
2.21.3



  parent reply	other threads:[~2020-09-01 18:53 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-01 18:34 [PATCH 0/7] hppa power button support, graphics updates and firmware fixes Helge Deller
2020-09-01 18:34 ` [PATCH 1/7] seabios-hppa: Update SeaBIOS to hppa-qemu-5.2-2 tag Helge Deller
2020-09-01 18:34 ` Helge Deller [this message]
2020-09-01 21:36   ` [PATCH 2/7] hw/hppa: Make number of TLB and BTLB entries configurable Richard Henderson
2020-09-02 11:16     ` Helge Deller
2020-09-02 16:52       ` Richard Henderson
2020-09-02 19:36         ` Helge Deller
2020-09-01 18:34 ` [PATCH 3/7] hw/hppa: Store boot device in fw_cfg section Helge Deller
2020-09-01 21:37   ` Richard Henderson
2020-09-01 18:34 ` [PATCH 4/7] hw/hppa: Inform SeaBIOS about fw_cfg port address Helge Deller
2020-09-01 21:39   ` Richard Henderson
2020-09-02 11:24     ` Helge Deller
2020-09-02 16:46       ` Richard Henderson
2020-09-02 19:37         ` Helge Deller
2020-09-01 18:34 ` [PATCH 5/7] hw/hppa: Add power button emulation Helge Deller
2020-09-01 21:42   ` Richard Henderson
2020-09-01 18:34 ` [PATCH 6/7] hw/display/artist: Fix artist screen resolution Helge Deller
2020-09-01 21:49   ` Richard Henderson
2020-09-02 21:48     ` Helge Deller
2020-09-02 22:09       ` Richard Henderson
2020-09-03  6:07         ` Helge Deller
2020-09-03  6:08         ` Helge Deller
2020-09-03  6:09         ` Helge Deller
2020-09-03 15:09           ` Richard Henderson
2020-09-01 18:34 ` [PATCH 7/7] target/hppa: Fix boot with old Linux installation CDs Helge Deller
2020-09-01 19:37 ` [PATCH 0/7] hppa power button support, graphics updates and firmware fixes Philippe Mathieu-Daudé
2020-09-01 19:49   ` Helge Deller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200901183452.24967-3-deller@gmx.de \
    --to=deller@gmx.de \
    --cc=qemu-devel@nongnu.org \
    --cc=rth@twiddle.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).