Drain one can of beans for later use.
Heat the olive oil in your soup pot. Put the onions and bacon pieces in the pot and sauté for about 5 minutes so the onions turn gold. Add the rosemary and garlic for 5 more minutes of sautéing.
Add the beans, including the one can drained and the two with their liquid, to the pot. Add both kinds of broth and the tomatoes to the pot and get it boiling.
Next, add the macaroni and some of the parmesan cheese. Boil until the pasta is softened. When you serve it, add more parmesan cheese on top.