mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2025-12-05 15:15:44 +00:00
2007-11-30 Till Straumann <strauman@slac.stanford.edu>
* mpc6xx/mmu/bat.c, mpc6xx/mmu/pte121.c: use new feature-checks from cpuIdent.h rather than filtering CPU types when checking for availability of high BATs and an MMU with hardware page-table lookup.
This commit is contained in:
@@ -1,12 +1,16 @@
|
|||||||
|
2007-11-30 Till Straumann <strauman@slac.stanford.edu>
|
||||||
|
|
||||||
|
* mpc6xx/mmu/bat.c, mpc6xx/mmu/pte121.c: use new
|
||||||
|
feature-checks from cpuIdent.h rather than filtering
|
||||||
|
CPU types when checking for availability of high BATs
|
||||||
|
and an MMU with hardware page-table lookup.
|
||||||
|
|
||||||
2007-11-30 Till Straumann <strauman@slac.stanford.edu>
|
2007-11-30 Till Straumann <strauman@slac.stanford.edu>
|
||||||
|
|
||||||
* mpc6xx/clock/c_clock.c, mpc6xx/clock/c_clock.h:
|
* mpc6xx/clock/c_clock.c, mpc6xx/clock/c_clock.h:
|
||||||
added support for bookE/ppc405 style CPUs where the
|
added support for bookE/ppc405 style CPUs where the
|
||||||
decrementer works slightly differently.
|
decrementer works slightly differently.
|
||||||
|
|
||||||
2007-11-30 Till Straumann <strauman@slac.stanford.edu>
|
|
||||||
|
|
||||||
* mpc6xx/mmu/bat.c, mpc6xx/mmu/pte121.c
|
|
||||||
2007-11-29 Till Straumann <strauman@slac.stanford.edu>
|
2007-11-29 Till Straumann <strauman@slac.stanford.edu>
|
||||||
|
|
||||||
* mpc6xx/exceptions/raw_exception.c,
|
* mpc6xx/exceptions/raw_exception.c,
|
||||||
|
|||||||
@@ -162,8 +162,6 @@ bat_addrs_put (ubat * bat, int typ, int idx)
|
|||||||
static void
|
static void
|
||||||
bat_addrs_init ()
|
bat_addrs_init ()
|
||||||
{
|
{
|
||||||
ppc_cpu_id_t cpu = get_ppc_cpu_type ();
|
|
||||||
|
|
||||||
ubat bat;
|
ubat bat;
|
||||||
|
|
||||||
GETBAT (DBAT0, bat.words.u, bat.words.l);
|
GETBAT (DBAT0, bat.words.u, bat.words.l);
|
||||||
@@ -185,8 +183,7 @@ bat_addrs_init ()
|
|||||||
bat_addrs_put (&bat, TYP_I, 3);
|
bat_addrs_put (&bat, TYP_I, 3);
|
||||||
|
|
||||||
|
|
||||||
if ((cpu == PPC_7455 || cpu == PPC_7457)
|
if ( ppc_cpu_has_8_bats() && (HID0_7455_HIGH_BAT_EN & _read_HID0 ())) {
|
||||||
&& (HID0_7455_HIGH_BAT_EN & _read_HID0 ())) {
|
|
||||||
GETBAT (DBAT4, bat.words.u, bat.words.l);
|
GETBAT (DBAT4, bat.words.u, bat.words.l);
|
||||||
bat_addrs_put (&bat, TYP_D, 4);
|
bat_addrs_put (&bat, TYP_D, 4);
|
||||||
GETBAT (DBAT5, bat.words.u, bat.words.l);
|
GETBAT (DBAT5, bat.words.u, bat.words.l);
|
||||||
@@ -251,9 +248,7 @@ check_bat_index (int i)
|
|||||||
if (i >= 0 && i < 4)
|
if (i >= 0 && i < 4)
|
||||||
return 0;
|
return 0;
|
||||||
if (i >= 4 && i < 8) {
|
if (i >= 4 && i < 8) {
|
||||||
/* don't use current_ppc_cpu because we don't know if it has been set already */
|
if ( ! ppc_cpu_has_8_bats() )
|
||||||
ppc_cpu_id_t cpu = get_ppc_cpu_type ();
|
|
||||||
if (cpu != PPC_7455 && cpu != PPC_7457)
|
|
||||||
return -1;
|
return -1;
|
||||||
/* OK, we're on the right hardware;
|
/* OK, we're on the right hardware;
|
||||||
* check if we are already enabled
|
* check if we are already enabled
|
||||||
@@ -298,9 +293,7 @@ check_bat_size (unsigned long size)
|
|||||||
}
|
}
|
||||||
/* bit < 17 is not really legal but we aliased it to 0 in the past */
|
/* bit < 17 is not really legal but we aliased it to 0 in the past */
|
||||||
if (bit > (11 + 17)) {
|
if (bit > (11 + 17)) {
|
||||||
/* don't use current_ppc_cpu because we don't know if it has been set already */
|
if ( ! ppc_cpu_has_8_bats() )
|
||||||
ppc_cpu_id_t cpu = get_ppc_cpu_type ();
|
|
||||||
if (cpu != PPC_7455 && cpu != PPC_7457)
|
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
hid0 = _read_HID0 ();
|
hid0 = _read_HID0 ();
|
||||||
|
|||||||
@@ -428,14 +428,7 @@ triv121PgTblInit (unsigned long base, unsigned ldSize)
|
|||||||
* performance, screwing deterministic latency!
|
* performance, screwing deterministic latency!
|
||||||
* (Could still be useful for debugging, though)
|
* (Could still be useful for debugging, though)
|
||||||
*/
|
*/
|
||||||
if ( PPC_604 != current_ppc_cpu
|
if ( ! ppc_cpu_has_hw_ptbl_lkup() )
|
||||||
&& PPC_604e != current_ppc_cpu
|
|
||||||
&& PPC_604r != current_ppc_cpu
|
|
||||||
&& PPC_750 != current_ppc_cpu
|
|
||||||
&& PPC_7400 != current_ppc_cpu
|
|
||||||
&& PPC_7455 != current_ppc_cpu
|
|
||||||
&& PPC_7457 != current_ppc_cpu
|
|
||||||
)
|
|
||||||
return 0; /* unsupported by this CPU */
|
return 0; /* unsupported by this CPU */
|
||||||
|
|
||||||
pgTbl.base = (APte) base;
|
pgTbl.base = (APte) base;
|
||||||
|
|||||||
Reference in New Issue
Block a user