diff options
author | Evan Lojewski <github@meklort.com> | 2019-06-22 18:01:29 -0600 |
---|---|---|
committer | Evan Lojewski <github@meklort.com> | 2019-06-22 18:01:29 -0600 |
commit | b4668768e1281ad943cc04deca0bd5feabd3b448 (patch) | |
tree | 56f6e0c72b4ad3ec0eed2095e3441b2432c8720a /simulator | |
parent | a8dbe49f6c799f213d68b013c7961c591e019f03 (diff) | |
download | bcm5719-ortega-b4668768e1281ad943cc04deca0bd5feabd3b448.tar.gz bcm5719-ortega-b4668768e1281ad943cc04deca0bd5feabd3b448.zip |
Add a simple printf implimentation to the APE firmware.
Diffstat (limited to 'simulator')
-rw-r--r-- | simulator/HAL.cpp | 7 | ||||
-rw-r--r-- | simulator/include/HAL.hpp | 3 |
2 files changed, 8 insertions, 2 deletions
diff --git a/simulator/HAL.cpp b/simulator/HAL.cpp index 800a440..90ca052 100644 --- a/simulator/HAL.cpp +++ b/simulator/HAL.cpp @@ -53,6 +53,9 @@ using namespace std; #define DEVICE_CONFIG "config" #define BAR_STR "resource" +uint8_t *gDEVICEBase; +uint8_t *gAPEBase; + typedef struct { uint16_t vendor_id; @@ -269,8 +272,8 @@ bool initHAL(const char *pci_path, int wanted_function) free(located_pci_path); } - uint8_t *DEVICEBase = (uint8_t *)bar[0]; - uint8_t *APEBase = (uint8_t *)bar[2]; + uint8_t *DEVICEBase = gDEVICEBase = (uint8_t *)bar[0]; + uint8_t *APEBase = gAPEBase = (uint8_t *)bar[2]; init_bcm5719_DEVICE(); init_bcm5719_DEVICE_sim(DEVICEBase); diff --git a/simulator/include/HAL.hpp b/simulator/include/HAL.hpp index 602c55b..198b782 100644 --- a/simulator/include/HAL.hpp +++ b/simulator/include/HAL.hpp @@ -51,4 +51,7 @@ bool is_supported(uint16_t vendor_id, uint16_t device_id); bool initHAL(const char* pci_path, int wanted_function = 0); +extern uint8_t *gDEVICEBase; +extern uint8_t *gAPEBase; + #endif /* HAL_H */
\ No newline at end of file |