]> Zhao Yanbai Git Server - kernel.git/commitdiff
wording modify
authorAceVest <zhaoyanbai@126.com>
Fri, 1 Aug 2014 12:49:01 +0000 (20:49 +0800)
committerAceVest <zhaoyanbai@126.com>
Fri, 1 Aug 2014 12:49:01 +0000 (20:49 +0800)
16 files changed:
bin/shell.c
boot/cmdline.c
drivers/ide.c
fs/ext2.c
include/page.h
include/system.h
kernel/clock.c
kernel/init.c
kernel/pci.c
kernel/setup.c
kernel/system.c
mm/buddy.c
mm/mm.c
mm/page.c
mm/slub.c
scripts/grub.cfg

index 295ea12077a8394b0fc8f10ac521bde64e4bcb13..2a05453b62744adb678a2a05c1d71cd3b8f52e5a 100644 (file)
@@ -18,7 +18,7 @@ int main()
 
     while(1)
     {
-        printf("shell#");
+        printf("shell# ");
         char cmd[256];
         read(0, cmd, 256);
 
index 2476d30d30e4e2d1d626278bad746ab01027411e..4dab58143c3b849f50431c236ee89515e0b1c0b3 100644 (file)
@@ -43,4 +43,7 @@ void parse_cmdline(const char *cmdline)
     assert(value[0]=='h' && value[1]=='d' && value[2] == 'a');
     system.root_dev = MAKE_DEV(DEV_MAJOR_HDA, atoi(value+3));
     printk("root device %08x\n", system.root_dev);
+
+    get_value("delay", value);
+    system.delay = atoi(value);
 }
index 4cf9976485096a2acf0603707f137d09f735448e..bd21d898972b5f9f1068cc2d6d80b74759b0a001 100644 (file)
@@ -222,8 +222,8 @@ void init_pci_controller(unsigned int classcode)
     pci_device_t *pci = pci_find_device_by_classcode(classcode);
     if(pci != 0 && pci->intr_line < 16)
     {
-        printk("Found PCI Vendor %04x Device %04x Class %04x IntrLine %d\n", pci->vendor, pci->device, pci->classcode, pci->intr_line);
-        printl(17, "Found PCI Vendor %04x Device %04x Class %04x IntrLine %d", pci->vendor, pci->device, pci->classcode, pci->intr_line);
+        printk("found pci vendor %04x device %04x class %04x intr %d\n", pci->vendor, pci->device, pci->classcode, pci->intr_line);
+        printl(17, "found pci vendor %04x device %04x class %04x intr %d", pci->vendor, pci->device, pci->classcode, pci->intr_line);
         ide_pci_init(pci);
         drv.pci = pci;
     }
@@ -413,12 +413,12 @@ void ide_read_extended_partition(u64_t lba, unsigned int inx)
         {
             drv.part[inx].lba_start  = part_lba;
             drv.part[inx].lba_end    = part_lba+part_scnt;
-            printk("  Logic Partition[%02d] [%02x] LbaBase %10d LbaEnd %10d\n", inx, p->type, (unsigned int)(drv.part[inx].lba_start), (unsigned int)(drv.part[inx].lba_end - 1));
+            printk("  logic partition[%02d] [%02x] LBA base %10d end %10d\n", inx, p->type, (unsigned int)(drv.part[inx].lba_start), (unsigned int)(drv.part[inx].lba_end - 1));
         }
         else
         {
             part_lba = drv.ext_lba_base + p->lba;
-            printk("        Extended      [%02x] LbaBase %10d LbaEnd %10d\n", p->type, (unsigned int)(part_lba), (unsigned int)(part_lba+part_scnt - 1));
+            printk("        extended      [%02x] LBA base %10d end %10d\n", p->type, (unsigned int)(part_lba), (unsigned int)(part_lba+part_scnt - 1));
             ide_read_extended_partition(part_lba, inx+1);
         }
     }
@@ -428,7 +428,7 @@ void ide_read_extended_partition(u64_t lba, unsigned int inx)
 
 void ide_read_partition()
 {
-    printk("Reading Partitions....\n");
+    printk("reading partitions....\n");
     unsigned int i;
     char *buf = kmalloc(512, 0);
     if(buf == 0)
@@ -467,7 +467,7 @@ void ide_read_partition()
             }
         }
 
-        printk("Primary Partition[%02d] [%02x] LbaBase %10d LbaEnd %10d\n", i, p->type, (unsigned int)(part_lba), (unsigned int)(part_lba+part_scnt - 1));
+        printk("primary partition[%02d] [%02x] LBA base %10d end %10d\n", i, p->type, (unsigned int)(part_lba), (unsigned int)(part_lba+part_scnt - 1));
     }
 
     kfree(buf);
index 9bff1cff0a42cd0d3f57fc11f1efd5dd65f6060e..1d00ddcd6903e862505effd2eef29d23dca1aa45 100644 (file)
--- a/fs/ext2.c
+++ b/fs/ext2.c
@@ -272,7 +272,7 @@ void ext2_setup_fs()
     unsigned int i;
     for(i=0; i<gps; ++i)
     {
-        printk("  [%2u] inode table %u free blocks %u free inode %u used dir %u\n",
+        printd("  [%2u] inode table %u free blocks %u free inode %u used dir %u\n",
             i, ext2_gd(i)->bg_inode_table, ext2_gd(i)->bg_free_blocks_count, ext2_gd(i)->bg_free_inodes_count, ext2_gd(i)->bg_used_dirs_count);
     }
 
index 96cdec56a04094380e7b8c786ca3e419df0ab55f..0e94cec72f0f96818e38f5431823c09f284018a9 100644 (file)
@@ -66,7 +66,6 @@ typedef unsigned long pte_t;
 #define PFN_DW(addr)    ((addr) >> PAGE_SHIFT)
 
 #define MAX_ORDER       (11)
-#define MAX_OLD_ORDER   (11)
 
 #define LOAD_CR3(pde)   asm("movl %%edx, %%cr3"::"d"(va2pa(pde)))
 
index ac2b5fff5330f0f3d73e6a0199df5c073134e76d..adb24f6a9690ce28519ff35b41da5e98d337c70d 100644 (file)
@@ -218,10 +218,15 @@ typedef struct system
     const char *cmdline;
 
     u32 debug;
+
+    u32 delay;
 } System, *pSystem;
 
+
 extern    System system;
 
+void system_delay();
+
 #define pgmap system.page_map
 
 #endif
index 884e49e04058d76ff2f4ba9ab6732523a14de1ba..3c565d3fda53d9d557f0e027700f944c9733b26d 100644 (file)
@@ -25,5 +25,5 @@ void clk_handler(unsigned int irq, pt_regs_t * regs, void *dev_id)
     jiffies++;
 
     //printd("^");
-    printl(MPL_CLOCK, "clock:%d", jiffies);
+    printl(MPL_CLOCK, "clock irq:%d", jiffies);
 }
index 6ac3a7e90406b3f7d3a9dbae6ae7f8cb5499a8e1..5c8156e380bd52b50f76b37e8242c9626cee6128 100644 (file)
@@ -64,6 +64,7 @@ void root_task_entry()
 
     kernel_task(init_task_entry);
     kernel_task(user_task_entry);
+    kernel_task(init_task_entry);
 
 
     int cnt = 0;
index a42a6a92e972f3f2a3eb76849b17436d7b17efef..81113c4f5e3f9c1bdbba2471fd03dc09f0b95154 100644 (file)
@@ -65,8 +65,10 @@ void scan_pci_bus(int bus)
     u32 cmd;
     u32 v;
     int i;
-    printk("scanning PCI bus %d\n", bus);
+    printk("scanning pci bus %d\n", bus);
     
+    system_delay();
+
     for(dev=0; dev<32; dev++)
     {
         for(devfn =0; devfn<8; devfn++)
@@ -167,7 +169,7 @@ void dump_pci_dev()
     list_for_each(p, &pci_devs)
     {
         pci_device_t *pci = list_entry(p, pci_device_t, list);
-        printk("Vendor %04x Device %04x Class %04x Intr %02d ", pci->vendor, pci->device, pci->classcode, pci->intr_line);
+        printk("vendor %04x device %04x class %04x intr %02d ", pci->vendor, pci->device, pci->classcode, pci->intr_line);
         printk("%s\n", pci_get_info(pci->classcode, pci->progif));
         continue;
         switch(pci->hdr_type)
@@ -242,147 +244,148 @@ typedef struct pci_info {
     unsigned long code;
     unsigned int  flag;
     const char   *info;
+    const char   *detail;
 } pci_info_t;
 
 pci_info_t pci_info[] = {
-    { 0x000000, 0, "Any device except for VGA-Compatible devices" },
-    { 0x000100, 0, "VGA-Compatible Device" },
-    { 0x010000, 0, "SCSI Bus Controller" },
-    { 0x0101,   1, "IDE Controller" },
-    { 0x010200, 0, "Floppy Disk Controller" },
-    { 0x010300, 0, "IPI Bus Controller" },
-    { 0x010400, 0, "RAID Controller" },
-    { 0x010520, 0, "ATA Controller (Single DMA)" },
-    { 0x010530, 0, "ATA Controller (Chained DMA)" },
-    { 0x010600, 0, "Serial ATA (Vendor Specific Interface)" },
-    { 0x010601, 0, "Serial ATA (AHCI 1.0)" },
-    { 0x010700, 0, "Serial Attached SCSI (SAS)" },
-    { 0x018000, 0, "Other Mass Storage Controller" },
-    { 0x020000, 0, "Ethernet Controller" },
-    { 0x020100, 0, "Token Ring Controller" },
-    { 0x020200, 0, "FDDI Controller" },
-    { 0x020300, 0, "ATM Controller" },
-    { 0x020400, 0, "ISDN Controller" },
-    { 0x020500, 0, "WorldFip Controller" },
-    { 0x0206,   1, "PICMG 2.14 Multi Computing" },
-    { 0x028000, 0, "Other Network Controller" },
-    { 0x030000, 0, "VGA-Compatible Controller" },
-    { 0x030001, 0, "8512-Compatible Controller" },
-    { 0x030100, 0, "XGA Controller" },
-    { 0x030200, 0, "3D Controller (Not VGA-Compatible)" },
-    { 0x038000, 0, "Other Display Controller" },
-    { 0x040000, 0, "Video Device" },
-    { 0x040100, 0, "Audio Device" },
-    { 0x040200, 0, "Computer Telephony Device" },
-    { 0x048000, 0, "Other Multimedia Device" },
-    { 0x050000, 0, "RAM Controller" },
-    { 0x050100, 0, "Flash Controller" },
-    { 0x058000, 0, "Other Memory Controller" },
-    { 0x060000, 0, "Host Bridge" },
-    { 0x060100, 0, "ISA Bridge" },
-    { 0x060200, 0, "EISA Bridge" },
-    { 0x060300, 0, "MCA Bridge" },
-    { 0x060400, 0, "PCI-to-PCI Bridge" },
-    { 0x060401, 0, "PCI-to-PCI Bridge (Subtractive Decode)" },
-    { 0x060500, 0, "PCMCIA Bridge" },
-    { 0x060600, 0, "NuBus Bridge" },
-    { 0x060700, 0, "CardBus Bridge" },
-    { 0x0608,   1, "RACEway Bridge" },
-    { 0x060940, 0, "PCI-to-PCI Bridge (Semi-Transparent, Primary)" },
-    { 0x060980, 0, "PCI-to-PCI Bridge (Semi-Transparent, Secondary)" },
-    { 0x060A00, 0, "InfiniBrand-to-PCI Host Bridge" },
-    { 0x068000, 0, "Other Bridge Device" },
-    { 0x070000, 0, "Generic XT-Compatible Serial Controller" },
-    { 0x070001, 0, "16450-Compatible Serial Controller" },
-    { 0x070002, 0, "16550-Compatible Serial Controller" },
-    { 0x070003, 0, "16650-Compatible Serial Controller" },
-    { 0x070004, 0, "16750-Compatible Serial Controller" },
-    { 0x070005, 0, "16850-Compatible Serial Controller" },
-    { 0x070006, 0, "16950-Compatible Serial Controller" },
-    { 0x070100, 0, "Parallel Port" },
-    { 0x070101, 0, "Bi-Directional Parallel Port" },
-    { 0x070102, 0, "ECP 1.X Compliant Parallel Port" },
-    { 0x070103, 0, "IEEE 1284 Controller" },
-    { 0x0701FE, 0, "IEEE 1284 Target Device" },
-    { 0x070200, 0, "Multiport Serial Controller" },
-    { 0x070300, 0, "Generic Modem" },
-    { 0x070301, 0, "Hayes Compatible Modem (16450-Compatible Interface)" },
-    { 0x070302, 0, "Hayes Compatible Modem (16550-Compatible Interface)" },
-    { 0x070303, 0, "Hayes Compatible Modem (16650-Compatible Interface)" },
-    { 0x070304, 0, "Hayes Compatible Modem (16750-Compatible Interface)" },
-    { 0x070400, 0, "IEEE 488.1/2 (GPIB) Controller" },
-    { 0x070500, 0, "Smart Card" },
-    { 0x078000, 0, "Other Communications Device" },
-    { 0x080000, 0, "Generic 8259 PIC" },
-    { 0x080001, 0, "ISA PIC" },
-    { 0x080002, 0, "EISA PIC" },
-    { 0x080010, 0, "I/O APIC Interrupt Controller" },
-    { 0x080020, 0, "I/O(x) APIC Interrupt Controller" },
-    { 0x080100, 0, "Generic 8237 DMA Controller" },
-    { 0x080101, 0, "ISA DMA Controller" },
-    { 0x080102, 0, "EISA DMA Controller" },
-    { 0x080200, 0, "Generic 8254 System Timer" },
-    { 0x080201, 0, "ISA System Timer" },
-    { 0x080202, 0, "EISA System Timer" },
-    { 0x080300, 0, "Generic RTC Controller" },
-    { 0x080301, 0, "ISA RTC Controller" },
-    { 0x080400, 0, "Generic PCI Hot-Plug Controller" },
-    { 0x088000, 0, "Other System Peripheral" },
-    { 0x090000, 0, "Keyboard Controller" },
-    { 0x090100, 0, "Digitizer" },
-    { 0x090200, 0, "Mouse Controller" },
-    { 0x090300, 0, "Scanner Controller" },
-    { 0x090400, 0, "Gameport Controller (Generic)" },
-    { 0x090410, 0, "Gameport Contrlller (Legacy)" },
-    { 0x098000, 0, "Other Input Controller" },
-    { 0x0A0000, 0, "Generic Docking Station" },
-    { 0x0A8000, 0, "Other Docking Station" },
-    { 0x0B0000, 0, "386 Processor" },
-    { 0x0B0100, 0, "486 Processor" },
-    { 0x0B0200, 0, "Pentium Processor" },
-    { 0x0B1000, 0, "Alpha Processor" },
-    { 0x0B2000, 0, "PowerPC Processor" },
-    { 0x0B3000, 0, "MIPS Processor" },
-    { 0x0B4000, 0, "Co-Processor" },
-    { 0x0C0000, 0, "IEEE 1394 Controller (FireWire)" },
-    { 0x0C0010, 0, "IEEE 1394 Controller (1394 OpenHCI Spec)" },
-    { 0x0C0100, 0, "ACCESS.bus" },
-    { 0x0C0200, 0, "SSA" },
-    { 0x0C0300, 0, "USB (Universal Host Controller Spec)" },
-    { 0x0C0310, 0, "USB (Open Host Controller Spec" },
-    { 0x0C0320, 0, "USB2 Host Controller (Intel Enhanced Host Controller Interface)" },
-    { 0x0C0380, 0, "USB" },
-    { 0x0C03FE, 0, "USB (Not Host Controller)" },
-    { 0x0C0400, 0, "Fibre Channel" },
-    { 0x0C0500, 0, "SMBus" },
-    { 0x0C0600, 0, "InfiniBand" },
-    { 0x0C0700, 0, "IPMI SMIC Interface" },
-    { 0x0C0701, 0, "IPMI Kybd Controller Style Interface" },
-    { 0x0C0702, 0, "IPMI Block Transfer Interface" },
-    { 0x0C0800, 0, "SERCOS Interface Standard (IEC 61491)" },
-    { 0x0C0900, 0, "CANbus" },
-    { 0x0D0000, 0, "iRDA Compatible Controller" },
-    { 0x0D0100, 0, "Consumer IR Controller" },
-    { 0x0D1000, 0, "RF Controller" },
-    { 0x0D1100, 0, "Bluetooth Controller" },
-    { 0x0D1200, 0, "Broadband Controller" },
-    { 0x0D2000, 0, "Ethernet Controller (802.11a)" },
-    { 0x0D2100, 0, "Ethernet Controller (802.11b)" },
-    { 0x0D8000, 0, "Other Wireless Controller" },
-    { 0x0E00,   1, "I20 Architecture" },
-    { 0x0E0000, 0, "Message FIFO" },
-    { 0x0F0100, 0, "TV Controller" },
-    { 0x0F0200, 0, "Audio Controller" },
-    { 0x0F0300, 0, "Voice Controller" },
-    { 0x0F0400, 0, "Data Controller" },
-    { 0x100000, 0, "Network and Computing Encrpytion/Decryption" },
-    { 0x101000, 0, "Entertainment Encryption/Decryption" },
-    { 0x108000, 0, "Other Encryption/Decryption" },
-    { 0x110000, 0, "DPIO Modules" },
-    { 0x110100, 0, "Performance Counters" },
-    { 0x111000, 0, "Communications Syncrhonization Plus Time and Frequency Test/Measurment" },
-    { 0x112000, 0, "Management Card" },
-    { 0x118000, 0, "Other Data Acquisition/Signal Processing Controller" },
+    { 0x000000, 0, "VGA-Compatible devices", "Any device except for VGA-Compatible devices" },
+    { 0x000100, 0, "VGA-Compatible device", "VGA-Compatible Device" },
+    { 0x010000, 0, "SCSI Bus Controller", "SCSI Bus Controller" },
+    { 0x0101,   1, "IDE Controller", "IDE Controller" },
+    { 0x010200, 0, "Floppy Disk Controller", "Floppy Disk Controller" },
+    { 0x010300, 0, "IPI Bus Controller", "IPI Bus Controller" },
+    { 0x010400, 0, "RAID Controller", "RAID Controller" },
+    { 0x010520, 0, "ATA Controller", "ATA Controller (Single DMA)" },
+    { 0x010530, 0, "ATA Controller", "ATA Controller (Chained DMA)" },
+    { 0x010600, 0, "Serial ATA", "Serial ATA (Vendor Specific Interface)" },
+    { 0x010601, 0, "Serial ATA", "Serial ATA (AHCI 1.0)" },
+    { 0x010700, 0, "SCSI", "Serial Attached SCSI (SAS)" },
+    { 0x018000, 0, "Storage Controller", "Other Mass Storage Controller" },
+    { 0x020000, 0, "Ethernet Controller", "Ethernet Controller" },
+    { 0x020100, 0, "Token Ring Controller", "Token Ring Controller" },
+    { 0x020200, 0, "FDDI Controller", "FDDI Controller" },
+    { 0x020300, 0, "ATM Controller", "ATM Controller" },
+    { 0x020400, 0, "ISDN Controller", "ISDN Controller" },
+    { 0x020500, 0, "WorldFip Controller", "WorldFip Controller" },
+    { 0x0206,   1, "PICMG 2.14", "PICMG 2.14 Multi Computing" },
+    { 0x028000, 0, "Network Controller", "Other Network Controller" },
+    { 0x030000, 0, "VGA-Compatible Controller", "VGA-Compatible Controller" },
+    { 0x030001, 0, "8512-Compatible Controller", "8512-Compatible Controller" },
+    { 0x030100, 0, "XGA Controller", "XGA Controller" },
+    { 0x030200, 0, "3D Controller (Not VGA-Compatible)", "3D Controller (Not VGA-Compatible)" },
+    { 0x038000, 0, "Display Controller", "Other Display Controller" },
+    { 0x040000, 0, "Video Device", "Video Device" },
+    { 0x040100, 0, "Audio Device", "Audio Device" },
+    { 0x040200, 0, "Computer Telephony Device", "Computer Telephony Device" },
+    { 0x048000, 0, "Other Multimedia Device", "Other Multimedia Device" },
+    { 0x050000, 0, "RAM Controller", "RAM Controller" },
+    { 0x050100, 0, "Flash Controller", "Flash Controller" },
+    { 0x058000, 0, "Memory Controller", "Other Memory Controller" },
+    { 0x060000, 0, "Host Bridge", "Host Bridge" },
+    { 0x060100, 0, "ISA Bridge", "ISA Bridge" },
+    { 0x060200, 0, "EISA Bridge", "EISA Bridge" },
+    { 0x060300, 0, "MCA Bridge", "MCA Bridge" },
+    { 0x060400, 0, "PCI-to-PCI Bridge", "PCI-to-PCI Bridge" },
+    { 0x060401, 0, "PCI-to-PCI Bridge", "PCI-to-PCI Bridge (Subtractive Decode)" },
+    { 0x060500, 0, "PCMCIA Bridge", "PCMCIA Bridge" },
+    { 0x060600, 0, "NuBus Bridge", "NuBus Bridge" },
+    { 0x060700, 0, "CardBus Bridge", "CardBus Bridge" },
+    { 0x0608,   1, "RACEway Bridge", "RACEway Bridge" },
+    { 0x060940, 0, "PCI-to-PCI Bridge", "PCI-to-PCI Bridge (Semi-Transparent, Primary)" },
+    { 0x060980, 0, "PCI-to-PCI Bridge", "PCI-to-PCI Bridge (Semi-Transparent, Secondary)" },
+    { 0x060A00, 0, "InfiniBrand-to-PCI Host Bridge", "InfiniBrand-to-PCI Host Bridge" },
+    { 0x068000, 0, "Bridge Device", "Other Bridge Device" },
+    { 0x070000, 0, "Serial Controller", "Generic XT-Compatible Serial Controller" },
+    { 0x070001, 0, "Serial Controller", "16450-Compatible Serial Controller" },
+    { 0x070002, 0, "Serial Controller", "16550-Compatible Serial Controller" },
+    { 0x070003, 0, "Serial Controller", "16650-Compatible Serial Controller" },
+    { 0x070004, 0, "Serial Controller", "16750-Compatible Serial Controller" },
+    { 0x070005, 0, "Serial Controller", "16850-Compatible Serial Controller" },
+    { 0x070006, 0, "Serial Controller", "16950-Compatible Serial Controller" },
+    { 0x070100, 0, "Parallel Port", "Parallel Port" },
+    { 0x070101, 0, "Parallel Port", "Bi-Directional Parallel Port" },
+    { 0x070102, 0, "X Parallel Port", "ECP 1.X Compliant Parallel Port" },
+    { 0x070103, 0, "IEEE 1284 Controller", "IEEE 1284 Controller" },
+    { 0x0701FE, 0, "IEEE 1284 Target Device", "IEEE 1284 Target Device" },
+    { 0x070200, 0, "Serial Controller", "Multiport Serial Controller" },
+    { 0x070300, 0, "Generic Modem", "Generic Modem" },
+    { 0x070301, 0, "Hayes Compatible Modem", "Hayes Compatible Modem (16450-Compatible Interface)" },
+    { 0x070302, 0, "Hayes Compatible Modem", "Hayes Compatible Modem (16550-Compatible Interface)" },
+    { 0x070303, 0, "Hayes Compatible Modem", "Hayes Compatible Modem (16650-Compatible Interface)" },
+    { 0x070304, 0, "Hayes Compatible Modem", "Hayes Compatible Modem (16750-Compatible Interface)" },
+    { 0x070400, 0, "IEEE 488.1/2 Controller", "IEEE 488.1/2 (GPIB) Controller" },
+    { 0x070500, 0, "Smart Card", "Smart Card" },
+    { 0x078000, 0, "Communications Device", "Other Communications Device" },
+    { 0x080000, 0, "Generic 8259 PIC", "Generic 8259 PIC" },
+    { 0x080001, 0, "ISA PIC", "ISA PIC" },
+    { 0x080002, 0, "EISA PIC", "EISA PIC" },
+    { 0x080010, 0, "APIC Interrupt Controller", "I/O APIC Interrupt Controller" },
+    { 0x080020, 0, "APIC Interrupt Controller", "I/O(x) APIC Interrupt Controller" },
+    { 0x080100, 0, "8237 DMA Controller", "Generic 8237 DMA Controller" },
+    { 0x080101, 0, "ISA DMA Controller", "ISA DMA Controller" },
+    { 0x080102, 0, "EISA DMA Controller", "EISA DMA Controller" },
+    { 0x080200, 0, "8254 System Timer", "Generic 8254 System Timer" },
+    { 0x080201, 0, "ISA System Timer", "ISA System Timer" },
+    { 0x080202, 0, "EISA System Timer", "EISA System Timer" },
+    { 0x080300, 0, "Generic RTC Controller", "Generic RTC Controller" },
+    { 0x080301, 0, "ISA RTC Controller", "ISA RTC Controller" },
+    { 0x080400, 0, "Generic PCI Hot-Plug Controller", "Generic PCI Hot-Plug Controller" },
+    { 0x088000, 0, "Other System Peripheral", "Other System Peripheral" },
+    { 0x090000, 0, "Keyboard Controller", "Keyboard Controller" },
+    { 0x090100, 0, "Digitizer", "Digitizer" },
+    { 0x090200, 0, "Mouse Controller", "Mouse Controller" },
+    { 0x090300, 0, "Scanner Controller", "Scanner Controller" },
+    { 0x090400, 0, "Gameport Controller (Generic)", "Gameport Controller (Generic)" },
+    { 0x090410, 0, "Gameport Contrlller (Legacy)", "Gameport Contrlller (Legacy)" },
+    { 0x098000, 0, "Other Input Controller", "Other Input Controller" },
+    { 0x0A0000, 0, "Generic Docking Station", "Generic Docking Station" },
+    { 0x0A8000, 0, "Other Docking Station", "Other Docking Station" },
+    { 0x0B0000, 0, "386 Processor", "386 Processor" },
+    { 0x0B0100, 0, "486 Processor", "486 Processor" },
+    { 0x0B0200, 0, "Pentium Processor", "Pentium Processor" },
+    { 0x0B1000, 0, "Alpha Processor", "Alpha Processor" },
+    { 0x0B2000, 0, "PowerPC Processor", "PowerPC Processor" },
+    { 0x0B3000, 0, "MIPS Processor", "MIPS Processor" },
+    { 0x0B4000, 0, "Co-Processor", "Co-Processor" },
+    { 0x0C0000, 0, "IEEE 1394 Controller", "IEEE 1394 Controller (FireWire)" },
+    { 0x0C0010, 0, "IEEE 1394 Controller", "IEEE 1394 Controller (1394 OpenHCI Spec)" },
+    { 0x0C0100, 0, "ACCESS.bus", "ACCESS.bus" },
+    { 0x0C0200, 0, "SSA", "SSA" },
+    { 0x0C0300, 0, "USB", "USB (Universal Host Controller Spec)" },
+    { 0x0C0310, 0, "USB", "USB (Open Host Controller Spec" },
+    { 0x0C0320, 0, "USB2 Host Controller", "USB2 Host Controller (Intel Enhanced Host Controller Interface)" },
+    { 0x0C0380, 0, "USB", "USB" },
+    { 0x0C03FE, 0, "USB", "USB (Not Host Controller)" },
+    { 0x0C0400, 0, "Fibre Channel", "Fibre Channel" },
+    { 0x0C0500, 0, "SMBus", "SMBus" },
+    { 0x0C0600, 0, "InfiniBand", "InfiniBand" },
+    { 0x0C0700, 0, "IPMI SMIC Interface", "IPMI SMIC Interface" },
+    { 0x0C0701, 0, "IPMI Kybd Interface", "IPMI Kybd Controller Style Interface" },
+    { 0x0C0702, 0, "IPMI Block Interface", "IPMI Block Transfer Interface" },
+    { 0x0C0800, 0, "SERCOS Interface", "SERCOS Interface Standard (IEC 61491)" },
+    { 0x0C0900, 0, "CANbus", "CANbus" },
+    { 0x0D0000, 0, "iRDA Controller", "iRDA Compatible Controller" },
+    { 0x0D0100, 0, "IR Controller", "Consumer IR Controller" },
+    { 0x0D1000, 0, "RF Controller", "RF Controller" },
+    { 0x0D1100, 0, "Bluetooth Controller", "Bluetooth Controller" },
+    { 0x0D1200, 0, "Broadband Controller", "Broadband Controller" },
+    { 0x0D2000, 0, "Ethernet Controller (802.11a)", "Ethernet Controller (802.11a)" },
+    { 0x0D2100, 0, "Ethernet Controller (802.11b)", "Ethernet Controller (802.11b)" },
+    { 0x0D8000, 0, "Wireless Controller", "Other Wireless Controller" },
+    { 0x0E00,   1, "I20 Architecture", "I20 Architecture" },
+    { 0x0E0000, 0, "Message FIFO", "Message FIFO" },
+    { 0x0F0100, 0, "TV Controller", "TV Controller" },
+    { 0x0F0200, 0, "Audio Controller", "Audio Controller" },
+    { 0x0F0300, 0, "Voice Controller", "Voice Controller" },
+    { 0x0F0400, 0, "Data Controller", "Data Controller" },
+    { 0x100000, 0, "Computing Encrpytion/Decryption", "Network and Computing Encrpytion/Decryption" },
+    { 0x101000, 0, "Entertainment Encryption/Decryption", "Entertainment Encryption/Decryption" },
+    { 0x108000, 0, "Other Encryption/Decryption", "Other Encryption/Decryption" },
+    { 0x110000, 0, "DPIO Modules", "DPIO Modules" },
+    { 0x110100, 0, "Performance Counters", "Performance Counters" },
+    { 0x111000, 0, "Communications Syncrhonization Plus Time and Frequency Test/Measurment", "Communications Syncrhonization Plus Time and Frequency Test/Measurment" },
+    { 0x112000, 0, "Management Card", "Management Card" },
+    { 0x118000, 0, "Acquisition/Signal Processing Controller", "Other Data Acquisition/Signal Processing Controller" },
     { 0x000000, 0, 0 }
 };
 
index f932631869d1ab46054bdaa93faed82d3e3167c9..d7bbf11a5ac532618d3ab5e9018f60990ab190c3 100644 (file)
@@ -50,9 +50,9 @@ void setup_i8253()
 const char *version = 
     "Kernel version "
     VERSION
-    " ["__DATE__ " " __TIME__ "]"
     " @ "
     BUIDER
+    " ["__DATE__ " " __TIME__ "]"
     "\n";
 
 void setup_kernel()
@@ -74,6 +74,7 @@ void setup_kernel()
 
     set_tss();
 
+
     setup_sysc();
 
     cnsl_init();
@@ -87,15 +88,18 @@ void setup_kernel()
     //switch_printk_screen();
     setup_pci();
     //switch_printk_screen();
+    system_delay();
     void ide_init();
     ide_init();
 
+    system_delay();
+
     detect_cpu();
 
     setup_fs();
 
-    vga_puts(0, version, 0x2F);
+    //vga_puts(0, version, 0x2F);
+    printk(version);
 
     switch_printk_screen();
 }
-
index 26a93909bfc35ec918201b366c8722eac5102b31..7035db0edf3d65bcde7c74a529249a6587e31311 100644 (file)
@@ -174,4 +174,16 @@ int sysc_reboot(int mode)
     return 0;
 }
 
-
+void system_delay()
+{
+    unsigned long flags;
+    irq_save(flags);
+    unsigned int n = system.delay;
+    while(n--)
+    {
+        unsigned long cr0;
+        asm("movl %%cr0, %%eax;":"=a"(cr0));
+        asm("movl %%eax, %%cr0;"::"a"(cr0));
+    }
+    irq_restore(flags);
+}
index 0b8e767ce063c13f1ca17ee5a3ac53b5c54a8234..092f2ae6d7d2dcbae886068df13c83391274496b 100644 (file)
@@ -261,5 +261,5 @@ void init_buddy_system()
     // free bootmem bitmap pages to buddy system
     // ...
 
-    dump_buddy_system();
+    //dump_buddy_system();
 }
diff --git a/mm/mm.c b/mm/mm.c
index 8c50ba1fac0bd448a5f3ff40923d37ab160460f3..26e6d56b2069b20b4ed391485f6298f9a1dbc0cf 100644 (file)
--- a/mm/mm.c
+++ b/mm/mm.c
@@ -61,7 +61,7 @@ void e820_print_map()
     {
         struct e820_entry *p = boot_params.e820map.map + i;
 
-        printk("[%02d] 0x%08x - 0x%08x size %- 10d %8dKB %5dMB ", i, p->addr, p->addr + p->size, p->size, p->size>>10, p->size>>20);
+        printk("[%02d] 0x%08x - 0x%08x size %- 10d %8dKB %5dMB ", i, p->addr, p->addr + p->size - 1, p->size, p->size>>10, p->size>>20);
 
         e820_print_type(p->type);
 
@@ -308,8 +308,6 @@ extern void sysexit();
 
 void init_paging()
 {
-    printk("max_pfn %u", bootmem_data.max_pfn);
-    //while(1);
     unsigned int i;
     unsigned long pfn = 0;
     pte_t *pte = 0;
@@ -353,8 +351,10 @@ void init_mm()
     init_bootmem();
     printk("init global paging...\n");
     init_paging();
+
     printk("init buddy system...\n");
     init_buddy_system();
+
     printk("init slub system...\n");
     init_slub_system();
     printk("memory init finished...\n");
index 0f6f8770148c9cffec02fef0a4025be7e52ce5de..b228a325d30ccd91ba45bf1e7a660c18b5eb8211 100644 (file)
--- a/mm/page.c
+++ b/mm/page.c
@@ -19,7 +19,6 @@
 
 void do_no_page(void *addr)
 {
-    //printk("%s   addr %08x current %08x", __func__, (unsigned long)addr, current);
     pde_t *page_dir = (pde_t *)current->cr3;
     pte_t *page_tbl = 0;
 
@@ -60,13 +59,9 @@ void do_wp_page(void *addr)
     pde_t *page_dir = (pde_t *)current->cr3;
     pte_t *page_tbl = pa2va(PAGE_ALIGN(page_dir[npde]));
 
-    //printk("%s   addr %08x dirent %08x\n", __func__, (unsigned long)addr, page_dir[npde]);
-    //assert(page_dir[npde] != 0);
-
     unsigned long wp_pa_addr = PAGE_ALIGN(page_tbl[npte]);
    
     page_t *page = pa2page(wp_pa_addr);
-    //printk("page count %u\n", page->count);
     if(page->count > 0)
     {
         page->count --;
index 560f290fdebbf85de17642c2b4a6bbb5b0429b1a..820ce8eabb1a26f63149815fbfaca26b0f6b3d34 100644 (file)
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -320,7 +320,7 @@ void init_slub_system()
         kmem_cache_init(cache, "kmalloc_old", 1UL<<i, KMALLOC_MIN_ALIGN);
 
         list_add(&(cache->list), &slub_caches);
-        printk("kmem objsize %d\tsize %d \n", cache->objsize, cache->size);
+        //printk("kmem objsize %d\tsize %d \n", cache->objsize, cache->size);
     }
 
 #if 0
index 536311e7587af33a7c727dd91ede6f592bd9f200..26f771f5a9a93ea1d4435b78a548cb1ae8020295 100644 (file)
@@ -8,5 +8,5 @@ insmod ext2
 root=(hd0,msdos1)
 
 menuentry 'Kernel' --class os {
-    multiboot /boot/Kernel root=hda0
+    multiboot /boot/Kernel root=hda0 delay=20000000
 }