From: Joshua Wise Date: Sun, 21 Sep 2008 07:10:44 +0000 (-0400) Subject: Remove the 'first' stuff. Rename the entry point to smi_entry. X-Git-Url: http://git.joshuawise.com/netwatch.git/commitdiff_plain/d71d98729a8da95c6ac901db1e8b23eaab48a34d?ds=inline;hp=-c Remove the 'first' stuff. Rename the entry point to smi_entry. --- d71d98729a8da95c6ac901db1e8b23eaab48a34d diff --git a/aseg/aseg.lds b/aseg/aseg.lds index 2905027..e969a54 100644 --- a/aseg/aseg.lds +++ b/aseg/aseg.lds @@ -9,7 +9,7 @@ SECTIONS LONG(_stacktop); LONG(_bss); LONG(_bssend - _bss); - LONG(__start); + LONG(smi_entry); *(.text); *(.data); *(.rodata); diff --git a/aseg/counter.c b/aseg/counter.c index 104d809..7602218 100644 --- a/aseg/counter.c +++ b/aseg/counter.c @@ -2,6 +2,7 @@ #include #include #include +#include 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) diff --git a/aseg/firstrun.c b/aseg/firstrun.c index ca892ea..a606d2b 100644 --- a/aseg/firstrun.c +++ b/aseg/firstrun.c @@ -1,21 +1,10 @@ #include #include #include +#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)); diff --git a/ich2/smi.c b/ich2/smi.c index 6ca00c9..08fcc64 100644 --- a/ich2/smi.c +++ b/ich2/smi.c @@ -26,3 +26,4 @@ unsigned long smi_status() unsigned short smi_sts = _get_PMBASE() + ICH2_PMBASE_SMI_STS; return inl(smi_sts); } +