From owner-freebsd-arch Mon Jul 17 6:25:23 2000 Delivered-To: freebsd-arch@freebsd.org Received: from ns1.sunesi.net (ns1.sunesi.net [196.15.192.194]) by hub.freebsd.org (Postfix) with ESMTP id 593D737B958 for ; Mon, 17 Jul 2000 06:25:16 -0700 (PDT) (envelope-from nbm@sunesi.net) Received: from nbm by ns1.sunesi.net with local (Exim 3.03 #1) id 13EAtW-0000eX-00 for arch@FreeBSD.org; Mon, 17 Jul 2000 15:25:14 +0200 Date: Mon, 17 Jul 2000 15:25:14 +0200 From: Neil Blakey-Milner To: arch@FreeBSD.org Subject: Conditionally removing cosmetic messages for small kernels (PICOBSD). Message-ID: <20000717152514.A2056@mithrandr.moria.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="WIyZ46R2i8wDzkSu" X-Mailer: Mutt 1.0.1i Organization: Sunesi Clinical Systems X-Operating-System: FreeBSD 3.3-RELEASE i386 X-URL: http://rucus.ru.ac.za/~nbm/ Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG --WIyZ46R2i8wDzkSu Content-Type: text/plain; charset=us-ascii Hi, While building a PicoBSD disk for work purposes, I noticed that pcisupport.c was the largest object file sitting there, at 43k. By removing (#ifndef PICOBSD, better names accepted) the cosmetic probe messages, I managed to reduce that to 23k easily enough, buying me a few more executables (and NTFS support, which was why I was building the disk). If I were to do/start the work on the rest of the system, would this be acceptable? Initial patch attached. (There seems to be "quirk" fixes mixed in with the cosmetic stuff, so the patches aren't as clean as they could be.) Neil -- Neil Blakey-Milner Sunesi Clinical Systems nbm@mithrandr.moria.org --WIyZ46R2i8wDzkSu Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="pcisupport.cosmetic.patch" Index: pcisupport.c =================================================================== RCS file: /home/ncvs/src/sys/pci/pcisupport.c,v retrieving revision 1.163 diff -u -r1.163 pcisupport.c --- pcisupport.c 2000/06/09 16:00:28 1.163 +++ pcisupport.c 2000/07/17 13:17:40 @@ -673,6 +673,7 @@ static const char* pcib_match(device_t dev) { +#ifndef PICOBSD switch (pci_get_devid(dev)) { /* Intel -- vendor 0x8086 */ case 0x71818086: @@ -733,6 +734,7 @@ case 0x88811060: return ("UMC UM8881 HB4 486 PCI Chipset"); }; +#endif if (pci_get_class(dev) == PCIC_BRIDGE && pci_get_subclass(dev) == PCIS_BRIDGE_PCI) @@ -832,6 +834,7 @@ { unsigned rev; +#ifndef PICOBSD switch (pci_get_devid(dev)) { case 0x04848086: rev = pci_get_revid(dev); @@ -903,6 +906,7 @@ && pci_get_subclass(dev) == PCIS_BRIDGE_ISA) return ("Cypress 82C693 PCI-ISA bridge"); } +#endif if (pci_get_class(dev) == PCIC_BRIDGE && pci_get_subclass(dev) == PCIS_BRIDGE_ISA) @@ -979,6 +983,7 @@ const char * pci_usb_match(device_t dev) { +#ifndef PICOBSD switch (pci_get_devid(dev)) { /* Intel -- vendor 0x8086 */ @@ -1015,6 +1020,7 @@ case 0x06731095: return ("CMD Tech 673 (USB0673) USB controller"); } +#endif if (pci_get_class(dev) == PCIC_SERIALBUS && pci_get_subclass(dev) == PCIS_SERIALBUS_USB) { @@ -1033,6 +1039,7 @@ pci_ata_match(device_t dev) { +#ifndef PICOBSD switch (pci_get_devid(dev)) { /* Intel -- vendor 0x8086 */ @@ -1093,6 +1100,7 @@ case 0xd5681045: return ("OPTi 82C700 (FireStar) ATA controller(generic mode):"); } +#endif if (pci_get_class(dev) == PCIC_STORAGE && pci_get_subclass(dev) == PCIS_STORAGE_IDE) @@ -1121,6 +1129,7 @@ case 0x12258086: fixbushigh_i1225(dev); return ("Intel 824?? host to PCI bridge"); +#ifndef PICOBSD case 0x71808086: return ("Intel 82443LX (440 LX) host to PCI bridge"); case 0x71908086: @@ -1160,9 +1169,11 @@ return ("Intel 82439TX System controller (MTXC)"); case 0x71138086: return ("Intel 82371AB Power management controller"); +#endif case 0x12378086: fixwsc_natoma(dev); return ("Intel 82440FX (Natoma) PCI and memory controller"); +#ifndef PICOBSD case 0x84c58086: return ("Intel 82453KX/GX (Orion) PCI memory controller"); case 0x71208086: @@ -1301,6 +1312,7 @@ case 0x002c1033: case 0x003b1033: return NULL; +#endif }; if (pci_get_class(dev) == PCIC_BRIDGE @@ -1328,6 +1340,7 @@ const char *vendor, *chip, *type; vendor = chip = type = 0; +#ifndef PICOBSD switch (id & 0xffff) { case 0x003d: vendor = "Real 3D"; @@ -1770,6 +1783,7 @@ sprintf(buf, "%s %s %s", vendor, chip, type); return buf; } +#endif switch (pci_get_class(dev)) { --WIyZ46R2i8wDzkSu-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message