* Find out a few interesting information about the system (like CPU,

bus, and time base frequency) in the PPC boot loader, and propagate
  them to the kernel via kernel_args.
* Now we use the correct time base frequency for timer calculations.
* Implemented PPC specific system info stuff. Added a few PPC CPU
  types to <OS.h>.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15817 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold
2006-01-03 13:30:23 +00:00
parent 1c33148d10
commit 716a16ce61
8 changed files with 196 additions and 33 deletions
+28
View File
@@ -379,13 +379,41 @@ typedef enum cpu_types {
// ToDo: add latest models
/* Motorola/IBM */
B_CPU_PPC_UNKNOWN = 0,
B_CPU_PPC_601 = 1,
B_CPU_PPC_602 = 7,
B_CPU_PPC_603 = 2,
B_CPU_PPC_603e = 3,
B_CPU_PPC_603ev = 8,
B_CPU_PPC_604 = 4,
B_CPU_PPC_604e = 5,
B_CPU_PPC_604ev = 9,
B_CPU_PPC_620 = 10,
B_CPU_PPC_750 = 6,
B_CPU_PPC_686 = 13,
B_CPU_PPC_860 = 25,
B_CPU_PPC_7400 = 26,
B_CPU_PPC_7410 = 27,
B_CPU_PPC_7447A = 28,
B_CPU_PPC_7448 = 29,
B_CPU_PPC_7450 = 30,
B_CPU_PPC_7455 = 31,
B_CPU_PPC_7457 = 32,
B_CPU_PPC_8240 = 33,
B_CPU_PPC_8245 = 34,
B_CPU_PPC_IBM_401A1 = 35,
B_CPU_PPC_IBM_401B2 = 36,
B_CPU_PPC_IBM_401C2 = 37,
B_CPU_PPC_IBM_401D2 = 38,
B_CPU_PPC_IBM_401E2 = 39,
B_CPU_PPC_IBM_401F2 = 40,
B_CPU_PPC_IBM_401G2 = 41,
B_CPU_PPC_IBM_403 = 42,
B_CPU_PPC_IBM_405GP = 43,
B_CPU_PPC_IBM_405L = 44,
B_CPU_PPC_IBM_750FX = 45,
B_CPU_PPC_IBM_POWER3 = 46,
/* Intel */
@@ -77,6 +77,7 @@ extern uint32 get_sr(void *virtualAddress);
extern void set_sr(void *virtualAddress, uint32 value);
extern uint32 get_msr(void);
extern uint32 set_msr(uint32 value);
extern uint32 get_pvr(void);
extern void set_ibat0(struct block_address_translation *bat);
extern void set_ibat1(struct block_address_translation *bat);
@@ -117,4 +118,40 @@ extern void ppc_context_switch(void **_oldStackPointer, void *newStackPointer);
#define tlbia() asm volatile("tlbia")
#define tlbie(addr) asm volatile("tlbie %0" :: "r" (addr))
// PowerPC processor version (the upper 16 bits of the PVR).
enum ppc_processor_version {
MPC601 = 0x0001,
MPC603 = 0x0003,
MPC604 = 0x0004,
MPC602 = 0x0005,
MPC603e = 0x0006,
MPC603ev = 0x0007,
MPC750 = 0x0008,
MPC604ev = 0x0009,
MPC7400 = 0x000c,
MPC620 = 0x0014,
IBM403 = 0x0020,
IBM401A1 = 0x0021,
IBM401B2 = 0x0022,
IBM401C2 = 0x0023,
IBM401D2 = 0x0024,
IBM401E2 = 0x0025,
IBM401F2 = 0x0026,
IBM401G2 = 0x0027,
IBMPOWER3 = 0x0041,
MPC860 = 0x0050,
MPC8240 = 0x0081,
IBM405GP = 0x4011,
IBM405L = 0x4161,
IBM750FX = 0x7000,
MPC7450 = 0x8000,
MPC7455 = 0x8001,
MPC7457 = 0x8002,
MPC7447A = 0x8003,
MPC7448 = 0x8004,
MPC7410 = 0x800c,
MPC8245 = 0x8081,
};
#endif /* _KERNEL_ARCH_PPC_CPU_H */
@@ -16,6 +16,10 @@
// kernel args
typedef struct {
// architecture specific
uint64 cpu_frequency;
uint64 bus_frequency;
uint64 time_base_frequency;
addr_range page_table; // virtual address and size of the page table
addr_range exception_handlers;
addr_range framebuffer; // maps where the framebuffer is located, in physical memory