Add a helper function to determine the number of enabled CPUs
[coreboot.git] / src / include / device / device.h
index 5ab7748999408321c788880ce4a36b0b4968e228..0aea1d6087ee3a3ec2be198719432fc6c5b75767 100644 (file)
@@ -16,6 +16,9 @@ struct smbus_bus_operations;
 struct chip_operations {
        void (*enable_dev)(struct device *dev);
        const char *name;
+#if CONFIG_GENERATE_SMBIOS_TABLES
+       int (*get_smbios_data)(device_t dev, int *handle, unsigned long *current);
+#endif
 };
 
 #define CHIP_NAME(X) .name = X,
@@ -31,6 +34,9 @@ struct device_operations {
        void (*enable)(device_t dev);
        void (*set_link)(device_t dev, unsigned int link);
        void (*reset_bus)(struct bus *bus);
+#if CONFIG_GENERATE_SMBIOS_TABLES
+       int (*get_smbios_data)(device_t dev, int *handle, unsigned long *current);
+#endif
        const struct pci_operations *ops_pci;
        const struct smbus_bus_operations *ops_smbus_bus;
        const struct pci_bus_operations *ops_pci_bus;
@@ -64,8 +70,8 @@ struct device {
        struct device_path path;
        unsigned        vendor;
        unsigned        device;
-       u16 subsystem_vendor;
-       u16  subsystem_device;
+       u16             subsystem_vendor;
+       u16             subsystem_device;
        unsigned int    class;          /* 3 bytes: (base, sub, prog-if) */
        unsigned int    hdr_type;       /* PCI header type */
        unsigned int    enabled : 1;    /* set if we should enable the device */
@@ -126,6 +132,8 @@ device_t dev_find_device (u16 vendor, u16 device, device_t from);
 device_t dev_find_class (unsigned int class, device_t from);
 device_t dev_find_slot (unsigned int bus, unsigned int devfn);
 device_t dev_find_slot_on_smbus (unsigned int bus, unsigned int addr);
+device_t dev_find_lapic(unsigned apic_id);
+int dev_count_cpu(void);
 
 /* Debug functions */
 void print_resource_tree(struct device * root, int debug_level,