/[gxemul]/trunk/src/machines/machine_evbmips.c
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/src/machines/machine_evbmips.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 38 by dpavlin, Mon Oct 8 16:21:53 2007 UTC revision 44 by dpavlin, Mon Oct 8 16:22:56 2007 UTC
# Line 25  Line 25 
25   *  SUCH DAMAGE.   *  SUCH DAMAGE.
26   *     *  
27   *   *
28   *  $Id: machine_evbmips.c,v 1.20 2007/04/10 16:51:35 debug Exp $   *  $Id: machine_evbmips.c,v 1.30 2007/06/17 02:17:45 debug Exp $
29     *
30     *  COMMENT: MIPS evaluation boards (e.g. Malta)
31   */   */
32    
33  #include <stdio.h>  #include <stdio.h>
# Line 50  MACHINE_SETUP(evbmips) Line 52  MACHINE_SETUP(evbmips)
52          struct pci_data *pci_data;          struct pci_data *pci_data;
53          int i;          int i;
54    
55          /*  See http://www.netbsd.org/Ports/evbmips/ for more info.  */          /*  See http://www.netbsd.org/ports/evbmips/ for more info.  */
56    
57          switch (machine->machine_subtype) {          switch (machine->machine_subtype) {
58    
59          case MACHINE_EVBMIPS_MALTA:          case MACHINE_EVBMIPS_MALTA:
60          case MACHINE_EVBMIPS_MALTA_BE:          case MACHINE_EVBMIPS_MALTA_BE:
61                  if (machine->emulated_hz == 0)                  if (machine->emulated_hz == 0)
62                          machine->emulated_hz = 33000000;                          machine->emulated_hz = 33000000;
63                  cpu->byte_order = EMUL_LITTLE_ENDIAN;                  cpu->byte_order = EMUL_LITTLE_ENDIAN;
64                  machine->machine_name = "MALTA (evbmips, little endian)";                  machine->machine_name = "MALTA (evbmips, little endian)";
                 machine->stable = 1;  
65    
66                  if (machine->machine_subtype == MACHINE_EVBMIPS_MALTA_BE) {                  if (machine->machine_subtype == MACHINE_EVBMIPS_MALTA_BE) {
67                          machine->machine_name = "MALTA (evbmips, big endian)";                          machine->machine_name = "MALTA (evbmips, big endian)";
# Line 84  MACHINE_SETUP(evbmips) Line 86  MACHINE_SETUP(evbmips)
86                  pci_data = dev_gt_init(machine, machine->memory, 0x1be00000,                  pci_data = dev_gt_init(machine, machine->memory, 0x1be00000,
87                      tmpstr, tmpstr2, 120);                      tmpstr, tmpstr2, 120);
88    
89                  if (machine->use_x11) {                  if (machine->x11_md.in_use) {
90                          if (strlen(machine->boot_string_argument) < 3) {                          if (strlen(machine->boot_string_argument) < 3) {
91                                  fatal("WARNING: remember to use  -o 'console="                                  fatal("WARNING: remember to use  -o 'console="
92                                      "tty0'  if you are emulating Linux. (Not"                                      "tty0'  if you are emulating Linux. (Not"
# Line 139  MACHINE_SETUP(evbmips) Line 141  MACHINE_SETUP(evbmips)
141          cpu->cd.mips.gpr[MIPS_GPR_A3] = machine->physical_ram_in_mb * 1048576;          cpu->cd.mips.gpr[MIPS_GPR_A3] = machine->physical_ram_in_mb * 1048576;
142          /*  Hm. Linux ignores a3.  */          /*  Hm. Linux ignores a3.  */
143    
144          /*          /*  Set the Core ID. See maltareg.h for more info.  */
          *  TODO:  
          *      Core ID numbers.  
          *      How much of this is not valid for PBxxxx?  
          *  
          *  See maltareg.h for more info.  
          */  
145          store_32bit_word(cpu, (int32_t)(0x80000000 + MALTA_REVISION),          store_32bit_word(cpu, (int32_t)(0x80000000 + MALTA_REVISION),
146              (1 << 10) + 0x26);              (1 << 10) + 0x26);
147    
# Line 167  MACHINE_DEFAULT_CPU(evbmips) Line 163  MACHINE_DEFAULT_CPU(evbmips)
163    
164          case MACHINE_EVBMIPS_MALTA:          case MACHINE_EVBMIPS_MALTA:
165          case MACHINE_EVBMIPS_MALTA_BE:          case MACHINE_EVBMIPS_MALTA_BE:
166                    /*  5Kc = MIPS64 rev 1, 5KE = MIPS64 rev 2  */
167                  machine->cpu_name = strdup("5Kc");                  machine->cpu_name = strdup("5Kc");
168                  break;                  break;
169    
# Line 178  MACHINE_DEFAULT_CPU(evbmips) Line 175  MACHINE_DEFAULT_CPU(evbmips)
175    
176  MACHINE_DEFAULT_RAM(evbmips)  MACHINE_DEFAULT_RAM(evbmips)
177  {  {
178          /*  MeshCube is always (?) 64 MB, and the others work fine          machine->physical_ram_in_mb = 128;
             with 64 MB too.  */  
         machine->physical_ram_in_mb = 64;  
179  }  }
180    
181    

Legend:
Removed from v.38  
changed lines
  Added in v.44

  ViewVC Help
Powered by ViewVC 1.1.26