]> Joshua Wise's Git repositories - netwatch.git/commitdiff
Remove the 'first' stuff. Rename the entry point to smi_entry.
authorJoshua Wise <joshua@rebirth.joshuawise.com>
Sun, 21 Sep 2008 07:10:44 +0000 (03:10 -0400)
committerJoshua Wise <joshua@rebirth.joshuawise.com>
Sun, 21 Sep 2008 07:10:44 +0000 (03:10 -0400)
aseg/aseg.lds
aseg/counter.c
aseg/firstrun.c
ich2/smi.c

index 290502701ab32ca594096835919134208b24a3c4..e969a547ff826d23c7cecf6b8d217e79555d5eaf 100644 (file)
@@ -9,7 +9,7 @@ SECTIONS
                LONG(_stacktop);
                LONG(_bss);
                LONG(_bssend - _bss);
-               LONG(__start);
+               LONG(smi_entry);
                *(.text);
                *(.data);
                *(.rodata);
index 104d809dbdac0a3d5a6ddbd30d587d5db09ffcdd..76022187d255736ec87a396eef2f9593a49296bf 100644 (file)
@@ -2,6 +2,7 @@
 #include <smram.h>
 #include <video_defines.h>
 #include <minilib.h>
+#include <smi.h>
 
 char thestr[512];
 
@@ -54,25 +55,15 @@ void pci_dump() {
        outl(0x840, 0x0100);
 }
 
-void __start (void)
+void smi_entry(void)
 {
-       static int first = 1;
-       
        pcisave = inl(0xCF8);
        vgasave = inb(0x3D4);
        
-       if (first)
-       {
-               first = 0;
-               dolog("NetWatch running...");
-       }
-
        counter++;
        outb(0x80, (counter & 0xFF));
        
-       strcpy(thestr, "15-412! xxxxxxxx xxxxxxxx");
-       tohex(thestr + 8, inl(0x0834));
-       tohex(thestr + 17, counter);
+       sprintf(thestr, "15-412! %08x %08x", smi_status(), counter);
        strblit(thestr, 0, 0);
        
        if (inl(0x834) & 0x20)
index ca892ea0b3dd9b487973e157cd7426b475dc1c6b..a606d2bd2b97d9c43337ecbaa43d527d9b4d3133 100644 (file)
@@ -1,21 +1,10 @@
 #include <io.h>
 #include <smi.h>
 #include <pci.h>
+#include "vga-overlay.h"
 
 void __firstrun_start() {
-/*
-       puts("Current USB state is: ");
-       puthex(pci_read16(0, 31, 2, 0xC0));
-       puts(" ");
-       puthex(pci_read16(0, 31, 4, 0xC0));
-       puts("\n");
-       puts("Current SMI state is: ");
-       puthex(inl(0x830));
-       puts("\n");
-       puts("Current SMRAMC state is: ");
-       puthex(pci_read8(0, 0, 0, 0x70));
-       puts("\n");
-*/
+       dologf("NetWatch running");
 
        /* Try really hard to shut up USB_LEGKEY. */
        pci_write16(0, 31, 2, 0xC0, pci_read16(0, 31, 2, 0xC0));
index 6ca00c94618c30490006a6197455a78ff2951d35..08fcc64d4263d38713a37db79675d9d4ad2b7e4d 100644 (file)
@@ -26,3 +26,4 @@ unsigned long smi_status()
        unsigned short smi_sts = _get_PMBASE() + ICH2_PMBASE_SMI_STS;
        return inl(smi_sts);
 }
+
This page took 0.029423 seconds and 4 git commands to generate.