In a soup pot or casserole cook the bacon over moderate heat, stirring occasionally, until it is golden. With a slotted spoon transfer to a plate lined with paper towel.
Pour off all but 2 tablespoons fat from the pan and add the onion, celery, carrot, garlic, thyme and rosemary and cook over moderate heat, covered, stirring occasionally, for 5 minutes. Add the chicken stock or broth and salt and pepper to taste, bring to a boil and simmer the soup, stirring occasionally, for 20 minutes. Add the beans and tomatoes and simmer, stirring occasionally, for 5 minutes. Stir in the pasta and simmer the soup, covered, for 10 minutes, or until pasta is al dente. Let stand off heat, covered, for 5 minutes.
Make the Pistou: In a small food processor or blender, combine garlic, basil, Parmesan and pepper and with machine running, add oil in a stream. Puree until well blended. Add salt to taste.
Ladle the soup into bowls and serve topped with the Pistou and accompanied by fontina and Parmesan toasts.