diff -urN cromwell-shallax-orig/boot/BootResetAction.c cromwell-shallax/boot/BootResetAction.c --- cromwell-shallax-orig/boot/BootResetAction.c 2005-11-29 17:32:31.000000000 -0500 +++ cromwell-shallax/boot/BootResetAction.c 2005-12-19 21:08:13.000000000 -0500 @@ -117,30 +117,24 @@ VIDEO_CURSOR_POSY=vmode.ymargin; printk("\n\n"); + printk(" \2armitage\n\n\2"); if (cromwell_config==XROMWELL) { - printk(" \2Gentoox Loader (XBE) v" VERSION "\n\n\2"); + printk(" Cromwell (XBE) v" VERSION "\n\n"); } else if (cromwell_config==CROMWELL) { - printk(" \2Gentoox Loader (ROM) v" VERSION "\n\n\2"); + printk(" Cromwell (ROM) v" VERSION "\n\n"); } +#ifndef SILENT_MODE VIDEO_ATTR=0xff00ff00; - VIDEO_CURSOR_POSX=(vmode.xmargin/*+64*/)*4; - VIDEO_CURSOR_POSY=vmode.ymargin+64; - - - VIDEO_ATTR=0xff00ff00; - printk(" Gentoox"); - VIDEO_ATTR=0xffc8c8c8; - printk(" (c) ShALLaX - http://gentoox.shallax.com - "); - if (xbox_ram > 64) { VIDEO_ATTR=0xff00ff00; } else { VIDEO_ATTR=0xffffa20f; } printk("RAM: %d", xbox_ram); - printk("MiB\n"); + printk("MB\n"); +#endif VIDEO_CURSOR_POSX=(vmode.xmargin/*+64*/)*4; #ifndef SILENT_MODE diff -urN cromwell-shallax-orig/boot_rom/2bBootStartup.S cromwell-shallax/boot_rom/2bBootStartup.S --- cromwell-shallax-orig/boot_rom/2bBootStartup.S 2005-11-29 17:32:32.000000000 -0500 +++ cromwell-shallax/boot_rom/2bBootStartup.S 2005-11-29 17:32:32.000000000 -0500 @@ -48,13 +48,12 @@ #define SMBUS 0x0000c000 -#define SMB_xcode_Write(val1,val2); \ - xcode_outb(SMBUS+8, val1); \ - xcode_outb(SMBUS+6, val2); \ - xcode_outb(SMBUS+2, 0x0000000a); \ - xcode_inb(SMBUS); \ - xcode_ifgoto(0x00000010,-1); \ - xcode_outb(SMBUS, 0x00000010); +#define SMB_xcode_Write(val1,val2); xcode_outb(SMBUS+8, val1); \ + xcode_outb(SMBUS+6, val2); \ + xcode_outb(SMBUS+2, 0x0000000a); \ + xcode_inb(SMBUS); \ + xcode_ifgoto(0x00000010,-1); \ + xcode_outb(SMBUS, 0x00000010); .code32 @@ -88,7 +87,7 @@ .org 0x40 .long _start_checksum // This number will be overwritten - // With imagebld, but we need a temp value + // With imagebld, but we need a temp value .org 0x6c .long 0x00000107 @@ -97,13 +96,13 @@ .long 0x0000000f .long 0x40004400 -#ifndef MCPXREVD5 + #ifndef MCPXREVD5 .long 0x12d10070 .long 0x00000c90 -#else + #else .long 0x16ce0090 .long 0x00000dc0 -#endif + #endif //The bytecode interpreter begins here .org 0x80 @@ -154,7 +153,7 @@ xcode_poke_a(0x0f101000); xcode_poke(0x0f0010b8, 0xffff0000); - xcode_goto(5); + xcode_goto(5); xcode_peek(0x0f101000); xcode_bittoggle(0xe1f3ffff,0x820c0000); @@ -184,10 +183,10 @@ //VIDEO INIT CODE /* It is necessary to write to the video encoder, as the PIC - snoops the I2C traffic and will reset us if it doesn't see what - it judges as 'appropriate' traffic. Conexant is the most urgent, - as on 1.0 Xboxes, the PIC was very strict and reset us earlier - than later models + snoops the I2C traffic and will reset us if it doesn't see what + it judges as 'appropriate' traffic. Conexant is the most urgent, + as on 1.0 Xboxes, the PIC was very strict and reset us earlier + than later models */ //CONEXANT START @@ -233,7 +232,7 @@ xcode_outb(SMBUS+8, 0x0000000c); xcode_outb(SMBUS+6, 0x00000000); xcode_outb(SMBUS+2, 0x0000000a); - xcode_inb(SMBUS); + xcode_inb(SMBUS); xcode_ifgoto(0x00000010,2); //Write failed, forward 2 xcode_goto(4); //Success, skip to next focus write. xcode_bittoggle(0x00000008, 0x00000000); //Check fail status @@ -246,8 +245,8 @@ //XCALIBUR START /* We don't check to see if these writes fail, as - we've already tried Conexant and Focus - Oh dear, - not another encoder... :( + we've already tried Conexant and Focus - Oh dear, + not another encoder... :( */ //Clear the error from the previous attempts @@ -263,9 +262,9 @@ //VIDEND - Encoder 'init' complete. - // PIC SLAVE Address (Write) + // PIC SLAVE Address (Write) xcode_outb(SMBUS+4, 0x00000020); - // I2Ctransmit(0x20,0x1,0x0); + // I2Ctransmit(0x20,0x1,0x0); SMB_xcode_Write(0x01,0x00); // +6 // PIC SLAVE Address (Read) @@ -274,9 +273,10 @@ // I2Cgetbyte(0x8a,0x1); xcode_outb(SMBUS+8, 0x00000001); xcode_outb(SMBUS+2, 0x0000000a); - xcode_inb(SMBUS); - xcode_ifgoto(0x00000010,-1) - xcode_outb(SMBUS, 0x00000010); + xcode_inb(SMBUS); + xcode_ifgoto(0x00000010,-1) + xcode_outb(SMBUS, 0x00000010); + // If SMC version does not match ... ????? xcode_inb(SMBUS+6); @@ -287,7 +287,7 @@ xcode_poke(0x0f001228, 0x00000000); xcode_poke(0x0f001264, 0x00000000); - xcode_poke(0x0f001210, 0x00000010); + xcode_poke(0x0f001210, 0x00000000); xcode_peek(0x0f101000); xcode_bittoggle(0x06000000,0x00000000); @@ -325,7 +325,7 @@ xcode_poke(0x0f001250, 0x0000aa8b); xcode_poke(0x0f100228, 0x081205ff); - xcode_poke(0x0f001218, 0x00010000); + xcode_poke(0x0f001218, 0x00000000); xcode_pciin_a(0x80000860); xcode_bittoggle(0xffffffff,0x00000400); @@ -347,11 +347,12 @@ xcode_poke(0x0f100204, 0x11448000); xcode_pciout(0x8000103c, 0x00000000); + xcode_outb(SMBUS, 0x00000010); /* ---- Report Memory Size to PIC scratch register ---- */ - // We emulate Good memory result to PIC + // We emulate Good memory result to PIC //xcode_pciin_a(0x8000183c); //xcode_bittoggle(0x000000ff,0x00000000); @@ -373,18 +374,20 @@ xcode_poke(0x00000000, 0xfc1000ea); xcode_poke(0x00000004, 0x000008ff); - xcode_END(0x806); + xcode_END(0x806); // Note: never change this from offset 0x1000 .... // This is the Main Entry point .... - .org 0x1000 + .org 0x1000 - // Good Morning CPU + // Good Morning CPU // NOTE: - // We come here form the high rom section Jump + /* + We come here form the high rom section Jump + */ - // Clear Intel Interrupts in Processor Register + // Clear Intel Interrupts in Processor Register // Everytime very good, specially when comming out of a running envoronment movl $0x1b, %ecx @@ -401,7 +404,7 @@ // kill the cache = Disable bit 30 + 29 = CD + NW // CD = Cache Disable (disable = 1) // NW Not write through (disable = 1) - mov %cr0, %eax + mov %cr0, %eax orl $0x60000000, %eax mov %eax, %cr0 wbinvd @@ -416,75 +419,77 @@ xor %edx, %edx wrmsr - //We are setting the Ram Init's now to set up the Regions in the Ram +/* + We are setting the Ram Init's now to set up the Regions in the Ram +*/ // MTRR for RAM // from address 0, Writeback Caching, 128MB range - movl $0x200, %ecx + movl $0x200, %ecx movl $0x00000000, %edx movl $0x00000006, %eax // == WB_CACHE == 6 //movl $0x00000004, %eax // Temporary, as USB development wrmsr // MASK0 set to 0xf8000[000] == 128M - movl $0x201, %ecx + movl $0x201, %ecx movl $0x0000000f, %edx movl $0xf8000800, %eax wrmsr // MTRR for shadow RAM // from address 0xf0000000, Write-combining Caching, 128MB range - movl $0x202, %ecx + movl $0x202, %ecx movl $0x00000000, %edx movl $0xf0000001, %eax // Write-Combining == 1 wrmsr // MASK0 set to 0xf8000[000] == 128M - movl $0x203, %ecx + movl $0x203, %ecx movl $0x0000000f, %edx movl $0xf8000800, %eax wrmsr - // MTRR for FLASH + // MTRR for FLASH movl $0x204, %ecx movl $0x00000000, %edx movl $0xFff00000, %eax // We set to Uncacheable wrmsr - movl $0x205, %ecx + movl $0x205, %ecx movl $0x0000000f, %edx movl $0xfff00800, %eax wrmsr - xor %eax, %eax + xor %eax, %eax xor %edx, %edx movl $0x206, %ecx // IA32_MTRR_PHYS Base 3 - wrmsr + wrmsr movl $0x207, %ecx // IA32_MTRR_PHYS_MASK 3 - wrmsr + wrmsr movl $0x208, %ecx // IA32_MTRR_PHYS Base 4 - wrmsr + wrmsr movl $0x209, %ecx // IA32_MTRR_PHYS_MASK 4 - wrmsr + wrmsr movl $0x20a, %ecx // IA32_MTRR_PHYS Base 5 - wrmsr + wrmsr movl $0x20b, %ecx // IA32_MTRR_PHYS_MASK 5 - wrmsr + wrmsr movl $0x20c, %ecx // IA32_MTRR_PHYS Base 6 - wrmsr + wrmsr movl $0x20d, %ecx // IA32_MTRR_PHYS_MASK 6 - wrmsr + wrmsr movl $0x20e, %ecx // IA32_MTRR_PHYS Base 7 - wrmsr + wrmsr movl $0x20f, %ecx // IA32_MTRR_PHYS_MASK 7 - wrmsr + wrmsr // Define Memory in IA32_MTRR_DEF_TYPE @@ -502,7 +507,7 @@ andl $0x9FFFFFFF,%eax movl %eax, %cr0 - cld + cld // copy everything into RAM @@ -512,23 +517,24 @@ shr $2,%ecx // We dividy / 4, as we copy Dword oriented rep movsl - jmp initaftermemcpy + jmp initaftermemcpy - // We leave Flash at this point, we never come back to it anymore. - // the following ASM instructions below, already are linked to memory - // (look to the ldscript in this case) +/* + We leave Flash at this point, we never come back to it anymore. + the following ASM instructions below, already are linked to memory (look to the ldscript in this case) +*/ - .section .text, "ax" +.section .text, "ax" - // Note: We are in Memory here, not in Flash anylonger, - // we have been copy'd here and linked for memory, as we reside in section .text - // Look to LDscript + // Note: We are in Memory here, not in Flash anylonger, + // we have been copy'd here and linked for memory, as we reside in section .text + // Look to LDscript - .global MemoryChecksum +.global MemoryChecksum MemoryChecksum: // The SHA-1 Hashsum is dumped here after with ImageBLD - .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00 + .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00 .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,0x00, 0x00 .long _size_sha1hash .long 0x00 // Will be dumped in by imagebld ->compressed_image_start; @@ -559,21 +565,24 @@ .word 0x0 // fill Word, so we get alliged again initaftermemcpy: - // These Init Codes Can be found in the 2'nd Bootloader +/* + These Init Codes Can be found in the 2'nd Bootloader - // We set up a GDT now, this is not necessary needed, - // but it is preferred, as we have more ability with commands +*/ + // We set up a GDT now, this is not necessary needed, + // but it is preferred, as we have more ability with commands - // We clear the IDT in RAM - xor %eax,%eax + // We clear the IDT in RAM + xor %eax,%eax mov $0x5000,%ecx mov $0x400000,%edi rep stosb - lidt tableIdtDescriptor + lidt tableIdtDescriptor lgdt tableGdtDescriptor // set up selectors for everything + xor %eax, %eax lldt %ax @@ -581,8 +590,7 @@ .byte 0xEA // jmp far 0010:reload_cs .long reload_cs .word 0x0010 - .align 16 - +.align 16 reload_cs: // CS is now a valid entry in the GDT. Set SS, DS, and ES to valid @@ -612,6 +620,7 @@ movw $0xcfc, %dx movl $0x40000000, %eax outl %eax, %dx + // CPU Whoami ? sesless ? mov $0x80000080, %eax @@ -620,6 +629,8 @@ movw $0xcfc, %dx movl $0x100, %eax outl %eax, %dx + // this can be found in BootResetAction.c - jmp BootStartBiosLoader + jmp BootStartBiosLoader + diff -urN cromwell-shallax-orig/drivers/ide/BootIde.c cromwell-shallax/drivers/ide/BootIde.c --- cromwell-shallax-orig/drivers/ide/BootIde.c 2005-11-29 17:32:33.000000000 -0500 +++ cromwell-shallax/drivers/ide/BootIde.c 2005-12-19 19:51:07.000000000 -0500 @@ -552,8 +552,8 @@ //Cromwell locks drives in high security mode (NOT maximum security mode). //This means that even if you lose the normal (user) password, you can //unlock them again using the master password set below. - //Master password is GENTOOX (in ascii, NULL padded) - char *master_password="GENTOOX"; + //Master password is XBOXLINUX (in ascii, NULL padded) + char *master_password="XBOXLINUX"; //We first lock the drive with the master password //Just in case we ever need to unlock it in an emergency diff -urN cromwell-shallax-orig/include/config.h cromwell-shallax/include/config.h --- cromwell-shallax-orig/include/config.h 2005-11-29 17:32:37.000000000 -0500 +++ cromwell-shallax/include/config.h 2005-12-19 21:13:32.000000000 -0500 @@ -1,7 +1,7 @@ ////////////////////// compile-time options //////////////////////////////// -//Gentoox Loader version number -#define VERSION "5.11" +//Cromwell version number +#define VERSION "2.41-dev" // selects between the supported video modes, see boot.h for enum listing those available //#define VIDEO_PREFERRED_MODE VIDEO_MODE_800x600 @@ -14,7 +14,7 @@ #define ADVANCED_MENU //Time to wait in seconds before auto-selecting default item -#define BOOT_TIMEWAIT 5 +#define BOOT_TIMEWAIT 12 //Uncomment to make connected Xpads rumble briefly at init. //#define XPAD_VIBRA_STARTUP diff -urN cromwell-shallax-orig/lib/imagebld/imagebld.c cromwell-shallax/lib/imagebld/imagebld.c --- cromwell-shallax-orig/lib/imagebld/imagebld.c 2005-11-29 17:32:38.000000000 -0500 +++ cromwell-shallax/lib/imagebld/imagebld.c 2005-12-19 19:52:49.000000000 -0500 @@ -76,7 +76,7 @@ memcpy(BiosHeader->Magic,"AUTO",4); BiosHeader->HeaderVersion=1; BiosHeader->BiosSize= biosSize; - sprintf(BiosHeader->Name,"Gentoox Loader %s",VERSION); + sprintf(BiosHeader->Name,"Cromwell %s",VERSION); BiosHeader->XboxVersion = BiosID_Version10 | BiosID_Version11 | diff -urN cromwell-shallax-orig/lwip/dhcp.c cromwell-shallax/lwip/dhcp.c --- cromwell-shallax-orig/lwip/dhcp.c 2005-11-29 17:32:44.000000000 -0500 +++ cromwell-shallax/lwip/dhcp.c 2005-12-19 21:11:58.000000000 -0500 @@ -777,11 +777,12 @@ } LWIP_DEBUGF(DHCP_DEBUG | DBG_STATE, ("dhcp_bind(): IP: 0x%08lx\n", dhcp->offered_ip_addr.addr)); - printk ("%d.%d.%d.%d (DHCP)\n", + printk ("%d.%d.%d.%d netmask 0x%08lx (DHCP)\n", (dhcp->offered_ip_addr.addr & 0x000000ff) , (dhcp->offered_ip_addr.addr & 0x0000ff00) >> 8, (dhcp->offered_ip_addr.addr & 0x00ff0000) >> 16, - (dhcp->offered_ip_addr.addr & 0xff000000) >> 24); + (dhcp->offered_ip_addr.addr & 0xff000000) >> 24, + ntohl(sn_mask.addr)); netif_set_ipaddr(netif, &dhcp->offered_ip_addr); LWIP_DEBUGF(DHCP_DEBUG | DBG_STATE, ("dhcp_bind(): SN: 0x%08lx\n", sn_mask.addr)); netif_set_netmask(netif, &sn_mask); @@ -789,6 +790,7 @@ netif_set_gw(netif, &gw_addr); /* netif is now bound to DHCP leased address */ dhcp_set_state(dhcp, DHCP_BOUND); + printk ("Now, connect to that address with a web browser.\n"); } /** diff -urN cromwell-shallax-orig/lwip/ebd.c cromwell-shallax/lwip/ebd.c --- cromwell-shallax-orig/lwip/ebd.c 2005-11-29 17:32:44.000000000 -0500 +++ cromwell-shallax/lwip/ebd.c 2005-12-19 20:25:33.000000000 -0500 @@ -134,7 +134,7 @@ struct ip_addr ipaddr, netmask, gw; struct netif netif; busyLED(); - printk(" Initialising TCP/IP"); + printk(" Initializing TCP/IP"); dots(); mem_init(); memp_init(); @@ -172,7 +172,7 @@ if (!ebd_wait(&netif, TCP_TMR_INTERVAL)) { if (divisor++ == 60 * 4) { if (first && netif.dhcp->state != DHCP_BOUND) { - printk ("192.168.1.13 (DHCP failed)\n"); + printk ("192.168.1.13 (default burned-in address---you FAIL at dhcp)\n"); dhcp_stop (&netif); IP4_ADDR(&gw, 192,168,1,1); IP4_ADDR(&ipaddr, 192,168,1,13); diff -urN cromwell-shallax-orig/lwip/fail.html cromwell-shallax/lwip/fail.html --- cromwell-shallax-orig/lwip/fail.html 2005-11-29 17:32:44.000000000 -0500 +++ cromwell-shallax/lwip/fail.html 2005-12-19 19:55:50.000000000 -0500 @@ -1,7 +1,7 @@
-