Skip to content

Commit

Permalink
Merge pull request #269 from flaviojs/document-used-values-pvr
Browse files Browse the repository at this point in the history
Document used values for the pvr register of ppc32 cpus.
  • Loading branch information
grossmj authored Oct 7, 2024
2 parents 68f7da8 + 0794d56 commit 6088b5d
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion common/dev_c1700.c
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,7 @@ static int c1700_init_platform(c1700_t *router)
vm->boot_cpu = gen;

/* Set processor ID */
ppc32_set_pvr(cpu,0x00500202);
ppc32_set_pvr(cpu,PPC32_PVR_MPC860);

/* Mark the Network IO interrupt as high priority */
vm->irq_idle_preempt[C1700_NETIO_IRQ] = TRUE;
Expand Down
2 changes: 1 addition & 1 deletion common/dev_c2600.c
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,7 @@ static int c2600_init_platform(c2600_t *router)
vm->boot_cpu = gen;

/* Set processor ID */
ppc32_set_pvr(cpu,0x00500202);
ppc32_set_pvr(cpu,PPC32_PVR_MPC860);

/* Mark the Network IO interrupt as high priority */
vm->irq_idle_preempt[C2600_NETIO_IRQ] = TRUE;
Expand Down
2 changes: 1 addition & 1 deletion common/dev_c7200.c
Original file line number Diff line number Diff line change
Expand Up @@ -1303,7 +1303,7 @@ int c7200_init_npeg2(c7200_t *router)
int i;

/* Set the processor type: PowerPC G4 */
ppc32_set_pvr(CPU_PPC32(vm->boot_cpu),0x80040201);
ppc32_set_pvr(CPU_PPC32(vm->boot_cpu),PPC32_PVR_7448_v21);

/* Initialize the PA PCI busses */
if (c7200_pa_create_pci_busses(router) == -1)
Expand Down
5 changes: 4 additions & 1 deletion stable/ppc32.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@
#include "rbtree.h"

/* CPU identifiers */
#define PPC32_PVR_405 0x40110000
#define PPC32_PVR_405 0x40110000 /* PowerPC 405GPa */
#define PPC32_PVR_MPC8xx 0x00500000 /* PowerPC MPC 8xx cores (aka PowerQUICC) */
#define PPC32_PVR_MPC860 (PPC32_PVR_MPC8xx | 0x0202) /* assumed, because dev_mpc860 is being used */
#define PPC32_PVR_7448_v21 0x80040201 /* PowerPC 74xx cores (aka G4) */

/* Number of GPR (general purpose registers) */
#define PPC32_GPR_NR 32
Expand Down
5 changes: 4 additions & 1 deletion unstable/ppc32.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@
#include "rbtree.h"

/* CPU identifiers */
#define PPC32_PVR_405 0x40110000
#define PPC32_PVR_405 0x40110000 /* PowerPC 405GPa */
#define PPC32_PVR_MPC8xx 0x00500000 /* PowerPC MPC 8xx cores (aka PowerQUICC) */
#define PPC32_PVR_MPC860 (PPC32_PVR_MPC8xx | 0x0202) /* assumed, because dev_mpc860 is being used */
#define PPC32_PVR_7448_v21 0x80040201 /* PowerPC 74xx cores (aka G4) */

/* Number of GPR (general purpose registers) */
#define PPC32_GPR_NR 32
Expand Down

0 comments on commit 6088b5d

Please sign in to comment.