clean up TSS initialization.

Now two complete tss structures exist within the per-cpu structure. Instead
of having to create a seperate area per each one, initialize them in place.
Also, the old mechanism to getting all of the cpus to get initialized was 
subtly broken, but still managed to work. Now, just force all the cpus to
initialize at boot, which makes the actual swapping of esp0 somewhat simpler.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20131 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Travis Geiselbrecht
2007-02-14 06:24:59 +00:00
parent ae473111b0
commit dfb5375d18
3 changed files with 24 additions and 77 deletions
+5 -1
View File
@@ -158,6 +158,7 @@ enum x86_vendors {
};
typedef struct arch_cpu_info {
// saved cpu info
enum x86_vendors vendor;
enum x86_feature_type feature[FEATURE_NUM];
char model_name[49];
@@ -167,6 +168,10 @@ typedef struct arch_cpu_info {
int stepping;
int model;
char feature_string[256];
// local TSS for this cpu
struct tss tss;
struct tss double_fault_tss;
} arch_cpu_info;
#ifdef __cplusplus
@@ -203,7 +208,6 @@ uint32 x86_count_mtrrs(void);
void x86_set_mtrr(uint32 index, uint64 base, uint64 length, uint8 type);
status_t x86_get_mtrr(uint32 index, uint64 *_base, uint64 *_length, uint8 *_type);
bool x86_check_feature(uint32 feature, enum x86_feature_type type);
struct tss *x86_get_main_tss(void);
#define read_cr3(value) \